3

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 how to listen to keyboard events in a console application.

any ideas? Thanks in advance.

Alanmars
  • 1,267
  • 1
  • 11
  • 21

1 Answers1

1

This is slightly more complicated than it looks.

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

Nicolas Modrzyk
  • 13,961
  • 2
  • 36
  • 40