Win9x keyboard file source?

by Michael S. Kaplan, published on 2007/04/10 10:08 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2007/04/10/2073530.aspx


Thorsten Glaser asked over in the Suggestion Box:

Hi,

thanks for MSKLC, now I'm able to have the same keyboard layout on the BSD wscons (text mode) console, under X-Window and on Windows NT/2k/… – with a “meta” key that just adds 0x80 to the value of the character (e.g. maps Meta-d to ä), emulated with AltGr on NT and Mode_switch on X11, and a few funny characters I'm occasionally needing (…€„™“”•–), and Ÿ for the sake of  completeness.

Now I've seen Janko's Keyboard Generator for Win9x, and I wonder if the format of the .KBD files is publically documented. If so, I could create the same (almost) layout with a hex-editor, which sometimes is capable of doing more than some random UI programme. (Even MSKLC wouldn't let me re-map AltGr-Tab at first.) Maybe it's just not possible, but even then, I'd be interested if there's some kind of docs for that format which I couldn't find (probably because it's been 12+ years since “Chicago” was new).

Thanks in advance!

The source, header files, samples, and build environment to build keyboard layouts on Win9x has been a part of the Windows 98 DDK even back all those years ago when it was the Windows 95 DDK.

For documentation, the entire section of the documentation entitled Windows 95 Keyboard Driver is of particular use here, as is the subsection within entitled Keyboard Layouts.

In fact, the only problem with this advice (which totally answer's Thorsten's question!) is that the DDK no longer appears to be available for download (not entirely surprising since it is as old as it is and Windows 98 is no longer supported). So I hope Thorsten has a copy of the DDK installed somewhere, or knows someone who does....

I may post more on this topic in the future, though I am probably more likely to talk about NT-based keyboards, all things considered. :-)

 

This post brought to you by  (U+a1d9, a.k.a. YI SYLLABLE LYR)


# Mihai on 10 Apr 2007 6:29 PM:

It looks like you are in the "curvy characters that look like S" mood.

Looking at the last posts, you have ᔓ in the title, and ઽ + ꇙ as sponsors.

Hmmm, maybe I should go and pick up that Freud book? ;-)

# Michael S. Kaplan on 10 Apr 2007 7:27 PM:

Actually, the "S" stands for Supported. :-)

# Igor on 10 Apr 2007 9:41 PM:

I happen to have a copy of Windows 98 DDK (even NT 4.0 DDK is laying around here somewhere). I never throw such things out, you never know when you might need to look up something that just got removed in new and improved version :)

I checked out new MSKLC, it is very nice. The only thing that bothers me is its size -- 10MB (packed) for a keymap compiler is a bit on a heavy side don't you think?

# Michael S. Kaplan on 10 Apr 2007 10:09 PM:

Hey Igor,

The 10mb is the size of all of the build tools for all three platforms. It could have been smaller if it required the Platform SDk but then its small download would require a HUGE download to get started!

# Igor on 11 Apr 2007 7:52 PM:

Hey Michael!

Well if I designed it I would have made binary table editor instead of bundling compiler, linker, library and header files.

If you think about it, then you would probably come to the same conclusion as I did.

Surely it is nice to have headers which you can update but once you ship the tool that advantage is lost because you just ship another version anyway which again weighs 10MB (or more) in size.

I am sure it could be made to fit in 1MB with setup or even less without it.

# Michael S. Kaplan on 11 Apr 2007 8:02 PM:

Hmmm.... not such a great way to support the myriad of possible layouts in the massuive number of different ways that they need to be built, especially given that kbdutool.exe can support a huge number of possible layouts that MSKLC cannot.

So no, I never would have made that choice, sorry! I am in this to support everything the system can, not a binary subset that is ultimately unsupportable....

# Michael S. Kaplan on 11 Apr 2007 8:06 PM:

If we really are talking about Win9x, then ignore the MSKLC comments but the rest still applies.

If we are talking about NT and MSKLC then you commented to the wrong post!

# Thorsten Glaser on 14 Apr 2007 5:25 AM:

Thanks for the info, I'll try to find someone who has the old DDK. I don't have it because I usually do only coding on a shell script or ISO C layer, not for Win32, because I'm not primarily from the Windows world (I do like DOS though). But I thought it might be neat, and in contrast to the GNU/Linux folks we BSD people can acknowledge if Microsoft gets a few things right (and we're quite annoyed at things we can't fix, like X11R6 bugs – it does not serialise keyboard and mouse events correctly, which gives interesting effects under load, and if more load, it gets worse, e.g. type ababa and get aaabb). About kbdutool: right, it can do more than MSKLC. I mapped the English double quotation marks to AltGr-Tab and AltGr-Shift-Tab, respectively. (Actually, I let MSKLC do its thing and hand-edited the .c and .h files.) Thanks again for giving us tools to the hand that make our live (even if switching between platforms) easier!


referenced by

2007/04/11 WinNT keyboard file source?

go to newer or older post, or back to index or month or day