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

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

From: Hallvord R. M. Steen <hallvord@opera.com>
Date: Fri, 23 Mar 2012 12:29:30 +0100
To: www-dom@w3.org
Message-ID: <op.wbmfjgada3v5gv@hr-opera.oslo.osa>
On Tue, 03 Jan 2012 19:42:23 +0100, Hallvord R. M. Steen  
<hallvord@opera.com> wrote:

> Hi,
> 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?

Ping :)

I think this is a very important issue for the spec. If we don't specify  
this in full detail, the spec does not guarantee that implementations are  
compatible when it comes to the core functionality the spec is intended to  

For example, if a web application wants to respond to an Alt-S shortcut,  
can it use .char and .key to do so? It's not clear to me. If it wants to  
handle Ctrl-B, should it detect whether event.char is the ASCII control  
character STX? (Isn't whether Ctrl-B is mapped to STX an even more arcane  
OS detail than the virtual key codes we're currently depending on, and  
likely to be even less portable?)

Somebody should also address the questions Andrew Oakley brought up in  
this E-mail from January 26th:

Hallvord R. M. Steen, Core Tester, Opera Software
http://www.opera.com http://my.opera.com/hallvors/
Received on Friday, 23 March 2012 11:27:52 UTC

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