summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Gribov <grossws@gmail.com>2019-12-27 11:32:34 +0300
committerCharles Pigott <charlespigott@googlemail.com>2019-12-27 08:32:34 +0000
commit69f9529ba32df396c4353b2d1c752a3f6609069a (patch)
tree4f130e256ce3c4bed6cd3017ec9cc39c86102c4d
parent0e7839377409bd70c09c75739f35301991c29c29 (diff)
downloadopenttd-69f9529ba32df396c4353b2d1c752a3f6609069a.tar.xz
Add: Missing keycodes for hotkeys.cfg (#7850)
Added missing keycodes mapping to `_keycode_to_name` array to allow their use in `hotkeys.cfg`. Also reordered them according to `WindowKeyCodes` order. Signed-off-by: Konstantin Gribov <grossws@gmail.com>
-rw-r--r--src/hotkeys.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/hotkeys.cpp b/src/hotkeys.cpp
index 11be10b30..d5cd90b3c 100644
--- a/src/hotkeys.cpp
+++ b/src/hotkeys.cpp
@@ -38,10 +38,15 @@ static const KeycodeNames _keycode_to_name[] = {
{"META", WKC_META},
{"GLOBAL", WKC_GLOBAL_HOTKEY},
{"ESC", WKC_ESC},
- {"DEL", WKC_DELETE},
{"BACKSPACE", WKC_BACKSPACE},
+ {"INS", WKC_INSERT},
+ {"DEL", WKC_DELETE},
+ {"PAGEUP", WKC_PAGEUP},
+ {"PAGEDOWN", WKC_PAGEDOWN},
+ {"END", WKC_END},
+ {"HOME", WKC_HOME},
{"RETURN", WKC_RETURN},
- {"BACKQUOTE", WKC_BACKQUOTE},
+ {"SPACE", WKC_SPACE},
{"F1", WKC_F1},
{"F2", WKC_F2},
{"F3", WKC_F3},
@@ -54,11 +59,24 @@ static const KeycodeNames _keycode_to_name[] = {
{"F10", WKC_F10},
{"F11", WKC_F11},
{"F12", WKC_F12},
+ {"BACKQUOTE", WKC_BACKQUOTE},
{"PAUSE", WKC_PAUSE},
- {"COMMA", WKC_COMMA},
- {"NUM_PLUS", WKC_NUM_PLUS},
+ {"NUM_DIV", WKC_NUM_DIV},
+ {"NUM_MUL", WKC_NUM_MUL},
{"NUM_MINUS", WKC_NUM_MINUS},
+ {"NUM_PLUS", WKC_NUM_PLUS},
+ {"NUM_ENTER", WKC_NUM_ENTER},
+ {"NUM_DOT", WKC_NUM_DECIMAL},
+ {"/", WKC_SLASH},
+ {";", WKC_SEMICOLON},
{"=", WKC_EQUALS},
+ {"[", WKC_L_BRACKET},
+ {"\\", WKC_BACKSLASH},
+ {"]", WKC_R_BRACKET},
+ {"'", WKC_SINGLEQUOTE},
+ {",", WKC_COMMA},
+ {"COMMA", WKC_COMMA}, // legacy variant, should be below ","
+ {".", WKC_PERIOD},
{"-", WKC_MINUS},
};