Skip to content

Commit 8ca4147

Browse files
author
Joseph Atkins-Turkish
committed
Added a docstring.
1 parent 85248d3 commit 8ca4147

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ide/static/ide/js/global_shortcuts.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ CloudPebble.GlobalShortcuts = (function () {
2828
}
2929

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

0 commit comments

Comments
 (0)