From fbc542433f5ef5e1acc8ab6800c7e94262cf0d68 Mon Sep 17 00:00:00 2001 From: tetektoza Date: Sun, 15 Oct 2023 22:17:41 +0200 Subject: [PATCH] Hotkeys: Support binding to keypad numbers (0-9) This patch adds support to bind actions in settings to keypad numbers (0-9). --- Source/options.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/options.cpp b/Source/options.cpp index 5eba80d8dc7..50858d14ede 100644 --- a/Source/options.cpp +++ b/Source/options.cpp @@ -1304,6 +1304,11 @@ KeymapperOptions::KeymapperOptions() keyIDToKeyName.emplace(SDLK_F1 + i, StrCat("F", i + 1)); } + keyIDToKeyName.emplace(SDLK_KP_0, "KEYPADNUM 0"); + for (int i = 0; i < 9; i++) { + keyIDToKeyName.emplace(SDLK_KP_1 + i, StrCat("KEYPADNUM ", i + 1)); + } + keyIDToKeyName.emplace(SDLK_LALT, "LALT"); keyIDToKeyName.emplace(SDLK_RALT, "RALT"); keyIDToKeyName.emplace(SDLK_SPACE, "SPACE");