This commit is contained in:
Kovid Goyal 2022-08-12 07:01:40 +05:30
parent 2b7455e353
commit d4075bfa9a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -56,7 +56,7 @@ def compare_shortcut_maps(final: Dict[Shortcut, str], final_kitty_mod: int, init
# previous_tab uses a definition of ctrl+shift+tab not kitty_mod+tab, but # previous_tab uses a definition of ctrl+shift+tab not kitty_mod+tab, but
# we cant distinguish these as the information about the original # we cant distinguish these as the information about the original
# definition is discarded. # definition is discarded.
ei = {k._replace(kitty_mod=0 if v == 'previous_tab' and k.keys[0].key == 57346 else initial_kitty_mod).human_repr: v for k, v in initial.items()} ei = {k._replace(kitty_mod=0 if v == 'previous_tab' and k.human_repr.endswith('+tab') else initial_kitty_mod).human_repr: v for k, v in initial.items()}
ef = {k._replace(kitty_mod=final_kitty_mod).human_repr: v for k, v in final.items()} ef = {k._replace(kitty_mod=final_kitty_mod).human_repr: v for k, v in final.items()}
added = set(ef) - set(ei) added = set(ef) - set(ei)
removed = set(ei) - set(ef) removed = set(ei) - set(ef)