8000 Accelerators in menus no longer reflect keyboard layout on Windows · Issue #26888 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Accelerators in menus no longer reflect keyboard layout on Windows #26888
Closed
@alexdima

Description

@alexdima

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 pressing VKEY_OEM_2 produces #

To Reproduce

relevant code snippet:

const template = [
  {
    label: 'Edit',
    submenu: [
      { label: 'Test', accelerator: 'Ctrl+/' },
    ]
  }
]

const menu = Menu.buildFromTemplate(template)
Menu.setApplicationMenu(menu)

Screenshots

  • 2.0.18 (last known good version):
    image

  • 3.0.0-beta.1 (first bad version):
    image

Additional Information

  • From what I can tell, ctrl+/ is parsed here as ui::VKEY_OEM_2 correctly.
  • Another example is ctrl+\ which should be rendered as Ctrl+â on the Romanian keyboard layout.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0