Fix handling of key_mappings
This commit is contained in:
parent
0967b6abd2
commit
f2fadd7add
@ -138,15 +138,16 @@ class BaseKeyParser(QObject):
|
|||||||
self._count += txt
|
self._count += txt
|
||||||
return QKeySequence.ExactMatch
|
return QKeySequence.ExactMatch
|
||||||
|
|
||||||
sequence = self._sequence.append_event(e)
|
self._sequence = self._sequence.append_event(e)
|
||||||
match, binding = self._match_key(sequence)
|
match, binding = self._match_key(self._sequence)
|
||||||
if match == QKeySequence.NoMatch:
|
if match == QKeySequence.NoMatch:
|
||||||
mappings = config.val.bindings.key_mappings
|
mappings = config.val.bindings.key_mappings
|
||||||
mapped = mappings.get(sequence, None)
|
mapped = mappings.get(self._sequence, None)
|
||||||
if mapped is not None:
|
if mapped is not None:
|
||||||
|
self._debug_log("Mapped {} -> {}".format(
|
||||||
|
self._sequence, mapped))
|
||||||
match, binding = self._match_key(mapped)
|
match, binding = self._match_key(mapped)
|
||||||
|
self._sequence = mapped
|
||||||
self._sequence = self._sequence.append_event(e)
|
|
||||||
|
|
||||||
if match == QKeySequence.ExactMatch:
|
if match == QKeySequence.ExactMatch:
|
||||||
self._debug_log("Definitive match for '{}'.".format(
|
self._debug_log("Definitive match for '{}'.".format(
|
||||||
|
Loading…
Reference in New Issue
Block a user