Windows IME can cause duplicate text input #8930
Version of OpenTTD
799eb31 and probably many earlier. Possibly only on Win32 video driver, possibly depends on standard library/compiler used.
One press of a letter key results in one letter input.
Some input is duplicated, and the duplicate keypresses appear as capital letters despite not touching Shift or Caps Lock keys.
Steps to reproduce
Appears to be related to slow framerates. Recommend opening console and filling it with many lines, and opening a text file viewer window, and running an unoptimised build with checks/asserts enabled.
Windows 10 (version 2004)
The text was updated successfully, but these errors were encountered:
Turns out it has to do with the Japanese IME being the active input/keyboard layout. Even if the text conversion isn't active and it's in direct ASCII input mode, it causes this behaviour. Switching to a different keyboard layout makes the input behave normally.
…n edit box is in focus. Handle printable input only when the matching WM_CHAR message is incoming. Without an edit box, do the handling in keydown as usual to support hotkeys.