Using Non-US English Keyboards with RDP
You can use non-US English keyboards on systems under test (SUTs) with Eggplant Functional and either Virtual Network Computing (VNC) or Remote Desktop Protocol (RDP) connection types. Information about how to use non-US English keyboards on SUTs with Eggplant Functional is provided below.
For additional information and alternative methods for using non-English keyboards with Eggplant Functional, see the FAQ article How do I use non-English keyboards with Eggplant Functional?
For VNC SUT Connections
Eggplant Functional support for using non-US English keyboards is built in to the VNC server. No special configuration is required to use non-US English keyboards on SUTs that you connect to with VNC.
For RDP SUT Connections
Eggplant Functional support for using non-US English keyboards with RDP SUT connections requires additional configuration depending on the language:
-
For French, German, and UK English languages, we provide the keyboard layout mapping. You configure it by selecting the language you want in Eggplant Functional and on the SUT as described in Using the Provided Languages below.
-
For other languages, you can create your own keyboard layout mapping file within Eggplant Functional as described in Creating a Keyboard Layout Mapping File below.
Detailed information about how to implement non-US English keyboards with either of these configurations is provided below.
Using the Provided Languages
If you want to use French, German, or UK English on a SUT that you are connecting to with RDP, you must configure the language as described here:
- Choose Control > RDP Keyboard Layout > and French, German, or UK English from the Eggplant Functional toolbar.
- Select the same language on the SUT when you connect to it.
In Live Mode, Eggplant Functional always uses the US English keyboard. Changing the keyboard setting only affects scripted keyboard actions (i.e. the typeText
command).
Using Other Languages
Eggplant Functional supports the use of languages in addition to the provided languages by giving you the option to create your own keyboard layout mappings file. When you choose to create a new layout mapping file, we create the file for you. You need to modify it with the key codes for the language you want.
Creating a Keyboard Layout Mapping File
Below are the things you need to know about creating a keyboard layout mappings file, along with the contents of a file that has been created but not edited. The following topics are covered:
- Step by Step: Creating a Keyboard Layout Mappings File
- Keyboard Layouts Mapping File Contents
- Keyboard Layout Mapping Files Requirements
- Keyboard Layout Mapping Format Examples
- Step by Step: Implementing a Keyboard Layout
Step by Step: Creating a Keyboard Layout Mapping File
To create a keyboard layout mapping file, perform the following steps:
-
Launch Eggplant Functional.
-
Choose Control > RDP Keyboard Layout > Create new. This opens the New Keyboard Layout window prompting you to name your new file and save it in the KeyboardLayouts directory, which is in your Eggplant Functional application directory structure. If you installed Eggplant Functional in the default installation directory, the KeyboardLayouts directory would be in one of the following locations:
- On Mac and Linux: ~/Library/Eggplant/KeyboardLayouts.
- On Windows: %APPDATA%/Eggplant/KeyboardLayouts.
-
Give your mappings file a name that is meaningful to you. For example, our French keyboard layout file is named "French.txt."
-
Save your mappings file as a text file with the .txt extension, which is the default. You
must
save the file as text file. -
After you save the file, you can locate it in the KeyboardLayouts directory and edit with a text editor.
ノートYou need to repeat this process for each language you want to add.
Keyboard Layout Mappings File Contents
Below are the contents of a keyboard layout mappings file that has been created but not edited. It contains example code for configuring keys.
You must replace this sample code with the code for your language.
{
"~": {
"altFlag": "DOWN",
"scancode": 27,
"controlFlag": "DOWN"
},
"`": {
"shiftFlag": "DOWN",
"scancode": 13,
"altFlag": "UP",
"controlFlag": "UP"
},
"?": {
"shiftFlag": "DOWN",
"scancode": 12,
"altFlag": "UP",
"controlFlag": "UP"
},
"/": {
"shiftFlag": "DOWN",
"scancode": 8,
"altFlag": "UP",
"controlFlag": "UP"
},
"1": {
"scancode": 2
}
}
Keyboard Layout Mapping Files Requirements
Following are the Eggplant Functional requirements for the keyboard layout mapping file and mappings:
File Format Requirements
- You must create one mapping file for each language you want to add.
- Each mapping
file
must begin with the character { and end with the character }.
Key Mapping Requirements
- You need to include mappings in the file for only those characters that differ from the US keyboard key mappings. The US keyboard mapping is used for any character that is not mapped in the file.
- The mapping for each key must include the character you are mapping, a scan code, and flags for any required modifier keys. (The modifier keys are Alt, Shift, or Control (CTRL). You can omit flags for modifiers that are not required by the character. For example, the character # in the US keyboard requires the Shift key to be down, regardless of the state of other modifier keys. Hence, you don't need to include the other modifier keys (i.e., CTRL and Alt) as shown in the mapping in Example 2.
Keep in mind that each key has one scan code. But each key can have multiple mappings because it can be used for different characters. For example, the number 4 key on a US keyboard is also used for the # character when the Shift key is down. See examples 1 and 2 below.
Keyboard Layout Mapping Format Examples
Below are examples of key mappings in the format Eggplant Functional requires for non-US English keyboard layout mapping files. Explanations of the mappings follow.