Re: [DOM3Events] keyCode and charCode [ISSUE-133]

On Thu, 16 Sep 2010 22:56:14 +0900, Doug Schepers <schepers@w3.org> wrote:

>>> Please specify keyCode and charCode, even if marked as 'obsolete'.
>>
>> Agreed. These do need to be specified, for web compat.

> After talking with many people, including browser vendors and the i18n  
> WG, and doing a good bit of research, and considering the real-world use  
> of keyCode and charCode, we came to the conclusion that it would be very  
> difficult (if possible at all) to specify keyCode and charCode in a way  
> that would be consistent across browsers, or even the same browser on  
> different platforms.

I've attempted to draft a spec for it [1] (I need to understand this  
anyway to help fixing Opera's key events), and whereas there are some  
clear implementation differences (like Firefox's charCode implementation  
versus IE's keyCode), I think it's possible to spec most of the common  
behaviour, define two alternate implementation options for a few clearly  
intentional differences, and sort out the corner cases in a web-compatible  
way most browsers would over time align on.

> Browsers have had 15 years to get this right, and despite its  
> importance, they haven't been able to.

This merely shows how important it is to get a proper spec - finally! -  
and is a really strong argument that this group SHOULD take the  
challenge.. ;)

> Not one browser we tested was consistent across platforms and keyboard  
> layouts.  Opera doesn't even really try.

(In some corners, the problem rather is that it tries too hard :-p )

I'll have a look at my old draft plus the current spec text to see if it  
can be used for something.

[1] http://lists.w3.org/Archives/Public/public-webapi/2008Apr/0225.html
[2] https://lists.webkit.org/pipermail/webkit-dev/2007-December/002992.html
-- 
Hallvord R. M. Steen, Core Tester, Opera Software
http://www.opera.com http://my.opera.com/hallvors/

Received on Friday, 17 September 2010 03:15:14 UTC