canvas-sketch
canvas-sketch copied to clipboard
Hotkeys for Exporting & Controlling Sketches
As brought up by this thread by @fturcheti, it might be nice to get some feedback on hotkeys and "how to control the sketch" in a nice and easy way.
Currently these hotkeys work:
- Cmd + S / Ctrl + S = Export Single Frame
- Cmd + Shift + S / Ctrl + Shift S = Start/Stop Recording Multiple Frames
- Cmd + K = Commit & Export Single Frame
- Space to play/pause (only for animated sketches)
One issue with Cmd + S is that it sometimes triggers the native save dialog, i.e. when done from within DevTools. Unfortunately it doesn't seem like a simple solve, since keydown
events aren't triggered in the window when DevTools are in focus.
I'm not sure if there are better default keystrokes for these – maybe some additional hotkeys could be added (e.g. stop/reset playhead), or some removed (the play/pause does not really fit right now). Maybe there is also some other method of exporting & controlling sketches that I have not considered.