diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-23 03:47:34 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-23 03:47:44 +0300 |
| commit | e7fc85bfdb51f89488430adbfe5bbced3be79c2f (patch) | |
| tree | c1c0324f28040c50d0075d6407bdf6ab14d1b8c0 /src/client/mod.rs | |
| parent | 2a20e90a026936d0d5b96823d74e2e4fe13a166f (diff) | |
fix: preserve kitty printable key releases
refs #1746
Diffstat (limited to 'src/client/mod.rs')
| -rw-r--r-- | src/client/mod.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs index 011de937..a22fd227 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -69,6 +69,8 @@ struct ClientState { blit_encoder: render_ansi::BlitEncoder, /// Whether host mouse capture is currently active. mouse_capture_active: bool, + /// Whether the host terminal currently reports all keys as Kitty sequences. + keyboard_report_all_active: bool, /// The terminal size we reported to the server in our last Hello/Resize. reported_size: (u16, u16), /// Client-local sound playback config, refreshed on server request. @@ -1290,6 +1292,7 @@ async fn run_client_loop( let mut state = ClientState { blit_encoder: render_ansi::BlitEncoder::new(), mouse_capture_active: config.mouse_capture_active, + keyboard_report_all_active: false, reported_size: (cols, rows), sound_config: config.sound_config, kitty_graphics_enabled: config.kitty_graphics_enabled, @@ -1585,6 +1588,16 @@ async fn run_client_loop( host_mouse_capture_active.store(desired, Ordering::Release); } } + ServerMessage::KittyKeyboardReportAll { enabled } => { + if enabled != state.keyboard_report_all_active { + crate::terminal_modes::set_host_kitty_keyboard_report_all( + &mut io::stdout(), + enabled, + ) + .map_err(ClientError::ConnectionFailed)?; + state.keyboard_report_all_active = enabled; + } + } ServerMessage::PrefixInputSource { active } => { if active { prefix_input_source.switch_to_ascii(); |
