Keyboard shortcuts
Press these keys in the interactive shell that fx opens. For commands that start with /, see Slash commands.
On Linux, press alt wherever this page says option. Shortcuts with cmd work only in terminals that pass cmd key presses to fx, and many terminals keep some of them, such as cmd+c, for their own copy and paste.
Control fx
| Shortcut | Action |
|---|---|
escape twice | Interrupt fx while it works or retries. File changes and commands that already ran stay in place. The footer shows esc again to interrupt after the first press. |
ctrl+c | Clear your draft. With an empty draft, stop what fx is doing. |
ctrl+c twice | Exit fx. The footer shows press ctrl+c again to exit for 3 seconds after the first press. |
ctrl+d | Exit fx when your draft is empty and fx isn't working. Otherwise, delete the character after the cursor. |
ctrl+z | Suspend fx and return to your shell. Run fg to resume it. |
ctrl+o | Open or close Full detail. |
ctrl+x | When another agent is open, open the agent list to switch to a subagent or another instance, even with a draft. Press it again to go back. |
ctrl+p | Open the model picker without losing your draft. Press ctrl+p again to close it. |
shift+tab | Cycle the permission mode through ask, auto, and full access. |
cmd+r | Open saved sessions from every workspace. Send or clear your draft first. |
ctrl+g | Reload fx when the footer shows update ready: ctrl+g to reload. |
ctrl+l | Redraw the screen. |
escape | End a request that is waiting for you, such as at Out of credits or This request crashed fx twice. |
enter | Send a request again when fx asks first, such as at This request crashed fx twice or Interrupted more than a day ago. |
Write a prompt
| Shortcut | Action |
|---|---|
enter | Send your prompt. While fx works, the prompt steers the current task. |
shift+enter, option+enter, or ctrl+j | Insert a newline. |
\, then enter | Replace the backslash with a newline. This works in every terminal. |
@ | Choose a file or folder to include. On a folder, tab opens it to list its contents, and enter includes the folder itself. |
/ | Browse slash commands. |
$ | Choose a skill. |
tab | Complete the highlighted file, command, model, or reasoning effort. |
up or down | Move between lines. On the first or last line, move to the start or end of the draft, then browse your earlier prompts. |
up with nothing typed | While a steering prompt waits for a running tool or compaction, bring it back to edit before fx applies it. |
down with nothing typed | When another agent is open, open the agent list. |
ctrl+n | Show the next prompt in your history. |
ctrl+v | Attach a clipboard image, like /paste. |
escape twice | Clear your draft while fx is idle. The footer shows esc again to clear after the first press. |
Move the cursor
| Shortcut | Action |
|---|---|
left or right, ctrl+b or ctrl+f | Move one character. |
option+left or option+right, ctrl+left or ctrl+right, option+b or option+f | Move one word. |
home or end, ctrl+a or ctrl+e, cmd+left or cmd+right | Move to the start or end of the line. |
option+up or option+down | Move to the previous or next paragraph. A blank line separates paragraphs. |
ctrl+home or ctrl+end, cmd+up or cmd+down | Move to the start or end of the draft. |
page up or page down | Move through a long draft one page at a time. |
Select and undo
| Shortcut | Action |
|---|---|
shift with a movement key | Select text, for example with shift+left or shift+option+right. Typing replaces the selection. |
cmd+a | Select the whole draft. |
cmd+c | Copy the selection. |
cmd+x | Cut the selection. |
cmd+z or ctrl+_ | Undo. |
cmd+shift+z | Redo. |
Delete text
On a Mac keyboard, backspace is the delete key and forward delete is fn+delete.
| Shortcut | Action |
|---|---|
backspace or ctrl+h | Delete the character before the cursor. |
forward delete or ctrl+d | Delete the character after the cursor. |
option+backspace or ctrl+backspace | Delete the word before the cursor. A terminal that doesn't report ctrl+backspace as its own key deletes one character instead. |
ctrl+w | Delete back to the previous space. |
option+d, option+forward delete, or ctrl+forward delete | Delete the word after the cursor. |
ctrl+u or cmd+backspace | Delete to the start of the line. At the start of a line, join it to the line above. |
ctrl+k or cmd+forward delete | Delete to the end of the line. |
ctrl+y | Paste the text you last deleted with ctrl+w, ctrl+u, or ctrl+k. |
Menus and pickers
These keys work in lists such as /model, /resume, /help, and /settings, and in the suggestions that appear when you type /, @, or $.
| Shortcut | Action |
|---|---|
up or ctrl+k | Move up. |
down or ctrl+j | Move down. |
enter | Choose the highlighted item. |
| typing | Filter a list that shows type to filter. |
tab or shift+tab | Switch the category in /help and /settings, the provider in /model, or the source in /skills. In /resume, switch between the current workspace and all workspaces. |
left or right | Change the highlighted value in /settings and /statusline. |
escape | Close the list. |
/usage
| Shortcut | Action |
|---|---|
tab, shift+tab, left, or right | Change the period. |
up or down | Select a model. |
enter | Show details for the selected model. |
r | Refresh. |
escape | Close, or return from model details. |
/mcp
| Shortcut | Action |
|---|---|
| typing | Filter the servers, or on a server's screen, its tools. |
up or down | Move through the servers, or through a server's actions and tools. |
enter or right | Open the highlighted server, or run the highlighted action, such as Log in, Log out, Approve, Reject, or Remove. |
left | Go back a screen. |
escape | Go back a screen, or close the menu from the server list. |
ctrl+c | Close the menu from any screen. |
When you've typed a filter, left and right move the cursor in it. At the end of the filter, right acts as enter.
Remove and Reject ask on their own row. left chooses yes, right chooses no, and enter confirms the highlighted answer. Typing any other character answers no. Approve opens a screen that shows what the server connects to or runs. Press enter to approve it or escape to cancel.
Approval prompts
These keys work when fx asks before it runs a tool.
| Shortcut | Action |
|---|---|
1, 2, or 3 | Choose that option and answer right away. The prompt shows what each number does. |
up, down, left, or right | Move between options. While you type a note, left and right move the cursor in it. |
tab | Add a note for fx to a yes or no answer. When the prompt doesn't take a note, move to the next option. |
enter | Confirm the highlighted option. |
escape | Cancel the request and stop fx's turn. |
ctrl+c | Answer no, without a note. |
| mouse wheel | Scroll a long file review. |
Questions from fx
These keys work when fx asks you a question with options.
| Shortcut | Action |
|---|---|
1 to 9 | Choose that option. |
up or down | Move between options. |
shift+up or shift+down | Move between options while you type an answer. |
tab | Go to the next question. |
left | Go back to the previous question, unless you're typing an answer. |
enter | Answer. |
escape | Cancel the questions. If you've typed an answer, press escape twice to clear it first. |
ctrl+c | Cancel the questions. |
Full detail
Full detail shows the conversation and complete command output.
It opens on the latest turns. Scrolling up past them loads earlier turns from the saved session, one context compaction at a time. If earlier turns can't be loaded, the footer says so, and page up tries again.
If a damaged line in the saved session hides some earlier turns, the footer says so and points to fx doctor, which names the session and the command that recovers it.
| Shortcut | Action |
|---|---|
ctrl+o, escape, or ctrl+c | Close Full detail. fx keeps working. |
up or down, mouse wheel | Scroll. |
page up or page down | Scroll one page. |