Hopefully this is easy to remember from left to right:
- run is F1
- stop is F2
- hide/show is F3
- save is F4
- load is F5
There are also tooltips to introduce these shortcuts to newcomers.
Most of the shortcuts are only enabled when code is visible. In keeping
with existing conventions for mouse events, we leave most event handlers
for the script when code is hidden. The only exception is 'F3' to show
code. So if you want to use a shortcut 'k' when code is hidden, you have
to instead use 'F3 k F3'.
This is all tentative and open to change. But I'll probably grow more
reluctant to change the shortcuts in a few weeks or months.
I think I'm least likely to break something if I do this as explicitly
as possible rather than trying to figure out the right helper to put it
in once and for all. So just add some boilerplate to reset all state at
the start of each onpress1 handler. This seems like a good choice since
we aren't planning to add a lot more menus that would quadratically
explode the boilerplate.