Closed Bug 1606655 Opened 4 years ago Closed 4 years ago

Alt Codes Malfunction with the Programmer Dvorak Keyboard Layout

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla74
Tracking Status
firefox72 --- wontfix
firefox73 --- wontfix
firefox74 --- verified

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:

  1. Install Programmer Dvorak — https://www.kaufmann.no/roland/dvorak/ — on a Windows 7 Ultimate 64-bit system.
  2. Open Firefox and select any field where text can be entered — like the address bar, or "add a public comment" field on YouTube.
  3. Hold ALT and then type 0153 on the NumPad.
  4. 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:

  1. Nothing should happen until the ALT key is released.
  2. When the ALT key is released the Trade Mark Sign (™) should appear behind the cursor, as if you typed it.

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.

Status: UNCONFIRMED → NEW
Component: Untriaged → Keyboard Navigation
Ever confirmed: true
Version: 71 Branch → Trunk
Component: Keyboard Navigation → DOM: Editor
Product: Firefox → Core
Component: DOM: Editor → DOM: UI Events & Focus Handling
Priority: -- → P3
Whiteboard: [key hell]

I'll check it next week (I hope I have much time).

Flags: needinfo?(masayuki)

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: nobody → masayuki
Status: NEW → ASSIGNED
Flags: needinfo?(masayuki)

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
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
Regressions: 1612238

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

Status: RESOLVED → VERIFIED
Regressions: 1615977
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: