W3C home > Mailing lists > Public > public-webapi@w3.org > September 2007

Re: DOM3 Key Events + accelerator keys

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Tue, 25 Sep 2007 17:47:58 +0200
To: Oliver Hunt <oliver@apple.com>
Cc: public-webapi <public-webapi@w3.org>
Message-ID: <ha9if3tckl1m73f5j84lpqbr58odqsrscu@hive.bjoern.hoehrmann.de>

* Oliver Hunt wrote:
>Obviously the spec should not (cannot?) define accelerators, but we  
>would ideally have some kind of specification to define what events  
>should be fired, and whether they should be allowed to prevent  
>default handling, etc.  It is these that it would be good to define.

I am afraid it is not really clear to me where the specification is
lacking in this regard. To give an example, my desktop has a launch
mail application key. If I press it, the browser should not make that
fact available to possibly malicious web sites, much less allow them
to prevent me launching the mail application. In some other context
it might well be appropriate to make the application aware of the key
press and perhaps allow the application to prevent the default action.

In a different setup, you might be on a web site that uses accesskey
navigation on some HTML document and normally, say, ALT+S takes you
to some search input control; in that case informing the application
of the key press and allowing it to cancel the focus change might be
appropriate, but naturally the application cannot know whether ALT+S
will do accesskey navigation, or, say, trigger a Save As dialog for
the current web page, and maybe the latter should not be cancelable.

As it stands, all keyboard events browsers generate are cancelable,
but the specification generally does not say what default action any
particular keyboard event object might have, so you might well end up
with a canceled LaunchMail event object, but the mail application is
launched nevertheless.

So I don't see what the specification might say in addition to what
it says at the moment, except perhaps pointing out in the Security
Considerations section, that sometimes you might not want to inform
DOM applications of certain key presses.

I do not understand what is unclear about what events should be fired,
could you give a specific example of keyboard input and the possible
interpretations of the current specification text?

>Only WebKit's output had a valid keyIdentifier, but it used the  
>unicode sequence U+0043, rather than "Copy" which is probably what is  
>expected :-/

That does indeed sound wrong, unless perhaps, to give an example, the
keyboard driver maps all Copy presses to a sequence of CTRL+C presses
or whatever might be associated with that action, e.g. to accomodate
legacy applications.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Tuesday, 25 September 2007 15:48:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:24 UTC