Today I shadowed a user’s session in Citrix and when I wanted to type something I noticed that the keyboard layout was incorrect.

This is and old “friend” that I always tend to forget about. So hopefully this post will help me to remember it :D.

You can prevent this by adding a value “IgnoreRemoteKeyboardLayout” to the registry key HKLM\System\CurrentControlSet\Keyboard Layout:

reg add “HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layout” /v IgnoreRemoteKeyboardLayout /t REG_DWORD /d 0x00000001 /f

This option has been present since Windows 2000 but was broken in Windows 2003. For Windows 2003 there are two related hotfixes, see kb 842136 and kb 917910.

If you want to change the keyboard layout that is used before logging in (“at the logon screen”) you need to modify the key HKEY_USER\.DEFAULT\Keyboard Layout\Preload:


In the screenshot above the locale id 0413 (Dutch) but you can even add more than one entry and cycle between them with ALT-SHIFT.

A description of the Locale ID’s (LCID’s) can be found in kb 262283.