1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

Fix #9684 and #9690: Enter and keypad enter are treated as different keys

* Remapped keypad Enter to return scancode

Fix #9684: Entering custom size for water/land tool allows confirmation
with main enter key, but not numpad enter key

Fix #9690: The keyboard shortcut for rotating the game view can be set
to Enter or KP Enter, but not both

* Add changelog entry
This commit is contained in:
Denis Khabenkov
2019-10-18 11:40:07 +03:00
committed by Michael Steenbeek
parent 1f3998909b
commit 6632b979d7
2 changed files with 5 additions and 1 deletions

View File

@@ -17,6 +17,8 @@
- Fix: [#9669] The tile inspector shortcut key does not work with debugging tools disabled.
- Fix: [#9675] Guest entry point limit can be bypassed in scenario editor.
- Fix: [#9683] Cannot raise water level if part of the tool's area of effect is off of the map.
- Fix: [#9684] Entering custom size for water/land tool allows confirmation with main enter key, but not numpad enter key.
- Fix: [#9690] The keyboard shortcut for rotating the game view can be set to Enter or KP Enter, but not both.
- Fix: [#9717] Scroll bars do not render correctly when using OpenGL renderer.
- Fix: [#9729] Peeps do not take into account height difference when deciding to pathfind to a ride entrance (original bug).
- Fix: [#9902] Doors/Portcullis do not check to make sure doors are open causing double opens.

View File

@@ -106,13 +106,15 @@ void TextComposition::HandleMessage(const SDL_Event* e)
uint16_t modifier = e->key.keysym.mod;
SDL_Keycode key = e->key.keysym.sym;
SDL_Scancode scancode = e->key.keysym.scancode;
if (key == SDLK_KP_ENTER)
{
// Map Keypad enter to regular enter.
key = SDLK_RETURN;
scancode = SDL_SCANCODE_RETURN;
}
GetContext()->GetUiContext()->SetKeysPressed(key, e->key.keysym.scancode);
GetContext()->GetUiContext()->SetKeysPressed(key, scancode);
// Text input
if (_session.Buffer == nullptr)