Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Java console app must catch keyboard input without pressing the 'Enter' key.
How to implement key listener for Java console app?
Posted
Comments
Suvendu Shekhar Giri 28-Nov-15 0:17am    
What have you tried so far?
Check following links-
How to use KeyListener[^]
How to Write a Key Listener[^]
CodeGust 29-Nov-15 6:23am    
I know about JNI and Jline,JavaCurces but I have no idea how to use those for the described purpose...
It is a Console application so I cannot use KeyListener as it is meant for a Gui app...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900