Commands
Buttons, texture inspectors, the panel's own actions and anything you register are commands: they show in the palette (/, or > for commands only), ranked by what you use, and can have hotkeys.
gui.command({ id: 'sim.step', label: 'Step simulation', key: 'shift+s', run: () => sim.step() });
gui.command({
id: 'sim.resume', label: 'Resume', group: 'Simulation', keywords: 'play continue',
when: () => sim.paused, // in the palette, and its key live, only while it's true
run: () => sim.resume(),
});
gui.runCommand('sim.step');
gui.use({ name: 'my-tools', commands: [/* … */] }); // extensions contribute them too
Keys are 'r', 'shift+r', 'alt+r', 'mod+k' (⌘ on macOS, Ctrl elsewhere).