diff options
| author | JJ Liebig <jonathan.liebig@gmail.com> | 2026-07-27 01:16:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-27 02:16:57 +0300 |
| commit | 04205ac070f1b5673b7afec930a561900a3bb31e (patch) | |
| tree | 68488c31661d37678afe80e4a57025729c1efe38 /src/platform/windows.rs | |
| parent | bb29eedb7209a0d5e91052458ce76bc7e4259d18 (diff) | |
fix: preserve shift-enter in windows panes (#1909)
refs #1743
Diffstat (limited to 'src/platform/windows.rs')
| -rw-r--r-- | src/platform/windows.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/platform/windows.rs b/src/platform/windows.rs index d77a30be..8a171716 100644 --- a/src/platform/windows.rs +++ b/src/platform/windows.rs @@ -56,6 +56,17 @@ use super::{ClipboardImage, ForegroundJob, Signal}; const STILL_ACTIVE: u32 = 259; const FOREGROUND_PROCESS_SNAPSHOT_CACHE_TTL: Duration = Duration::from_millis(250); +pub(crate) fn encode_windows_conpty_shift_enter(key: crate::input::TerminalKey) -> Option<Vec<u8>> { + use crossterm::event::{KeyCode, KeyEventKind, KeyModifiers}; + + if key.code != KeyCode::Enter || key.modifiers != KeyModifiers::SHIFT { + return None; + } + + let key_down = !matches!(key.kind, KeyEventKind::Release); + Some(format!("\x1b[13;28;13;{};16;1_", u8::from(key_down)).into_bytes()) +} + #[derive(Debug)] struct CachedProcessSnapshot { built_at: Instant, |
