ravvytheprogrammer / jnativehook

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

The keyCode for nativeKeyPressed and nativeKeyTyped events is always 0 #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build using ant script.
2. Run the example and type normal keys (alpha numeric).
3. The key code for the NATIVE_KEY_RELEASED is correct, however for the 
NATIVE_KEY_PRESSED and NATIVE_KEY_TYPED, the key code is always 0.

What is the expected output? What do you see instead?
Correct key codes for all 3 NativeKey events.

What version of the product are you using? On what operating system?
This was seen on Ubuntu 10.04
JNativeHook-src-1.1.0_rc2.zip

Please provide any additional information below.
This was working in my environment with JNativeHook-src-1.0.2288.zip

Original issue reported on code.google.com by Jonathan...@gmail.com on 11 May 2012 at 5:31

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by alex%1st...@gtempaccount.com on 11 May 2012 at 8:33

GoogleCodeExporter commented 9 years ago
Thanks for the report, NATIVE_KEY_PRESSED events have been fixed in the trunk.  

As for the NATIVE_KEY_TYPED events, they always use the keycode VK_UNDEFINED as 
specified in the javadoc for KeyEvent: 
http://docs.oracle.com/javase/1.5.0/docs/api/java/awt/event/KeyEvent.html

"For key pressed and key released events, the getKeyCode method returns the 
event's keyCode. For key typed events, the getKeyCode method always returns 
VK_UNDEFINED."

Original comment by alex%1st...@gtempaccount.com on 11 May 2012 at 11:40