[Windows] Why does AWT generate KEY_TYPED events in response to WM_SYSCHAR messages?

Nikita Provotorov nikita.provotorov at jetbrains.com
Mon Jun 10 21:37:33 UTC 2024


Although MSDN clearly states
<https://learn.microsoft.com/en-us/windows/win32/learnwin32/keyboard-input#character-messages>
:

> The WM_SYSCHAR message indicates a system character. As with
> WM_SYSKEYDOWN, you should generally pass this message directly to
> DefWindowProc. Otherwise, you may interfere with standard system commands. *In
> particular, do not treat WM_SYSCHAR as text that the user has typed*.


It causes some key combinations to generate input, being inconsistent with
other apps. It includes Alt [+ Shift] + Enter, and generally any Alt +
letter combinations.

Are there any cons of dropping this logic?

I was trying to git blame the codebase to find some info in a particular
commit, but the corresponding change was included in the repository initial
commit. Searching in the mailing list and the bug tracker didn't help
neither.

Best regards,
Nikita Provotorov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/client-libs-dev/attachments/20240610/9f997503/attachment.htm>


More information about the client-libs-dev mailing list