code-dot-org/blockly — pull request #682 by cpirich (2014-06-18 06:26:15+00:00)
Title: [finishes #73434010]: add whenArrow event block, use it in the freeplay levels toolbox

Added this new event block (Pat's suggestion) that uses a drop-down to specify which arrow key you are interested in. This saves vertical space in the toolbox for the freeplay levels because we can show one block there instead of four.

Note: we haven't determined yet if we want to do the same thing for the k-1 freeplay level.

Renamed the internal event handlers to look like "when-down". Created a new registerHandlersWithTitleParam() function that registers the various arrow keys in this same form, much like how the other event handlers are named that take parameters.

Replaced three instances of [] with {} (based on Brian's feedback)