From cad6df1a9b2926c4189c9471786cf3d78f9f55f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= <35082514+alezmad@users.noreply.github.com> Date: Sat, 28 Feb 2026 09:59:40 +0000 Subject: [PATCH] feat: add Ctrl+Space as unified toggle between picker and grid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Works in both directions — picker→grid and grid→picker. Keeps existing Ctrl+` and t keybinds as alternatives. Co-Authored-By: Claude Opus 4.6 --- src/input/handlers.ts | 8 +++++++- src/ui/panels.ts | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/input/handlers.ts b/src/input/handlers.ts index 02cb383..486a110 100644 --- a/src/input/handlers.ts +++ b/src/input/handlers.ts @@ -306,7 +306,7 @@ export async function handleGridInput(rawSequence: string): Promise { return true } - if (rawSequence === "\x1e" || rawSequence === "\x1b`") { + if (rawSequence === "\x1e" || rawSequence === "\x1b`" || rawSequence === "\x00") { switchToPicker() return true } @@ -397,6 +397,12 @@ function processGridInput(str: string) { // ─── Stdin: picker mode ────────────────────────────────────────────── function processPickerInput(str: string) { + // Ctrl+Space → toggle to grid + if (str.includes("\x00") && app.directGrid && app.directGrid.paneCount > 0) { + switchToGrid() + return + } + const pickerMouse = extractMouseEvents(str) for (const me of pickerMouse) { if (me.btn === 0 && !me.release) handlePickerClick(me.col, me.row) diff --git a/src/ui/panels.ts b/src/ui/panels.ts index c55d157..c44810e 100644 --- a/src/ui/panels.ts +++ b/src/ui/panels.ts @@ -93,7 +93,7 @@ export function updateColumnHeaders() { } export function updateFooter() { - const gridHint = app.directGrid && app.directGrid.paneCount > 0 ? " │ t grid" : "" + const gridHint = app.directGrid && app.directGrid.paneCount > 0 ? " │ ^space grid" : "" if (app.bottomPanelMode === "idle" && app.cachedIdleSessions.length > 0) { app.footerText.content = t` ${dim( "↑↓ nav │ tab/shift-tab idle select │ enter focus │ i preview │ space select │ a all │ n none │ s sort │ q quit" + gridHint