LeVanPhuUIT / jnativehook

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

CMD, SHIFT, ALT, CTRL is recognized as SHIFT #30

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
On mac, every time I'm pressing CMD, SHIFT, ALT, CTRL i'm getting wrong keyText 
value. 
It's always SHIFT. key code is always the same, but rawKeyCode is differ.

On windows virtual machine is fine.

The only work around i found is to use raw codes instead of key code.. but this 
makes my code more platform dependant.

I'm using macbook pro with osx lion on board. 
Windows VM is equiped with Windows 7.

One of output methods calls: 

 System.out.println("Key Pressed "+e.getRawCode()+" : " + NativeKeyEvent.getKeyText(e.getKeyCode()));

Output:

Key Pressed 55 : Shift
Key  released 55 : Shift
test - mouse pressed!: 1
test - mouse!: 1
test - mouse pressed!: 1
test - mouse!: 1
Key Pressed 0 : A
Key Typed 0: Undefined
Key  released 0 : A
aKey Pressed 0 : A
Key Typed 0: Undefined
Key  released 0 : A
Key Pressed 55 : Shift
Key Pressed 6 : Z
Key Typed 6: Undefined
Key  released 6 : Z
Key  released 55 : Shift
Key Pressed 55 : Shift
Key Pressed 6 : Z
Key Typed 6: Undefined
Key  released 6 : Z
Key  released 55 : Shift
Key Pressed 55 : Shift
Key Pressed 6 : Z
Key Typed 6: Undefined
Key  released 6 : Z
Key  released 55 : Shift
Key Pressed 55 : Shift
Key Pressed 1 : S
Key Typed 1: Undefined
Key  released 1 : S
Key  released 55 : Shift
Key Pressed 55 : Shift
Key  released 55 : Shift
Key Pressed 58 : Shift
Key  released 58 : Shift
Key Pressed 59 : Shift
Key  released 59 : Shift
Key Pressed 56 : Shift
Key  released 56 : Shift

Original issue reported on code.google.com by Wojciech...@gmail.com on 14 Dec 2012 at 3:05

Attachments:

GoogleCodeExporter commented 8 years ago
This is related to bug #25 which causes a TSMProcessRawKeyCode failed (-192) 
error that no one on earth seems to know the cause of.  The code taht is 
crashing is outside of the JNativeHook library and based on what I have found 
looks like there is a problem somewhere in the JVM.  Can you let me know what 
version of Java you are using?

Original comment by a...@1stleg.com on 14 Dec 2012 at 7:14

GoogleCodeExporter commented 8 years ago
Please test.

Original comment by a...@1stleg.com on 30 Dec 2012 at 7:27

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by a...@1stleg.com on 30 Dec 2012 at 7:28

GoogleCodeExporter commented 8 years ago
This should be fixed as of 1.1.3.  If you experience this problem or a similar 
problem again, please reopen this bug.

Thanks

Original comment by a...@1stleg.com on 3 Jan 2013 at 5:00

GoogleCodeExporter commented 8 years ago
I am using 1.1.4 and get this same issue. The shift, ctrl, command, and alt 
keys all return 16 for their keycode, but their real key for the rawcode. I'm 
running mavericks.

Original comment by stupidbo...@gmail.com on 12 Jul 2014 at 4:55