[Bug]: "before-input-event" and "input-event" respond with wrong key #41382
Labels
29-x-y
bug 🪲
has-repro-gist
Issue can be reproduced with code at https://gist.github.com/
platform/windows
Preflight Checklist
Electron Version
29.0.0
What operating system are you using?
Windows
Operating System Version
10.0.19042
What arch are you using?
x64
Last Known Working Electron version
28.0.0
Expected Behavior
The event should show the pressed key depending on the current keyboard layout
Actual Behavior
Wrong key is shown
Testcase Gist URL
https://gist.github.com/t57ser/30ad5e0ac634feb13e412408048742ce
Additional Information
My system has the language set to english but keyboard layout is set to german
In electron 28 I received:
before-input-event {
type: 'keyDown',
key: '+',
code: 'BracketRight',
isAutoRepeat: false,
isComposing: false,
shift: false,
control: true,
alt: false,
meta: false,
location: 0,
_modifiers: 1026,
modifiers: [ 'control', 'numlock' ]
}
Notice that the "code" here is wrong but key is correct.
In electron 29, both "key" and "code" are incorrect
I pressed "ctrl +"
The text was updated successfully, but these errors were encountered: