diff --git a/kitty/keys.c b/kitty/keys.c index b49ddf4a3..2930d1364 100644 --- a/kitty/keys.c +++ b/kitty/keys.c @@ -86,7 +86,10 @@ on_key_input(int key, int scancode, int action, int mods, const char* text, int Window *w = active_window(); if (!w) return; if (global_state.in_sequence_mode) { - if (action != GLFW_RELEASE) call_boss(process_sequence, "iiii", key, scancode, action, mods); + if ( + action != GLFW_RELEASE && + key != GLFW_KEY_LEFT_SHIFT && key != GLFW_KEY_RIGHT_SHIFT && key != GLFW_KEY_LEFT_ALT && key != GLFW_KEY_RIGHT_ALT && key != GLFW_KEY_LEFT_CONTROL && key != GLFW_KEY_RIGHT_CONTROL + ) call_boss(process_sequence, "iiii", key, scancode, action, mods); return; } Screen *screen = w->render_data.screen; diff --git a/kitty/keys.py b/kitty/keys.py index f84788ba8..cc40f27c4 100644 --- a/kitty/keys.py +++ b/kitty/keys.py @@ -257,7 +257,7 @@ def get_shortcut(keymap, mods, key, scancode): def shortcut_matches(s, mods, key, scancode): - return s[0] & 0b1111 == mods & 0b1111 and s[1] == key + return defines.resolve_key_mods(s[0]) & 0b1111 == mods & 0b1111 and s[1] == key def generate_key_table():