Bug 162861

Summary: KeyboardEvent.getModifierState() should support "CapsLock" modifier
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, cdumez, commit-queue, darin, sam, webkit
Priority: P2 Keywords: WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://w3c.github.io/uievents/#dom-keyboardevent-getmodifierstate
Bug Depends on: 162855    
Bug Blocks: 162852    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Chris Dumez
Reported 2016-10-02 15:15:35 PDT
getModifierState() should support for modifiers: - https://w3c.github.io/uievents/#dom-keyboardevent-getmodifierstate In particular, we are missing the following ones: CapsLock, Fn, FnLock, Hyper, NumLock, Super, ScrollLock, Symbol, SymbolLock.
Attachments
Patch (26.81 KB, patch)
2016-10-05 12:00 PDT, Chris Dumez
no flags
Patch (26.88 KB, patch)
2016-10-05 12:03 PDT, Chris Dumez
no flags
Patch (28.12 KB, patch)
2016-10-05 12:42 PDT, Chris Dumez
no flags
Patch (28.12 KB, patch)
2016-10-05 13:08 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2016-10-04 09:06:33 PDT
The only one that is missing and that seems to make sense on Mac is capsLock.
Chris Dumez
Comment 2 2016-10-05 12:00:31 PDT
Chris Dumez
Comment 3 2016-10-05 12:03:49 PDT
Darin Adler
Comment 4 2016-10-05 12:22:09 PDT
Why doesn’t Fn make sense on Mac?
Darin Adler
Comment 5 2016-10-05 12:24:28 PDT
A good test case with Fn might be the return key with the "Fn" modifier down.
Chris Dumez
Comment 6 2016-10-05 12:25:06 PDT
(In reply to comment #4) > Why doesn’t Fn make sense on Mac? As far as I can tell, this is a hardware key, it does not generate an NSEvent. Note that there is no ModifierFlag for Fn key on NSEvent: - https://developer.apple.com/reference/appkit/nsevent/modifier_flags
Chris Dumez
Comment 7 2016-10-05 12:42:40 PDT
Chris Dumez
Comment 8 2016-10-05 13:08:20 PDT
WebKit Commit Bot
Comment 9 2016-10-05 14:15:20 PDT
Comment on attachment 290743 [details] Patch Clearing flags on attachment: 290743 Committed r206828: <http://trac.webkit.org/changeset/206828>
WebKit Commit Bot
Comment 10 2016-10-05 14:15:26 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.