Extending Shortcut
Defining the shortcuts needs to be done in the field of package.json
, as follows:
In this example, we define a shortcut key for the undo operation, which is CTRL + Z
on Windows and on macOS.
When the corresponding shortcut key is pressed, the undo
message is sent.
Parameter descriptions
Type {string} Required
Shortcut-bound message that will be sent when this shortcut is triggered. Shortcut pressed messages can only be sent to the current extension.
Type {string} Optional
The shortcut will be triggered only under certain conditions.
type {string} required
On Windows platform, the keystroke to listen to.
Type {string} Required
On macOS, the keystroke to listen to.