Not the coolest, but

by Michael S. Kaplan, published on 2007/01/30 05:34 -08:00, original URI: http://blogs.msdn.com/michkap/archive/2007/01/30/1557184.aspx


The thing released today that I am going to talk about is not the coolest product that will be widely available starting today, January 30, 2007.

It will not be used by as many people.

It will not change as many lives.

It is not localized into as many (or frankly any) other languages.

It will not have as big of an impact on the various companies providing hardware and software for computers.

But I still think it is cool as hell, cool enough that I do not resent it being buried under whatever else is going to be released on this fine day.

What product am I blathering about? You probably know already.

It is the one that fixes this problem and this problem and this problem, not to mention some other important bugs and problems that have been reported here and elsewhere.

Microsoft Keyboard Layout Creator 1.4 has now been released!

The download page can be found right here. The download is a bit larger than (a little over twice the size of) its younger cousin (MSKLC 1.3), though if you are looking for 64-bit support (AMD64/x64 or IA64), or if you are looking for custom locale support on Vista, you'll probably consider it to be worth the .NET Framework 2.0 requirement.

If not, then you'll still find MSKLC 1.3 is available, and it can run just fine with version 1.0 or 1.1 of the .NET Framework.

Enjoy!

 

This post is sponsored by every freaking character in Unicode 5.0


# Nick Lamb on Tuesday, January 30, 2007 12:11 PM:

Does it fix the problem I reported here?

# Michael S. Kaplan on Tuesday, January 30, 2007 12:34 PM:

I assume you mean the limitations around UTF-16, i.e. only one code point in SGCAPS or dead keys (I can't remember which off the very top of my head)?

No changes were made to the limitations in the underlying Windows platform or the code in the USER subsystem, which is where the limitaion comes from. Though we did improve detection of the problem here for SGCAPS.

# Michael S. Kaplan on Tuesday, January 30, 2007 12:40 PM:

No, I just found the bug -- the one with the unpaired surrogate throwing an exception that only happens on the 102 key. That bug was not fixed in 1.4, it is being tracked for a future version.

# Mihai on Tuesday, January 30, 2007 2:33 PM:

Congrats!

# Paul Gorodyansky on Monday, February 05, 2007 8:21 PM:

Michael,

Could you please clarify one thing regarding MSKLC 1.4?

I've found only 32-bit Vista in ur lab :) it's why I am asking:

a) I do know - from you (have read here) and others that under XP64 (not Vista)  a user must have _two_ custom keyboard files:

- one in %WINDIR%\System32 directory

- another in %WINDIR%\SysWOW64 directory - for "older" 32-bit applications running under this 64-bit OS

b) Is it the same under 64-bit Vista? I mean, I use MSKLC, it prepared for me several directories and under 64-bit Vista:

(a) file from         i386         sub-directory should go to the %WINDIR%\System32 directory

(b) and file from        wow64    sub-directory should go to the %WINDIR%\SysWOW64 directory

Right? (64-bit Vista has such directory as well as XP64, right?)

I am asking because someone wrote that while it was necessary under XP64 it is not necessary anymore under Vista, that is under 64-bit Vista  only (a) should be done and that file will work fine for both 64-bit applications and for older 32-bit ones.

It's not correct, is it? We do need (a) _and_ (b) under 64-bit Vista, don't we?

--

Thanks,

Paul

# Michael S. Kaplan on Monday, February 05, 2007 8:29 PM:

Yes, under 64-bit you need two files -- and the setup that is built will always have them. This is true of Vista and of 64-bit Windows prior to Vista.

# Cristian Secară on Tuesday, February 06, 2007 8:14 AM:

Related question: if I use my "Windows DDK 3790.1830" to build a keyboard layout driver for Windows Server 2003 in x64 or IA-64 build environments, only one .dll is generated, presumably the non-wow64. What's the mistery ?

Cristi

# Michael S. Kaplan on Tuesday, February 06, 2007 8:22 AM:

Um, MSKLC is nice enough to build the two separate binaries. If you are using the DDK you have to do all that yourself. The difficulty in accomplishing this is why MSKLC exists!

# Cristian Secară on Tuesday, February 06, 2007 9:18 AM:

Yes, MSKLC is useful tool, but for x86 keyboard .dll files I am using DDK, it makes more fun :) (and I suspect that back in 2002 I had no choice in doing otherwise)

I see that the WDK is out, I will download and play with it a little. If I will not succeed, no problem, I am happy with the new MSKLC also :)

Cristi

# Michael S. Kaplan on Tuesday, February 06, 2007 9:57 AM:

More fun for who? That format is simply awful to work with, and quite unforgiving....

But anyway, make sure to be careful -- it is way to easy to create keyboards that won't work well or at all when you do it the hard way, something that MSKLC goes out of its wasy to help guard against. :-)

# Cristian Secară on Tuesday, February 06, 2007 12:15 PM:

Fun for me, don't know about others :)

It's now more than five years since the users are happy with my keyboard driver, so I suppose it is well written. Apart from that, with the DDK I am offering support for NT 4.0 versions too, something that MSKLC can't do as far as I know (for exemple on NT 4.0 there are no multimedia keys).

Cristi

# Michael S. Kaplan on Tuesday, February 06, 2007 12:22 PM:

Not sure what you mean -- the keyboards should install on NT 4.0, too?

# PaulGor on Tuesday, February 06, 2007 2:06 PM:

May I report a usability problem in MSKLC 1.4 under Vista?

Say I prepared installer for my custome (Phonetic) Russian keyboard layout and some end-end-user :-) got it and decided to install:

- s/he sees - for a split second - a window with "Preparing Install"

- then there is nothing on screen - for a long time, I say 15 seconds

- only then Installer window appears

I am afraid, such user will be confused...

It's probably better if there is a window all the time on screen after s/he clicked on install.exe ....

*********

Two small unrelated questions.

I use MSKLC on _32-bit_  Vista and get folders like    i386   and wow64.

1) Will those layout files work under older system - XP64?

2) I look at the size of the files: 6k in i386 and 7k in wow64 -

and then I look what file the Installer placed into System32 folder of my 32-bit Vista -

I see that it's 6k file (that is, it's from i386 folder)

Is it Ok? I mean, it's _32_-bit Vista - should it be a file from wow64 folder?

Or the Installer (built under 32-bit Vista) will place to System32 -

being it 64-bit Vista or 32-bit Vista - same file (from i386) for both?

Thanks,

Paul

# Michael S. Kaplan on Tuesday, February 06, 2007 2:17 PM:

The pause is pure Windows Installer stuff; we complained but they say it is by design. :-(

The way the folder breakout works:

Simple enough? :-)

# PaulGor on Tuesday, February 06, 2007 2:34 PM:

> Simple enough? :-)

Almost :) Sorry for double-checking but it looks like eventhough I built the files under 32-bit Windows,

_the same_ dll from i386 is used (placed to System32) on each of 3 systems:

- 32-bit Vista

- 64-bit Vista

- XP64

Right? But last two are not "x86 boxes", they are  "x64 boxes", aren't they?

I am new to 64-bit world, so may ask stupid questions, sorry!

# Michael S. Kaplan on Tuesday, February 06, 2007 3:30 PM:

Well, two things (channeling Raymond's psychic powers, too!):

  1. Have you tried the keyboard in a 64-bit process? If the wrong one were there, it would immediately fail.
  2. How are you checking this? (Hint: redirection can mislead the answer!)

# PaulGor on Tuesday, February 06, 2007 6:03 PM:

> Have you tried the keyboard in a 64-bit process

No, I did not - if I had an access to a 64-bit Vista, I'd try and not ask questions :)

I also dont' have XP64. All I have - 32-bit Vista

I guess what I don't understand from your list above is the following (regarding regular Intel machines):

- i386 -- installs to system32 on an x86 box (any version of Windows)

x86 box - does it include 64-bit XP or 64-bit Vista or not?

If the answer is "yes" then I _can_ offer the dll from i386 which I built under 32-bit Vista to my Russian readers _even_ if they have XP64 or 64-bit Vista.

If the answer is "No" then I need to have _two_ sets of i386 files - one built under 32-bit Vista and another - built under 64-bit Vista.

# Michael S. Kaplan on Tuesday, February 06, 2007 6:09 PM:

No, an x86 box is 32-bit only. Ever. If you have a 64-bit box you never use the i386 file.

64-bit ALWAYS requires two files.

Microsoft ONLY supports using the installation package as we built it -- which includes all four dirs. If you split it up, you are on your own as this is an untested, unsupported configuration.

I will probably blog about this soon to make sure it is entirely clear....

# PaulGor on Tuesday, February 06, 2007 6:44 PM:

1)

> No, an x86 box is 32-bit only. Ever.

> If you have a 64-bit box you never use the i386 file.

Then there is a missing line in your list above (or I am missign something) - you had there a line about

i386 for x86 box (and file from there goes to System32)

but there is no line about

i386 for x64 box...

2) No, my question was not about "not using Installer", please let me state it better:

Fact.

I have Installer build on x86 box - under 32-bit Vista.

It works _there_ fine - according to your list a file from i386 folder goes to System32 folder of that 32-bit Vista

Question.

If I copy this _that_ Installer (built on x86 box) onto a x64 box -

XP64 or Vista 64-bit - will it work?

In that Installer - built under 32-bit Vista (it's all I have) there is no file for x64 box, is it?

# PaulGor on Tuesday, February 06, 2007 6:49 PM:

Monday... Sorry, Michael, please - if you can - remove my last comment - I finally got it :)

That is when I build Installer on my 32-bit Vista, MSKLC still creates a file fro a 64-bit system - it puts it to

ia64

folder.

Why I was so stupid I guess is because I saw unknown for me word

Itanium

and did not read what's in parenthesys - assumed that it's "some other platform such as say AMD) :)

Thanks for patience!

# Cristian Secară on Tuesday, February 06, 2007 6:59 PM:

> Not sure what you mean -- the keyboards should install on NT 4.0, too?

Yes, but not the same driver fol all versions ... my standardized Romanian keyboard layout driver is available separately for NT 4.0, 2000 and XP. Until recently for x86 only, now also for XP 64 bit, thanks to MSKLC 1.4 :)

The NT 4.0 version is a distinct build with Windows DDK. The source code is similar but not the same as for for 2000/XP.

As far as I know, MSKLC files are not compatible with NT 4.0.

Surprisingly or not, I can still find NT 4.0s around me, used for dedicated tasks (e.g. DVS Pronto digital disk recorder, SD version), for which no one finds any reason for upgrading (except, perhaps, an upgrade to the entire system) ...

Cristi

# Michael S. Kaplan on Tuesday, February 06, 2007 7:07 PM:

Actually, they work just find in NT 4.0, I have instslled them many times!

# Cristian Secară on Tuesday, February 06, 2007 7:41 PM:

Well, glad to hear that, but I never tried it, because this is what the MSKLC page says: "... your system must meet the following requirements: Windows 2000, Windows XP, Windows Server 2003 or Windows Vista (MSKLC will not run on Windows 95, Windows 98, Windows ME or Windows NT4)".

I always believe what Microsoft says, I don't feel the need to search for proof :)

Cristi

# Michael S. Kaplan on Tuesday, February 06, 2007 7:57 PM:

MSKLC can't run there.

The keyboards that MSKLC creates can.

There is a difference! :-)

# Cristian Secară on Tuesday, February 06, 2007 8:14 PM:

True, I becomed confused here by the english text ... :(

Unrelated question: is there any possibility to strip the "Company" entry field from the .dll property ? I don't feel confortable with this, since I publish my drivers under my real name "brand", not under my company name brand.

Cristi

# Michael S. Kaplan on Tuesday, February 06, 2007 8:34 PM:

You can put something like a hyphen in there instead..... :-)

# PaulGor on Tuesday, February 06, 2007 9:39 PM:

I've placed a word 'personal' there

# PaulGor on Tuesday, February 06, 2007 9:58 PM:

Another MSKLC question.

Under Windows XP (x86) end user - being just a member of Users group - add say "Russian" layout via Control Panel

but can not replace it with a custom layout because he does not have rights to copy a file to System32 folder.

Is it the same for Vista? I saw that MSKLC says something about Administrator Rights - does it mean that a member of Users groups will not be able to use Installer?

# Michael S. Kaplan on Tuesday, February 06, 2007 10:04 PM:

This is a Windows requirement.

Keyboards are stored in the system dir and have to have info about them written to HKLM. An administrator must do the initial initial installation, always, in any and every version of Windows.

# PaulGor on Tuesday, February 06, 2007 10:19 PM:

Thanks, I get it - a user who belongs to Users group is capable to "Add" a Russian keyboard layout (not being an Admin) only because the file kbdru.dll is already in System32 and is already registered in HKLM. Righ?

# Michael S. Kaplan on Tuesday, February 06, 2007 10:32 PM:

Exactly. There are two different operations:

1) Installing a new keyboard layout on the machine.

2) Adding a keyboard on the machine to the user's Language Bar.

#1 requires you to be an admin, but #2 does not.

Now MSKLC 1.4 blurs the line a little bit since it will actually try to do both things when you run setup (due to user confusion at needing to go through separate steps to get #2 done when doing #1). But there are still these two separate operations....

# PaulGor on Wednesday, February 07, 2007 1:02 PM:

MSKLC 1.4 as well as setup.exe it bulds require .NET 2.0

There was no complain about that on the 32-bit Vista machine I found in the lab at work.

So Vista already has .NET 2.0, right?

# Michael S. Kaplan on Wednesday, February 07, 2007 5:14 PM:

setup.exe used by built keyboard layouts does not require .NET of any version; MSKLC the tool does require 2.0.

Vista has a recent enough version, yes.

# PaulGor on Thursday, February 08, 2007 1:10 PM:

MSKLC "package" question.

Somehow I thought that setup.exe is the program that checks Windows version and does needed things to layout files, but apparently it does not work without .msi files.

Why then it's kind of large? Entire .zip takes 300k - is it a little bit too much for copying couple dll to their folders and make Registry changes?

# Michael S. Kaplan on Thursday, February 08, 2007 1:15 PM:

If you look at the series I did about Converting a Project to Unicode, you will see exactly where setup.exe comes from (the extra step is code I added that decides which .MSI file to use).

Since setup.exe, three .MSI files, and four DLLs are there, these things will take a small amount of space.... how else to support three different platforms?

# Dean Harding on Thursday, February 08, 2007 6:10 PM:

I've also found that setup.exe's are usually a bit bigger because they link to the c runtime statically, rather than dynamically (i.e. to the .lib, rather than the .dll). Obviously, your setup.exe needs to have as few dependencies as possible (usually just USER32, KERNEL32 and GDI32 if you can!) and you certainly can't be sure the user has the c runtime installed (at least, not for VC8, maybe in Vista?) so you link statically. Thus making the executable bigger.

# Michael S. Kaplan on Thursday, February 08, 2007 7:10 PM:

In the case of MSKLC, we dynamically link to msvcrt.dll, using the rules that let us link to the ones in earlier versions. Since we do not run on Win9x anyway, the fact that Win95 may not have the DLL did not seem too terribly important. :-)

# Dean Harding on Thursday, February 08, 2007 8:15 PM:

Yeah, that would be another option.

# Francis Leboutte on Tuesday, April 24, 2007 2:06 AM:

Hello

I'm trying to update and port my French Dvorak layouts to Vista (see URL). I have installed .NET Framework 2.0 and last version of MS KLC on a XP pro PC. MS KLC starts but doesn't display any layout (just a gray background). Anything else seems to work, for example I can load one of my old source file and test it or validate it. What can I do?

Thanks,

Francis

# Michael S. Kaplan on Tuesday, April 24, 2007 2:19 AM:

Hi Francis,

See this post, it sounds like the same issue as what you are seeing?

# Francis Leboutte on Tuesday, April 24, 2007 3:53 AM:

Exactly. Changing the DPI and rebooting fixes the problem. Thank you. Have a nice day,

Francis


referenced by

2011/05/23 Philosophical about enablement, the impossible, and the infeasible

2010/05/04 The wacky world of WOW64 keyoards, un-leashed, un-locked, un-something-or-other

2008/08/27 Uniqueness of the Name and Description...

2008/05/10 Why Bengali keyboards can't be found on XP 64 bit

2007/02/07 I do not think that word means what the Platform SDK thinks it means

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