Un-matched modifier keys should not pop keyboard mode

This commit is contained in:
Kovid Goyal 2023-12-01 19:34:20 +05:30
parent 9560968a7d
commit d63b852b90
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -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,
@ -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():