IME examples

In the text about Input Method Editors [1], the examples do

> keydown: 's' (U+0073, Latin Small Letter S key)
> compositionstart: ''
> keyup: 's' (U+0073, Latin Small Letter S key)
> keydown: 'i' (U+0069, Latin Small Letter I key)
> keyup: 'i' (U+0069, Latin Small Letter I key)
> keydown: 'Convert'

Now, I'm not a developer - merely a "black box" QA tester - but is it  
possible to implement this in a cross-platform way? AFAIK, on Windows,  
Windows mobile and perhaps other platforms all the implementation will get  
in a keydown event is a VK_PROCESS virtual key code. How is the  
implementation then supposed to map that to an 's', an 'i' and so on?

What sensible implementations currently do is to fire keydown with keyCode  
set to 220 (VK_PROCESS) and keyup with the actual key's virtual key code -  
if the platform makes it available in keyup events, otherwise 229.

(Sorry about the number of separate E-mails today. I've tried to read the  
spec carefully earlier, but it's funny how you overlook things and they  
suddenly jump at you..)

[1]  
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#keys-IME


-- 
Hallvord R. M. Steen, Core Tester, Opera Software
http://www.opera.com http://my.opera.com/hallvors/

Received on Wednesday, 22 September 2010 05:12:47 UTC