From f5e66b251fa8ec24989bf25861bcf4e38a561470 Mon Sep 17 00:00:00 2001 From: sf-jin-ku Date: Wed, 3 Jun 2026 09:13:01 -0700 Subject: feat: switch input source during prefix mode (#434) On macOS, opt-in under [experimental], temporarily switch the host input source to the current ASCII-capable layout while prefix mode is active so prefix commands register even when a CJK IME is composing, then restore the previous input source when prefix mode exits or is cancelled. No-op when the current source is already ASCII-capable, on non-macOS platforms, or when any input source call fails. Pane text input is unaffected. Also pin next_resize_poll in next_loop_deadline_includes_selection_autoscroll_deadline so the selection autoscroll deadline stays the earliest; the default resize poll could otherwise beat it and flake the assertion. refs #400 Co-authored-by: Can Celik --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 13ba5e6f..f88880d7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -274,6 +274,11 @@ const DEFAULT_CONFIG: &str = r##"# herdr configuration # kitty_graphics = false # Save recent pane screen history across full server restarts. pane_history = false +# While prefix mode is active, temporarily switch the macOS host input +# source to an ASCII-capable keyboard layout so prefix commands register +# even when a CJK IME is active, then restore the previous input source +# when prefix mode exits. macOS only; best-effort. Default: false. +# switch_ascii_input_source_in_prefix = false # Expose the focused pane's cursor to the outer terminal so macOS input # methods keep tracking the candidate window when TUIs paint their own # cursor (Claude Code, pi, codex). Trade-off: extra cursor visible for -- cgit v1.2.3