Skip to content

Commit

Permalink
Un-matched modifier keys should not pop keyboard mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Dec 1, 2023
1 parent 9560968 commit d63b852
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kitty/boss.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
get_options,
get_os_window_size,
global_font_size,
is_modifier_key,
last_focused_os_window_id,
mark_os_window_for_close,
os_window_font_size,
Expand Down Expand Up @@ -1363,6 +1364,8 @@ def dispatch_possible_special_key(self, ev: KeyEvent) -> bool:
mode = self.keyboard_modes[''] if is_root_mode else self.keyboard_mode_stack[-1]
key_action = get_shortcut(mode.keymap, ev)
if key_action is None:
if is_modifier_key(ev.key):
return False
if self.global_shortcuts_map and get_shortcut(self.global_shortcuts_map, ev):
return True
if self.pop_keyboard_mode():
Expand Down

0 comments on commit d63b852

Please sign in to comment.