keyboardshortcuthandler.js
No description.

File Location

/goog/ui/keyboardshortcuthandler.js

Classes

goog.ui.KeyboardShortcutEvent
Object representing a keyboard shortcut event.
goog.ui.KeyboardShortcutHandler
Component for handling keyboard shortcuts. A shortcut is registered and bound to a specific identifier. Once the shortcut is triggered an event is fired with the identifier for the shortcut. This allows keyboard shortcuts to be customized without modifying the code that listens for them. Supports keyboard shortcuts triggered by a single key, a stroke stroke (key plus at least one modifier) and a sequence of keys or strokes.

Public Protected Private

Enumerations

Global Functions

goog.ui.KeyboardShortcutHandler.getKeyCode(name) number
Static method for getting the key code for a given key.
Arguments:
name : string
Name of key.
Returns: number  The key code.
code »
goog.ui.KeyboardShortcutHandler.makeKey_(keyCodemodifiers) number
Constructs key from key code and modifiers. The lower 8 bits are used for the key code, the following 3 for modifiers and the remaining bits are unused.
Arguments:
keyCode : number
Numeric key code.
modifiers : number
Required modifiers.
Returns: number  The key.
code »
goog.ui.KeyboardShortcutHandler.parseStringShortcut(s) !Array.<Object>
Builds stroke array from string representation of shortcut.
Arguments:
s : string
String representation of shortcut.
Returns: !Array.<Object>  The stroke array.
code »
goog.ui.KeyboardShortcutHandler.setShortcut_(parentstrokesidentifier)
Adds or removes a stroke node to/from the given parent node.
Arguments:
parent : Object
Parent node to add/remove stroke to/from.
strokes : Array.<Object>
Array of strokes for shortcut.
identifier : ?string
Identifier for the task performed by shortcut or null to clear.
code »

Directory ui

File Reference