feat: add registerAccelerator flag to allow menu items to optionally skip accelerator registration (#15723)
* feat: add registerAccelerator flag to allow menu items to skip registration * docs: add docs for registerAccelerator * docs: re-add accidentally removed line
This commit is contained in:
parent
3748ee49ea
commit
0242818f39
9 changed files with 43 additions and 7 deletions
|
@ -24,6 +24,7 @@ const delegate = {
|
|||
if (command.accelerator != null) return command.accelerator
|
||||
if (useDefaultAccelerator) return command.getDefaultRoleAccelerator()
|
||||
},
|
||||
shouldRegisterAcceleratorForCommandId: (menu, id) => menu.commandsMap[id] ? menu.commandsMap[id].registerAccelerator : undefined,
|
||||
executeCommand: (menu, event, id) => {
|
||||
const command = menu.commandsMap[id]
|
||||
if (!command) return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue