Class type Goog.​Ui.​keyboardShortcutHandler

class type keyboardShortcutHandler = object..end

Inherits


method disposeInternal : unit Js.meth

Removes all event listeners and clears shortcuts.

method getAllShortcutsAreGlobal : bool Js.t Js.meth

Returns whether all shortcuts (including modifier shortcuts) are treated as if the keys had been passed to the setGlobalKeys function. Returns Whether all shortcuts are treated as globals.

method getAlwaysPreventDefault : bool Js.t Js.meth

Returns whether the default action will always be prevented when a shortcut event is fired. The default value is true. Returns Whether preventDefault will always be called.

method getAlwaysStopPropagation : bool Js.t Js.meth

Returns whether the event will always be stopped from propagating beyond its target when a shortcut event is fired. The default value is false. Returns Whether stopPropagation will always be called.

method getEventType : Js.js_string Js.t -> Js.js_string Js.t Js.meth

Returns event type for a specific shortcut. Returns Theh event type.

method getGlobalKeys : int Js.js_array Js.t Js.meth

Returns The global keys, i.e. keys that are safe to always regard as shortcuts, even if entered in a textarea or input field.

method getModifierShortcutsAreGlobal : bool Js.t Js.meth

Returns whether shortcuts with modifiers are treated as if the keys had been passed to the setGlobalKeys function. Ignored if you have called setAllShortcutsAreGlobal(true). Applies only to form elements (not content-editable). Returns Whether shortcuts with modifiers are treated as globals.

method isShortcutRegistered : Js.js_string Js.t -> bool Js.t Js.meth

Verifies if a particular keyboard shortcut is registered already. It has the same interface as the unregistering of shortcuts.

param keyCode Numeric code for key param opt_modifiers Bitmap indicating required modifier keys. goog.ui.KeyboardShortcutHandler.Modifiers.SHIFT, CONTROL, ALT, or META.

The two parameters can be repeated any number of times to create a shortcut using a sequence of strokes.

A string representation of the shortcut can be supplied instead see registerShortcut for syntax. In that case the method only takes one argument. Returns Whether the specified keyboard shortcut is registered.

method registerShortcut : Js.js_string Js.t -> Js.js_string Js.t Js.meth

Registers a keyboard shortcut.

method setAllShortcutsAreGlobal : bool Js.t -> unit Js.meth

Sets whether to treat all shortcuts (including modifier shortcuts) as if the keys had been passed to the setGlobalKeys function.

method setAlwaysPreventDefault : bool Js.t -> unit Js.meth

Sets whether to always prevent the default action when a shortcut event is fired. If false, the default action is prevented only if preventDefault is called on either of the corresponding SHORTCUT_TRIGGERED or SHORTCUT_PREFIX events. If true, the default action is prevented whenever a shortcut event is fired. The default value is true.

method setAlwaysStopPropagation : bool Js.t -> unit Js.meth

Sets whether to always stop propagation for the event when fired. If false, the propagation is stopped only if stopPropagation is called on either of the corresponding SHORT_CUT_TRIGGERED or SHORTCUT_PREFIX events. If true, the event is prevented from propagating beyond its target whenever it is fired. The default value is false.

method setGlobalKeys : int Js.js_array Js.t -> unit Js.meth

Sets the global keys; keys that are safe to always regarded as shortcuts, even if entered in a textarea or input field.

method setModifierShortcutsAreGlobal : bool Js.t -> unit Js.meth

Sets whether to treat shortcuts with modifiers as if the keys had been passed to the setGlobalKeys function. Ignored if you have called setAllShortcutsAreGlobal(true). Applies only to form elements (not content-editable).

method unregisterAll : unit Js.meth

Unregisters all keyboard shortcuts.

method unregisterShortcut : Js.js_string Js.t -> unit Js.meth

Unregisters a keyboard shortcut by keyCode string representation of sequence.