Skip to content

Keyboard Shortcuts

All TUI shortcuts use the Ctrl+X chord pattern: press Ctrl+X, release, then press the action key.

ShortcutAction
Ctrl+X PCommand palette
Ctrl+X MChange model
Ctrl+X SSwitch provider
Ctrl+X DToggle dry-run
Ctrl+X TChange theme
Ctrl+X HShow history
Ctrl+X CShow config
Ctrl+X LClear output
Ctrl+X ?Show help
Ctrl+X QExit
Ctrl+CExit / Cancel
EscClose dialogs

Opens the command palette with all available actions. Use arrow keys to navigate and Enter to select.

Shows the help dialog with all available shortcuts and commands.

Gracefully exits Magic Shell TUI.

  • If an operation is running: cancels it
  • If idle: exits the TUI

Closes any open dialog without making a selection.

Opens the model picker. Shows:

  • Model name and ID
  • Category (fast/smart/reasoning)
  • Free indicator for no-cost models
  • Disabled indicator if unavailable

Switches between AI providers:

  • OpenCode Zen
  • OpenRouter

If the target provider isn’t configured, prompts for API key.

Opens the theme picker with live preview. Available themes:

  • opencode (default)
  • tokyonight
  • catppuccin
  • gruvbox
  • nord
  • dracula
  • one-dark
  • matrix

Toggles dry-run mode on/off:

  • On: Commands are shown but not executed
  • Off: Commands can be executed (with safety checks)

Displays current configuration:

  • Provider
  • Model
  • Safety level
  • Theme
  • Dry-run status

Opens command history showing:

  • Previous queries
  • Translated commands
  • Timestamps

Clears the output area while keeping input and config.

Standard line editing shortcuts work in the input field:

ShortcutAction
Ctrl+AMove to start of line
Ctrl+EMove to end of line
Ctrl+UClear line
Ctrl+WDelete word before cursor
Ctrl+KDelete to end of line
Left/RightMove cursor
Up/DownNavigate history
EnterSubmit query

Type these in the input field as alternatives to shortcuts:

CommandEquivalent
!helpCtrl+X ?
!modelCtrl+X M
!providerCtrl+X S
!themeCtrl+X T
!dryCtrl+X D
!configCtrl+X C
!historyCtrl+X H
!clearCtrl+X L

The Ctrl+X prefix is used to:

  1. Avoid conflicts with common terminal shortcuts
  2. Group all Magic Shell actions under one prefix
  3. Follow familiar patterns (like Emacs C-x prefix)

The slight extra keystroke provides a much larger shortcut namespace without conflicts.