Skip to content

Keyboard shortcuts

Shortcut (Windows / Linux)macOSActionWhen
Alt+\Alt+\Request a code completionEditing a file
TabTabAccept the shown completionA suggestion is showing
EscEscDismiss the shown completionA suggestion is showing
Ctrl+ICmd+IInline edit: describe a change to the selectionEditing a file
Ctrl+Shift+EnterCmd+Shift+EnterAccept the pending inline editAn edit is waiting
Ctrl+Shift+BackspaceCmd+Shift+BackspaceReject the pending inline editAn edit is waiting
Ctrl+Shift+/Ctrl+Shift+/Stop generation (completion, chat, edit or review)twinny is generating
Ctrl+.Cmd+.Lightbulb: Fix with Twinny, Edit with TwinnyOn a diagnostic or selection

Tab, Esc and Ctrl+. are VS Code’s own bindings for inline suggestions and code actions.

In the chat

These work in the chat’s composer, in the sidebar and in the panel. They are the chat’s own keys, as in a terminal: Ctrl is Ctrl on macOS too. Press ? on an empty composer to see them, or run Twinny - Chat keyboard shortcuts from the view’s … menu.

KeyAction
EnterSend. A message sent while a reply runs is queued until it ends
Shift+EnterNew line
EscStop the reply, from anywhere in the chat
Esc EscClear the draft (↑ brings it back)
Ctrl+CStop the reply, or clear the draft when nothing is streaming. With text selected it copies
↑ ↓Earlier prompts, from an empty composer
PgUp PgDnScroll the transcript
Ctrl+LNew conversation
Shift+TabAgent mode on or off
@Add a file, symbol, problems, git or terminal output as context
?Show or hide the list of keys, on an empty composer

When agent mode has a command or change waiting for you and the composer is empty:

KeyAction
EnterRun the command, or apply the change
Shift+EnterAlways run that command
EscSkip it

Esc does the first of these that applies: close the list of keys, skip what is waiting, stop the reply, and, pressed twice, clear the draft. Typing while the focus is on the transcript goes to the composer.

The chat’s keys are not VS Code keybindings and cannot be changed in Keyboard Shortcuts.

Changing the editor shortcuts

Open Keyboard Shortcuts (Ctrl+K Ctrl+S) and search for twinny. Or add to keybindings.json:

[
{ "key": "ctrl+alt+i", "command": "twinny.edit", "when": "editorTextFocus && !editorReadonly" },
{ "key": "ctrl+alt+enter", "command": "twinny.acceptEdit", "when": "twinnyInlineEditPending && editorTextFocus" }
]

Useful when contexts: twinnyInlineEditPending (an edit is waiting) and twinnyGeneratingText (something is streaming).

Conflicts

The completion shortcut is on VS Code’s built-in Trigger Inline Suggestion command (editor.action.inlineSuggest.trigger), which GitHub Copilot also binds to Alt+\. If both are installed, rebind one. Ctrl+I is bound by some other assistants too; twinny’s binding applies only in a writable text editor.

Suggested extras

Commands without a default binding that are worth one if you use them often:

Command idSuggestion
twinny.addTestsCtrl+Alt+T
twinny.explainCtrl+Alt+E
twinny.terminalCommand`Ctrl+Alt+“
twinny.fixTerminalErrorCtrl+Alt+F
twinny.newConversationCtrl+Alt+N (Ctrl+L already does this inside the chat)