LeVanPhuUIT / jnativehook

Automatically exported from code.google.com/p/jnativehook
0 stars 0 forks source link

e.getKeyChar() returning incorrect values #77

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. https://code.google.com/p/jnativehook/wiki/examples
2. nativeKeyTyped() replace e.getKeyText(e.getKeyCode()) to 
e.getKeyText(e.getKeyChar())      //This is because getKeyCode returns 
undefined.(As is documented)
3.Now when ran, incorrect values are printed

What is the expected output? What do you see instead?
eg. A: prints NumPad 1, B: prints NumPad 2, C: NumPad 3 etc.

If I hold Shift whilst typing though, the correct letters are printed.
eg. SHIFT+A: prints A, SHIFT+B prints B.

What version of the product are you using? On what operating system?
Windows Vista 32bit, JNativeHook 1.1.4

Please provide any additional information below.
Hopefully not just mixing my source code again guys lol 

Thanks in advance

Original issue reported on code.google.com by wakatak...@gmail.com on 16 Dec 2013 at 10:28

GoogleCodeExporter commented 8 years ago
You are using the wrong argument with getKeyTest(keyCode);  

keyCode the native virtual key code generated by this event.

Original comment by a...@1stleg.com on 17 Apr 2014 at 8:32