Undo, copy and paste

How far back undo goes, what copy takes, and what paste does with it.

Undo

Ctrl/Cmd+Z undoes, Ctrl/Cmd+Shift+Z or Ctrl/Cmd+Y redoes. The canvas toolbar has the same two as buttons, and they light up only when there is somewhere to go.

Undo works on snapshots of the diagram rather than on a list of commands: after anything changes the canvas, the whole diagram is pushed onto a stack. That has two consequences worth knowing.

  • A drag is one undo. Changes that arrive within about four tenths of a second of each other replace the top entry instead of stacking, so dragging a part across the board and letting go is one step back, not forty.
  • The stack holds a hundred entries. The oldest go first. A diagram is a few kilobytes of text, so a hundred of them cost less than the bookkeeping a command log would need.

Undoing and then editing throws the redo branch away, because it is no longer reachable from what is on screen.

Source files are not in this stack. The code editor keeps its own undo history, which is what you want: undoing a wire should not undo a line of C++.

In a live room

A remote edit is written into your stack as well as onto your canvas, so undo on each side takes back only that side's work. Without that, undoing your own move would restore a document that never had the other person's part in it and the next change would delete it for everybody. See rooms.

Copy, cut, paste and duplicate

  • Ctrl/Cmd+C copies the selection.
  • Ctrl/Cmd+X cuts it.
  • Ctrl/Cmd+V pastes.
  • Ctrl/Cmd+D duplicates in place.
  • Ctrl/Cmd+A selects everything.

The clipboard takes every selected part with its properties, its rotation and its firmware choice, and every wire whose two ends are on selected parts. A wire with one end outside the selection has nothing to attach to in the copy, so it is left behind.

Breadboard holes count as pins of the breadboard part. Copying a circuit that is pushed into a breadboard therefore means having the breadboard in the selection too, which is what Select all does for you.

A paste gets fresh ids and is offset a little from the original, so the copy is not hiding underneath it.

When the shortcut does not fire

Typing always wins. With the caret in the code editor, the serial input or the project title, none of these shortcuts fire: they belong to the field you are typing in. And if there is text selected on the page outside a control, Ctrl+C is the browser's copy of that text, which is how you get a line out of the serial log.

The full list is in keyboard shortcuts.