From adb50cba9b15583db019bb655119915869e8c44e Mon Sep 17 00:00:00 2001 From: Can Celik Date: Tue, 4 Aug 2026 05:19:40 +0300 Subject: fix(input): preserve shift-tab in pane automation (#2259) refs #1561 --- src/pane/input.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/pane/input.rs') diff --git a/src/pane/input.rs b/src/pane/input.rs index 38e8138b..2e60bfc8 100644 --- a/src/pane/input.rs +++ b/src/pane/input.rs @@ -13,7 +13,12 @@ pub(super) fn ghostty_key_event_from_terminal_key( crate::ghostty::ffi::GhosttyKeyAction_GHOSTTY_KEY_ACTION_REPEAT } }); - event.set_mods(ghostty_mods_from_key_modifiers(key.modifiers)); + let mut mods = ghostty_mods_from_key_modifiers(key.modifiers); + if matches!(key.code, crossterm::event::KeyCode::BackTab) { + // Ghostty represents backtab as Tab with Shift rather than a distinct key. + mods |= crate::ghostty::MOD_SHIFT; + } + event.set_mods(mods); event.set_key(ghostty_key_from_crossterm_key_code( key.code, key.shifted_codepoint, -- cgit v1.2.3