W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2012

event.key and event.char for combined key presses (ctrl+b etc)

From: Hallvord R. M. Steen <hallvord@opera.com>
Date: Tue, 03 Jan 2012 19:42:23 +0100
To: www-dom@w3.org
Message-ID: <op.v7it8xxha3v5gv@hr-opera.oslo.osa>
quick question: if one presses ctrl+b, what should event.key and  
event.char be set to for the B key's keydown and keyup events?

I'm not off the top of my head certain whether the B key should cause a  
keypress event here either. Spec text doesn't really say whether you  
should take the state of other keys into account when determining whether  
the key "normally" outputs a character:

"A user agent must dispatch this event when a key is pressed down, if and  
only if that key normally produces a character value"

Hallvord R. M. Steen, Core Tester, Opera Software
http://www.opera.com http://my.opera.com/hallvors/
Received on Tuesday, 3 January 2012 18:44:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:18 UTC