[webkit-dev] Behaviour of CapsLock in WebKit/Mac

Wez wez at chromium.org
Wed Dec 12 12:57:43 PST 2012


Right; so the question is really whether consistency with other platforms
(and with the DOM Events spec) is sufficiently desirable to risk breaking
any content that already works around this behaviour on Mac.

As regards interacting with the HID manager, I suspect that the issue is
above that level, since swapping Ctrl & CapsLock this behaviour follows the
re-mapped CapsLock.  We could alternatively work-around the behaviour by
injecting keydown/keyup pairs for CapsLock every time we see either event
from OS X, if we prefer to avoid the HID manager, or if it doesn't behave
any differently.


On 12 December 2012 12:05, Elliott Sprehn <esprehn at chromium.org> wrote:

> This same bug exists in Gecko
> https://bugzilla.mozilla.org/show_bug.cgi?id=712535
>
> It appears Cocoa just doesn't notify of this:
>
> http://stackoverflow.com/questions/12536356/how-to-detect-key-up-or-key-release-for-the-capslock-key-in-os-x
>
> so we'd probably need to interact directly with the HID manager... and
> then hope it's not at that level too :)
>
>
> On Wed, Dec 12, 2012 at 10:43 AM, Wez <wez at chromium.org> wrote:
>
>> Thanks Mark!
>>
>> If this is intentional behaviour of Mac OS X then ideally WebKit should
>> work around it, but I wonder how much existing content that would break?
>>
>>
>> On 11 December 2012 21:32, Mark Rowe <mrowe at apple.com> wrote:
>>
>>>
>>> On 2012-12-11, at 21:24, Wez <wez at chromium.org> wrote:
>>>
>>> > Hi all,
>>> >
>>> > There's a bug reported against Chromium (crbug.com/144757) for the
>>> CapsLock key generating only a keydown when first pressed and released, and
>>> a keyup when next pressed and released, i.e. the keydown & keyup events
>>> correspond with the caps lock-state being toggled, rather than with the key
>>> itself being pressed or released.
>>> >
>>> > The same issue reproduces against Safari on Mac.  Is this a by-design
>>> behaviour of WebKit?
>>>
>>> It’s a known issue (<https://bugs.webkit.org/show_bug.cgi?id=18792>).
>>>
>>> - Mark
>>>
>>>
>>
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo/webkit-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20121212/057de13a/attachment.html>


More information about the webkit-dev mailing list