Closed Bug 1874727 Opened 3 months ago Closed 3 months ago

Ctrl+Alt+Letter does not trigger shortcut on (non-English) Russian keyboard layout

Categories

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

All
Windows
defect

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: robwu, Assigned: masayuki)

References

Details

Attachments

(1 file)

In bug 1782660, a user has expressed the desire to trigger a shortcut mapped to an ASCII key on their (non-ASCII) Russian keyboard layout. Oddly, Ctrl+Alt+Letter does not work at all, but Alt-Shift-Letter does (details: https://bugzilla.mozilla.org/show_bug.cgi?id=1782660#c6). Can we fix the implementation so that Ctrl+Alt+Letter works?

To keep this issue actionable, I'm focusing this issue to Russian keyboard layouts (Windows OS). But broader fixes are also welcome.

While looking for similar issues, I came across bug 1527491, with extra details in https://bugzilla.mozilla.org/show_bug.cgi?id=1527491#c8, this comment in particular:

Looks like that Russian keyboard layout cannot input [ nor ] even with any modifiers. So, we could add good hack for this case. However, currently, we don't collect all key information in any platforms. So, we cannot decide whether a character is inputtable with active keyboard layout for now. So, anyway, we cannot fix this so soon.

AltGr on Windows can be emulated with Ctrl + Alt. Therefore, such shortcut is not available for keyboard layout users whose right Alt key is AltGr.
https://searchfox.org/mozilla-central/rev/8b6cf2a8352979c781dfd90c46a9f4f7135fabea/widget/tests/test_keycodes.xhtml#5158-5160

On the other hand, Russian keyboard layout does not have AltGr, however, Alt + Digit8 inputs (U+20BD). That causes that KeyboardLayout thinks the layout has AltGr...

Ah, we don't compute shortcut candidate if both Ctrl and Alt are pressed. This was required before bug 900750. However, now, both modifiers are unset if AltGr introduces a character or a dead key before calling the method. So, we could fix this bug, but the change is risky. Therefore, I'd like to fix this at start of the next cycle.

Assignee: nobody → masayuki
Severity: -- → S3
Status: NEW → ASSIGNED
OS: Unspecified → Windows
Hardware: Unspecified → All

It does not compute shortcut candidates when both Ctrl and Alt are pressed.
This was valid before bug 900750, but when the method is called, now, Ctrl
and Alt are unset if AltGr is pressed and that introduces a character or
a dead character.
https://searchfox.org/mozilla-central/rev/8b6cf2a8352979c781dfd90c46a9f4f7135fabea/widget/windows/KeyboardLayout.cpp#1663-1666,1683,1688-1689

Therefore, it should be safe to compute shortcut candidates when Ctrl and
Alt are pressed even though such shortcut keys shouldn't be used from i18n
point of view.

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/938e67ed7818
Make `NativeKey::ComputeInputtingStringWithKeyboardLayout()` compute shortcut candidates when both `Ctrl` and `Alt` are pressed r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
Depends on: 900750
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: