Comment 18 for bug 428575

Revision history for this message
AJenbo (ajenbo) wrote :

I meant to say "it can't be that hard" obviously.

Any way under HKEY_CURRENT_USER', 'Keyboard Layout\Preload' there will be a numbered string for each installed keyboard layout.

I found a list of keyboard codes that windows uses, and what ISO they correspond to.

"00000402"="bg"
"00000404"="ch"
"00000405"="cz"
"00000406"="dk"
"00000407"="gr"
"00000408"="gk"
"00000409"="us"
"0000040A"="sp"
"0000040B"="su"
"0000040C"="fr"
"0000040E"="hu"
"0000040F"="is"
"00000410"="it"
"00000411"="jp"
"00000412"="ko"
"00000413"="nl"
"00000414"="no"
"00000415"="pl"
"00000416"="br"
"00000418"="ro"
"00000419"="ru"
"0000041A"="yu"
"0000041B"="sl"
"0000041C"="us"
"0000041D"="sv"
"0000041F"="tr"
"00000422"="us"
"00000423"="us"
"00000424"="yu"
"00000425"="et"
"00000426"="us"
"00000427"="us"
"00000804"="ch"
"00000807"="sg"
"00000809"="uk"
"0000080A"="la"
"0000080C"="be"
"00000813"="be"
"00000816"="po"
"00000C0C"="cf"
"00000C1A"="us"
"00001009"="us"
"0000100C"="sf"
"00001809"="us"
"00010402"="us"
"00010405"="cz"
"00010407"="gr"
"00010408"="gk"
"00010409"="dv"
"0001040A"="sp"
"0001040E"="hu"
"00010410"="it"
"00010415"="pl"
"00010419"="ru"
"0001041B"="sl"
"0001041F"="tr"
"00010426"="us"
"00010C0C"="cf"
"00010C1A"="us"
"00020408"="gk"
"00020409"="us"
"00030409"="usl"
"00040409"="usr"
"00050408"="gk"

It should be very easy to make Wubi use this to install the same keyboard layouts in Ubuntu.

I haven't found out how to see which of the installed keyboard layouts is currently selected. But i suggest that you as a minimum set the first none us (none 00000409) keyboard as the default. The reason for this is that I have seen many computers where the OEM installation leaves behind the US layout from the default MS install script, even though it's a laptop with only a Danish layout.
To prove my point her are some random Danish Windows desktop screenshot from Google, the DA in the lower right means that this computer has Danish keyboard layout selected and at least one more installed.
http://peter.mpbrun.dk/wp-content/uploads/office12/trial/10activated.png
http://www.kb.dk/export/sites/kb_dk/da/kub/campusbib/it/wireless_print/wireless_pics/vista1.jpg
http://www.pensionistedb.dk/grafik/PhotoFiltrevindue.jpg
http://www.it.life.ku.dk/vejledninger/traadloestnet/~/media/IT/wireless/eduroam_vista_dk/12.jpg.ashx
In fact 4/6 of the screenshots i found on Google had this, and as I have only ever known two guy who had multiple keyboards with different layouts, i seriously doubt that this reflects a deliberate setup of the user base.