spiegel-keyman/web/docs/engine/reference/core/addHotKey.md
Marc Durdin 6c145cb775 refactor(web): move web engine help to app repo
Note: build.sh updated to make sure that test:help build action:target
doesn't also call test.sh by adding `:_all` meta-target.

Note: CI will need a new help-keyman-com.sh build step to deploy web
engine help.

Fixes: #12347
2024-10-31 11:00:06 +07:00

677 B

title
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.