One keyboard to rule them all?

by Michael S. Kaplan, published on 2008/06/02 03:01 -04:00, original URI:

Mariano asks via the Contact link:

Hi Michael!

I taught myself to type Dvorak and love it. However, I have a lot of problems when I play video games. Take your typical FPS, where you use (WASD) to move. In Dvorak, this is (,AOE). Games like Crysis recognize Dvorak and reorganizes the keys accordingly, but others like Half-life 2 do not, and ends up using the real WASD keys, which in Dvorak are all over the place.

Now, here's the problem. If I have Dvorak as my default in Vista, and US or Spanish as alternates, Vista has a "per-window" language. If Dvorak is the default and change it to US in the language bar while focused on say, Firefox, if I switch to Outlook, it's still Dvorak.

So, I guess my question is: can I change the default Vista behavior so that keyboard changes can be done for the whole session, instead of per-window, (like it's done in OS X, had to say it)? Or do you have an alternate solution?


Mexico City

The "Vista" behavior here is actually the Windows behavior and has been for some time -- technically not "per-Window" but rather "per-thread-with-an-input-queue". There is no way to change this to be a single layout per Windows session....

A lot of people really don't care much for the "separate input language per input queue" model, and I am not going to try to defend it.

While it is completely understandable, it really is not all that intuitive, and there are way too many situations where the behavior it causes is not what a person really wants.

Folks in Office think the same thing about the complicated nature of it all, though their efforts to simplify things have not really been all that impressive either....

But there are alternatives, though.

Like writing a small application to send a WM_INPUTLANGCHANGEREQUEST to an application (as discussed in Rumor as prophecy in Win32), one that you would call after the game has been started.

Or even better writing a small application that could be called even before the game is started -- one that will change the default input language for new processes by calling SystemParametersInfo with the SPI_SETDEFAULTINPUTLANG flag.

The latter method can be done non-programmatically, too -- just right-click in the language bar area to get the Text Services and Input Languages dialog, and change the Default input language there....

Now maybe if Office did some of that interprocess communication stuff it could mimic the OS X behavior of one input language for all of Office. They could still track changes people made, but they could apply the changes to everyone in the Office family....

This blog brought to you by(U+09c4, aka BENGALI VOWEL SIGN VOCALIC RR)

Mariano on 13 Jun 2008 5:22 PM:

Thanks for answering my question Michael, I just saw your post. The idea of doing a script/app to change the input language sounds like fun! I haven't used the Win32 API all that much, but it's something to think about. Cheers!

Shridhara on 12 Sep 2010 10:33 PM:

Hi Michael, I'm unable to get SystemParametersInfo (with SPI_SETDEFAULTINPUTLANG) working on Win 7. The function returns a non-zero value indicating success, but the default language doesn't change. The same piece of code works fine in Win XP. Any suggestions?

Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

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