Ctrl+Alt+Letter does not trigger shortcut on (non-English) Russian keyboard layout
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
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.
Assignee | ||
Comment 1•3 months ago
|
||
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
...
Assignee | ||
Comment 2•3 months ago
|
||
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 | ||
Comment 3•3 months ago
|
||
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
Comment 5•3 months ago
|
||
bugherder |
Description
•