Skip to main content

Keyboard Shortcuts

This document provides detailed information about various keyboard shortcuts available in the command line interface, helping you interact with AI more efficiently.

Usage Instructions​

This guide is organized by functional modules, with detailed explanations for each shortcut. We recommend first familiarizing yourself with basic shortcuts, then gradually mastering advanced features.

Basic Function Shortcuts​

The following are the most commonly used basic shortcuts, recommended for priority mastery:

ShortcutFunctionUse Case
EscClose dialogs and suggestion windowsWhen you want to cancel current operation
Ctrl+CExit application (requires double confirmation)End CLI session
Ctrl+DExit application when input is empty (requires double confirmation)Quick exit from blank state
Ctrl+LClear screenClean screen when interface has too much content
Ctrl+SShow complete response content, disable truncationView full content of long responses
Shift+Tab / Alt+MSwitch modesQuickly switch between different working modes

Debug and Display Control​

These shortcuts are used to control interface display and debugging features:

ShortcutFunctionApplicable Scenario
Ctrl+OToggle debug console displayView detailed information during development debugging
Ctrl+TToggle tool description displayWhen you want to understand tool functionality
Ctrl+YToggle auto-approval mode (YOLO mode)Use when trusting all tool calls

Input Editing Shortcuts​

Basic Input Operations​

ShortcutFunctionUsage Tips
EnterSubmit current inputConfirm and send after completing input
\ (at line end) + EnterInsert line breakUse when inputting multi-line content
!Switch to shell mode when input is emptyQuickly execute system commands
TabAuto-complete current suggestionImprove input efficiency

Cursor Movement​

ShortcutFunction
Ctrl+A / HomeMove cursor to beginning of line
Ctrl+E / EndMove cursor to end of line
Ctrl+B / Left ArrowMove cursor left one character
Ctrl+F / Right ArrowMove cursor right one character
Ctrl+Left Arrow / Meta+Left / Meta+BMove cursor left one word
Ctrl+Right Arrow / Meta+Right / Meta+FMove cursor right one word

Delete Operations​

ShortcutFunction
Ctrl+H / BackspaceDelete character to the left of cursor
Ctrl+D / DeleteDelete character to the right of cursor
Ctrl+W / Meta+Backspace / Ctrl+BackspaceDelete word to the left of cursor
Meta+Delete / Ctrl+DeleteDelete word to the right of cursor
Ctrl+UDelete from cursor to beginning of line
Ctrl+KDelete from cursor to end of line
Ctrl+CClear input prompt box

History and Clipboard​

ShortcutFunctionUsage Tips
Up Arrow / Ctrl+PBrowse previous input historyReuse previous commands
Down Arrow / Ctrl+NBrowse next input historyNavigate through history
Ctrl+VPaste clipboard contentSupports text and image pasting
Ctrl+X / Meta+EnterOpen current input in external editorMore convenient for editing long text

Suggestion Selection Shortcuts​

When the system displays suggestion lists, use the following shortcuts:

ShortcutFunction
Up ArrowBrowse suggestions upward
Down ArrowBrowse suggestions downward
Tab / EnterAccept selected suggestion

Option Selection Shortcuts​

Use in radio button interfaces:

ShortcutFunction
Up Arrow / kMove selection up
Down Arrow / jMove selection down
EnterConfirm selection
1-9Directly select option with corresponding number
Multi-digit numbersPress digits in quick succession to select options greater than 9

Usage Tips​

  1. Beginner Recommendation: First master basic shortcuts like Ctrl+C, Enter, Ctrl+L
  2. Efficiency Improvement: Proficiently use Tab auto-completion and arrow key history features
  3. Advanced Usage: Combining Ctrl+Y auto-approval mode can accelerate workflows
  4. Debugging Help: Use Ctrl+O to view debugging information when encountering problems

Special Notes​

  • Image Support: Use Ctrl+V to directly paste images, the system will automatically save and insert references in input
  • External Editor: Ctrl+X can invoke the system default editor, convenient for editing long text
  • Safe Exit: Both Ctrl+C and Ctrl+D require double confirmation to exit, avoiding accidental operations

We hope this guide helps you use iFlow CLI better! If you have any questions, feel free to ask anytime.