Normalize bindings correctly when checking key_mappings

This commit is contained in:
Florian Bruhin 2017-06-19 11:45:10 +02:00
parent 383968d948
commit 75798bebb0
2 changed files with 8 additions and 3 deletions

View File

@ -127,8 +127,13 @@ class BaseKeyParser(QObject):
if binding is None:
self._debug_log("Ignoring only-modifier keyeevent.")
return False
binding = binding.lower()
binding = config.val.bindings.key_mappings.get(binding, binding)
key_mappings = config.val.bindings.key_mappings
try:
binding = key_mappings['<{}>'.format(binding)][1:-1]
except KeyError:
pass
try:
cmdstr = self.special_bindings[binding]
except KeyError:

View File

@ -407,7 +407,7 @@ def keyevent_to_string(e):
if mod & mask and s not in parts:
parts.append(s)
parts.append(key_to_string(e.key()))
return '+'.join(parts)
return normalize_keystr('+'.join(parts))
class KeyInfo: