Alt Codes Malfunction with the Programmer Dvorak Keyboard Layout
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
People
(Reporter: James.Smith_Bugzilla, Assigned: masayuki)
References
Details
(Whiteboard: [key hell])
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0
Steps to reproduce:
- Install Programmer Dvorak — https://www.kaufmann.no/roland/dvorak/ — on a Windows 7 Ultimate 64-bit system.
- Open Firefox and select any field where text can be entered — like the address bar, or "add a public comment" field on YouTube.
- Hold ALT and then type 0153 on the NumPad.
- Release ALT.
Actual results:
With the alt key pressed, when you hit NumPad 5, the Edit menu pops up, as if you pressed ALT+e. This only happens in Firefox (with the Programmer Dvorak layout). All other programs I've tested behave as expected with the Programmer Dvorak layout.
Expected results:
- Nothing should happen until the ALT key is released.
- When the ALT key is released the Trade Mark Sign (™) should appear behind the cursor, as if you typed it.
Comment 1•4 years ago
|
||
Hi James,
Thanks for the details. I was able to reproduce on Windows 7 and 8, on Firefox Nightly version 74.0a1 (2020-01-07) (64-bit), Release 72.0 (64-bit) and Beta 73.015 (64-bit).
I've chosen a component so that the issue is reviewed.
Best regards, Clara.
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
I'll check it next week (I hope I have much time).
Assignee | ||
Comment 3•4 years ago
|
||
Hmm, it's tricky layout. Shift
+ Numpad5
inputs e
, this e
is used at resolving mnemonic. Perhaps, we should use altnative keycodes when the combination of Alt
and Numpad[0-9]
.
Assignee | ||
Comment 4•4 years ago
|
||
Custom keyboard layout may set unusual character to each numpad key. In our
shortcut and acceleration key handling, we refer alternative char code values
stored in eKeyDown
or eKeyPress
and they may contain an alphabet which is
used by menubar but it shouldn't be performed while user inputs a Unicode
character with Alt
+ numpad keys because it's being handled by Windows.
(In strictly speaking, I think that we shouldn't dispatch key events of the
sequence, but Chrome does it so that we should keep dispatching for web-compat.)
This patch makes NativeKey
stores same mCommittedCharsAndModifiers
,
mShiftedString
and mUnshiftedString
values as usual keyboard layout
even active keyboard layout customized numpad key values.
Note that Windows handles the key sequence without virtual key code, meaning
that even if the numpad keys are shuffled by keyboard layout, typed numbers
are computed from physical key position. E.g., even if Numpad7
is mapped
to 1
, it's treated as 7
. Therefore, this patch refers scan code in
some places.
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/b94005dcae81 Make `NativeKey` stop adding alternative char codes while user inputs a Unicode character with `Alt` + some numpad keys r=m_kato
Comment 6•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Comment 7•4 years ago
|
||
Hi,
I've tested this using Firefox Nightly version 74.0a1 ( 2020-01-30) (64-bit),and and Beta 74.0b3 for windows 7 and the issue is not reproducible anymore. Based on this I will mark v74 flag and bug's status as verified.
I also verified the fix in latest nightly 75.0a1 and the issue is not reproducible there either.
Best,
Clara
Description
•