Home > SYS_ShortcutKey > register
SYS_ShortcutKey.register() 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
function register(id: string, props: ISYS_ShortcutKeyDataWithCallFn): boolean;Parameters
Parameter | Type | Description |
|---|---|---|
id | string | Shortcut key ID. The extension UUID will be automatically concatenated as a prefix |
props | Shortcut key data |
Returns
boolean
Register whether it is successful
Remarks
The shortcutKey passed in when registering a shortcut key here is only the default shortcut key. Users can modify it in settings
If the shortcut key conflicts with a system shortcut key, the system shortcut key will take precedence
To modify registered shortcut key information, you can call this API directly and pass the complete shortcut key data to be modified in props
This API cannot modify system shortcut keys
Note: This API is only valid for extensions. Calling it in a standalone script environment will always throw Error ADD since EDA v4.2