feat(maestro): open the bar with ctrl-k over a focused pane
The global listener already ran in the capture phase, but deferred to isTypingTarget, so xterm's hidden textarea kept Ctrl-K. The bar now treats that textarea as not a typing target, while real form fields — the spawn form's inputs — keep their own Ctrl-K. Leader then ctrl-k (ctrl-a ctrl-k) sends the literal 0x0B to the focused pane through the leader chord the command set already resolves, so readline's kill-to-end-of-line stays reachable. The pool grows a sendToFocused for it, over a new AttachConnection.sendInput. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
9fe9fe4628
commit
b2cbb23fe2
@@ -50,6 +50,10 @@ export interface AttachConnection {
|
||||
onUnmount(): void;
|
||||
/** Put the keyboard back into this terminal — what leaving the sidebar does. */
|
||||
focusTerminal(): void;
|
||||
/** Type raw bytes straight into the PTY, bypassing the terminal's own key
|
||||
* handling — the leader's literal Ctrl-K escape hatch
|
||||
* (docs/COMMAND-BAR.md). */
|
||||
sendInput(data: string): void;
|
||||
/** Fully disconnect: close the WS, dispose the terminal, remove the element. */
|
||||
dispose(): void;
|
||||
}
|
||||
@@ -506,6 +510,9 @@ export function createAttachConnection(
|
||||
focusTerminal() {
|
||||
term.focus();
|
||||
},
|
||||
// The closure above: the same bytes-out path keystrokes and the mobile key
|
||||
// bar already take.
|
||||
sendInput,
|
||||
dispose() {
|
||||
if (disposed) return;
|
||||
disposed = true;
|
||||
|
||||
Reference in New Issue
Block a user