Skip to content

Gemini CLI Keyboard Shortcuts

This document lists the available keyboard shortcuts in the Gemini CLI.

General

ShortcutDescription
EscClose dialogs and suggestions.
Ctrl+CExit the application. Press twice to confirm.
Ctrl+DExit the application if the input is empty. Press twice to confirm.
Ctrl+LClear the screen.
Ctrl+OToggle the display of the debug console.
Ctrl+SAllows long responses to print fully, disabling truncation. Use your terminal's scrollback to view the entire output.
Ctrl+TToggle the display of tool descriptions.
Ctrl+YToggle auto-approval (YOLO mode) for all tool calls.

Input Prompt

ShortcutDescription
!Toggle shell mode when the input is empty.
\ (at end of line) + EnterInsert a newline.
Down ArrowNavigate down through the input history.
EnterSubmit the current prompt.
Meta+Delete / Ctrl+DeleteDelete the word to the right of the cursor.
TabAutocomplete the current suggestion if one exists.
Up ArrowNavigate up through the input history.
Ctrl+A / HomeMove the cursor to the beginning of the line.
Ctrl+B / Left ArrowMove the cursor one character to the left.
Ctrl+CClear the input prompt
Ctrl+D / DeleteDelete the character to the right of the cursor.
Ctrl+E / EndMove the cursor to the end of the line.
Ctrl+F / Right ArrowMove the cursor one character to the right.
Ctrl+H / BackspaceDelete the character to the left of the cursor.
Ctrl+KDelete from the cursor to the end of the line.
Ctrl+Left Arrow / Meta+Left Arrow / Meta+BMove the cursor one word to the left.
Ctrl+NNavigate down through the input history.
Ctrl+PNavigate up through the input history.
Ctrl+Right Arrow / Meta+Right Arrow / Meta+FMove the cursor one word to the right.
Ctrl+UDelete from the cursor to the beginning of the line.
Ctrl+VPaste clipboard content. If the clipboard contains an image, it will be saved and a reference to it will be inserted in the prompt.
Ctrl+W / Meta+Backspace / Ctrl+BackspaceDelete the word to the left of the cursor.
Ctrl+X / Meta+EnterOpen the current input in an external editor.

Suggestions

ShortcutDescription
Down ArrowNavigate down through the suggestions.
Tab / EnterAccept the selected suggestion.
Up ArrowNavigate up through the suggestions.

Radio Button Select

ShortcutDescription
Down Arrow / jMove selection down.
EnterConfirm selection.
Up Arrow / kMove selection up.
1-9Select an item by its number.
(multi-digit)For items with numbers greater than 9, press the digits in quick succession to select the corresponding item.

Released under the MIT License.