code-dot-org/blockly — pull request #264 by cpirich (2013-11-06 16:06:30+00:00)
Title: [Finishes 59583904]: dialog support for keyboard

Depends on recent dashboard change
Dashboard will handle the ESC key
We need to manually add a handler for keydown to grab SPACE and ENTER
We allow a button to be identified (optionally) at dialog create time that will become the default button.
Assuming a default button is provided, we look for SPACE and ENTER and if we see it, we override default behavior (prevents browser from scrolling on SPACE) and fire a click event to the default button.
All of the places where createModalDialogWithIcon() is called have been updated to pass a default button (instructions, show code, and feedback).
For feedback, when there are multiple buttons, Try Again is the default unless there is a Continue button only.