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