The rule
A shortcut never fires while you are typing. If the focus is in the code editor, the serial input, the project title or any other field, the key belongs to that field. None of the canvas keys needs the Alt key, and any key press holding Alt is ignored there.
The single-key shortcuts (the letters, digits, + and - below) can be
switched off, or set to need Alt+Shift with each one, from the canvas menu's
Keys tile. Each press steps it on, then Alt+Shift, then off. It is kept in
this browser with the grid and the theme. Ctrl/Cmd keys, Delete, Escape
and the keys in Working without a mouse are not
affected, because those only act while the canvas itself has focus. The code editor has keys of its own, in
the last table.
On a Mac the modifier is ⌘; everywhere else it is Ctrl. The editor works out which and says so in its own menus.
The document
| Key | What it does |
|---|---|
Ctrl/Cmd+S |
Save |
Ctrl/Cmd+Shift+H |
History: this project's earlier saves |
Ctrl/Cmd+Z |
Undo |
Ctrl/Cmd+Shift+Z or Ctrl/Cmd+Y |
Redo |
Ctrl/Cmd+A |
Select all |
Ctrl/Cmd+C |
Copy the selection |
Ctrl/Cmd+X |
Cut the selection |
Ctrl/Cmd+V |
Paste |
Ctrl/Cmd+D |
Duplicate the selection |
Ctrl/Cmd+\ |
Hide or show the code pane, when the canvas and the code sit side by side |
Ctrl/Cmd+S is caught before anything else, wherever the focus is, so the
browser never offers to save the page instead.
Ctrl/Cmd+C and Ctrl/Cmd+X stand aside when there is text selected on the
page outside a control: that is the browser's own copy, which is how you get a
line out of the serial log.
The canvas
| Key | What it does |
|---|---|
A |
Open the part panel |
R |
Rotate the selected parts 90 degrees |
Delete or Backspace |
Delete the selection |
D |
Open or close the drawing tools |
T |
Tidy wires: lay the selection, or every wire, out again |
L |
Open or close the layers panel |
Shift+L |
Show levels: the live level and voltage on every net |
Shift+O |
Take the DC operating point; press it again to put it away |
C |
Add a comment where the pointer is |
Enter or F2 |
Rename the selected frame, or edit the selected note |
F |
Fit the whole circuit to the screen |
+ or = |
Zoom in |
- or _ |
Zoom out |
Space (held) |
Pan while dragging |
Alt (Option) while dragging a breadboard |
Move the board alone, leaving the parts plugged into it where they are |
Escape |
Abandon the wire being drawn, or clear the selection |
Escape does the nearest thing first: it puts the drawing tool down, closes a note or frame you are typing in, closes an open comment thread, drops a wire that is half drawn, and only then clears the selection. It also closes the part panel, the canvas menu, the color swatches and the share sheet.
With one sticky note selected and nothing else, typing a letter opens the note
and types that letter into it. C, R and the other letters are then text,
not shortcuts.
While the circuit runs
| Key or click | What it does |
|---|---|
| A key you bound to a button | Holds that button down while the key is held. Several keys at once all work |
Shift and a click on a button |
Keeps the button pressed until you Shift-click it again |
Bind keys to a pushbutton or any other part you press with the pointer: select it, and in its properties under Keyboard keys press Set key, then the key, or choose one from Quick pick. The keys are saved with the part, so they travel with the project. A key typed into the code editor or a field never presses a part.
Working without a mouse
The canvas is one stop in the Tab order. Tab to it and these keys work while it has focus. Each action is read out by a screen reader.
| Key | What it does |
|---|---|
Tab / Shift+Tab |
Select the next or previous part. Past the last part, Tab leaves the canvas |
| Arrow keys | Move the selected part one grid step; with Shift, five steps. A breadboard takes the parts plugged into it along. With nothing selected, select the first part |
R |
Rotate the selected part |
Enter or W |
Connect a wire: pick one of the part's pins, then type to find the pin to connect to, and press Enter |
P |
Go to the selected part's properties. Shift+Tab from there comes back to the canvas |
Delete or Backspace |
Delete the selected part |
V |
Open the circuit as text |
Space or Enter (running) |
Press a button, or flip a switch, on the selected part |
Arrow keys, Page Up, Page Down, Home, End (running) |
Turn the selected knob or slider |
A wire made this way is routed like one drawn by hand and is one step of Undo. The wire dialog also lists the wires already on the part, each with a Delete button.
Circuit as text (the canvas menu, V, or the hidden link at the top of the
canvas that appears when you Tab to it) lists every part in a table, with its
type, its settings and, while the circuit runs, what it is doing: an LED on or
off and how bright, a servo's angle, a seven-segment digit, a meter's reading.
Below it, every connection is listed as "part.pin to part.pin". Each part
selects itself on the canvas, and each wire can be deleted from the list. While
the circuit runs, changes are announced at most once every two seconds; a
checkbox turns that off.
The part panel
The arrows move through the tiles, Enter places the highlighted part, and
Escape closes the panel. The panel swallows its own keys, so A typed inside
the search field is a letter, not a second attempt to open it.
The code editor
With the cursor in the code, these are the keys. They follow Sublime Text, and where CodeMirror, the editor underneath, has a spelling of its own, both work. Where the Arduino IDE has a key of its own, the Arduino IDE's wins. Where a Mac key differs it is in brackets.
The Arduino IDE's keys
| Key | What it does |
|---|---|
Ctrl/Cmd+Enter |
Run, or Stop while it runs: the same as pressing the Run button |
Ctrl/Cmd+T or Ctrl/Cmd+Shift+F |
Auto Format: indent the open file again, two spaces a level |
Auto Format indents every line by how deep it sits in braces and brackets,
lines each closing brace up with the line that opened it, indents a lone
statement under an if or an else, indents case labels inside a switch,
and puts a space after if, for, while and switch. It keeps blank lines
and never moves a brace to another line. Strings, comments and # lines keep
their text exactly. It is one edit, so one Ctrl/Cmd+Z takes it back.
In an ordinary browser window, Ctrl/Cmd+T opens a new tab and the page
never sees the key: Chrome, Edge and Firefox keep it for themselves. Use
Ctrl/Cmd+Shift+F, which works everywhere. Ctrl/Cmd+T does reach the editor
when Mokxi is installed as an app and runs in its own window.
Ctrl+R, Verify in the Arduino IDE, is left alone: in a browser it reloads the
page. Run builds the code first anyway.
Completion
| Key | What it does |
|---|---|
Ctrl+Space |
Show the completions for the word at the cursor |
Enter or Tab |
Take the highlighted completion |
Up, Down, Page Up, Page Down |
Move through the list |
Escape |
Close the list |
Tab, Shift+Tab |
In a snippet, the next or previous blank to fill in |
Cursors and selection
| Key | What it does |
|---|---|
Ctrl/Cmd+D |
Select the word, then add its next match; keep pressing for more |
Alt+F3 (Ctrl+Cmd+G) or Ctrl/Cmd+Shift+L |
Select every match of the selection |
Ctrl/Cmd+Shift+L on a selection over several lines |
A cursor at the end of each line |
| Alt and a click | Add a cursor there |
| Alt and a drag | Select a column, a rectangle across the lines |
Ctrl/Cmd and a click |
Add a cursor there |
Ctrl/Cmd+Alt+Up or Down |
Add a cursor on the line above or below |
Escape |
Back to one cursor |
Ctrl/Cmd+L |
Select the line; again for the next one |
Ctrl/Cmd+I |
Grow the selection to the enclosing block |
Ctrl/Cmd+U |
Undo the last change of selection |
Find
| Key | What it does |
|---|---|
Ctrl/Cmd+F |
Find, with match case, regular expression and whole word |
Ctrl+H (Cmd+Alt+F) |
Find and replace |
F3, Shift+F3 |
Next match, previous match (Cmd+G, Shift+Cmd+G on a Mac too) |
Ctrl+G or Ctrl/Cmd+Alt+G |
Go to a line |
Ctrl/Cmd+Shift+\ |
Jump to the matching bracket |
Lines
| Key | What it does |
|---|---|
Ctrl/Cmd+/ |
Comment or uncomment the lines |
Shift+Alt+A (Shift+Ctrl+A) |
Comment or uncomment the selection as a block |
Ctrl/Cmd+Shift+D |
Duplicate the line |
Shift+Alt+Up or Down |
Copy the line up or down |
Alt+Up or Down, or Ctrl+Shift+Up or Down (Ctrl+Cmd+Up or Down) |
Move the line up or down |
Ctrl/Cmd+Shift+K |
Delete the line |
Ctrl/Cmd+Shift+Enter |
A new line above |
Tab, Shift+Tab |
Indent, outdent |
Ctrl/Cmd+], Ctrl/Cmd+[ |
Indent, outdent |
Ctrl/Cmd+Alt+\ |
Indent the selection again, the way the code asks |
Enter |
A new line, indented, with no trailing spaces left behind |
Folding, errors and the view
| Key | What it does |
|---|---|
Ctrl+Shift+[, Ctrl+Shift+] (Cmd+Alt+[, Cmd+Alt+]) |
Fold, unfold the block |
Ctrl+Alt+[, Ctrl+Alt+] |
Fold all, unfold all |
F8 |
Go to the next build error or warning |
Ctrl/Cmd+Shift+M |
The list of build errors and warnings |
Alt+Z |
Wrap long lines, or keep them whole; remembered |
Ctrl/Cmd+Z, Ctrl/Cmd+Shift+Z or Ctrl+Y |
Undo, redo |
Ctrl/Cmd+S |
Save the project, the same as anywhere else in the editor |
Tab indents, so it does not move you out of the code. Press Escape and then
Tab to leave it with the keyboard, or Ctrl+M (Shift+Alt+M) to make Tab
move the focus until you press it again.
In diagram.json, Ctrl/Cmd+Enter applies the edited diagram instead.
Where else to look
Every button on the canvas toolbar names its shortcut in its tooltip, because the buttons and the keyboard read the same table. The more menu's tiles carry only a word, so for everything in there, this page is the list.
Run, Stop and Save have buttons rather than bare keys, because they are the
three things you press most and a button is easier to find than a memory. With
the cursor in the code, Ctrl/Cmd+Enter presses Run (or Stop) for you, as it
does in the Arduino IDE, and the Run button's tooltip says so.