# Keybindings

> Rebind any Flow shortcut with keyboard.ACTION settings, the chord syntax, conflicts, global hotkeys, and the full action list with default chords.

Every `⌘` shortcut in Flow is a named action with a setting, `keyboard.ACTION`, that holds its chord. You can rebind any of them, unbind them, or give a chord to an action that has none by default. A separate set of global hotkeys works while Flow is in the background.

## Rebind a shortcut in Settings

1. Open Settings (`⌘,`) and choose **Keyboard**. Shortcuts are grouped into Layout, Tabs & sessions, Focus, Editing and App.
2. Click a shortcut. The row starts recording.
3. Press the new chord. It must include `⌘`: bare `⌃` and `⌥` chords belong to the programs running in your terminals.
4. To cancel, press `Esc`. To unbind the action, press `⌫` (or Delete) with no modifier.

**Restore defaults** on the Keyboard page puts every shortcut back to its default chord.

You can also search for a shortcut from the command palette: type a query with a word starting with "shortcut", "key", "hotkey" or "binding" (for example "split shortcut") and the shortcut rows appear with their recorders.

## Rebind from settings.json or flow-cli

The setting key is `keyboard.` plus the action's name from the tables below. Its value is a chord string:

```sh
flow-cli settings apply keyboard.split_right cmd-shift-k   # rebind
flow-cli settings apply keyboard.new_files_tab cmd-alt-e   # bind an unbound action
flow-cli settings apply keyboard.toggle_snooze none        # unbind
flow-cli settings reset keyboard.split_right               # back to the default chord
```

In `~/.flow/settings.json` (edit it only while Flow is quit; see [Settings](https://flow.worldbreakstudios.com/docs/configuration/settings.md#edit-settingsjson-by-hand)):

```json
{
  "keyboard.split_right": "cmd-shift-k",
  "keyboard.toggle_snooze": "none"
}
```

## Chord syntax

A chord is a list of tokens joined by `-`:

| Token | Means |
|---|---|
| `cmd` | ⌘. Optional: every app shortcut includes ⌘ whether you write it or not. |
| `shift` | ⇧ |
| `alt` or `opt` | ⌥ |
| `ctrl` | ⌃ |
| anything else | the key; the last one wins |

Keys are written in lowercase: letters (`k`), digits (`1`), punctuation (`,` `=` `[` `]` `;` `\` and the backtick), `minus` for the `-` key (a bare `-` is the separator), and `left`, `right`, `up`, `down` for the arrows. Shifted punctuation folds to its base key, so `{` is `[`, `}` is `]`, `+` is `=` and `_` is `minus`. `none` means unbound.

| You want | Write |
|---|---|
| `⌘K` | `cmd-k` |
| `⇧⌘K` | `cmd-shift-k` |
| `⌃⌥⌘1` | `cmd-ctrl-alt-1` |
| `⌘-` | `cmd-minus` |
| `⇧⌘←` | `cmd-shift-left` |
| no shortcut | `none` |

## Conflicts

Two actions can hold the same chord. When you press it, only the first of them in the action list below runs; the other never fires.

- **Settings › Keyboard** lets you record a chord that another action already holds, keeps both, and marks the conflict so you can fix it.
- **The command palette and `flow-cli settings apply`** take the chord away from the action holding it, which becomes unbound (`none`). The reply names the action that lost it, so you can rebind it.

The default chords never conflict with each other. Some share a key but apply in different places: for example `⌘F` is Find in page in a webview tab, and `⌘B` is Go to definition in a Files tab.

## Horizontal tabs mirror the arrow steps

With horizontal tabs on (`appearance.horizontal_tabs`), sessions run left to right along the top strip and labels top to bottom in its dropdown, so the four `⇧⌘` arrow steps trade arrows:

| Action | Sidebar layout | Horizontal tabs |
|---|---|---|
| Previous / next session (`prev_sidebar_tab`, `next_sidebar_tab`) | `⇧⌘↑` / `⇧⌘↓` | `⇧⌘←` / `⇧⌘→` |
| Previous / next label (`prev_page`, `next_page`) | `⇧⌘←` / `⇧⌘→` | `⇧⌘↑` / `⇧⌘↓` |

A chord you store for these four is the sidebar layout's; Flow mirrors it the same way when horizontal tabs are on.

## Global hotkeys

These work system-wide, even while another app is in front. They use a different chord syntax: modifiers `shift`, `alt`, `ctrl` and `meta` (⌘) joined to a key by `+`, with the key spelled the way macOS key codes are named and case-sensitive: `KeyP`, `Digit1`, `Comma`, `Space`, `ArrowUp`.

| Hotkey | Setting key | Default | Default chord |
|---|---|---|---|
| Command palette (anywhere) | `keyboard.global_palette` | `alt+meta+KeyP` | `⌥⌘P` |
| Clipboard history (anywhere) | `keyboard.global_clipboard` | `alt+meta+KeyV` | `⌥⌘V` |
| Search snippets (anywhere) | `keyboard.global_snippets` | `shift+meta+Comma` | `⇧⌘,` |
| Paste next from clipboard cycle (anywhere) | `keyboard.global_clipboard_cycle` | `shift+meta+Digit1` | `⇧⌘1` |
| Reset clipboard cycle (anywhere) | `keyboard.global_clipboard_cycle_reset` | `shift+meta+Digit2` | `⇧⌘2` |

Set one to `none` (or an empty value) to turn it off. Record them in Settings › Keyboard › Global hotkeys; while a row records, every global hotkey is paused so the chord reaches the window. Changes apply at once, with no restart. While the Flow agent experiment is on, its toggle (`keyboard.toggle_flow`, `⌃⌘J`) is registered system-wide too.

If macOS or another app already owns a chord, registration fails and Settings shows why. The in-app `⇧⌘P` palette shortcut keeps working either way.

## Fixed shortcuts

A few keys are not actions and can't be rebound:

| Keys | Where | Does |
|---|---|---|
| `⌘1`–`⌘9` | Sessions page, Dashboard | Switch to the Nth session (on the Dashboard, focus the Nth card) |
| `⌃1`–`⌃9`, `⌃Tab` / `⌃⇧Tab` | a session in a session group | Jump to the group's Nth member, or the next / previous one |
| `⌘1`–`⌘7` | New tab launcher | Pick a tab type (`⌘1`–`⌘6` while web tabs are off) |
| `⌥1`–`⌥9` | New tab launcher | Launch the Nth Run row |

## Run an action without a shortcut

Every action in the tables below also appears in the command palette (`⇧⌘P`) by its label, and runs from a shell by its name:

```sh
flow-cli action split_right
flow-cli action toggle_dashboard
```

## Action reference

Every rebindable action in Settings › Keyboard order (the order that decides conflicts). **Notes** marks actions that only apply in one place, and actions that only appear while an experiment is on (Settings › Experiments).

### Layout

| Action | Setting key | Default | Notes |
|---|---|---|---|
| Split side-by-side | `keyboard.split_right` | `⌘D` |  |
| Split stacked | `keyboard.split_down` | `⇧⌘D` |  |
| Toggle context card | `keyboard.toggle_context_card` | unbound |  |
| Collapse/expand pane | `keyboard.toggle_collapse` | `⌥⌘M` |  |
| Focus mode: collapse other panes / zoom the dashboard card | `keyboard.toggle_focus_others` | `⌥⌘F` |  |
| Focus terminals | `keyboard.toggle_sidebar` | `⌘S` |  |
| Toggle tabs mode | `keyboard.toggle_horizontal_tabs` | unbound |  |
| Toggle dashboard | `keyboard.toggle_dashboard` | `⌘G` |  |
| Toggle dashboard side panel | `keyboard.toggle_dashboard_side` | `⌥⌘S` | Dashboard only |
| Cycle dashboard PR filter | `keyboard.dashboard_pr_filter` | `⌥⌘G` | Dashboard only |
| Focus dashboard side panel | `keyboard.dashboard_focus_side` | `⌘→` | Dashboard only |
| Focus dashboard card | `keyboard.dashboard_focus_card` | `⌘←` | Dashboard only |
| Toggle PR details panel | `keyboard.toggle_pr_meta` | unbound |  |
| Toggle PR activity order | `keyboard.toggle_pr_activity_order` | unbound |  |
| Toggle PR diff groups panel | `keyboard.toggle_pr_groups` | unbound | PR review tab |
| Toggle Markdown preview | `keyboard.toggle_markdown_preview` | unbound | Files tab or PR review tab |
| Request reviewers… | `keyboard.request_reviewers` | unbound | PR review tab |
| Toggle file explorer | `keyboard.toggle_files_explorer` | `⇧⌘E` | focused Files tab |
| Filter files | `keyboard.filter_files` | `⌥⌘E` | focused Files tab |
| Toggle factory | `keyboard.toggle_factory` | `⌘;` | Factory experiment |
| Close the Factory pane | `keyboard.factory_close_pane` | `⌥⌘\\` | Factory experiment; Factory page only |
| Toggle the Factory secondary pane | `keyboard.factory_toggle_secondary` | unbound | Factory experiment; ⌘\ on the Factory page |

### Tabs and sessions

| Action | Setting key | Default | Notes |
|---|---|---|---|
| New tab | `keyboard.new_tab` | `⌘T` |  |
| New terminal | `keyboard.new_terminal` | unbound |  |
| New webview… | `keyboard.new_webview` | `⌥⌘B` | Web tabs experiment |
| Review pull request | `keyboard.review_pull_request` | `⌥⌘R` |  |
| Browse files | `keyboard.new_files_tab` | unbound |  |
| Change directory… | `keyboard.change_directory` | unbound |  |
| Notes | `keyboard.new_notes_tab` | unbound |  |
| New Shells tab | `keyboard.new_shells_tab` | unbound |  |
| New remote session… | `keyboard.new_remote_session` | unbound |  |
| Open PR as session… | `keyboard.open_pr_session` | unbound |  |
| Reopen closed session | `keyboard.reopen_closed_session` | `⇧⌘T` |  |
| Snooze / wake group | `keyboard.toggle_snooze` | `⇧⌘Z` |  |
| Babysit/stop babysitting group | `keyboard.toggle_babysit` | unbound |  |
| Mark group unread | `keyboard.mark_unread` | unbound |  |
| Open agent details | `keyboard.open_agent_details` | unbound |  |
| New session group | `keyboard.new_session_group` | unbound |  |
| New session in group… | `keyboard.new_session_in_group` | unbound |  |
| Rename session group… | `keyboard.rename_session_group` | unbound |  |
| Remove from session group | `keyboard.remove_from_session_group` | unbound |  |
| Ungroup sessions | `keyboard.ungroup_sessions` | unbound |  |
| Close session group | `keyboard.close_session_group` | unbound |  |
| Next session in group | `keyboard.next_group_member` | unbound |  |
| Previous session in group | `keyboard.prev_group_member` | unbound |  |
| Expand/collapse session group | `keyboard.toggle_session_group_fold` | unbound |  |
| Add to session group… | `keyboard.add_to_session_group` | unbound |  |
| Find in page… | `keyboard.find_in_page` | `⌘F` | focused webview tab |
| Focus address bar | `keyboard.focus_address` | `⌘L` | focused webview tab |
| Open in default browser | `keyboard.open_in_browser` | `⇧⌘O` | focused webview tab |
| Copy link | `keyboard.copy_link` | `⇧⌘C` | focused webview tab |
| Print… | `keyboard.print_page` | `⌃⌘P` | focused webview tab |
| Developer tools | `keyboard.developer_tools` | `⌥⌘I` | focused webview tab |
| Site information | `keyboard.site_info` | `⌃⌘I` | focused webview tab |
| Previous tab | `keyboard.prev_tab` | `⇧⌘[` |  |
| Next tab | `keyboard.next_tab` | `⇧⌘]` |  |
| Open file in editor | `keyboard.open_in_editor` | `⌘O` | focused Files tab |
| Open in Files | `keyboard.open_in_files` | `⌥⌘O` | PR review tab |
| Go to definition | `keyboard.go_to_definition` | `⌘B` | focused Files tab |
| Find references | `keyboard.find_references` | `⇧⌘B` | focused Files tab |
| Switch session… | `keyboard.switch_session` | unbound |  |
| New label | `keyboard.new_section` | `⌃⌥⌘N` |  |
| Add session to the Factory… | `keyboard.factory_add` | unbound | Factory experiment |
| Remove session from the Factory | `keyboard.factory_remove` | unbound | Factory experiment |
| Lock Window to Session… | `keyboard.lock_window` | unbound |  |
| Locked Windows… | `keyboard.locked_windows` | unbound |  |
| Pop out tab | `keyboard.pop_out_tab` | unbound |  |
| Return pop-out to session | `keyboard.return_pop_out` | unbound |  |
| Pin pop-out on top | `keyboard.toggle_pop_out_pin` | unbound |  |
| Cycle pop-out mode | `keyboard.cycle_pop_out_mode` | unbound |  |
| Focus pop-out's session | `keyboard.focus_pop_out_session` | unbound |  |

### Focus

| Action | Setting key | Default | Notes |
|---|---|---|---|
| Focus previous tile | `keyboard.prev_tile` | `⌘[` |  |
| Focus next tile | `keyboard.next_tile` | `⌘]` |  |
| Focus pane left | `keyboard.focus_left` | `⇧⌘H` |  |
| Focus pane down | `keyboard.focus_down` | `⇧⌘J` |  |
| Focus pane up | `keyboard.focus_up` | `⇧⌘K` |  |
| Focus pane right | `keyboard.focus_right` | `⇧⌘L` |  |
| Previous sidebar tab | `keyboard.prev_sidebar_tab` | `⇧⌘↑` | ⇧⌘← with horizontal tabs |
| Next sidebar tab | `keyboard.next_sidebar_tab` | `⇧⌘↓` | ⇧⌘→ with horizontal tabs |

### Editing

| Action | Setting key | Default | Notes |
|---|---|---|---|
| Copy selection | `keyboard.copy` | `⌘C` |  |
| Paste | `keyboard.paste` | `⌘V` |  |

### App

| Action | Setting key | Default | Notes |
|---|---|---|---|
| New webview from command… | `keyboard.new_webview_from_command` | `⌥⇧⌘B` | Web tabs experiment |
| New session… | `keyboard.new_group` | `⇧⌘N` |  |
| Go links | `keyboard.go_links` | unbound |  |
| Create go link | `keyboard.new_go_link` | unbound |  |
| Clipboard history | `keyboard.clipboard_history` | unbound |  |
| Search snippets | `keyboard.search_snippets` | unbound |  |
| Create snippet | `keyboard.create_snippet` | unbound |  |
| Import snippets | `keyboard.import_snippets` | unbound |  |
| Export snippets | `keyboard.export_snippets` | unbound |  |
| Paste next from clipboard cycle | `keyboard.clipboard_cycle_next` | unbound |  |
| Reset clipboard cycle | `keyboard.clipboard_cycle_reset` | unbound |  |
| Pick color | `keyboard.pick_color` | unbound |  |
| Close tab | `keyboard.close_tab` | `⌘W` |  |
| Close group | `keyboard.close_group` | `⇧⌘W` |  |
| Close session everywhere | `keyboard.close_group_everywhere` | unbound | Puddles experiment |
| Pin/unpin group | `keyboard.toggle_pin` | unbound |  |
| Pin / unpin tab | `keyboard.toggle_pin_tab` | `⌥⌘P` |  |
| Show / hide title bar | `keyboard.toggle_title_bar` | `⌥⌘T` |  |
| Quit | `keyboard.quit` | `⌘Q` |  |
| Previous label | `keyboard.prev_page` | `⇧⌘←` | ⇧⌘↑ with horizontal tabs |
| Next label | `keyboard.next_page` | `⇧⌘→` | ⇧⌘↓ with horizontal tabs |
| Open settings | `keyboard.open_settings` | `⌘,` |  |
| Browse settings… | `keyboard.browse_settings` | unbound |  |
| Command palette | `keyboard.command_palette` | `⇧⌘P` |  |
| Find file | `keyboard.find_file` | `⌘P` |  |
| Search in files | `keyboard.search_in_files` | `⇧⌘F` |  |
| Show changes | `keyboard.show_changes` | unbound |  |
| Toggle Flyover Terminal | `keyboard.toggle_flyover` | `` ⌘` `` |  |
| Save as workspace | `keyboard.save_workspace` | `⇧⌘S` |  |
| Open pull request | `keyboard.open_pr_in_github` | `⇧⌘G` |  |
| Merge pull request | `keyboard.merge_pr` | `⇧⌘M` |  |
| Mark PR ready for review | `keyboard.mark_pr_ready` | unbound |  |
| Convert PR to draft | `keyboard.convert_pr_to_draft` | unbound |  |
| Close pull request | `keyboard.close_pr` | unbound |  |
| Enable auto-merge | `keyboard.enable_auto_merge` | unbound |  |
| Disable auto-merge | `keyboard.disable_auto_merge` | unbound |  |
| Change PR status… | `keyboard.pr_status` | unbound |  |
| Toggle Flow agent | `keyboard.toggle_flow` | `⌃⌘J` | Flow agent experiment; system-wide while it is on |
| Increase font size | `keyboard.increase_font_size` | `⌘=` | terminal size in a terminal, chrome size elsewhere |
| Decrease font size | `keyboard.decrease_font_size` | `⌘-` | terminal size in a terminal, chrome size elsewhere |
| Screenshot to clipboard | `keyboard.screenshot_to_clipboard` | `⌃⌥⌘C` |  |
| Screenshot to file | `keyboard.screenshot_to_file` | `⌃⌥⌘S` |  |
| Go to Sessions | `keyboard.go_to_sessions` | `⌃⌥⌘1` |  |
| Go to first tool page | `keyboard.go_to_tool` | unbound |  |
| Go to Task Manager | `keyboard.go_to_tasks` | unbound |  |
| Go to Schedules | `keyboard.go_to_schedules` | unbound | Automations experiment |
| Go to Reviews | `keyboard.go_to_pr_reviews` | unbound | Pull requests experiment |
| Go to My PRs | `keyboard.go_to_my_prs` | unbound | Pull requests experiment |
| Go to Factory | `keyboard.go_to_factory` | unbound | Factory experiment |
| Go to Trash | `keyboard.go_to_trash` | `⌃⌥⌘3` |  |
| Go to Puddle | `keyboard.go_to_puddle` | `⌃⌥⌘2` | Puddles experiment |
| Invite a device to your puddle… | `keyboard.puddle_invite` | unbound | Puddles experiment |
| Install command-line tools… | `keyboard.install_cli` | unbound |  |
| Route gh through ghx (~/.zshrc)… | `keyboard.toggle_gh_alias` | unbound |  |
| Route git through gitx (~/.zshrc)… | `keyboard.toggle_git_alias` | unbound |  |
| Check for updates… | `keyboard.check_for_updates` | unbound |  |
| Download and install update… | `keyboard.install_update` | unbound |  |
| Relaunch to update | `keyboard.relaunch_for_update` | unbound |  |
| Notification history | `keyboard.show_notifications` | `⌥⌘N` |  |
| Clear notifications | `keyboard.clear_notifications` | unbound |  |
| Toggle Do Not Disturb | `keyboard.toggle_do_not_disturb` | unbound |  |
| Open label in new window | `keyboard.open_label_window` | unbound |  |
| Caffeinate | `keyboard.caffeinate` | unbound |  |
| Decaffeinate | `keyboard.decaffeinate` | unbound |  |
| Caffeinate for… | `keyboard.caffeinate_for` | unbound |  |
| Caffeinate until… | `keyboard.caffeinate_until` | unbound |  |
| Caffeinate status | `keyboard.caffeine_status` | unbound |  |
| Caffeine in menu bar | `keyboard.toggle_caffeine_menu_bar` | unbound |  |
| Keep display awake | `keyboard.toggle_caffeine_display` | unbound |  |
| Test decisions model connection | `keyboard.test_decisions_model` | unbound | Decisions experiment |
| Run all cells | `keyboard.run_all_cells` | unbound | Notebooks experiment |
| Restart kernel | `keyboard.restart_kernel` | unbound | Notebooks experiment |
| Clear outputs | `keyboard.clear_outputs` | unbound | Notebooks experiment |
| Evaluate hunk classifier | `keyboard.eval_hunk_classifier` | unbound | Decisions experiment |

## Limits

- Every app shortcut needs ⌘. Chords without it are left to the terminal.
- A conflicting chord only runs the first action in the list above.
- An action whose experiment is off is hidden from Settings, the palette and search, and does nothing.
