diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-08-04 05:19:40 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-04 05:19:40 +0300 |
| commit | adb50cba9b15583db019bb655119915869e8c44e (patch) | |
| tree | 910180a20322a581436b8d8e88b1279f40e1500e /src/pane/input.rs | |
| parent | cffc6c4b50178d404fbb939346dab7a33e5ed8d4 (diff) | |
fix(input): preserve shift-tab in pane automation (#2259)
refs #1561
Diffstat (limited to 'src/pane/input.rs')
| -rw-r--r-- | src/pane/input.rs | 7 |
1 files changed, 6 insertions, 1 deletions
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, |
