From 51a265fbb910f009484ab0c0290a110d7160eadd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 30 Jun 2025 14:41:30 +0530 Subject: [PATCH] Fix #8767 --- docs/changelog.rst | 2 ++ kitty/boss.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 9948d84ce..e771d59e2 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -132,6 +132,8 @@ Detailed list of changes - Fix a regression in 0.40.0 that broke erasing of characters in a line in the presence of wide characters (:iss:`8758`) +- Fix a regression that broke using :kbd:`esc` to exit visual select window mode (:iss:`8767`) + - kitten run-shell: Fix SIGINT blocked when execing the shell (:iss:`8754`) 0.42.1 [2025-05-17] diff --git a/kitty/boss.py b/kitty/boss.py index d0e37fe24..8f898f80b 100644 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -55,6 +55,7 @@ from .constants import ( ) from .fast_data_types import ( CLOSE_BEING_CONFIRMED, + GLFW_FKEY_ESCAPE, GLFW_MOD_ALT, GLFW_MOD_CONTROL, GLFW_MOD_SHIFT, @@ -1523,6 +1524,7 @@ class Boss: return km = KeyboardMode('__visual_select__') km.on_action = 'end' + km.keymap[SingleKey(key=GLFW_FKEY_ESCAPE)].append(KeyDefinition(definition='visual_window_select_action_trigger 0')) fmap = get_name_to_functional_number_map() alphanumerics = get_options().visual_window_select_characters for idx, window in tab.windows.iter_windows_with_number(only_visible=True):