GTK on Windows currently uses its own incomplete emulation for converting keystrokes into characters. This leads to some problems of GTK applications not behaving as a Windows user would expect.
The correct way to handle keyboard input on Windows is to call TranslateMessage() and interpret the WM_CHAR messages sent by Windows. This way a GTK application will behave exactly like a native Windows application, including all the nasty edgecases like modifier combinations, dead keys and so forth. This is exactly what this merge request does.
I built my changes on top of the IME input module, since I would have to handle those messages anyway and there was no point in reinventing the wheel. Hence I made the IME module the default for all locales.
It works perfectly for me. I have tested my changes with
- German keyboard layout
- NEO 2 German keyboard layout (it has special modifier keys)
- American layout
- Japanese IME (I don't speak Japanese, but it seems to be working correctly as far as I can tell)
This merge request fixes the following issues:
- #2017 (closed) Upper layers of NEO keyboard layout not working on Windows
- #2018 (closed) GTK3 on Windows doesn't handle Ctrl+Alt+<key> correctly
- #478 (closed) No possibility to enter characters by Alt+Numpad sequences
- #1428 (closed) Ligatures ignored on input on Windows