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

ShortcutAction
escape twiceInterrupt 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+cClear your draft. With an empty draft, stop what fx is doing.
ctrl+c twiceExit fx. The footer shows press ctrl+c again to exit for 3 seconds after the first press.
ctrl+dExit fx when your draft is empty and fx isn't working. Otherwise, delete the character after the cursor.
ctrl+zSuspend fx and return to your shell. Run fg to resume it.
ctrl+oOpen or close Full detail.
ctrl+xWhen 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+pOpen the model picker without losing your draft. Press ctrl+p again to close it.
shift+tabCycle the permission mode through ask, auto, and full access.
cmd+rOpen saved sessions from every workspace. Send or clear your draft first.
ctrl+gReload fx when the footer shows update ready: ctrl+g to reload.
ctrl+lRedraw the screen.
escapeEnd a request that is waiting for you, such as at Out of credits or This request crashed fx twice.
enterSend 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

ShortcutAction
enterSend your prompt. While fx works, the prompt steers the current task.
shift+enter, option+enter, or ctrl+jInsert a newline.
\, then enterReplace 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.
tabComplete the highlighted file, command, model, or reasoning effort.
up or downMove 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 typedWhile a steering prompt waits for a running tool or compaction, bring it back to edit before fx applies it.
down with nothing typedWhen another agent is open, open the agent list.
ctrl+nShow the next prompt in your history.
ctrl+vAttach a clipboard image, like /paste.
escape twiceClear your draft while fx is idle. The footer shows esc again to clear after the first press.

Move the cursor

ShortcutAction
left or right, ctrl+b or ctrl+fMove one character.
option+left or option+right, ctrl+left or ctrl+right, option+b or option+fMove one word.
home or end, ctrl+a or ctrl+e, cmd+left or cmd+rightMove to the start or end of the line.
option+up or option+downMove to the previous or next paragraph. A blank line separates paragraphs.
ctrl+home or ctrl+end, cmd+up or cmd+downMove to the start or end of the draft.
page up or page downMove through a long draft one page at a time.

Select and undo

ShortcutAction
shift with a movement keySelect text, for example with shift+left or shift+option+right. Typing replaces the selection.
cmd+aSelect the whole draft.
cmd+cCopy the selection.
cmd+xCut the selection.
cmd+z or ctrl+_Undo.
cmd+shift+zRedo.

Delete text

On a Mac keyboard, backspace is the delete key and forward delete is fn+delete.

ShortcutAction
backspace or ctrl+hDelete the character before the cursor.
forward delete or ctrl+dDelete the character after the cursor.
option+backspace or ctrl+backspaceDelete the word before the cursor. A terminal that doesn't report ctrl+backspace as its own key deletes one character instead.
ctrl+wDelete back to the previous space.
option+d, option+forward delete, or ctrl+forward deleteDelete the word after the cursor.
ctrl+u or cmd+backspaceDelete to the start of the line. At the start of a line, join it to the line above.
ctrl+k or cmd+forward deleteDelete to the end of the line.
ctrl+yPaste the text you last deleted with ctrl+w, ctrl+u, or ctrl+k.

These keys work in lists such as /model, /resume, /help, and /settings, and in the suggestions that appear when you type /, @, or $.

ShortcutAction
up or ctrl+kMove up.
down or ctrl+jMove down.
enterChoose the highlighted item.
typingFilter a list that shows type to filter.
tab or shift+tabSwitch 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 rightChange the highlighted value in /settings and /statusline.
escapeClose the list.

/usage

ShortcutAction
tab, shift+tab, left, or rightChange the period.
up or downSelect a model.
enterShow details for the selected model.
rRefresh.
escapeClose, or return from model details.

/mcp

ShortcutAction
typingFilter the servers, or on a server's screen, its tools.
up or downMove through the servers, or through a server's actions and tools.
enter or rightOpen the highlighted server, or run the highlighted action, such as Log in, Log out, Approve, Reject, or Remove.
leftGo back a screen.
escapeGo back a screen, or close the menu from the server list.
ctrl+cClose 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.

ShortcutAction
1, 2, or 3Choose that option and answer right away. The prompt shows what each number does.
up, down, left, or rightMove between options. While you type a note, left and right move the cursor in it.
tabAdd a note for fx to a yes or no answer. When the prompt doesn't take a note, move to the next option.
enterConfirm the highlighted option.
escapeCancel the request and stop fx's turn.
ctrl+cAnswer no, without a note.
mouse wheelScroll a long file review.

Questions from fx

These keys work when fx asks you a question with options.

ShortcutAction
1 to 9Choose that option.
up or downMove between options.
shift+up or shift+downMove between options while you type an answer.
tabGo to the next question.
leftGo back to the previous question, unless you're typing an answer.
enterAnswer.
escapeCancel the questions. If you've typed an answer, press escape twice to clear it first.
ctrl+cCancel 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.

ShortcutAction
ctrl+o, escape, or ctrl+cClose Full detail. fx keeps working.
up or down, mouse wheelScroll.
page up or page downScroll one page.