[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

List of installed keyboard layouts

Florian Haag

9/4/2008 7:17:00 PM

Hi,
I'd like to let my users select a keyboard layout, just like in the
Windows input locale bar. How can I do that?

I've tried to use System.Windows.Forms.InputLanguage, but it doesn't
seem to do what I want. Particularly, the MSDN description of the
property LayoutName seems to be wrong.
It says:

"Gets the name of the current keyboard layout as it appears in the
regional settings of the operating system on the computer."

My regional settings contain this (German Windows XP Home):

Chinesisch (VR China)
Tastatur
Chinese (Simplified) - Microsoft Pinyin IME 3.0
Chinesisch (vereinfacht) - QuanPin
Pinyin (Deutsch)
Deutsch (Deutschland) [default]
Tastatur
Deutsch
Deutsch (International) [default]
Deutsch (Mathematisch)
Englisch (USA)
Tastatur
US
Französisch (Frankreich)
Tastatur
Französisch
Russisch
Tastatur
Russisch
Spanisch (Internationale Sortierung)
Tastatur
Spanisch

(Those marked as [default] are displayed bold.)

However, a simple application that enumerates all items of
InputLanguage.InstalledInputLanguages, outputs this:

LayoutName: Deutsch; Culture: de-DE
LayoutName: Deutsch (International); Culture: de-DE
LayoutName: Pinyin (Deutsch); Culture: zh-CN
LayoutName: Pinyin (Deutsch); Culture: zh-CN
LayoutName: Pinyin (Deutsch); Culture: zh-CN
LayoutName: Deutsch (International); Culture: de-DE
LayoutName: US; Culture: en-US
LayoutName: Französisch; Culture: fr-FR
LayoutName: Russisch; Culture: ru-RU
LayoutName: Spanisch; Culture: es-ES
LayoutName: Chinesisch (vereinfacht) - US-Tastatur; Culture: zh-CN

Why does the keyboard layout "Deutsch (Mathematisch)" (a custom
keyboard layout designed with MS Keyboard Layout Creator) seem to be
shown as "Deutsch (International)" (its culture rather than its name)?
Why does "Pinyin (Deutsch)" (another custom keyboard layout) appear by
its name, but three times?
Ideally, I'd like to see two other Chinese keyboards, not just one -
I've installed two IMEs, and accordingly, the Windows input locale bar
displays (besides _one time_ the "Pinyin (Deutsch)" one) one item for
MS Pinyin IME and one for QuanPin.

(Yes, I have asked this in a more specialized newsgroup some three
weeks ago, but as it seems quite inactive (a total of 6 postings in
three weeks and loads of spam), I'm asking here again.)

Thanks in advance,
Florian Haag