Skip to main content

Keyboard Shortcuts

This namespace allows you to setup keyboard shortcuts that your application can response to.

Namespace methods#

createShortcutHandle(keyboardShortcutDescriptor)#

This method creates a shortcut handle. A shortcut handle can be used in various APIs in the SDK to keyboard enable them.

ParametersTypeDescription
keyboardShortcutDescriptorKeyboardShortcutDescriptordetails of the shortcut.

Returns a KeyboardShortcutHandle


KeyboardShortcutHandle#

This class registers a keyboard shortcut. It just defines the key combination itself but not what to when that shortcut is executed. In order to actually do something when this handle is executed, you need to pass this handle to other functions that accept KeyboardShortcutHandle like the toolbar button registration functions.

remove()#

Deactivates the keyboard shortcut.


KeyboardShortcutDescriptor#

Describes a keyboard shortcut combination

PropertyTypeDescriptionRequired?Default
chordstringThe keys the user has to press to activate the shortcut. Simultaneous keypresses can be defined with "+". For multi-key chords like Gmail's, include a space between the keys, i.e. "g i". Syntax matches the combokeys library.Yes
descriptionstringThe description text that shows up in Gmail's keyboard shortcut help (when the user presses '?').Yes