Solving keyboard layout issues in an ICA or RDP session can be quite tricky. In this article I deal with some of the common causes and their solutions.
|The issues and solutions in this article apply to XenDesktop / Citrix Virtual Apps and Desktops (CVAD) version 7.12 and higher and Citrix Receiver 4.6 and higher.|
A list of the most common issues
Sometimes it may be necessary to reset Citrix Receiver or Citrix Workspace. This can normally resolve unexpected behavior and/or problems. You can reset Citrix Receiver or Citrix Workspace using the desktop graphical user interface or using the command line. (Please ensure TVT is not in use before continuing) Microsoft Windows 7, 8.1 & 10. Citrix Workspace is rated 8.4, while Microsoft Remote Desktop Services is rated 7.8. The top reviewer of Citrix Workspace writes 'Fast set up, easy to install, with responsive support'. On the other hand, the top reviewer of Microsoft Remote Desktop Services writes 'It's predictable but they need to develop better support for remote. The only solution I have found that is actually manageable and usable is to start the Citrix Workspace app and connect to the remote desktop session, then once the desktop loads, press the SHIFT-F2 key combination, which places the desktop into windowed mode, which is unusable due to the resolution issue noted in my original post.
Let's start with a list of the most common keyboard layout issues. Each issue is linked to a section in this article that describes the causes and solutions:
- You logon to an RDP or ICA session.
- Issue 1 - the keyboard layout changes unexpectedly at logon:
- The keyboard layout of the local client should be synchronized in the session, but it is not. Instead, the server-side keyboard layout on the worker (VDA) is used.
- The keyboard layout of the local client is used instead of the server-side keyboard layout (worker/VDA). This is the opposite situation compared to scenario A.
- Issue 2- the keyboard layout changes unexpectedly when opening another application in the same session.
When opening another application in the same session the keyboard layout changes unexpectedly. In most cases logging off and on again solves the problem (until the layout changes unexpectedly again).
- Issue 3: the keyboard layout changes randomly during the session (without opening a new application).
Sometimes when working in a session the keyboard layout changes unexpectedly without any specific interaction by the user (e.g. starting a new application or launching a console). In most cases logging off and on again solves the problem (until the layout changes unexpectedly again).
- Issue 4: the keyboard layout changes unexpectedly on the Windows lock screen (this issue is described in a separate article on this website).
As you can see in the previous list, keyboard layout issues can present themselves in different ways. The following paragraphs describe the causes and solutions for each of the scenarios above.
Common causes and solutions for issue 1 'the keyboard layout changes unexpectedly at logon'
There are at least three possible reasons why either the local keyboard layout or server-side keyboard layout is used at session launch:
The registry value IgnoreRemoteKeyboardLayout is either configured or missing
The registry value IgnoreRemoteKeyboardLayout is a 'golden oldie' in the world or Remote Desktop Services and Citrix. This value is configured on the Remote Desktop Session Host or Citrix worker (VDA).
First of all, IgnoreRemoteKeyboardLayout is a registry value that you set on the Citrix worker (the VDA):
- Key:HKLMSYSTEMCurrentControlSetControlKeyboard Layout
A reboot is not necessary. For this value to take effect you only need to close your current RDP or ICA session (in case you have one open) and launch a new session. This setting is a local machine setting, so it applies to all users (and administrators!).
As said, this registry setting has been around forever and still applies to all server operating systems including the latest one, Windows Server 2019.
So what exactly does this setting do? Well, when an RDP or ICA session is launched, instead of using the keyboard layout set on the local client device, the keyboard layout set in the user's (roaming) profile within the RDP or ICA session is used. To be more precise; the keyboard layout that is listed first in the current user registry hive HKCUKeyboard LayoutPreload in the user's (roaming) profile is used.
By default, the registry value IgnoreRemoteKeyboardLayout is not present on the local system. In case the value is present, but you want to use the local keyboard layout of the user's client device instead, you can either delete the registry value or change it from 1 to 0.
Citrix Workspace app is configured to use either the local or remote keyboard layout (APPSRV.INI)
Citrix Workspace app includes several advanced preferences, one of which is the Keyboard and Language bar.
By default, the configuration of this setting is set to Use the server keyboard layout. As explained in the previous section, the server keyboard layout is actually the user's keyboard layout as configured in the (roaming) profile used in the ICA session.
Switching to Yes enables the keyboard layout synchronization feature which was introduced in XenDesktop 7.12 and Receiver 4.6. This feature not only synchronizes the keyboard layout of the local client to the ICA session at session launch, but it also dynamically changes the layout in the active ICA session when the keyboard layout on the local client is changed.
This setting is actually stored in the APPSRV.INI or at least it will be when you change it. The APPSRV.INI has been around for a very long time, since the early releases of Citrix Receiver. The file APPSRV.INI is a user-specific configuration file and is located in the following directory:
(= C:Users%UserName%AppDataRoamingICAClient APPSRV.INI)
Selecting Yes in the above screenshot adds a new entry in the APPSRV.INI file: LocalIME=1