Add some aliases when parsing config files for common key name variations

This commit is contained in:
Kovid Goyal
2019-09-08 19:28:41 +05:30
parent 70c2765a6e
commit 17fd749e8d
3 changed files with 32 additions and 30 deletions

View File

@@ -8,6 +8,34 @@ from contextlib import suppress
from .constants import is_macos
key_name_aliases = {
"'": 'APOSTROPHE',
',': 'COMMA',
'-': 'MINUS',
'_': 'UNDERSCORE',
'.': 'PERIOD',
'/': 'SLASH',
';': 'SEMICOLON',
'=': 'EQUAL',
'[': 'LEFT_BRACKET',
'\\': 'BACKSLASH',
']': 'RIGHT_BRACKET',
'`': 'GRAVE_ACCENT',
'+': 'PLUS',
'ESC': 'ESCAPE',
'PGUP': 'PAGE_UP',
'PAGEUP': 'PAGE_UP',
'PGDN': 'PAGE_DOWN',
'PAGEDOWN': 'PAGE_DOWN',
'RETURN': 'ENTER',
'ARROWUP': 'UP',
'ARROWDOWN': 'DOWN',
'ARROWRIGHT': 'RIGHT',
'ARROWLEFT': 'LEFT',
}
def null_lookup(name, case_sensitive=False):
pass