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

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  
enable.

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:
http://www.w3.org/mid/4F21428D.3010505@ado.is-a-geek.net

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