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

DOM3 Key Events + accelerator keys

From: Oliver Hunt <oliver@apple.com>
Date: Mon, 24 Sep 2007 22:49:30 -0700
Message-Id: <85875A5D-72F9-411C-92FD-3AC371AE448E@apple.com>
To: public-webapi <public-webapi@w3.org>

Hi Everyone,
   It seems that DOM3 is rather silent on the topic of accelerator keys.

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.

A brief examination of Firefox, IE7, Safari 3 beta and Opera 9.5  
indicates that keydown and keyup are fired in all browsers other than  
Firefox3/Mac and Safari3/Mac (neither of which fire any keyup  
events), with individual keydowns and keyups sent for the ctrl (or  
cmd) key and the accelerator key (i was testing with the copy key, so  
the accelerator was 'c').

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 :-/

In all browsers that send a keypress when an accelerator exists  
(basically every browser other than IE) the accelerator occurs after  
the keypress event has been fired.

Finally, event.preventDefault() (and equivalents) will prevent  
accelerators from firing in both Safari and Firefox, but not in Opera  
or IE.

Anyhoo, I figured it would be good to have a defined behaviour to  
make it easier for developers of complex webapps with better  
accelerator handling.

Received on Tuesday, 25 September 2007 05:50:04 UTC

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