Skip to content

Commit

Permalink
Added a docstring.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Atkins-Turkish committed May 9, 2016
1 parent 85248d3 commit 8ca4147
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ide/static/ide/js/global_shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ CloudPebble.GlobalShortcuts = (function () {
}

return {
/** Add or replace global shortcuts
*
* @param {Object} shortcuts The keys of this object must be strings which represent keyboard shortcuts.
* They can Codemirror-compatible shortcut descriptors e.g. "Shift-Cmd-V", or they can reference CodeMirror
* commands such as "Save".
* The values should be objects which have a descriptive "name" property, and also either have a "func" property
* or be functions themselves. For example, a named function fully satisfies the requirements, as does an object
* such as {name: "My Function", func: my_anonymous_function}
*/
SetShortcutHandlers: function (shortcuts) {
_.each(shortcuts, function (descriptor, key) {
var shortcut = shortcut_for_command(key);
Expand Down

0 comments on commit 8ca4147

Please sign in to comment.