keydown
fires when any key is pressed and a Sidebar option is in focus
keydown: (event: KeyboardEvent, id?: string) => void;
Parameters:
event: KeyboardEvent
- a native KeyboardEvent objectid?: string
- the ID of the Sidebar option in focus
Example
sidebar.events.on("keydown", function(event, id) {
console.log("You've pressed the key: " + event.key);
});
Related sample: Sidebar. Events
Change log:
added in v8.3