Back to Qwen Code

Qwen Code Keyboard Shortcuts

docs/users/reference/keyboard-shortcuts.md

0.18.412.9 KB
Original Source

Qwen Code Keyboard Shortcuts

This document lists the available keyboard shortcuts in Qwen Code.

General

ShortcutDescription
EscClose dialogs and suggestions.
Ctrl+CCancel the ongoing request and clear the input. Press twice to exit the application.
Ctrl+DExit the application if the input is empty. Press twice to confirm.
Ctrl+LClear the screen.
Ctrl+OToggle compact mode (hide/show tool output and thinking).
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+BWhile a foreground shell command is running: promote it to a background task. The child keeps running, the agent's turn unblocks, and the shell appears in /tasks + the Background tasks dialog. No-op when no shell is executing — Ctrl+B then falls through to its prompt-area binding (cursor-left).
Alt/Option+MToggle Markdown output between rich rendered previews and raw/source mode. On macOS, the terminal must send Option as Meta.
Shift+Tab (Tab on Windows)Cycle approval modes (plandefaultauto-editautoyolo)

Input Prompt

ShortcutDescription
!Toggle shell mode when the input is empty.
?Toggle keyboard shortcuts display when the input is empty.
Ctrl+Enter / Cmd+Enter / Shift+Enter / Ctrl+JInsert a newline.
Down ArrowRow down, then snap to end, then history next.
EnterSubmit the current prompt.
Meta+Delete / Ctrl+DeleteDelete the word to the right of the cursor.
TabAutocomplete the current suggestion if one exists.
Up ArrowRow up, then snap to start, then history prev.
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
Esc (double press)Clear 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+NRow down, then snap to end, then history next.
Ctrl+PRow up, then snap to start, then history prev.
Ctrl+RReverse search through input/shell history.
Ctrl+YRetry the last failed request.
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+V (Windows: Alt+V)Paste 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 Arrow / Ctrl+NNavigate down through the suggestions.
Tab / EnterAccept the selected suggestion.
Up Arrow / Ctrl+PNavigate up through the suggestions.

Radio Button Select

ShortcutDescription
Down Arrow / j / Ctrl+NMove selection down.
EnterConfirm selection.
Up Arrow / k / Ctrl+PMove 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.

History scrollback

Active only when ui.useTerminalBuffer is enabled (Settings → UI → Virtualized History). In that mode conversation history is rendered inside an in-app viewport instead of the host terminal scrollback, so the keys below replace the terminal's native scroll.

ShortcutDescription
Shift+UpScroll history up one line.
Shift+DownScroll history down one line.
PgUpScroll history up one page (viewport height).
PgDnScroll history down one page (viewport height).
Ctrl+HomeJump to the top of the conversation.
Ctrl+EndJump to the bottom (and re-engage live auto-follow).
Mouse wheelScroll history (3 lines per tick).

When ui.useTerminalBuffer is on, the terminal forwards mouse events to qwen-code so the wheel can drive the in-app viewport. As a side effect, native click-and-drag text selection is consumed by the program — hold Shift (or Option on macOS Terminal / iTerm) while dragging to bypass mouse capture and select text the usual way.

tmux trackpad scrolling

Inside tmux, some terminals translate trackpad or wheel gestures into plain Up Arrow and Down Arrow sequences before qwen-code sees them. Those bytes are identical to real arrow-key presses, so qwen-code cannot tell whether you meant to scroll the viewport or navigate prompt history.

If trackpad scrolling changes the prompt history in tmux, enable ui.useTerminalBuffer; then use Shift+Up / Shift+Down, or the mouse wheel when tmux forwards wheel events to the app. If you prefer host scrollback, adjust your tmux mouse bindings for wheel events.

IDE Integration

ShortcutDescription
Ctrl+GSee context CLI received from IDE