Refactor shortcut config parsing

Resolution of kitty_mod and creation of the maps now happens in one
central place after all config is parsed. Fixes #496

Also have --debug-config output multi-key shortcuts nicely as well.
This commit is contained in:
Kovid Goyal
2018-04-27 11:16:58 +05:30
parent 0f06bf1bdb
commit 2e693c31df
6 changed files with 138 additions and 104 deletions

View File

@@ -257,7 +257,7 @@ def get_shortcut(keymap, mods, key, scancode):
def shortcut_matches(s, mods, key, scancode):
return defines.resolve_key_mods(s[0]) & 0b1111 == mods & 0b1111 and s[1] == key
return s[0] & 0b1111 == mods & 0b1111 and s[1] == key
def generate_key_table():