Solving keyboard layout issues in an ICA or RDP session

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

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:

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:

  1. The registry value IgnoreRemoteKeyboardLayout is either configured or missing
  2. Citrix Workspace app is configured to use either the local or remote keyboard layout (APPSRV.ini)
  3. Local IME (and the keyboard synchronization feature) has been enabled or disabled on the Citrix worker (VDA)

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: HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layout
  • Name: IgnoreRemoteKeyboardLayout
  • Value: 1
  • Type: DWORD

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 HKCU\Keyboard Layout\Preload in the user’s (roaming) profile is used.

Solving keyboard layout issues - AppSRVINI keyboard user profile

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.

Solving keyboard layout issues - APPSRVINI LocalIMI

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:

%AppData%\ICAClient APPSRV.INI
(= C:\Users\%UserName%\AppData\Roaming\ICAClient APPSRV.INI)

Selecting Yes in the above screenshot adds a new entry in the APPSRV.INI file: LocalIME=1

Set this value to 0 if you want to disable the keyboard synchronization feature and use the server-side keyboard layout.

Important note concerning Windows Server 2016!
As per Citrix: “This feature [local IME] is disabled in Windows Server 2016 due to a third-party issue which may introduce performance risk. […]”
Configuring local IME using wfica32.exe and prevent users from changing settings
For the sake of completeness; it is also possible to change this setting using the command line: wfica32:exe /localime:on or wfica32:exe /localime:off.

You can prevent users from changing the keyboard settings in Citrix Workspace app by configuring the Group Policy Hide Local Keyboard Layout Settings.Hide keyboard setting in Citrix WorkspaceFor more information on Citrix Workspace app and Group Policies see the article Citrix Workspace app unattended installation with PowerShell on this website.

There is actually a second value that can be configured in the APPSRV.INI to set the keyboard layout (which has been around for a long long time): KeyboardLayout

By default, the value KeyboardLayout is missing from the APPSRV.INI file. When adding the value, choose either KeyboardLayout=(Server Default) or KeyboardLayout=(User Profile). The last one uses the keyboard layout of the user’s local client.

The settings described in this section only apply to ICA sessions and not to RDP. In comparison, the  registry value IgnoreRemoteKeyboardLayout applies to both RDP and ICA sessions.

For more information see the following Citrix articles:

Local IME (and the keyboard synchronization feature) has been enabled or disabled on the Citrix worker (VDA)

In the previous section I described the keyboard synchronization feature (local IME). It is important to realize that this feature can also be managed from the Citrix worker (VDA). It is possible to enable or disable the feature by setting the following registry value:

  • Key: HKLM\SOFTWARE\Citrix\Ica\IcaIme
  • Name: DisableKeyboardSync
  • Value:
    • 0 (keyboard sync is enabled)
    • 1 (keyboard sync is disabled)
  • Type: DWORD

You can use a Group Policy Preference item to set the registry value.

Disable keyboard layout synchronization using Group Policy Preferences

In case you are sure that you have configured the settings in Citrix Workspace app correctly (and you have taken operating system specific issues into account) and the keyboard layout is still incorrect, you may have to enable or disable this setting.

The settings described in this section only apply to ICA sessions and not to RDP.

Common causes and solutions for issue 2 and 3 “the keyboard layout changes unexpectedly when opening another application in the same session or randomly during the session”

The cause for issues 2 and 3 lies in the Citrix keyboard layout synchronization feature in the Citrix Workspace app. As explained in one of the previous sectionsthis feature dynamically changes the keyboard layout in the active Citrix session when the local keyboard layout is changed.

For some reason though, the keyboard layout in the active session is changed on occasion although the local keyboard layout was not altered. The exact reason why this happens is unknown (the Citrix support engineer, although providing the solution, was not able to explain the exact cause either).

The solution to this problem is to disable the keyboard synchronization feature on the worker (VDA). This is done by modifying a registry value as described in the section Local IME.

Configuring this registry value (1 = disable) actually solved this issue for me!

What is strange about the whole situation is that:

  1. Technically speaking, keyboard layout synchronization should already be disabled based on the default setting “No, use the server keyboard layout” in Citrix Workspace app.
  2. Secondly, according to the Citrix documentation, on Windows Server 2016, this feature should already be deactivated: “This feature is disabled in Windows Server 2016 due to a third-party issue which might introduce performance risk. […]”

This issue is also described in the Citrix article Receiver | keyboard language set on VDA is over ridden by the one set on the endpoint.

Citrix CTA Julian Mooren also describes this problem on his blog in the article XenApp – Keyboard Layout is switching occasionally in MUI environment.

The settings described in this section only apply to ICA sessions and not to RDP.

I hope the information presented in this article was of some help to you.

24 thoughts on “Solving keyboard layout issues in an ICA or RDP session

  1. Dennis,

    When you were born, the Citrix Gods have bent over your craddle and have decided that you would later become our guardian angel to all of us, poor little quarks lost in the wonderful though sometimes chaotic Citrix universe. This post is another proof that you never fail for that mission.

    Thanks a million !

    Yvan

  2. Hi Dennis great work on Citrix. I have a question. I’m running Xenapp 7.6 and using citrix receiver 4.12 on windows 10 LTSC IE11 and the problem i;m coming across is that when login to citrix receiver and the users are able to see published applications they click on a manufacturing Execution System application which gives them a login dialog box to type in credential however, at that point is when keyboard stops working and users can’t key in anything in the login screen. I’m thinking is the Xenapp issue not the lenovo laptops or computers the users are using. Please advise .. Thanks

  3. Dennis, i have tried Citrix Receiver 4.9 Cu7 and when i click on the published app and the login screen pops up the keyboard no response can’t type. We are using a third party software called Secure Desktop which replaces the windows explorer shell but its not harden just basic configuration. I think it needs to have all of the executable files for Citrix receiver in the secure desktop software since its configured only for Citrix receiver.exe ? what do you think? Thank You,

    • Hi. I do not know/understand the situation well enough to advise you further. I do not know this Secure Desktop software. From which company is it? Can you send me a URL perhaps? Do you use this software on the local client where Citrix Receiver is installed or is the software installed on the Citrix server itself? Do you experience the same problem with other software that also requires logon credentials to be entered? It may very well be that this software blocks the user from entering their credentials and perhaps you do have to exclude an executable file or DLL or something else. I definitely need more info on this topic to be of further help to you.

  4. Hi Dennis,
    When I am trying to connect to Remote desktop using Citrix my keyboard is working very slow, even shift is also not working. I Tried with different laptops but getting the same issue,and it happened suddenly while I was already connected to remote desktop. The keyboard has become very very slow. PLEAE HELP

    • Hi Swapnil. Apologies for the very late reply. Can you give me some additional information, for example which OS are you running on your laptop, which version of the Citrix Workspace app, which Citrix CVAD version does the Delivery Controller have and what is the latency between you and the remote desktop? Thanks.

  5. Hi Dennis! My problem is that some users experience that their local input language Changes after starting a RDS session. They have Polish locally at their PC’s but after starting RDS session it seems like they get English or Swedish instead. So Before starting a RDS session Polish works fine in local applications like Outlook or Word, but after starting a RDS session they now longer can enter special Polish characters like L’s with sort of a dash, but regular L’s works. We use RDS on Win Srv 2016. Greatful for any ideas regarding solution:)!

    • Apologies for the late reply. The RDS session does not change the (local) keyboard of the local client. However, in case you connect to an RDS session using a type of “session manager” software, e.g. Remote Desktop Manager from Devolution, you may experience that certain characters on your keyboard do not work as expected. Normally you only need to minimize the software and your keyboard works fine again. I have seen this bug in various “session manager” applications. Besides a potential bug this also has to do with shortcuts defined in the application.

  6. Trying to use my Corsair keyboard with icue software on my Mac with citrix.
    The keyboard works fine but any macros or text shortcuts I setup for the extra keys on the keyboard on my K55 RBG Corsair doesn’t work. When I use the assigned key it simply inputs blank characters in
    Please help if possible

  7. Hi Dennis!

    Great article, the “golden oldie” was the key for solving the issue, thanks for sharing!

    Kind regards
    Alexey

      • Hi Dennis,
        I have some problems using most keys requiring Ctrl+c, Ctrl+v and some random keys. I have a acer chromebook running Citrix 19.12 LTSR. We made the change but i still have the default(value not set) and the same problem.
        Key: HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layout
        Name: IgnoreRemoteKeyboardLayout
        Value: 1
        Type: DWORD

        Can i send you a pic example via email of what i do?

  8. Hi Dennis,
    I’m not sure if this directly related to our issue but has a lot of similiarities. We deploy a singe gold image (win 8.1) to all our users and some of them have keyboard mapping issues with certain keys.
    They only have a UK keyboard in Control Panel, but on the notifcation area they have 2 showing. (UK and US) and that they have to change it there to US to get the keybaord to behave like a UK. (effects “, @, #, \).
    I tried putting in the IgnoreRemoteKeyboardLayout = 1 and made no difference. Likewise Profile reset doesn’t sem to make any difference. When you look at the HKCU\Keyboard Layout\Preload they only have 1 entry 00000809 entry?

    Any thoughts as to why? ho we can remove the extra keyboard from notification areas?

    • Hi John. I do not have a definite answer for you. The US keyboard is included in the image because you most likely are using a US version of Windows 8.1. The US keyboard is then automatically added. The reason for the second, UK, keyboard has to do with the behavior of the RDP and ICA protocol. The keyboard from the local device is redirected to the remote session. However, it is strange that a user has to change the keyboard layout to US (within the remote desktop) to get the correct behavior of the UK keyboard.

  9. Hi Dennis,

    In my environment user are using local chines traditional key board but when they use in side published desktop it is typically in English. Even we tried the Citrix workspace option and changed the settings on server side. Citrix ime also enables .
    But still problem persists. Now user requirements is they need chines language inside published vdi

    Any suggestions?

  10. Hi Dennis,

    Your solution to make the keyboard work might suit for windows but how do I make it work for Google Chrome Book? I have Lenovo(installed Google Flex Chrome OS) and the office laptop (where it is an Acer Chromebook) both of them have same issues. I have tried to change the keyboard layout to UK at both the places on the Laptop as well as the VDI, it didn’t help.

    Please help on this.

    • Hi Vijay, normally the keyboard configured on the endpoint device is automatically used when a user connects to a session. A couple of ideas from my side. Please make sure to 1) install the latest Workspace app for Chrome on the endpoint, 2) update the backend (the Citrix infrastructure) to the latest LTSR or CR release, 3) check the Citrix documentation (https://docs.citrix.com/en-us/citrix-workspace-app-for-chrome/keyboard.html), and 4) check the Configuration.js file (perhaps you are preventing a user from changing certain settings).

  11. Hi, i was looking for article like this for a long time. Appreciate your work. I have many problems when using Citrix. I need it to work remotly. Whenever i close it suddenly my system works fine. I changed keyboard sync settings and it solved problems when i write either in Citrix or outside. But for some reason when i dont close citrix and open a game, my character in game is stuck going in one direction. It applays for all games. I can see it often happens when i use CTRL + W/S/A/D. Or my keys dont react immideitly but with huge delay. Sometimes even my system (win11) frozes and randomly turns off and back on?!

    Any advices or solutions?

    PS. Maybe article requaires some updates as my registry editor for citrix looks completly different but i managed to find some options after time.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.