In Java, what is the best way to capture a keystroke?

前端 未结 3 1134
生来不讨喜
生来不讨喜 2020-12-21 05:13

I\'m having trouble capturing the keystroke in my Java command-line application. Using System.in.read() I don\'t seem to get anything when hitting the tab key. W

3条回答
  •  死守一世寂寞
    2020-12-21 05:58

    I would guess that your shell is capturing tab and preventing it from getting to your application. There may not be anything you can do about this...

提交回复
热议问题