Skip to content
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

Fix #7783, #7816: SDL2: Fix various issues with keyboard input #7825

merged 6 commits into from Nov 10, 2019


Copy link

JGRennison commented Nov 4, 2019


  • Fix input using only the shift key modifier being interpreted as non-text input or as a hotkey in edit contexts (#7783, #7816).
  • Fix page down key.
  • Fix backtick key scancode handling.
  • Fix up/down keys in non-console edit context typing: '?' character
  • Fix F1-F12 keys in edit context typing: '?' character
Copy link

nielsmh commented Nov 5, 2019

The commit checker wants commit message form Fix #7783, Fix #7816: SDL2: Fix input handling in edit context

I think the SDL2 part in messages should also be bracketed, so [SDL2] not SDL2:.

JGRennison added 6 commits Nov 4, 2019
SDL_Keysym::scancode is a SDL_SCANCODE_* constant, not a raw scan code
In particular this fixes handling of the shift key
SDLK_PAGEUP and SDLK_PAGEDOWN are not sequential
They must have separate entries in _vk_mapping
SDL_Keysym::sym is not suitable for checking whether the character
is printable or not
@JGRennison JGRennison force-pushed the JGRennison:fix-sdl2-keyboard-input-issues branch from 0728dc5 to 41ae84e Nov 5, 2019
@LordAro LordAro merged commit a15ace0 into OpenTTD:master Nov 10, 2019
8 checks passed
8 checks passed
OpenTTD CI Build #20191105.3 succeeded
OpenTTD CI (Linux commit-checker) Linux commit-checker succeeded
OpenTTD CI (Linux linux-amd64-clang-3.9) Linux linux-amd64-clang-3.9 succeeded
OpenTTD CI (Linux linux-amd64-gcc-6) Linux linux-amd64-gcc-6 succeeded
OpenTTD CI (Linux linux-i386-gcc-6) Linux linux-i386-gcc-6 succeeded
OpenTTD CI (MacOS) MacOS succeeded
OpenTTD CI (Windows Win32) Windows Win32 succeeded
OpenTTD CI (Windows Win64) Windows Win64 succeeded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.