jnativehook icon indicating copy to clipboard operation
jnativehook copied to clipboard

Explain keypad number conversions in jni_ConvertToJavaLocation(...)

Open spxl opened this issue 2 years ago • 0 comments

// FIXME Should this fall though? comments are highly suspicious. It seems that there should not be a fall-through in these places.

Please describe the logic of the subtractions made for numpad keys 1 to 9

eg *nativeKeyCode -= ((VC_KP_1 - VC_1) - (VC_KP_4 - VC_4) ); // 0x4D - 0x46

Why are these not all just like the code for keypad 0?

https://github.com/kwhat/jnativehook/blob/dd4a524a6e6035acc5180230789992c44ac156b4/src/main/jni/jni_Converter.c#L142-L166

spxl avatar Jun 27 '23 19:06 spxl