Home > SYS_ShortcutKey > registerShortcutKey
SYS_ShortcutKey.registerShortcutKey() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Register shortcut key
Signature
typescript
function registerShortcutKey(
shortcutKey: TSYS_ShortcutKeys,
title: string,
callbackFn: (shortcutKey: TSYS_ShortcutKeys) => void | Promise<void>,
documentType?: Array<ESYS_ShortcutKeyEffectiveEditorDocumentType>,
scene?: Array<ESYS_ShortcutKeyEffectiveEditorScene>,
): Promise<boolean>;1
2
3
4
5
6
7
2
3
4
5
6
7
Parameters
Parameter | Type | Description |
|---|---|---|
shortcutKey | Shortcut key. If the array contains multiple elements, it is parsed as a combined shortcut key and sorted by rules before being stored in the cache | |
title | string | Shortcut key title, the friendly name of the shortcut key |
callbackFn | (shortcutKey: TSYS_ShortcutKeys) => void | Promise<void> | Callback function |
documentType | (Optional) | |
scene | (Optional) |
Returns
Promise<boolean>
Register whether the operation is successful