-
-
Notifications
You must be signed in to change notification settings - Fork 975
Windows IME can cause duplicate text input #8930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you reproduce this inside the text input windows that correspond to renaming vehicles/stations/depots/companies/etc? |
Yes I can reproduce this also in other text inputs, and it appears I can even under high framerates, if I mash keys fast enough. |
I think if you could bisect this to work out where the problem first occurs (there have been a lot of changes to video drivers recently, after all), that would be super helpful in working out what is actually causing it |
Okay I've reproduced this even in the release build of 1.11.0. |
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.
…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.
…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.
Version of OpenTTD
799eb31 and probably many earlier. Possibly only on Win32 video driver, possibly depends on standard library/compiler used.
Expected result
One press of a letter key results in one letter input.
Actual result
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.
Then type quickly. Mashing keys on home row works well.
Windows 10 (version 2004)
Video driver: win32-opengl (NVIDIA Corporation - GeForce RTX 2060/PCIe/SSE2 (3.2.0 NVIDIA 456.71))
Blitter: 40bpp-anim
Windowed mode: 2560x1600 at 60 Hz
Interface and Font size both at 2x scale
The text was updated successfully, but these errors were encountered: