Re: Changes to DOM3 Events Key Identifiers


Hi Laurens,

--Original Message--:
>Op 30-10-2009 11:36, Alex Danilo schreef:
>>> "\uxxxx" is not a syntax, it is a Unicode string of the actual
>>> character. \u introduces the escape sequence for a unicode code point.
>>> So you can compare it directly to a character.
>>>      
>> Thanks for the clarification.
>>    
>
>Well, regardless of whether what Maciej says is actually the case,
>
>> So, how does this provide any advantage over 'keyCode'?
>>    
>
>keyCode returns an integer, which in JavaScript is not directly 
>comparable to a character (well, it is, but not like in C; 101 == 
>"101"). JavaScript does not have a character type, only a string type. 
>Actually I think C does not have a character type either, it is an alias 
>for byte, no? Either way, in JavaScript 169 != "©".
>
>> It seemed to me that keyCode is used for the code point, as in maps
>> to the Unicode point and the whole reason there was keyIdentifier
>> was to provide descriptive strings.
>>    
>
>keyCode does not map to Unicode code points, e.g. F1-F24 map to values 
>112-135 which are not Unicode.
>
>> If I want the Unicode point explicitly I can use
>> keyCode or am I missing something?
>>    
>
>Hope this cleared that up.

Yes, thanks it did, much appreciated.

Alex

>~Laurens
>
>-- 
>~~ Ushiko-san! Kimi wa doushite, Ushiko-san nan da!! ~~
>Laurens Holst, developer, Utrecht, the Netherlands
>Website: www.grauw.nl. Backbase employee; www.backbase.com
>
>
>
>

Received on Friday, 30 October 2009 12:15:06 UTC