From 32b068560dd8ae309f34ba6c750f687003ea442b Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Mon, 27 Apr 2026 15:32:16 -0500 Subject: [PATCH] fix(tui): stop ctrl+x from leaking a literal 'x' into the composer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The text input's ctrl-passthrough whitelist only listed Ctrl+C and Ctrl+B. Ctrl+X fell through to the printable-char branch and got inserted as 'x' alongside the queue-delete action firing in useInputHandlers. Add Ctrl+X to the same whitelist so it bypasses the readline-style fallback and reaches the app-level handler unchanged. When not in queue-edit mode it's a no-op, which is fine — typing 'x' on Ctrl+X was the wrong default anyway. --- ui-tui/src/components/textInput.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui-tui/src/components/textInput.tsx b/ui-tui/src/components/textInput.tsx index 3b916d3d8d..1bff1d6756 100644 --- a/ui-tui/src/components/textInput.tsx +++ b/ui-tui/src/components/textInput.tsx @@ -684,13 +684,13 @@ export function TextInput({ return } - // Ctrl+B is the documented voice-recording toggle (see platform.ts → - // isVoiceToggleKey). Pass it through so the app-level handler in - // useInputHandlers receives it instead of being swallowed here as - // either backward-word nav (line below) or a literal 'b' insertion. + // Ctrl chords claimed by useInputHandlers — pass through instead of + // letting them fall into readline-style nav or a literal char insert. + // Ctrl+B = voice toggle, Ctrl+X = delete queued message while editing. if ( (k.ctrl && inp === 'c') || (k.ctrl && inp === 'b') || + (k.ctrl && inp === 'x') || k.tab || (k.shift && k.tab) || k.pageUp ||