Skip to main content

Keyboard shortcuts

From contributes.keybindings in Knox 2.2.2. Remap in Keyboard Shortcuts (search knoxchat or knox.). Shift+Tab for permission mode is handled in the composer, not this table.

Chat and inline edit​

ActionMacWindows / Linux
Add as context and clear / focus chat⌘LCtrl+L
Add as context⌘⇧LCtrl+Shift+L
Edit code (Cmd+I)⌘ICtrl+I
Edit without clear⌘⇧ICtrl+Shift+I
Exit editEsc (editor focused, in edit mode)Esc
Apply code from chat⌥AAlt+A
Debug terminal⌘⇧RCtrl+Shift+R
Cycle permission modeShift+TabShift+Tab
Cancel generation⌘⌫ (as shown in UI)Ctrl+Backspace

Diffs​

ActionMacWindows / LinuxWhen
Accept diff⌘⇧EnterCtrl+Shift+EnterKnox diff visible
Reject diff⌘⇧⌫Ctrl+Shift+BackspaceKnox diff visible
Reject diff⌘ZCtrl+ZKnox diff visible (same chord as editor undo)
Accept vertical-diff block⌥⌘YAlt+Ctrl+Y
Reject vertical-diff block⌥⌘NAlt+Ctrl+N
Accept shadow preview⇧⌥⌘SCtrl+Shift+Alt+SShadow diff visible
Reject shadow preview⇧⌥⌘⌫Ctrl+Shift+Alt+BackspaceShadow diff visible

Assistant undo and checkpoints​

ActionMacWindows / LinuxWhen
Undo last assistant operation⇧⌥⌘ZCtrl+Shift+Alt+ZAgent mode, can undo
Redo last assistant operation⇧⌥⌘YCtrl+Shift+Alt+YAgent mode, can redo
Create checkpoint⌥⌘SCtrl+Alt+S
Undo checkpoint⌥⌘ZCtrl+Alt+Z
Redo checkpoint⌥⌘YCtrl+Alt+Y
List / show checkpoints⌥⌘HCtrl+Alt+H
File history (checkpoint)⇧⌥⌘HCtrl+Alt+Shift+H

⌘Z in a normal editor buffer is editor undo. Checkpoint undo is the Alt chords above. See Restore and undo.

Other​

ActionMacWindows / Linux
Toggle assistant mode⇧⌥⌘ACtrl+Shift+Alt+A

Next​

Command palette · Inline edit · Settings reference