From eb39e9b922d18a54a58007158fe95de9a6464633 Mon Sep 17 00:00:00 2001 From: Gheorghita Mutu Date: Sun, 1 Sep 2024 18:16:37 +0300 Subject: [PATCH] [SDL] + fix numeric key bindings on SDL --- AppCUI/src/Terminal/SDLTerminal/SDLTerminalInput.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AppCUI/src/Terminal/SDLTerminal/SDLTerminalInput.cpp b/AppCUI/src/Terminal/SDLTerminal/SDLTerminalInput.cpp index 1bc3d546..31e2d456 100644 --- a/AppCUI/src/Terminal/SDLTerminal/SDLTerminalInput.cpp +++ b/AppCUI/src/Terminal/SDLTerminal/SDLTerminalInput.cpp @@ -32,9 +32,10 @@ bool SDLTerminal::InitInput(const Application::InitializationData&) KeyTranslation[static_cast(SDL_SCANCODE_A + i)] = static_cast(((uint32) Key::A) + i); } - for (size_t i = 0; i < 10; i++) + KeyTranslation[static_cast(SDL_SCANCODE_0)] = static_cast((uint32) Key::N0); + for (size_t i = 1; i < 10; i++) { - KeyTranslation[static_cast(SDL_SCANCODE_0 + i)] = static_cast(((uint32) Key::N0) + i); + KeyTranslation[static_cast(SDL_SCANCODE_1 + i)] = static_cast(((uint32) Key::N1) + i); } for (size_t i = 0; i < 12; i++)