Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
65 changes: 24 additions & 41 deletions docs/reference/keyboard-shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`<br />`K` |
| `nav.dialog.down` | Move down within dialog options. | `Down`<br />`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`<br />`K` |
| `nav.dialog.down` | Move down within dialog options. | `Down`<br />`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`<br />`F10` |

#### Suggestions & Completions

Expand All @@ -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`<br />`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`<br />`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

Expand Down Expand Up @@ -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](<https://en.wikipedia.org/wiki/Terminal_(macOS)>):
- `shift+enter` is not supported.
17 changes: 13 additions & 4 deletions packages/cli/src/ui/key/keyBindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')]],
Expand Down Expand Up @@ -392,11 +392,17 @@ 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')]],
[
Comment thread
Gitanaskhan26 marked this conversation as resolved.
Command.CYCLE_APPROVAL_MODE,
[new KeyBinding('shift+tab'), new KeyBinding('f10')],
Comment thread
Gitanaskhan26 marked this conversation as resolved.
],
[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')]],
Expand All @@ -409,7 +415,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')]],

Expand Down
17 changes: 16 additions & 1 deletion packages/cli/src/ui/key/keyMatchers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')],
},
{
Expand Down