Menu "accelerator" not handling short keys, expected or bug?


#1

I’m using this in my menu template:

  {
    label: 'Debug',
    role: 'debug',
    submenu: [
      {
        label: 'Show Debugger',
		accelerator: 'CmdOrCtrl+D',
        click: function() {
			mainWindow.openDevTools();
		}
      },
    ]
  }

It renders the shortcut Ctrl+D in the submenu item in Windows 10, but pressing Ctrl+D doesn’t do anything.
I’ve tried other combinations, but they don’t work either.

Is this a bug or to be expected?


#2

Same for me, Accelerators do not work when adding menuitems with Menu.append(mymenuitem). I think this is a bug.

However, accelerators do work after a call to Menu.setApplicationMenu(MyTopMenu)