summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordP <dp@dpointer.org>2020-08-10 09:56:01 +0300
committerCharles Pigott <charlespigott@googlemail.com>2020-09-01 09:33:17 +0100
commitab420d8cc01a81ad872a14afb8cb3e56afbc8dec (patch)
treece0bd37e50030d4a4db02ea9b46feac0822d8458 /src
parentdacec76c1b4fe8708c4c7c7521d759eb5e599536 (diff)
downloadopenttd-ab420d8cc01a81ad872a14afb8cb3e56afbc8dec.tar.xz
Change: Use key names instead of characters in hotkey.cfg
Diffstat (limited to 'src')
-rw-r--r--src/hotkeys.cpp30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/hotkeys.cpp b/src/hotkeys.cpp
index 0bf350f8f..6db3a406b 100644
--- a/src/hotkeys.cpp
+++ b/src/hotkeys.cpp
@@ -67,17 +67,25 @@ static const KeycodeNames _keycode_to_name[] = {
{"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},
+ {"SLASH", WKC_SLASH},
+ {"/", WKC_SLASH}, /* deprecated, use SLASH */
+ {"SEMICOLON", WKC_SEMICOLON},
+ {";", WKC_SEMICOLON}, /* deprecated, use SEMICOLON */
+ {"EQUALS", WKC_EQUALS},
+ {"=", WKC_EQUALS}, /* deprecated, use EQUALS */
+ {"L_BRACKET", WKC_L_BRACKET},
+ {"[", WKC_L_BRACKET}, /* deprecated, use L_BRACKET */
+ {"BACKSLASH", WKC_BACKSLASH},
+ {"\\", WKC_BACKSLASH}, /* deprecated, use BACKSLASH */
+ {"R_BRACKET", WKC_R_BRACKET},
+ {"]", WKC_R_BRACKET}, /* deprecated, use R_BRACKET */
+ {"SINGLEQUOTE", WKC_SINGLEQUOTE},
+ {"'", WKC_SINGLEQUOTE}, /* deprecated, use SINGLEQUOTE */
+ {"COMMA", WKC_COMMA},
+ {"PERIOD", WKC_PERIOD},
+ {".", WKC_PERIOD}, /* deprecated, use PERIOD */
+ {"MINUS", WKC_MINUS},
+ {"-", WKC_MINUS}, /* deprecated, use MINUS */
};
/**