# Keyboard Shortcuts

## Global Shortcuts

| Shortcut | Action | Description |
|----------|--------|-------------|
| `Ctrl+C` | Smart Quit | Cancel if busy, quit if idle |
| `Ctrl+L` | Clear History | Clear all blocks and context |
| `Ctrl+S` | Quick Export | Export conversation to markdown |
| `Ctrl+R` | History Search | Search command history |
| `Ctrl+F` | Block Search | Search block contents |
| `Ctrl+P` | Command Palette | Search and execute commands |
| `Escape` | Cancel | Cancel current operation |

## Mode Toggle

| Shortcut | Action |
|----------|--------|
| `Ctrl+Space` | Toggle AI/CLI mode |
| `Ctrl+T` | Toggle AI/CLI mode (alternate) |
| `Ctrl+B` | Toggle AI/CLI mode (alternate) |

## Function Keys

| Key | Action |
|-----|--------|
| `F1` | Open help screen |
| `F2` | Select AI model |
| `F3` | Change theme |
| `F4` | Select provider |

## Input Field

| Shortcut | Action |
|----------|--------|
| `Enter` | Submit command/query |
| `Up/Down` | Navigate command history |
| `Tab` | Accept autocomplete suggestion |

## Block Actions

When focused on an AI response block:

| Action | Description |
|--------|-------------|
| Copy | Copy response to clipboard |
| Edit | Edit and resubmit query |
| Retry | Regenerate response |
| Fork | Branch conversation from this point |

## Terminal Block (TUI Mode)

When a TUI application is running:

| Key | Action |
|-----|--------|
| All keys | Passed to running application |
| `Ctrl+C` | Send interrupt to application |

## Command Palette

| Shortcut | Action |
|----------|--------|
| `Ctrl+P` | Open palette |
| `Escape` | Close palette |
| `Enter` | Execute selected command |
| `Up/Down` | Navigate options |
| Type | Filter commands |
