[UI Events-key] KeyboardEvent.key value of printable keys with Control are usually wrong on macOS

RESOLVED FIXED in Firefox 54

Status

()

Core
Widget: Cocoa
RESOLVED FIXED
10 months ago
9 months ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

Trunk
mozilla54
All
Mac OS X
Points:
---

Firefox Tracking Flags

(firefox54 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

When Control is pressed, KeyboardEvent.key should be computed without Control key (except when Ctrl+Foo causes inputting text). However, as far as I tested, some keys work as expected but especially when Shift key is also pressed, the value is odd. For example, when I press Ctrl+Semicolon, key value is ';' as expected but Ctrl+Shift+Semicolon, key value is also ';', rather than '+' with Japanese Keyboard layout.

I guess that we need to reimplement around here when Ctrl key is pressed.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=44a9208e1ca5
FYI: Spec definition is here:
https://w3c.github.io/uievents-key/#selecting-key-attribute-values
(Assignee)

Updated

10 months ago
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Comment hidden (mozreview-request)

Comment 4

9 months ago
mozreview-review
Comment on attachment 8842258 [details]
Bug 1342865 When Control key is pressed and InsertText() isn't called on macOS, its KeyboardEvent.key value should be characters which are inputted by the key without Control key state

https://reviewboard.mozilla.org/r/116136/#review118118
Attachment #8842258 - Flags: review?(m_kato) → review+

Comment 5

9 months ago
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/3bee9644cf4c
When Control key is pressed and InsertText() isn't called on macOS, its KeyboardEvent.key value should be characters which are inputted by the key without Control key state r=m_kato

Comment 6

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3bee9644cf4c
Status: ASSIGNED → RESOLVED
Last Resolved: 9 months ago
status-firefox54: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.