Skip to content

Commit

Permalink
Hotkeys: Support binding to keypad numbers (0-9)
Browse files Browse the repository at this point in the history
This patch adds support to bind actions in settings to keypad numbers
(0-9).
  • Loading branch information
tetektoza authored and AJenbo committed Oct 16, 2023
1 parent 5b62bf7 commit fbc5424
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit fbc5424

Please sign in to comment.