Khan/perseus — pull request #12 by AkA84 (2014-09-03 18:13:54+00:00)
Title: Add widgets shortcuts

Summary: Quick insert of widgets into the editor via keyboard shortcuts

![shortcuts3](https://cloud.githubusercontent.com/assets/6400898/4138904/9436cc6e-3395-11e4-8555-117f5c33b7fd.gif)

How it works:
1. While writing the question/answer/hint, tap CTRL
2. You have now half a second to type the shortcut of a widget to quickly add it (for example: 'N' for the number line)
3. Press spacebar to immediately insert the widget, or just wait
4. Rinse & repeat

Thought this could be useful for someone who writes a lot of exercises :)

What has been done
* Added a onkeyUp handler to detect the CTRL key and to start the capturing of the shortcut
* Added a onkeyDown handler to capture the shortcut characters
* Added a method to Util for simulating events
* Extracted a shortcut of each widget based on its name, and displayed it on the widgets dropdown
* Added a info tip to notify the user of the shortcut feature
* Fixed a discrepancy between FF and Chrome with the margins of the s in .perseus-editor-widgets-selectors