kwhat/jnativehook

Not capturing simulated keypress

xgrapher opened this issue · 1 comments

So I have a software that sends keypresses but when I try to decode it using jnativehook paramSting I get the below:

Actual text shown is: Vhernandezd255m
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231

NATIVE_KEY_PRESSED,keyCode=15,keyText=Tab,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=9

And this is: Casa2000
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231
NATIVE_KEY_PRESSED,keyCode=0,keyText=Undefined,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=231

NATIVE_KEY_PRESSED,keyCode=28,keyText=Enter,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=13

Is there anyway to decode these correctly?

when I type on the keyboard I am able to decode everything successfully for example:

NATIVE_KEY_PRESSED,keyCode=30,keyText=A,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=65
NATIVE_KEY_PRESSED,keyCode=31,keyText=S,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=83
NATIVE_KEY_PRESSED,keyCode=33,keyText=F,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=70
NATIVE_KEY_PRESSED,keyCode=32,keyText=D,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=68
NATIVE_KEY_PRESSED,keyCode=35,keyText=H,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=72
NATIVE_KEY_PRESSED,keyCode=24,keyText=O,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=79
NATIVE_KEY_PRESSED,keyCode=17,keyText=W,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=87
NATIVE_KEY_PRESSED,keyCode=57,keyText=Space,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=32
NATIVE_KEY_PRESSED,keyCode=30,keyText=A,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=65
NATIVE_KEY_PRESSED,keyCode=19,keyText=R,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=82
NATIVE_KEY_PRESSED,keyCode=18,keyText=E,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=69
NATIVE_KEY_PRESSED,keyCode=57,keyText=Space,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=32
NATIVE_KEY_PRESSED,keyCode=21,keyText=Y,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=89
NATIVE_KEY_PRESSED,keyCode=24,keyText=O,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=79
NATIVE_KEY_PRESSED,keyCode=22,keyText=U,keyChar=Undefined,keyLocation=KEY_LOCATION_STANDARD,rawCode=85