Normalize bindings correctly when checking key_mappings
This commit is contained in:
parent
383968d948
commit
75798bebb0
@ -127,8 +127,13 @@ class BaseKeyParser(QObject):
|
|||||||
if binding is None:
|
if binding is None:
|
||||||
self._debug_log("Ignoring only-modifier keyeevent.")
|
self._debug_log("Ignoring only-modifier keyeevent.")
|
||||||
return False
|
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:
|
try:
|
||||||
cmdstr = self.special_bindings[binding]
|
cmdstr = self.special_bindings[binding]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
@ -407,7 +407,7 @@ def keyevent_to_string(e):
|
|||||||
if mod & mask and s not in parts:
|
if mod & mask and s not in parts:
|
||||||
parts.append(s)
|
parts.append(s)
|
||||||
parts.append(key_to_string(e.key()))
|
parts.append(key_to_string(e.key()))
|
||||||
return '+'.join(parts)
|
return normalize_keystr('+'.join(parts))
|
||||||
|
|
||||||
|
|
||||||
class KeyInfo:
|
class KeyInfo:
|
||||||
|
Loading…
Reference in New Issue
Block a user