From 64bca37c169b0f9655cbccc294f2ec593f581ea7 Mon Sep 17 00:00:00 2001 From: Gitanaskhan26 Date: Tue, 28 Apr 2026 09:02:36 +0530 Subject: [PATCH 1/5] fix(cli): add F10 fallback for approval mode cycling --- packages/cli/src/ui/key/keyBindings.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/ui/key/keyBindings.ts b/packages/cli/src/ui/key/keyBindings.ts index e3fbcd8262a..4d7a2d88114 100644 --- a/packages/cli/src/ui/key/keyBindings.ts +++ b/packages/cli/src/ui/key/keyBindings.ts @@ -398,7 +398,10 @@ export const defaultKeyBindingConfig: KeyBindingConfig = new Map([ [Command.TOGGLE_COPY_MODE, [new KeyBinding('f9')]], [Command.TOGGLE_MOUSE_MODE, [new KeyBinding('ctrl+s')]], [Command.TOGGLE_YOLO, [new KeyBinding('ctrl+y')]], - [Command.CYCLE_APPROVAL_MODE, [new KeyBinding('shift+tab')]], + [ + Command.CYCLE_APPROVAL_MODE, + [new KeyBinding('shift+tab'), new KeyBinding('f10')], + ], [Command.SHOW_MORE_LINES, [new KeyBinding('ctrl+o')]], [Command.EXPAND_PASTE, [new KeyBinding('ctrl+o')]], [Command.FOCUS_SHELL_INPUT, [new KeyBinding('tab')]], From 7bb14829ca543856b2a1456ffc254a2dd72270c5 Mon Sep 17 00:00:00 2001 From: Gitanaskhan26 Date: Tue, 28 Apr 2026 09:13:22 +0530 Subject: [PATCH 2/5] fix(cli): add F10 fallback to unfocus commands --- packages/cli/src/ui/key/keyBindings.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/ui/key/keyBindings.ts b/packages/cli/src/ui/key/keyBindings.ts index 7ea4037a1ec..64db3dc0e8d 100644 --- a/packages/cli/src/ui/key/keyBindings.ts +++ b/packages/cli/src/ui/key/keyBindings.ts @@ -406,7 +406,10 @@ export const defaultKeyBindingConfig: KeyBindingConfig = new Map([ [Command.SHOW_MORE_LINES, [new KeyBinding('ctrl+o')]], [Command.EXPAND_PASTE, [new KeyBinding('ctrl+o')]], [Command.FOCUS_SHELL_INPUT, [new KeyBinding('tab')]], - [Command.UNFOCUS_SHELL_INPUT, [new KeyBinding('shift+tab')]], + [ + Command.UNFOCUS_SHELL_INPUT, + [new KeyBinding('shift+tab'), new KeyBinding('f10')], + ], [Command.CLEAR_SCREEN, [new KeyBinding('ctrl+l')]], [Command.RESTART_APP, [new KeyBinding('r'), new KeyBinding('shift+r')]], [Command.SUSPEND_APP, [new KeyBinding('ctrl+z')]], @@ -419,7 +422,10 @@ export const defaultKeyBindingConfig: KeyBindingConfig = new Map([ [Command.TOGGLE_BACKGROUND_SHELL, [new KeyBinding('ctrl+b')]], [Command.TOGGLE_BACKGROUND_SHELL_LIST, [new KeyBinding('ctrl+l')]], [Command.KILL_BACKGROUND_SHELL, [new KeyBinding('ctrl+k')]], - [Command.UNFOCUS_BACKGROUND_SHELL, [new KeyBinding('shift+tab')]], + [ + Command.UNFOCUS_BACKGROUND_SHELL, + [new KeyBinding('shift+tab'), new KeyBinding('f10')], + ], [Command.UNFOCUS_BACKGROUND_SHELL_LIST, [new KeyBinding('tab')]], [Command.SHOW_BACKGROUND_SHELL_UNFOCUS_WARNING, [new KeyBinding('tab')]], From 1788600084f55332e0e8284ebf31be5ae904d537 Mon Sep 17 00:00:00 2001 From: Gitanaskhan26 Date: Tue, 28 Apr 2026 09:30:12 +0530 Subject: [PATCH 3/5] fix(cli): add mapped DECKPAM enter sequence for Numpad key --- packages/cli/src/ui/contexts/KeypressContext.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cli/src/ui/contexts/KeypressContext.tsx b/packages/cli/src/ui/contexts/KeypressContext.tsx index 3a3961221fd..a6467068912 100644 --- a/packages/cli/src/ui/contexts/KeypressContext.tsx +++ b/packages/cli/src/ui/contexts/KeypressContext.tsx @@ -94,6 +94,7 @@ const KEY_INFO_MAP: Record< OE: { name: 'clear' }, OF: { name: 'end' }, OH: { name: 'home' }, + OM: { name: 'enter' }, OP: { name: 'f1' }, OQ: { name: 'f2' }, OR: { name: 'f3' }, From 1713aca82caa26552bbedc4d8ff0552d07c651c8 Mon Sep 17 00:00:00 2001 From: Gitanaskhan26 Date: Tue, 28 Apr 2026 09:39:15 +0530 Subject: [PATCH 4/5] Revert "fix(cli): add mapped DECKPAM enter sequence for Numpad key" This reverts commit 1788600084f55332e0e8284ebf31be5ae904d537. --- packages/cli/src/ui/contexts/KeypressContext.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/cli/src/ui/contexts/KeypressContext.tsx b/packages/cli/src/ui/contexts/KeypressContext.tsx index a6467068912..3a3961221fd 100644 --- a/packages/cli/src/ui/contexts/KeypressContext.tsx +++ b/packages/cli/src/ui/contexts/KeypressContext.tsx @@ -94,7 +94,6 @@ const KEY_INFO_MAP: Record< OE: { name: 'clear' }, OF: { name: 'end' }, OH: { name: 'home' }, - OM: { name: 'enter' }, OP: { name: 'f1' }, OQ: { name: 'f2' }, OR: { name: 'f3' }, From e306c137202e186b3481a00876e9c8b182516941 Mon Sep 17 00:00:00 2001 From: Anas Khalid <87142370+Gitanaskhan26@users.noreply.github.com> Date: Thu, 28 May 2026 11:01:27 +0530 Subject: [PATCH 5/5] fix(cli): apply F10 fallback to additional shift+tab commands --- .vscode/tasks.json | 18 ++++++ docs/reference/keyboard-shortcuts.md | 65 ++++++++------------- packages/cli/src/ui/key/keyBindings.ts | 2 +- packages/cli/src/ui/key/keyMatchers.test.ts | 17 +++++- 4 files changed, 59 insertions(+), 43 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 58709bc925b..da97038a37c 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -20,6 +20,24 @@ "problemMatcher": [], "label": "npm: build: vscode-ide-companion", "detail": "npm run build -w packages/vscode-ide-companion" + }, + { + "label": "npm:docs:keybindings", + "type": "shell", + "command": "npm", + "args": ["run", "docs:keybindings"], + "isBackground": false, + "problemMatcher": [], + "group": "build" + }, + { + "label": "npm:test", + "type": "shell", + "command": "npm", + "args": ["run", "test", "--workspaces"], + "isBackground": false, + "problemMatcher": [], + "group": "test" } ] } diff --git a/docs/reference/keyboard-shortcuts.md b/docs/reference/keyboard-shortcuts.md index 54bc8cc61f5..d351f360528 100644 --- a/docs/reference/keyboard-shortcuts.md +++ b/docs/reference/keyboard-shortcuts.md @@ -65,14 +65,14 @@ available combinations. #### Navigation -| Command | Action | Keys | -| --------------------- | -------------------------------------------------- | --------------- | -| `nav.up` | Move selection up in lists. | `Up` | -| `nav.down` | Move selection down in lists. | `Down` | -| `nav.dialog.up` | Move up within dialog options. | `Up`
`K` | -| `nav.dialog.down` | Move down within dialog options. | `Down`
`J` | -| `nav.dialog.next` | Move to the next item or question in a dialog. | `Tab` | -| `nav.dialog.previous` | Move to the previous item or question in a dialog. | `Shift+Tab` | +| Command | Action | Keys | +| --------------------- | -------------------------------------------------- | ---------------------- | +| `nav.up` | Move selection up in lists. | `Up` | +| `nav.down` | Move selection down in lists. | `Down` | +| `nav.dialog.up` | Move up within dialog options. | `Up`
`K` | +| `nav.dialog.down` | Move down within dialog options. | `Down`
`J` | +| `nav.dialog.next` | Move to the next item or question in a dialog. | `Tab` | +| `nav.dialog.previous` | Move to the previous item or question in a dialog. | `Shift+Tab`
`F10` | #### Suggestions & Completions @@ -97,41 +97,24 @@ available combinations. #### App Controls -| Command | Action | Keys | -| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -| `app.showErrorDetails` | Toggle the debug console for detailed error information. | `F12` | -| `app.showFullTodos` | Toggle the full TODO list. | `Ctrl+T` | -| `app.showIdeContextDetail` | Show IDE context details. | `F4` | -| `app.toggleMarkdown` | Toggle Markdown rendering. | `Alt+M` | -| `app.toggleCopyMode` | Toggle copy mode when in alternate buffer mode. | `F9` | -| `app.toggleMouseMode` | Toggle mouse mode (scrolling and clicking). | `Ctrl+S` | -| `app.toggleYolo` | Toggle YOLO (auto-approval) mode for tool calls. | `Ctrl+Y` | -| `app.cycleApprovalMode` | Cycle through approval modes: default (prompt), auto_edit (auto-approve edits), and plan (read-only). Plan mode is skipped when the agent is busy. | `Shift+Tab` | -| `app.showMoreLines` | Expand and collapse blocks of content when not in alternate buffer mode. | `Ctrl+O` | -| `app.expandPaste` | Expand or collapse a paste placeholder when cursor is over placeholder. | `Ctrl+O` | -| `app.focusShellInput` | Move focus from Gemini to the active shell. | `Tab` | -| `app.unfocusShellInput` | Move focus from the shell back to Gemini. | `Shift+Tab` | -| `app.clearScreen` | Clear the terminal screen and redraw the UI. | `Ctrl+L` | -| `app.restart` | Restart the application. | `R`
`Shift+R` | -| `app.suspend` | Suspend the CLI and move it to the background. | `Ctrl+Z` | -| `app.showShellUnfocusWarning` | Show warning when trying to move focus away from shell input. | `Tab` | -| `app.voiceModePTT` | Hold to speak in Voice Mode. | `Space` | +| `app.showShellUnfocusWarning` | Show warning when trying to move focus away from shell input. | `Tab` | +| `app.voiceModePTT` | Hold to speak in Voice Mode. | `Space` | #### Background Shell Controls -| Command | Action | Keys | -| --------------------------- | ------------------------------------------------------------------ | ----------- | -| `background.escape` | Dismiss background shell list. | `Esc` | -| `background.select` | Confirm selection in background shell list. | `Enter` | -| `background.toggle` | Toggle current background shell visibility. | `Ctrl+B` | -| `background.toggleList` | Toggle background shell list. | `Ctrl+L` | -| `background.kill` | Kill the active background shell. | `Ctrl+K` | -| `background.unfocus` | Move focus from background shell to Gemini. | `Shift+Tab` | -| `background.unfocusList` | Move focus from background shell list to Gemini. | `Tab` | -| `background.unfocusWarning` | Show warning when trying to move focus away from background shell. | `Tab` | -| `app.dumpFrame` | Dump the current frame as a snapshot. | `F8` | -| `app.startRecording` | Start recording the session. | `F6` | -| `app.stopRecording` | Stop recording the session. | `F7` | +| Command | Action | Keys | +| --------------------------- | ------------------------------------------------------------------ | ---------------------- | +| `background.escape` | Dismiss background shell list. | `Esc` | +| `background.select` | Confirm selection in background shell list. | `Enter` | +| `background.toggle` | Toggle current background shell visibility. | `Ctrl+B` | +| `background.toggleList` | Toggle background shell list. | `Ctrl+L` | +| `background.kill` | Kill the active background shell. | `Ctrl+K` | +| `background.unfocus` | Move focus from background shell to Gemini. | `Shift+Tab`
`F10` | +| `background.unfocusList` | Move focus from background shell list to Gemini. | `Tab` | +| `background.unfocusWarning` | Show warning when trying to move focus away from background shell. | `Tab` | +| `app.dumpFrame` | Dump the current frame as a snapshot. | `F8` | +| `app.startRecording` | Start recording the session. | `F6` | +| `app.stopRecording` | Stop recording the session. | `F7` | #### Extension Controls @@ -355,6 +338,6 @@ commands such as `dfx`, `dtx`, `cFx`, and `cTx` are supported. - `shift+enter` is only supported in version 1.25 and higher. - `shift+tab` [is not supported](https://github.com/google-gemini/gemini-cli/issues/20314) - on Node 20 and earlier versions of Node 22. + on Node 20 and earlier versions of Node 22. Use `F10` as a fallback. - On macOS's [Terminal](): - `shift+enter` is not supported. diff --git a/packages/cli/src/ui/key/keyBindings.ts b/packages/cli/src/ui/key/keyBindings.ts index 38de84d6df5..ec18ae7a4dd 100644 --- a/packages/cli/src/ui/key/keyBindings.ts +++ b/packages/cli/src/ui/key/keyBindings.ts @@ -347,7 +347,7 @@ export const defaultKeyBindingConfig: KeyBindingConfig = new Map([ [new KeyBinding('down'), new KeyBinding('j')], ], [Command.DIALOG_NEXT, [new KeyBinding('tab')]], - [Command.DIALOG_PREV, [new KeyBinding('shift+tab')]], + [Command.DIALOG_PREV, [new KeyBinding('shift+tab'), new KeyBinding('f10')]], // Suggestions & Completions [Command.ACCEPT_SUGGESTION, [new KeyBinding('tab'), new KeyBinding('enter')]], diff --git a/packages/cli/src/ui/key/keyMatchers.test.ts b/packages/cli/src/ui/key/keyMatchers.test.ts index a5f28d8cb79..a4ca6716620 100644 --- a/packages/cli/src/ui/key/keyMatchers.test.ts +++ b/packages/cli/src/ui/key/keyMatchers.test.ts @@ -441,7 +441,22 @@ describe('keyMatchers', () => { }, { command: Command.CYCLE_APPROVAL_MODE, - positive: [createKey('tab', { shift: true })], + positive: [createKey('tab', { shift: true }), createKey('f10')], + negative: [createKey('tab')], + }, + { + command: Command.DIALOG_PREV, + positive: [createKey('tab', { shift: true }), createKey('f10')], + negative: [createKey('tab')], + }, + { + command: Command.UNFOCUS_SHELL_INPUT, + positive: [createKey('tab', { shift: true }), createKey('f10')], + negative: [createKey('tab')], + }, + { + command: Command.UNFOCUS_BACKGROUND_SHELL, + positive: [createKey('tab', { shift: true }), createKey('f10')], negative: [createKey('tab')], }, {