Answer the question
In order to leave comments, you need to log in
How to implement key tapping in a console application?
Hello, the task arose to implement in a console application (without gui) in Java for windows a keystroke listener and events for it.
The meaning of the task is that after launching the console application, if the user presses Esc, the application will exit.
I googled but didn't find a way to implement this (at least without a gui). Apparently we need a native lib under win.
Maybe someone faced a similar problem?
PS. it is necessary to catch pressing Esc, not Enter and so on.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question