How can I detect the arrow keys in the java console and not in the GUI?

I am writing an application and I need to find the arrow keys in it. C ++ has a getch () function. We want to take input and then add a check for ASCII values.

How can we detect input arrow keys? Thanks

+7
source share
1 answer

I wrote the Java class RawConsoleInput , which uses JNA to invoke the functions of the Windows and Unix operating systems. It can be used to read the arrow keys, but the character codes are different on Windows and Unix.

+2
source

All Articles