How to redirect local keyboard layout in Citrix sessions

Issue #

In some Citrix Virtual Apps and Desktops (former XenApp/XenDesktop) environment, every time a Citrix VDA server is rebooted or even at random times the keyboard layouts appearing inside the Citrix session change. This is because Citrix Workspace App client is making use of the keyboard layouts defined in the Citrix VDA server on top of the keyboard layouts defined in the local machine. In cases where users are making use of non-US keyboards this can be disturbing and will need to be fixed.

Resolution #

Update: June 2022

Citrix has added a new feature in the latest Windows version of the Citrix Workspace App (CWA) client called Dynamic Sync. This allows for an on-demand sync of the local keyboard layout with the Citrix session keyboard layout. To activate this feature on the CWA client side (not enabled by default) right click the CWA client on your Windows desktop and choose "Advanced Preferences --> Keyboard and language bar --> Keyboard layout tab".

After enabling dynamic sync on the CWA client side, you need to carry out corresponding configuration on the Citrix VDA server side. On a Windows VDA server, carry out the following tasks:

  1. Launch the Registry editor and navigate to HKEY_LOCAL_MACHINE\Software\Citrix\Ica\IcaIme.
  2. Create the DWORD entry DisableKeyboardSync and set its value to 0. 1 disables the keyboard layout sync feature.
  3. Restart the Citrix session for the changes to take effect.

After you enable the keyboard layout on both the VDA and Citrix Workspace app, the following window appears when you switch keyboard layouts. Switching keyboard layout

The issue described in this KB article can be resolved in many cases by simply upgrading your Windows CWA client to the latest version, enabling Dynamic Sync (client and server side) and then performing a graceful Citrix session logoff and re-logon. If however this does not resolve the issue, there are a series of manual steps to take by configuring the Citrix server and workspace app client to only redirect the local keyboard layouts and ignore the Citrix VDA server keyboard layouts. This can accomplished by following the steps below.

Bear in mind that this article is primarily focused on users running Citrix Workspace App client in a supported Windows local machine. If the end user is running a non-Windows version of Citrix Workspace App (former Receiver) they will probably need to take extra configuration steps, as described in the guiding articles of the respective sections of this KB article.

The below configuration changes must be made to allow local client keyboard layout redirection to a Citrix Virtual Apps and Desktops session.

Citrix VDA server configuration #

The following registry keys must be configured (can be done via GPO for all VDA servers).

On the affected Citrix VDA servers, set the following values:
1) HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout --> Create REG_DWORD, name=IgnoreRemoteKeyboardLayout value=0
2) HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\Ica\IcaIme --> Create REG_DWORD, name=DisableKeyboardSync value=0

Citrix client for Windows configuration (mandatory, if windows client locally) #

In the following local configuration file %AppData%\ICAClient APPSRV.INI (= C:\Users\%UserName%\AppData\Roaming\ICAClient APPSRV.INI)
set the following parameters exactly as shown below:
LocalIME=1
KeyboardLayout=(User Profile)

Citrix Workspace app for Windows File path: “%appdata%\ICAClient\WFCLIENT.ini”

Set the following parameter value:

KeyboardLayout=(User Profile)

After the above changes right click the Citrix Workspace App and choose "Advanced Preferences --> Keyboard and Language bar". Ensure that the following options are checked:
1) Display the language bar in Citrix session
2) Yes, use the local keyboard layout.

Citrix Client for Mac (mandatory, if Mac client locally) #

Citrix Workspace app for MAC File path: “~/Library/Application Support/Citrix Receiver/Config”
open the Config file in the ~/Library/Application Support/Citrix Receiver/Config folder, locate the “EnableIMEEnhancement” setting and turn the feature on or off by setting the value to “true” or “false,” respectively.

Change setting in [WFClient]: KeyboardLayout=(Server Default) or KeyboardLayout=(User Profile)

To control this feature alone, open the Config file in the ~/Library/Application Support/Citrix Receiver/ folder, locate the “EnableIMEEnhancement” setting and turn the feature on or off by setting the value to “true” or “false,” respectively.

Note: The setting change takes effect after restarting the session.

To enable keyboard layout synchronization, go to Preferences > Keyboard and select “Use local keyboard layout, rather than the remote server keyboard layout.”

More details on Citrix Workspace app for MAC  (https://docs.citrix.com/en-us/receiver/mac/current-release/configure.html)

Citrix Workspace App for Linux #

Consult the following Citrix article for detailed instructions on how to configure multi-language keyboards with Citrix Workspace App for Linux.

https://www.citrix.com/blogs/2022/03/15/change-your-keyboard-layout-with-ease-with-citrix-workspace-app-for-linux/

Take into account particularly the following notes (valid as of July 2022).

  • For more information on enabling the Unicode Keyboard Layout Mapping feature on the Windows VDA, see this Knowledge Center article
  • Check out our Dynamic Keyboard Layout Synchronization documentation to learn about enabling the Dynamic Keyboard Layout Sync feature on the Linux VDA.
  • When using a Windows Server 2016 or Windows Server 2019, navigate to HKEY_LOCAL_MACHINE\Software\Citrix\ICA\IcaIme registry path and add a DWORD value with the key name DisableKeyboardSync and set the value to 0.
  • The input method editor (IME) is not supported on Citrix Workspace app for Linux, so when the input language is Chinese, Japanese, or Korean, keyboard layout synchronization is still not yet provided.
  • Make sure the following two lines are presented in the $HOME/.ICAClient/All_Regions.ini file on Linux client (if not, delete the All_Regions.ini, alternatively, add the two lines manually): KeyboardSyncMode= and KeyboardEventMode=.

Citrix Workspace App for Web and for Chrome #

If you need instructions on how to setup a multi-language keyboard for Citrix Workspace App for Web and for Citrix Workspace App for Chrome, consult the following article: https://support.citrix.com/article/CTX218100/configuring-multi-language-keyboard-layout-for-the-session-in-receiver-for-html5-and-receiver-for-chrome.

Registry setting for Unicode languages (optional, for non-windows versions of Workspce app) #

The difference in keyboard layout among operating systems can cause key mapping issues. For example, the Mac France keyboard layout is different from Windows. Citrix Virtual Apps and Desktops uses “Unicode Keyboard Layout Mapping” technology. Windows VDAs need to enable “Unicode Keyboard Layout Mapping” feature if users have key input issue when using a non-Windows version of Citrix Workspace app. Add the following registries in Windows VDA to enable this feature

HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\CtxKlMap\EnableKlMap value = DWORD 1

HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\CtxKlMap\DisableWindowHook value = DWORD 1

You can find more detailed guidance and step-by-step procedures for analyzing and troubleshooting Citrix Virtual Apps and Desktops organized by category in my Citrix Virtual Apps and Desktops Troubleshooting e-book.

Further resources #

Refer to the following articles for more in-depth analysis of the Citrix keyboard layout and language issues.

Powered by BetterDocs