Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Other versions
Version 18.0Version 17.0 (current version)Version 16.0Version 15.0Version 14.0Version 13.0Version 12.0Version 11.0Version 10.0Version 2.0

On this page

You are viewing an old version of this documentation. Click here to open the current version, 17.0.

addHotKey

Summary

Add hot key handler to array of document-level hotkeys triggered by key-up event.

Syntax

keyman.addHotKey(keyCode, shiftState, handler);

Parameters

keyCode
Type: number
The base key of the hotkey
shiftState
Type: number
shiftState is a bitwise combination of SHIFT (0x10), CTRL (0x20) and ALT (0x40).
handler
Type: function
The function to be called when the hotkey is triggered. It should not expect any parameters.

Return Value

undefined

Description

Used to support custom hotkeys within a web document. Only one handler function may exist per hotkey combination.