Skip to content

Keyboard and pointer bindings ​

Every key and pointer gesture the viewer honours, one table that the views, the command palette and this page all read, so they cannot disagree; every other chord, cmd or ctrl P among them, passes untouched to the browser or the editor. Advanced. viewer.md has the views, editing.md the tools and the assist mode they act on.

sh
npm run dev   # then / opens the palette, ? the key map

The palette and the key map ​

/ opens the command palette: every command with its keys, a search over titles and keys, arrows to move, Enter to run, Escape to close. ? shows the key map below over the view. Keys never fire while a text field has focus, and Mod is cmd on a Mac and ctrl elsewhere. The Editor keys act in VS Code: npm run build -w @pcbjs/vscode writes them into the extension's keybindings from this table, and the palette leaves them out.

The modifier contract ​

pcbjs uses these modifiers: shift+click extends or toggles the selection; cmd or ctrl+click selects the leaf; a double-click enters a group one level and Escape goes up; during a drag shift lifts snapping and cmd or ctrl keeps it to one axis, on the ring shift gives 5 degree stops; alt+click, option on a Mac, opens the definition of what a click selects and keeps the selection; rotation is never a held key, R turns one stop and the ring turns freely; Isolate is I or the chip's button.

The map ​

Everywhere ​

KeyDoesViews
/Open the command palette2D, 3D, Schematic, DRC/ERC
?Show the key map2D, 3D, Schematic, DRC/ERC
VCycle the view: 2D, 3D, schematic, DRC/ERC2D, 3D, Schematic, DRC/ERC
GShow or hide the grid2D, 3D, Schematic
NShow or hide the ratsnest and the connection indicators2D, 3D, Schematic

Board views ​

KeyDoesViews
FFit the board or the sheet2D, 3D, Schematic
+ or =Zoom in2D, 3D, Schematic
-Zoom out2D, 3D, Schematic

Selection ​

KeyDoesViews
EscapeCancel a drag, leave assist mode, go up inside an isolation, leave it, else clear the selection2D, 3D, Schematic
IIsolate: edit the definition of the selected instance, or leave it for the board2D, 3D, Schematic
Shift+ClickAdd to the selection or take out of it2D, 3D, Schematic
Mod+ClickSelect the leaf under the pointer, past its groups2D, 3D, Schematic
Alt+ClickOpen the definition of what a click selects, its factory or declaration, in the editor; the selection stays2D, 3D, Schematic
Double-clickEnter the definition of the instance under the pointer, the part clicked selected; a click on the selected instance does the same2D, 3D, Schematic

Tools ​

KeyDoesViews
MMove tool2D, 3D
RRotate the anchor 90 degrees2D, 3D
LPut the anchor on the other side2D, 3D
PControl point tool of a route2D, 3D
Delete or BackspaceDelete the picked control point2D, 3D
Mod+ZUndo: source document history in the editor, else this page’s last edit2D, 3D, Schematic
Mod+Shift+ZRedo: source document history in the editor, else this page’s last undo2D, 3D, Schematic

Drag ​

KeyDoesViews
Shift+DragMove or point: no snapping; ring: 5 degree stops2D, 3D
Mod+DragMove or point: lock to one axis; ring: no snapping2D, 3D

Assist ​

KeyDoesViews
ShiftEvery grid dot; a pick writes l when its trace is clean, else X2D, 3D
ClickWrite the dot as the argument the editor waits for2D, 3D

Editor ​

KeyDoesViews
Mod+Alt+2Open the 2D view beside the codeVS Code
Mod+Alt+Shift+2Open another 2D view beside the codeVS Code
Mod+Alt+3Open the 3D view beside the codeVS Code
Mod+Alt+Shift+3Open another 3D view beside the codeVS Code
Mod+Alt+SOpen the schematic view beside the codeVS Code
Mod+Alt+Shift+SOpen another schematic view beside the codeVS Code
Mod+Alt+4Open the DRC/ERC view beside the codeVS Code
Mod+Alt+Shift+4Open another DRC/ERC view beside the codeVS Code
Mod+Shift+RRestart the server and clear every cache, while a preview tab is activeVS Code

MIT licensed. A proof of concept, pre 0.1.