W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2012

Re: [DOM3Events] Comments on DOM Level 3 key events

From: (wrong string) Егор Николаев <termi1uc1@gmail.com>
Date: Fri, 26 Oct 2012 16:24:10 +0400
Message-ID: <CAP=KyTgjvr3u=QgA0i=-x-iTG=f0AMc+q3OPtr55kyKwJ0Fpmw@mail.gmail.com>
To: www-dom@w3.org
Cc: Mounir Lamouri <mounir@lamouri.fr>
On Fri, Oct 26, 2012 at 2:59 PM, Mounir Lamouri <mounir@lamouri.fr> wrote:

> On 10/26/2012 09:10 AM, Hallvord R. M. Steen wrote:
> > Mounir Lamouri <mounir@lamouri.fr> skreiv Thu, 25 Oct 2012 18:50:55
> +0200
> >> However, I think we should use a new attribute instead of 'key'.
> >> Otherwise, on my laptop, it would be hard to know what this would be
> >> doing:
> >> { char: '', key: 'Home' }
> >> it could be the 'Home' key or the 'BrightnessUp' depending on my
> >> pressing 'Fn' or not.
> >
> > But this has nothing to do with identifying the "physical key". The
> > "key:Home" property does a pretty good job at that (if we spec it like I
> > think we agree we should, i.e. disregarding modifier keys - that
> > presumably includes Fn).
> >
> > Here you seem to be looking for a way to determine what the key would do
> > if the script did not interfere, sort of like an event.nativeShortcut
> > property. That seems like a very different use case to me.
> >
> > In general, the OS or platform will always be able to filter out and
> > respond to some keypresses, like Fn+function keys or ctrl-alt-delete, we
> > probably can't demand that a web app should be able to respond to
> > absolutely every key combination.
> My issue isn't with the key event not being sent to the web application.
> Let say the OS is Web based and I'm writing an application that handles
> the screen brightness, I want to know when the 'BrightnessUp' or
> 'BrightnessDown' keys are pressed. However, if 'key' always gives me the
> physical key, I will only get 'Home' and 'End' even if 'Fn' was pressed.
> I think the correct way here is to say that the physical key is whether
> 'Home' or 'End' and the key value is 'BrightnessUp' or 'BrightnessDown'.
>  Am I clearer?
I must say that my original issue was only about alphabetical "key" value
with or without special keys (Shift, Crtl,...).
In this case, key='BrightnessUp' if 'Fn' was pressed and key='Home' if 'Fn'
was not pressed would be good enough.

And the API to detect all possible values of "key" property would be the
great solution, but only for specific cases.
Received on Friday, 26 October 2012 12:24:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:01 UTC