aboutsummaryrefslogtreecommitdiff
path: root/src/client/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/mod.rs')
-rw-r--r--src/client/mod.rs13
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();