Preferences › Keyboard Shortcuts lists every command and its keys. You can modify them visually.
In many cases it is probably easier to edit the JSON directly: Command palette › Open Keyboard Shortcuts (JSON).
[
{ "key": "mod+j", "command": "editor.bold" },
{ "key": "mod+b", "command": "-editor.bold" }
]
| Field |
Type |
Default |
Description |
key |
string |
|
The keys, such as mod+shift+k. mod is Cmd on macOS and Ctrl elsewhere. Two keys separated by a space are pressed one after the other, such as mod+k mod+s. |
command |
string |
|
The command's ID. Right-click a command in Preferences › Keyboard Shortcuts › Copy Command ID. A - in front removes a default key, such as -editor.bold. |
when |
string |
always |
Where the key works, such as sourceEditorFocus && editorLanguage == latex. Combine keys with &&, ||, !, ==, != and parentheses. |
args |
any |
none |
Passed to the command. |
Keys: a to z, 0 to 9, f1 to f24, enter, tab, space, backspace, delete, escape, insert, home, end, pageup, pagedown, up, down, left, right, and ; = , - . / ` [ \ ] '. Modifiers: mod, ctrl, shift, alt (option on macOS) and cmd (win on Windows).
when key |
True when |
sourceEditorFocus |
The source editor has the focus |
visualEditorFocus |
The visual editor has the focus |
editorLanguage |
The focused editor's language: latex, typst, markdown, bibtex or other |
inputFocus |
A text field has the focus |
textInputFocus |
A text field, an editor or the terminal has the focus |
terminalFocus |
The terminal has the focus |
dialogFocus |
A dialog has the focus |
editorKeymap |
The source editor's keybindings: default, vim or emacs |
isMac, isWindows, isLinux |
The system Texpile runs on |
| CtrlK | Command palette (also Ctrl Shift P) |
| CtrlT | Go to file |
| CtrlAltEnter | Compile, or stop a running compile |
| CtrlShiftF | Find in files |
| AltZ | Insert a citation from Zotero (Cmd Option Z on macOS) |
| CtrlShiftG | Source Control, with the cursor in the message box (Control Shift G on macOS) |
| CtrlEnter | Commit, from the Source Control message box |
| F8 | Next spelling problem |
| ShiftF8 | Previous spelling problem |
| Ctrl` | Inline code |
| CtrlShift` | Code block |
| CtrlM | Inline math |
| CtrlShiftM | Display math |
| Ctrl. | Superscript (LaTeX, Typst) |
| CtrlShift, | Subscript (LaTeX, Typst) |
| CtrlShiftX | Strikethrough (Markdown) |
| CtrlShiftB | Block quote (LaTeX, Markdown; Typst in the source editor only) |
| CtrlAlt1,2,3 | Heading 1, 2, 3 (\section to \subsubsection in the LaTeX source editor) |
| CtrlAlt4,5,6 | Heading 4, 5, 6 (Typst, Markdown) |
| CtrlShift1,2,3 | Heading 1, 2, 3, for layouts where Ctrl Alt types a character. Windows and Linux |
| CtrlAlt0 | Back to a paragraph (visual editor; Typst and Markdown source) |
| ShiftEnter | New display equation of the same kind, from inside a display equation |
| CtrlEnter | Leave a code block |
| Tab | Switch between \indent and \noindent in a LaTeX paragraph outside a table or list (Shift Tab too) |
| F12 | Go to the definition of a label, macro, citation, or \input (also Ctrl click) |
| F2 | Rename a Typst symbol in every file |
| AltEnter | Quick fixes (Typst) |
| CtrlSpace | Open suggestions, or the symbol search inside math (Control Space on macOS) |
| CtrlShiftSpace | Show the arguments of the command around the cursor (Cmd Shift Space on macOS) |
| CtrlShift[ | Fold the block at the cursor (Cmd Option [ on macOS) |
| CtrlShift] | Unfold the block at the cursor (Cmd Option ] on macOS) |
| CtrlAlt[ | Fold every block (Control Option [ on macOS) |
| CtrlAlt] | Unfold every block (Control Option ] on macOS) |
| Tab | Accept the starter text in an empty .tex file |
| Esc | Hide the math preview until the cursor leaves the math |
| AltF5 | Next change since the last commit |
| ShiftAltF5 | Previous change since the last commit |