Clear key chains when a special key is pressed in hint mode
When we press "s<Escape>", we don't want <Escape> to be handled as part of a key chain.
This commit is contained in:
parent
66b06ed84c
commit
c7cccf4ba0
@ -259,9 +259,18 @@ class HintKeyParser(CommandKeyParser):
|
||||
Returns:
|
||||
True if the match has been handled, False otherwise.
|
||||
"""
|
||||
match = super().handle(e, dry_run=dry_run)
|
||||
|
||||
dry_run_match = super().handle(e, dry_run=True)
|
||||
if dry_run:
|
||||
return match
|
||||
return dry_run_match
|
||||
|
||||
if (not keyutils.is_printable(e.key()) and
|
||||
dry_run_match == QKeySequence.NoMatch):
|
||||
log.keyboard.debug("Got special key, clearing keychain")
|
||||
self.clear_keystring()
|
||||
|
||||
assert not dry_run
|
||||
match = super().handle(e)
|
||||
|
||||
if match == QKeySequence.PartialMatch:
|
||||
self._last_press = LastPress.keystring
|
||||
|
Loading…
Reference in New Issue
Block a user