mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-25 18:37:50 +00:00
Fix #7055
This commit is contained in:
parent
cec427777c
commit
cd30de3727
2 changed files with 11 additions and 2 deletions
|
|
@ -173,10 +173,15 @@ class Mappings:
|
|||
self._push_keyboard_mode(sm)
|
||||
self.debug_print('\n\x1b[35mKeyPress\x1b[m matched sequence prefix, ', end='')
|
||||
else:
|
||||
mode.sequence_keys.append(ev)
|
||||
if len(final_actions) == 1:
|
||||
self.pop_keyboard_mode()
|
||||
return self.combine(final_actions[0].definition)
|
||||
consumed = self.combine(final_actions[0].definition)
|
||||
if not consumed:
|
||||
w = self.get_active_window()
|
||||
if w is not None:
|
||||
w.send_key_sequence(*mode.sequence_keys)
|
||||
return consumed
|
||||
mode.sequence_keys.append(ev)
|
||||
self.debug_print('\n\x1b[35mKeyPress\x1b[m matched sequence prefix, ', end='')
|
||||
mode.keymap.clear()
|
||||
for fa in final_actions:
|
||||
|
|
|
|||
|
|
@ -578,6 +578,10 @@ class TestKeys(BaseTest):
|
|||
self.ae(tm('ctrl+f', '1'), [True, False])
|
||||
af(tm.actions)
|
||||
self.ae(len(tm.active_window.key_seqs), 1) # ctrl+f should have been sent to the window
|
||||
# multi-key mapping that is unmapped should send all keys to child
|
||||
tm = TM('map kitty_mod+p>f')
|
||||
self.ae(tm('ctrl+shift+p', 'f'), [True, False])
|
||||
self.ae(len(tm.active_window.key_seqs), 1)
|
||||
|
||||
# unmap
|
||||
tm = TM('map kitty_mod+enter')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue