Closed
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for an issue that matches the one I want to file, without success.
Issue Details
- Electron Version:
3.0.0-beta.1
and above
- Operating System:
- Windows 10
- Last Known Working Electron version:
2.0.18
Expected Behavior
- When using a keyboard layout like German (QWERTZ) on Windows,
VKEY_OEM_2
should be rendered as#
in the menu, not as/
(like on the US keyboard layout)
Actual Behavior
VKEY_OEM_2
is always renderer as/
even if pressingVKEY_OEM_2
produces#
To Reproduce
- Electron Fiddle that uses
ctrl+/
as an accelerator: https://gist.github.com/eda6786c4f94483bf58aaa3147f1548f - Switch the keyboard layout to German (QWERTZ) on Windows
relevant code snippet:
const template = [
{
label: 'Edit',
submenu: [
{ label: 'Test', accelerator: 'Ctrl+/' },
]
}
]
const menu = Menu.buildFromTemplate(template)
Menu.setApplicationMenu(menu)
Screenshots
Additional Information
- From what I can tell,
ctrl+/
is parsed here asui::VKEY_OEM_2
correctly. - Another example is
ctrl+\
which should be rendered asCtrl+â
on the Romanian keyboard layout.