How to listen to keyboard events in a console application

前端 未结 1 334
花落未央
花落未央 2021-01-21 06:17

Now, I\'m developing a command-line application somewhat like bash. For implementing the autocomplete functionality, I must know users have pressed Tab key. But i don\'t know ho

相关标签:
1条回答
  • 2021-01-21 06:42

    This is slightly more complicated than it looks.

    Maybe you should have a look at the jline project that handles everything for you.

    0 讨论(0)
提交回复
热议问题