Re: [DOM3Events] keyCode and charCode data requested

* Hallvord R. M. Steen wrote:
>On Mon, 28 Apr 2008 14:40:03 +0200, Andrew Emmons  
><andrew.emmons@quickoffice.com> wrote:
>
>> Regarding keyCode and charCode, we would like to request data for these  
>> commonly used event attributes across various implementations and  
>> platforms.
>
>Just a thought: for Windows systems I believe it might be fairly trivial  
>to extract all this information from the DLLs that contain the keyboard  
>layouts Windows ships with. That would give you much better coverage of  
>the various Windows layouts than ad-hoc testing by list members.
>
>I don't know exactly how to extract such tables but maybe our Microsoft  
>friend Travis could help us find someone who does? :)

This is rather simple, you can either probe the Win32 API for the infor-
mation you want, Microsoft's own Keyboard Layout Creator and Michael
Kaplan's tool do this (presumably using either of them will already give
you what you are looking for in a easy to process form), or you can load
the DLLs call the one function they export and dump the returned struct.
The KBDTABLES structure is described in kbd.h, which is part of the DDK,
and also included in the MKLC. I would estimate a suitable dumper to
take about 200 lines of C code, less if you don't care, say, about what
keys dead keys combine with, or ligatures.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Saturday, 10 May 2008 02:09:29 UTC