Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
439 views
in Technique[技术] by (71.8m points)

Add Multiple shortcut key in Accelerator for single menu item in electron js

There is menu in electron with three items View,Delete,Copy. for delete I want use three shortcut keys (Delete ,backspace, D).

How can I add multiple shortcut key in single menu item.

{
    label: 'App',
    submenu: [
      {  label: 'View', accelerator: 'CmdOrCtrl+V', click: (item, focusedWindow) => _menuClick(focusedWindow, 'undo')},
      {  label: 'Delete', accelerator: 'Delete', click: (item, focusedWindow) => _menuClick(focusedWindow, 'undo')},
      { label: 'Copy', accelerator: 'CmdOrCtrl+C', click: (item, focusedWindow) => _menuClick(focusedWindow, 'undo')},
    ]
  },

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...