Alt+Number keyboard shortcuts for spaces toolbar hijacks Windows Alt codes for entering special characters, signs and symbols in text input fields
Categories
(Thunderbird :: General, defect, P5)
Tracking
(thunderbird_esr102? fixed, thunderbird104 fixed)
People
(Reporter: stepand76, Assigned: aleca)
References
(Blocks 1 open bug, Regression, )
Details
(Keywords: intl, regression)
Attachments
(2 files)
48 bytes,
text/x-phabricator-request
|
wsmwk
:
approval-comm-beta+
wsmwk
:
approval-comm-esr102+
|
Details | Review |
46.51 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0
Steps to reproduce:
- Open Address Book.
- Create new contact.
- Type Alt+0150 (N dash) into the Name field.
Same problem is on many other places. For example in Calendar in new event tab.
Actual results:
When I type 1 (while Alt is still pressed) it activates the mail tab.
Expected results:
Alt+Number keyboard shortcuts shouldn't be allowed.
Comment 1•2 years ago
•
|
||
Thanks. Confirming.
Regressed by https://phabricator.services.mozilla.com/D142014.
Windows allows using Alt Codes for entering at least 256 different special characters, signs and symbols in text input fields. Works in Firefox, fails in TB. Worse, we block loads of them as we also respond to Alt+01.. so any random digits within the up to 4 digits Alt codes will trigger our shortcuts. Not good. Alt+0150 (N dash) is a good example that such shortcuts are actually needed for everyday text input, e.g. in composition.
Need to figure out something better here (some sort of compromise), we cannot just hijack the entire set for text inputs.
Not urgent compared to other bugs atm, workaround is to generate special chars somewhere else and copy and paste into TB.
Fyi, stepand76, we had a hard time finding these shortcuts already because Ctrl+number key are taken for switching to the n-th tab in TB/FF, and Ctrl+Alt+* is Windows application startup shortcuts territory.
Comment 2•2 years ago
|
||
https://altcodeunicode.com/ has the list of permitted Alt Codes for Windows text inputs. There might be more above 256, but not sure if those are regularly working.
☺ ALT 1 White smiling face, smiley face U+263A
☻ ALT 2 Black smiling face U+263B
♥ ALT 3 Black heart suit U+2665
♦ ALT 4 Black diamond suit U+2666
♣ ALT 5 Black club suit U+2663
I wouldn't mind if we hijacked only those 5, but we're hijacking all 256+ of them as explained above, that's odd.
That said, I recall vaguely there might be alternative ways to enter those on windows.
In composition, Insert > Characters and Symbols only covers a small subset.
Comment 3•2 years ago
|
||
Hmm. We don't seem to have much choice in this area:
- Ctrl+<num> is taken by the tab switching.
- We can't use something like
Ctrl+Shift+<num>
because theevent.key
will not be a number but whatever symbol you get when you hold Shift. - We can't use
event.code
to address this either because it doesn't always line up with what is printed on the keyboard. - Ctrl+Alt+<num> or Meta+<num> might work, but they seem likely to be a desktop shortcut or not received by the application at all. I'm not sure what the conventions are on microsoft windows.
Updated•2 years ago
|
Comment 4•2 years ago
|
||
Yes basically every shortcut is taken. But there is no strict requirement to have keyboard shortcuts for these.
Comment 5•2 years ago
|
||
Alex, Henry,
Is it incorrect that alt combo is the primary means of entering intl characters without an intl key ?
If it is the primary means, then this MUST get quick attention and resolution - we can't leave our intl users high and dry.
Assignee | ||
Comment 6•2 years ago
|
||
I'll take care of this, trying to find a solution.
if that's not possible, the new shortcut manager allows us to disable those shortcuts only for Windows pretty easily.
These issues will not happen anymore once we implement customizable shortcuts, allowing users to change or disabled whatever they want.
Assignee | ||
Comment 7•2 years ago
|
||
If I'm not wrong, the ALT text only works with numbers from the Numpad, is that correct?
Trying with the regular number rows below the function keys I don't get any special characters anywhere.
If that's the case, we can use the KeyboardEvent.location
: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/location
This will tell us the region a key is pressed from, and if it comes from the Numpad, we can not hijack it for those shortcuts.
A fix that should be good for 102, and then we can ignore it once we implement customizable shortcuts.
Assignee | ||
Comment 8•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/a3eb7ab294f7
Do not hijack number key event for spaces tabs if triggered from Numpad. r=thomas8
Assignee | ||
Comment 10•2 years ago
|
||
Comment on attachment 9288574 [details]
Bug 1777666 - Do not hijack number key event for spaces tabs if triggered from Numpad. r=thomas8
[Approval Request Comment]
Regression caused by (bug #): bug 1665511
User impact if declined: Inability to input special character on Windows with the key combination Al+NumPad number
Testing completed (on c-c, etc.): on c-c
Risk to taking this patch (and alternatives if risky): very low as hardcoded spaces toolbar shortcuts are ignored if the keydown event is triggered from the numpad.
Comment 11•2 years ago
|
||
Comment on attachment 9288574 [details]
Bug 1777666 - Do not hijack number key event for spaces tabs if triggered from Numpad. r=thomas8
[Triage Comment]
Approved for beta
Comment 12•2 years ago
|
||
bugherder uplift |
Thunderbird 104.0b4:
https://hg.mozilla.org/releases/comm-beta/rev/865680f90a34
Comment 13•2 years ago
|
||
Comment on attachment 9288574 [details]
Bug 1777666 - Do not hijack number key event for spaces tabs if triggered from Numpad. r=thomas8
[Triage Comment]
Approved for esr102 (optimistically)
Thomas, can you test this on beta on Tuesday?
Comment 14•2 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #13)
Thomas, can you test this on beta on Tuesday?
Yes, verified fixed on 105.0a1 (2022-08-15) (64-bit) and 104.0b4 (64-bit), Win10.
Comment 15•2 years ago
|
||
Oh, had taken a screenshot, too: Alt+NumPad number keys (1-5) creates Unicode characters
Comment 16•2 years ago
|
||
bugherder uplift |
Thunderbird 102.2.0:
https://hg.mozilla.org/releases/comm-esr102/rev/ff67dda307eb
Description
•