mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-25 02:17:03 +00:00
pop_keyboard_mode should return True when nothing is done
This commit is contained in:
parent
cc5424c054
commit
ca6c607148
1 changed files with 4 additions and 3 deletions
|
|
@ -1340,12 +1340,13 @@ class Boss:
|
|||
End the current keyboard mode switching to the previous mode.
|
||||
''')
|
||||
def pop_keyboard_mode(self) -> bool:
|
||||
passthrough = True
|
||||
if self.keyboard_mode_stack:
|
||||
self.keyboard_mode_stack.pop()
|
||||
if not self.keyboard_mode_stack:
|
||||
set_ignore_os_keyboard_processing(False)
|
||||
return True
|
||||
return False
|
||||
passthrough = False
|
||||
return passthrough
|
||||
|
||||
@ac('misc', '''
|
||||
Switch to the specified keyboard mode, pushing it onto the stack of keyboard modes.
|
||||
|
|
@ -1368,7 +1369,7 @@ class Boss:
|
|||
return False
|
||||
if self.global_shortcuts_map and get_shortcut(self.global_shortcuts_map, ev):
|
||||
return True
|
||||
if self.pop_keyboard_mode():
|
||||
if not self.pop_keyboard_mode():
|
||||
if get_options().enable_audio_bell:
|
||||
ring_bell()
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue