Skip to content

[Bug]: globalShortcut won't register single quote or back quote correctly on different keyboard layouts (Windows 10) #28900

@iAbadia

Description

@iAbadia

Preflight Checklist

Electron Version

11.1

What operating system are you using?

Windows

Operating System Version

Windows 10 2004

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

When registering the back quote or single quote, the keystroke that triggers the event should be the same that was used to register it.

Ideally, the event would trigger when pressing the key that was registered only while using the keyboard layout that was being used when the key was registered. In other words, If I register back quote using UK layout and switch to US layout, the back quote should not trigger the event.

Actual Behavior

When I register the back quote (`) the event triggers when pressing the back quote using the US layout, it also triggers when pressing the single quote using the UK layout.

When I register the single quote (') the event triggers when pressing the single quote using the US layout, it does not trigger when pressing either the single quote or back quote using the UK layout.

Testcase Gist URL

https://gist.github.com/iAbadia/88c01d9be1dc6fc9f4a32653e0a3b550

Additional Information

This was found while using Terminus, a issue was filed there to follow this bug. After investigation I found the culprit was not Terminus but electron.

Eugeny/tabby#3742

Metadata

Metadata

Assignees

No one assigned

    Labels

    11-x-ybug 🪲has-repro-gistIssue can be reproduced with code at https://gist.github.com/platform/windowsstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions