It’s just the way Microsoft defined how WM_KEYDOWN should work.
See https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-keydown for full details.
https://docs.microsoft.com/en-us/windows/win32/inputdev/about-keyboard-input explains under what circumstances Windows sends what WM_KEY messages, and any library code that accepts keyboard data will expect that, so you should take care that you replicate Windows’ behaviour as exactly as possible.
(The other approach might be to directly call the “move the character code” instead of going through sending a message. If that’s a viable option for your use case, you’ll have far less moving parts that may affect how your code works.)
Regards,
Jo
--
You received this message because you are subscribed to the Google Groups "Java Native Access" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
jna-users+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jna-users/15154c15-2812-46df-9e9e-abe2533b516cn%40googlegroups.com.
Sensitivity: C2 Internal
The content of this e-mail is intended only for the
confidential use of the person addressed.
If you are not the intended
recipient, please notify the sender and delete this e-mail immediately.
Thank
you.