Closed Bug 1692263 Opened 5 years ago Closed 4 years ago

[macOS] Change keyboard shortcut for Message Security Info from Cmd+Option+S to Cmd+Control+S - Keyboard shortcuts with Alt/Option modifiers don't return different key characters (Alt+S=ß)

Categories

(Thunderbird :: OS Integration, defect, P2)

Desktop
macOS

Tracking

(thunderbird_esr78 wontfix)

RESOLVED FIXED
88 Branch
Tracking Status
thunderbird_esr78 --- wontfix

People

(Reporter: aleca, Assigned: aleca)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

I noticed this issue while trying to fix a failing test on macOS for bug 1640760.

It seems that the keyboard shortcuts defined in JavaScript via a document EventLitener "keypress" are not firing in macOS.

To test this out, select a message that has an S/MIME or OpenPGP encryption button visible.
To open the security info panel, ⌘ ⌥ S is the combination (Command, Option, S).
This used to work when we first implemented that shortcut as both myself and Richard tested it on macOS.

Is this a BigSur issue, or maybe a Firefox regression? Or are we doing something completely wrong?

Pinging Tim to see if he has any idea what this might be, and if it might be reproducible also on Firefox.

Flags: needinfo?(ntim.bugs)

Do you have a small JS snippet you can share that can be tried in the browser console?

(Also, I'm generally not too familiar with keyboard shortcuts in Firefox, maybe Gijs would be a better person to ask?)

Flags: needinfo?(ntim.bugs) → needinfo?(alessandro)

I found the problem, which is a macOS specific issue and not a Firefox issue.

When holding the alt/option key in macOS, keyboard letters are replaced with an ASCII character.
So, on Windows and Linux, Alt + S = S
on macOS, Alt + S = ß

Flags: needinfo?(alessandro)
Assignee: nobody → alessandro
Severity: S1 → N/A
Status: NEW → ASSIGNED
Priority: P1 → P2
Summary: [macOS] Keyboard shortcuts implemented via JavaScript are not working → [macOS] Keyboard shortcuts with Alt/Option modifiers don't return the correct key character
Attached patch 1692263-macos-shortcut.diff (obsolete) — Splinter Review

This fixes the shortcut issue on macOS by using the control key instead of the option key.
I also implemented a simple test to keep track of this.
https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=d128452195d312dbfd3e98eac03f2d8c20f56484

Attachment #9204709 - Flags: review?(richard.marti)
Attached patch 1692263-macos-shortcut.diff (obsolete) — Splinter Review
Attachment #9204709 - Attachment is obsolete: true
Attachment #9204709 - Flags: review?(richard.marti)
Attachment #9204726 - Flags: review?(richard.marti)

Making this test work was more annoying than expected.
Sorry for the noise: https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=14b0e2aa9c6049a376b80159d24da7ac182969a7

Attachment #9204726 - Attachment is obsolete: true
Attachment #9204726 - Flags: review?(richard.marti)
Attachment #9204739 - Flags: review?(richard.marti)

Comment on attachment 9204739 [details] [diff] [review]
1692263-macos-shortcut.diff

Looks good and works on Windows and Mac.

I haven't tested the test but it looks for me okay.

Attachment #9204739 - Flags: review?(richard.marti) → review+
Target Milestone: --- → 88 Branch
Summary: [macOS] Keyboard shortcuts with Alt/Option modifiers don't return the correct key character → [macOS] Change keyboard shortcut for Message Security Info from Cmd+Option+S to Cmd+Ctrl+S - Keyboard shortcuts with Alt/Option modifiers don't return different key characters (Alt+S=ß)
Summary: [macOS] Change keyboard shortcut for Message Security Info from Cmd+Option+S to Cmd+Ctrl+S - Keyboard shortcuts with Alt/Option modifiers don't return different key characters (Alt+S=ß) → [macOS] Change keyboard shortcut for Message Security Info from Cmd+Option+S to Cmd+Control+S - Keyboard shortcuts with Alt/Option modifiers don't return different key characters (Alt+S=ß)

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/3c1f317b2f62
Fix macOS keyboard shortcut not working for message security popup panel. r=Paenglab

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: