There have been reports of the default keyboard layout mapping being incorrect when using a Mac to access our Linux VDI.
During investigation, some people reported different outcomes using the same hardware and software, which means that coming up with a general fix that works for everyone is by no means a trivial matter, so we approached it in an incremental way, trying to define a minimum number of steps that can be taken until the problem is sorted out.
In this article we will be addressing issues with the native Horizon VDI client for MacOS.
From the browser it's supposed to work right away, but the native client is the recommended way of accessing this service.
It will be assumed that your Mac has a BRITISH (UK) keyboard layout, which is slightly different from the US layout and of course any PC keyboard.
Probably the following solutions may be used with German, Italian, or other country-specific layouts with minor changes if needed, but we haven't tested them.
Feel free to post your feedback in the comments below.
Solution 1
Try this first, since it's more likely to solve any keyboard layout mismatches and it's very simple to apply. It may look like it consists of a long number of steps, but only because they're very detailed. Also, not everyone will need to go through all of them.
Don't make any changes to the keyboard settings in the system preferences of your Mac. Leave it as British keyboard, so you don't have any issues with other applications unrelated to VDI.
- Open your Horizon VDI client.
- Open a text editor or terminal and type some control characters.
- If everything works as expected, you don't need to do anything.
- If some keys produce the wrong characters, start the "Settings" application in Linux VDI, go to "Region & Language" in the left pane.
- Click the plus sign
- Select "English (United Kingdom)".
- A list of variants will appear. Find "English (UK, Macintosh)" and select it, so your "input sources" panel looks similar to this:
- Now at the top bar you will be able to switch between layouts depending on the client you're using:
- If you click "Show Keyboard Layout", you will see a visual representation of the full keyboard. Of course, your physical keyboard may lack some of the keys that are shown here, such as the numeric keypad, but it's a good way to check and compare:
- If you don't plan to use different input methods, you can delete the "English (UK)" one, or move it to the bottom in the settings.
- Now try to type some control characters again. If everything works as expected, you don't need to do anything else.
- If there are still some mismatches between the key presses and the output they produce, go to "Menu > Preferences > Keyboard & Mouse tab > Key Mappings" in your VMware Horizon Client.
- Uncheck the option "Enable Language Specific Key Mappings":
- Try to type some control characters again. If everything works, you don't need to do anything else.
- However, there's a common issue with two very specific keys. If you see that the keys left to "1" and "Z" respectively (§ and ` characters) are swapped, you can tweak their mappings manually.
- In your VMware Horizon Client, go to "Menu > Preferences > Keyboard & Mouse tab > Key Mappings" again.
- Click the plus sign
- In the dialog that pops up, create a new entry to replace (from) the § character with (to) the ` character. Leave everything else untouched.
- Click "OK".
- Click the plus sign
again
- In the dialog that pops up, create a new entry to replace (from) the ` character with (to) the § character. Leave everything else untouched.
- Click "OK".
- Now, your preferences dialog should look like this:
- Try for one last time to type some control characters. Everything should work as expected now. Otherwise, try solution 2.
Procedure defined and tested by Daniel Ali, with thanks to Steffen Tietscheand Lennart Sorthfor their help.
Solution 2
Configure macOS X to use U.S. layout instead of British (you can swap layouts with keystroke, e.g. ctrl+space). You can do this with the "System Preferences > Keyboard" option. The US layout swaps the '#' and '£' character with 'shift+3' instead of 'option+3' but leaves the rest untouched. | |
In VMWare Horizon Client: "Menu > Preferences > Keyboard & Mouse > Key Mappings". Then deselect "Enable Language Specific Key Mappings" | |
then | In the Linux VDI, using the search, start the "Settings" application. Once it starts select "Region & Languages > Input Sources" and add "English (Macintosh)" as the Input Source by using the "+" button below the current input sources. Be aware that the Macintosh option only shows after you have selected "English (United Kingdom)" If you want to use If you have more than one input source you can swap them in the global menu bar, at the top right of the screen. |
Thanks to Willem Deconinckfor providing information for the this procedure.