Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change: [hotkeys] add missing keycodes for hotkeys.cfg #7850

Merged
merged 1 commit into from Dec 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 22 additions & 4 deletions src/hotkeys.cpp
Expand Up @@ -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},
Expand All @@ -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 ","
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this addition?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

, is just for consistency with existing -/= and new //;/etc. And COMMA to support configs from previous versions. Maybe it would be better to support it in config reading instead of this hack

{".", WKC_PERIOD},
{"-", WKC_MINUS},
};

Expand Down