Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

Define custom keys for screen objects

  • Last UpdatedOct 29, 2026
  • 3 minute read

Create an external XML file that defines custom keys and key combinations for user input on selected screen objects. These key definitions allow you to use non-standard keyboards in your project.

Before you begin this task, you should be familiar with: the basic features of the Extensible Markup Language (XML); the differences between nodes, elements, and attributes in XML; and how to use XML to create a program settings file. You should also have the manufacturer's documentation for the keyboard or device that you are using.

Some screen objects can be configured to be activated when the user presses keys on the keyboard, in addition to clicking or tapping the objects on the screen. At this time, these objects include:

For each object, you can select the appropriate key in the Key list in the Object Properties dialog box. By default, however, the Key list includes only the keys on a standard alphanumeric keyboard. It does not include any of the custom or device-specific keys that are on many industrial computers, panels, displays, etc. You need to define these custom keys so that they can be recognized and accepted as valid user input.

It is important that your custom key definitions exactly match the manufacturer's specifications for the keyboard or device that you are using. Each key should have both a keyboard scan code and a virtual-key code. If you do not have both codes for each and every custom key that you define, you may see unexpected behavior during project run time.

To define your custom keys:

  1. Create a new text file named CustomKeys.xml, and then save that file in the Bin sub-folder of program folder.

    The file should be located at: C:\Program Files (x86)\AVEVA\AVEVA Edge 2026\Bin\CustomKeys.xml

  2. Use a text editor to open the file for editing.

  3. At the top of the file, add the XML declaration, which indicates that it is an XML file:

    <?xml version="1.0" encoding="UTF-8"?>

  4. Below the XML declaration, insert a top-level node named CustomKeys:

    <?xml version="1.0" encoding="UTF-8"?>

    <CustomKeys>

    </CustomKeys>

  5. For each custom key that you want to define, insert a node named CustomKey with the following attributes:

    Attribute

    Accepted Values

    Description

    Name

    string up to 10 characters

    The name of the custom key, as it will appear the Key list in the Object Properties dialog box.

    ID

    0100 to FFFF

    A unique ID code (in hexadecimal) for the custom key. This code is what will actually be saved in your project settings and then referenced against the CustomKeys file. You should not reuse ID codes across different CustomKeys files.

    KeyCode

    00 to FF

    The virtual-key code (in hexadecimal) for the custom key. Values 00 through FE are typically used by the standard alphanumeric keys, while FF is typically reserved for custom keys. For a list of virtual-key codes, go to: msdn.microsoft.com/library/dd375731

    ScanCode

    00 to FF

    The keyboard scan code (in hexadecimal) for the custom key. Scan codes are specified by the keyboard or device manufacturer. For more information, consult the manufacturer's documentation or go to: msdn.microsoft.com/library/ms646280

    Shift

    0 (no) or 1 (yes)

    Combine the base key with Shift (for example, Shift+A).

    Alt

    0 (no) or 1 (yes)

    Combine the base key with Alt (for example, Alt+A).

    Ctrl

    0 (no) or 1 (yes)

    Combine the base key with Ctrl (for example, Ctrl+A).

    You can define as many custom keys as you want, as long as each one has a unique ID code and matches the manufacturer's specifications for the keyboard or device that you are using.

    Example:

    <?xml version="1.0" encoding="UTF-8"?>

    <CustomKeys>

    <CustomKey Name="Ro" ID="100" KeyCode="FF" ScanCode="73" Shift="0" Alt="0" Ctrl="0"/>

    <CustomKey Name="KaH_SHIFT" ID="101" KeyCode="FF" ScanCode="70" Shift="1" Alt="0" Ctrl="0"/>

    <CustomKey Name="YeN_ALT" ID="102" KeyCode="FF" ScanCode="7D" Shift="0" Alt="1" Ctrl="0"/>

    <CustomKey Name="HeN_CTRL" ID="103" KeyCode="FF" ScanCode="79" Shift="0" Alt="0" Ctrl="1"/>

    </CustomKeys>

  6. Save and close the XML file.

    Note: Make sure the file is saved with UTF-8 encoding. Some text editors (for example, Notepad) save with ANSI encoding by default.

  7. If your project is already open in the development environment, close it and then reopen it in order to see the changes.

Once you have defined your custom keys, they are included in the Key list in the Object Properties dialog box for all screen objects that support custom keys. You can select them for use with screen objects just as you would select standard alphanumeric keys.

Remember that the CustomKeys file is located in the program folder, not in the project folder. If you want to open and edit your project on another computer, you also need to copy the CustomKeys file to the application folder on that computer.