UmeshChoudhari / jnativehook

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

keycodes are not case sensetive, doesn't support non-ascii codes like arabic #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

pressing any letter buttons on keyboard with caps Lock on or off gives the same 
key codes

What is the expected output? What do you see instead?
for 'a', it should be 97 and 65 for 'A'
instead, it gives '65' for both 'a' and 'A'
It Also gives code:65 for Arabic letter that corresponds 'A' button on keyboard 
and so on with rest of buttons.

What version of the product are you using? On what operating system?
JNativeHook 1.1.0 Beta 1 on Windows 7 home premium

Please provide any additional information below.

Original issue reported on code.google.com by sayid.j...@gmail.com on 28 Mar 2012 at 12:19

GoogleCodeExporter commented 9 years ago
Key codes have a many to one relationship with the "key caps" printed on the 
top of the keys.  Each key on the keyboard produces a hardware code to indicate 
that it was pressed.  The letter that the code corresponds to is determined by 
the operating system's language support and what, if any, modifiers were 
active.  This is why java.awt.event.KeyEvent provides both the getKeyCode() and 
getKeyChar() methods.  The getKeyChar method has not been implemented in 
JNativeHook at this time but probably should be added so I will leave this bug 
open to address that issue and shoot for a resolution around 1.1.0 beta 3.

In the meantime, please check the Arabic letter that corresponds to the 'A' key 
using the webstart program listed on this page 
http://docs.oracle.com/javase/tutorial/uiswing/events/keylistener.html and let 
me know if the key code number number differs from 65.

Original comment by alex%1st...@gtempaccount.com on 28 Mar 2012 at 12:43

GoogleCodeExporter commented 9 years ago
Thanks friend for the quick reply, and for the precious info. I've understood 
how things are working exactly. Yes, it gives 65 as a key code by the webstart 
program on that page when I press the 'A' key while the language is set to 
Arabic on the system.

Original comment by sayid.j...@gmail.com on 28 Mar 2012 at 9:18

GoogleCodeExporter commented 9 years ago
This should be fixed in the trunk as of today.  I will be posting version 1.1 
RC 1 sometime this weekend.  Please test and re-open this bug if the issue 
continues.

Thanks!

Original comment by alex%1st...@gtempaccount.com on 27 Apr 2012 at 11:53