shortcut
Overview
The shortcut
component allows developers to register view-level keyboard shortcuts for specified actions.
Note: These shortcuts only persist while the user remains on the corresponding view. For use cases where shortcuts should persist across views, see the documentation for the ShortcutManager
JS/TS API.
Version compatibility
shortcut
was introduced in version 4.58.0 of the JourneyApps Runtime.Keyboard shortcuts are only supported on Desktop.
Basic Example
Reserved keys
The following keys are reserved and hence cannot be used as keys
:
CTRL+Z
CTRL+SHIFT+Z
CTRL+Y
CTRL+C
CTRL+V
CTRL+R
ESC
ENTER
BACKSPACE
DELETE
OXIDE will show an error if a reserved key combination is used:
Standard Attributes
keys
keys
Required
Type: string
Default: unset
Specify a key or key combination for the shortcut. Only one key or key combination is supported.
Example:
action
action
Required
Type: JS/TS function
Default: unset
An event that calls a JS/TS $:function or navigation when a user presses the key or key combination specified in the keys
attribute.
Advanced Attributes
name
name
Optional
Type: string
Default: unset
A human readable name to identify or describe the shortcut.
Last updated