Function Keys
Function keys can be configured to run actions or to run scripts.
Definitions
A standard PC keyboard has 12 function keys, F1 - F12.
A function key can be configured to affect only a particular screen or to be global. Global function keys behave identically for all screens. A global definition can always be accessed when the HMI panel is running, provided that the current screen does not have a screen definition for that function key. Screen function keys have higher priority than global function keys. Function keys included in background screens have lower priority than screen function keys, but higher priority than global function keys.
For touch panel and PC targets, the Function keys function is added via the Insert ribbon tab, and allows configuration of up to 24 function keys (even if the connected keyboard does not support more than 12 function keys).
Related information |
|---|
Configuring Function Keys
Function keys can be configured to run actions or to run scripts.
Function Key Actions
To define function key actions:
Click on Function Keys in the Project Explorer to open the function keys configuration page.
Select Global or Screen.
Select the function key to be defined.

Click on the button next to the action to display the actions editor. Define the action to be performed when the function key is pressed or released.

In the column Security groups required it is possible to specify security group accessibility for the function key.

Multiple actions can be configured for a function key.
It is only possible to activate two tags connected to function keys at the same time. This means that if more than two function keys are pressed at the same time, only the first two will be activated.
Should further function key actions be needed in addition to those available for the panel in question, this could be solved by adding buttons or other objects on screen, connecting these to the desired actions.
For a keypanel, the function is carried out by navigating to the object and pressing Enter.
Note
The function keys will be disabled if the backlight of the panel is disabled.
Related information |
|---|
Function Key Scripts
To define a script for a function key:
Click on Function Keys in the Project Explorer to open the function keys configuration page.
Select the function key to be defined.
Select script view mode by clicking Script in the lower part of the desktop area.
Click on the desired button node. Double-click on the KeyDown node. Edit the script code to be performed.
Example:
The following C# code sets up function key F12 to perform an acknowledge of all alarms:

Related information |
|---|
Momentary Function
In order to configure a function key with a momentary function, you need to combine a Set Tag action for Key Down with a Reset Tag action for Key Up.
![]() |
Change of Screen During Momentary Execution
When a momentary function is executed and another screen with settings for the function key is opened, the outcome depends on whether the Function Key Context is set to Global or Screen (local).
Tip
A Screen (local) function key command has priority over a Global function key command.
Screen change | Result |
|---|---|
When a local function key is pressed and the screen changes. | The up action for the local key is executed. No new down or up actions are triggered on the new screen while the key is pressed. |
When a global function key is pressed and the screen changes to one without a local setting for the same key. | No action occurs during the screen change. The up action for the global key is executed when the key is released. |
When a global function key is pressed and the screen changes to one with a local setting for the same key. | The up action for the global key is executed. No new down or up actions are triggered on the new screen while the key is pressed. |
