kwhat / jnativehook

Global keyboard and mouse listeners for Java.
Other
1.74k stars 347 forks source link

Print Screen and Asterisk have the same keycode #219

Open SayWut opened 6 years ago

SayWut commented 6 years ago

Before everything I want to thank you for creating this amazing huge library. I using this library for my project.

I am working on print screen program and I using the print screen button for that. I found out that the Print Screen button and the Asterisk button on the num pad have the same This is the code that I use.

public void nativeKeyPressed(NativeKeyEvent e)
{
    if(e.getKeyCode() == NativeKeyEvent.VC_PRINTSCREEN)
            System.out.println(e.getRawCode());
}

This is what I do to solve it for now.

public void nativeKeyPressed(NativeKeyEvent e)
{
    if(e.getKeyCode() == NativeKeyEvent.VC_PRINTSCREEN && e.getRawCode() == 44)
                 System.out.println(e.getRawCode());

}

Thank you for everything.

kwhat commented 6 years ago

Hi,

Thanks for reporting this bug. What OS is this on?

zeroeightysix commented 6 years ago

Also experiencing this.

64-Bit Windows 10 Pro AZERTY Keyboard (Belgian layout) (Corsair Strafe RGB)

SayWut commented 6 years ago

I using Windows 10 pro 64bit If you mean that you want my keyboard model so I am using Logitech K330

2018-06-09 16:18 GMT+03:00 zeroeightysix notifications@github.com:

Also experiencing this.

64-Bit Windows 10 Pro AZERTY Keyboard (Belgian layout) (Corsair Strafe RGB)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kwhat/jnativehook/issues/219#issuecomment-395968535, or mute the thread https://github.com/notifications/unsubscribe-auth/Ai3z2bpb51w4HIuJdIKPgblbWbPOrf7hks5t68sKgaJpZM4TQyJX .

hopelessdecoy commented 6 years ago

Any word on this issue? I am having the same problem. Windows 7 64bit, and a real basic HP keyboard (don't know the model)

Skhmt commented 5 years ago

Same problem, windows 10 64 bit, qwerty us-keyboard.

xt449 commented 5 years ago

Windows 10 Home 64 bit QWERTY keyboard English US layout (on laptop) JDK 8 and OpenJDK 11

Also Plus(+) and Minus(-) numpad keys are unknown as well as RightShift