I have to send the key code in hexadecimal to a function whose job is to tell which key’s code is that. For example key code in java for CONTROL key in hexadecimal form is 0x11. Is there a way i can directly get the key typed ? Otherwise i have to use switch statement. But i don’t want to consider it.I think that is not a smart way to do this.
I have to send the key code in hexadecimal to a function whose job
Share
Use
java.awt.event.KeyEvent.getKeyText(int keyCode). According to the Javadoc: it