Configuring Button Hotkeys in WinCC Advanced Runtime (TIA Portal)
WinCC Advanced (TIA Portal) provides built-in hotkey support for HMI buttons, but the set of supported keys is strictly limited compared to WinCC Professional or a custom .NET application. Engineers who want to jog an axis with the arrow keys, trigger a valve with the spacebar, or assign a function key to an alarm acknowledgment must first understand the supported key matrix, then design around its constraints. This reference documents the supported hotkey set for WinCC Advanced Runtime, the step-by-step configuration path, the differences against WinCC Professional and Basic Panels, and the verified workarounds that allow arbitrary keys to drive PLC tags.
1. WinCC Product Family Overview and Hotkey Capability
Siemens offers three distinct WinCC configurations inside the TIA Portal engineering framework, and the hotkey engine differs between them. Selecting the wrong configuration is the single most common cause of "the shortcut does nothing" complaints in the field.
| Configuration | Runtime Target | Built-in Hotkey Support | Configurable Keys |
|---|---|---|---|
| WinCC Basic | Basic Panels (KTP400, KTP700, KTP900, KTP1200) | System keys + 2-key shortcuts | F1-F12, Shift+F1..F12, plus hardware keys; configurable in TIA project |
| WinCC Advanced | Comfort Panels, WinCC RT Advanced (PC) | Button property "Hotkey" | F1-F12 and Shift+F1..F12 only; no alphanumeric, no arrow keys, no space/enter |
| WinCC Professional | WinCC RT Professional (PC) | Button property "Hotkey" + window shortcuts | F1-F12, Shift+F1..F12, alphanumeric keys, system keys, configurable combinations |
2. Supported Hotkey Matrix for WinCC Advanced Runtime
The WinCC Advanced Runtime hotkey engine enumerates a fixed list of 24 logical keys exposed to the button property "Hotkey". The list is published in the TIA Portal help and confirmed in the Configuring operation in Runtime (Professional) documentation family.
| Logical Hotkey ID | Key | Notes |
|---|---|---|
| F1 ... F12 | Function row | Always available; F1 is often reserved by Help system |
| SHIFT_F1 ... SHIFT_F12 | Shift + Function row | Two-key combination; first key held, then second pressed |
| CTRL_F1 ... CTRL_F12 | Ctrl + Function row | Available in WinCC Professional only |
| ALT_F1 ... ALT_F12 | Alt + Function row | Available in WinCC Professional only |
| A-Z, 0-9, SPACE, ENTER, TAB, ESC, ARROW_UP/DOWN/LEFT/RIGHT | Alphanumeric / navigation | Not supported in WinCC Advanced Runtime |
3. Prerequisites for Hotkey Configuration
- Installed TIA Portal V16 or later (V18 / V19 / V20 tested for the screenshots and combobox labels shown here).
- WinCC Advanced V16 or later license. Open Project > Properties > Protection > Licenses to confirm the WinCC Advanced ES + RT bundle is present.
- An HMI device of class Comfort Panel (TP700/900/1200/1500/1900) or a PC running WinCC RT Advanced.
- An HMI tag wired to a PLC tag (or an internal tag driving a script) that the button will toggle or set when pressed.
- For two-key shortcuts on Basic Panels, the panel must be a keyboard-attached variant (KTP with external keyboard, or TP with integrated keys). See Control keys and shortcuts (Basic Panels) - Support.
4. Step-by-Step: Assigning a Hotkey to a Button
- In the TIA Portal project tree, expand HMI_1 > Screens > Screen_1 and double-click the target screen.
- Select the button to which you want to bind a hotkey. Right-click > Properties.
- In the Properties inspector, open Properties > General > Hotkey.
- Click the combobox; the available selections are F1-F12 and Shift+F1..F12. Choose the desired key.
- Wire the Press event to a tag set, a function list, or a script that drives the axis jog. Example with an internal boolean tag "Axis_Z_Jog_Up":
// Function list bound to the Press event SetTagBit("Axis_Z_Jog_Up", 1) - Wire the Release event of the same button to clear the bit (otherwise the axis continues to drive after key release):
// Function list bound to the Release event SetTagBit("Axis_Z_Jog_Up", 0) - Compile the HMI (Project tree > right-click HMI_1 > Compile > Software (rebuild all)).
- Download to the target panel or start the WinCC RT Advanced simulation.
- Press the configured function key. The button visually depresses and the bound tag flips. If the button does not depress, see Section 8 (Troubleshooting Matrix).
5. Why Arrow Keys Fail in WinCC Advanced Runtime
The WinCC Advanced Runtime hotkey engine explicitly does not enumerate arrow keys, alphanumeric keys, or control keys other than F1-F12 in the button property combobox. This is a deliberate product boundary, not a missing feature or a bug. The reasons are:
- Focus model. The Runtime routes hotkeys to a single focused screen. Mapping every printable key to a button would collide with text-input fields, password dialogs, and the on-screen keyboard.
- Function row reservation. F1-F12 are reserved on PC keyboards for application functions and are not consumed by Windows shell shortcuts, giving a clean separation.
- Safety. Forcing a fixed, well-known set prevents accidental "lost focus" keystrokes from moving a machine.
When an engineer tries to assign an arrow key, the combobox simply does not list it, and writing SetTagBit with a low-level keyboard hook is not available from the standard scripting API of WinCC Advanced. The two viable engineering paths are (a) upgrade to WinCC Professional, or (b) bridge an external process into the Runtime using OPC tags.
6. Verified Workarounds for Arbitrary Key Capture
6.1 External process reading stdin and writing an OPC tag (WinCC Advanced RT, PC target only)
WinCC Advanced Runtime on a PC exposes a Configurable OPC DA/UA server. A user-mode helper process can poll the Windows console for keystrokes and write the detected key code into an HMI tag. The tag is then read inside the Runtime by a button or by a script.
Minimal C# helper (.NET 6, Windows console):
using System;
using Opc.Ua;
class KeyBridge {
static void Main() {
var client = new Opc.Ua.ClientSession(new Uri("opc.tcp://127.0.0.1:48010"));
client.Open();
Console.WriteLine("Bridge running. Arrow Up = axis Z up, Arrow Down = axis Z down. Esc to quit.");
while (true) {
var key = Console.ReadKey(true);
if (key.Key == ConsoleKey.Escape) break;
if (key.Key == ConsoleKey.UpArrow) client.Write("HMI_Tags.Axis_Z_Jog_Up", 1);
if (key.Key == ConsoleKey.DownArrow) client.Write("HMI_Tags.Axis_Z_Jog_Down", 1);
System.Threading.Thread.Sleep(50);
if (key.Key == ConsoleKey.UpArrow) client.Write("HMI_Tags.Axis_Z_Jog_Up", 0);
if (key.Key == ConsoleKey.DownArrow) client.Write("HMI_Tags.Axis_Z_Jog_Down", 0);
}
}
}
The bridge must be launched before Runtime start, and the OPC server on the Runtime must allow loopback. Add the executable to the Windows startup group or to a WinCC Advanced startup script.
6.2 Global Windows hotkey via a signed Win32 helper
If the goal is to assign any key (including Alt+J, Ctrl+Shift+F5, the media keys, or a USB footswitch that registers as HID keyboard), use the Win32 RegisterHotKey API. The helper process raises a window message, which the helper translates to an OPC write. This works in parallel with the Runtime because Windows hotkeys have a higher precedence than the Runtime's internal hotkey combobox.
// P/Invoke registration inside the helper
RegisterHotKey(hWnd, 1, MOD_ALT, VK_UP); // Alt+Up -> Axis Z up
RegisterHotKey(hWnd, 2, MOD_ALT, VK_DOWN); // Alt+Down -> Axis Z down
6.3 Upgrade to WinCC Professional
If the project budget allows a runtime upgrade, WinCC Professional exposes the full alphanumeric and arrow-key set in the same Properties > General > Hotkey combobox that WinCC Advanced uses. The configuration procedure is identical to Section 4. No external bridge, no DLL, no OPC traffic. The trade-off is the additional RT Professional license and the change in screen object model: Professional uses C-/VB-scripting and WinCC OLE controls, while Advanced uses the lighter TIA HMI tag/script model.
7. Basic Panels: Two-Key Shortcut Behavior
Basic Panels and Comfort Panels with attached USB keyboards use a two-key shortcut model. From the Control keys and shortcuts (Basic Panels) documentation: "With shortcuts, you keep the first key pressed. Then you press the second key." The configured first key is shown in the help text of the button; if the operator releases the first key before the second, the shortcut is cancelled.
| First key | Second key | Effect |
|---|---|---|
| Ctrl | F1..F12 | Button hotkey (System keys) |
| Alt | F1..F12 | Button hotkey (Application keys) |
| Shift | F1..F12 | Button hotkey (Shift+Fx) |
This is the closest the Basic Panel line gets to arrow-key jog, and it is still bounded to F1-F12. For arrow-key jog on a panel-mounted HMI, the external-helper approach (Section 6) is required.
8. Troubleshooting Matrix
| Symptom | Likely Root Cause | Verification | Remedy |
|---|---|---|---|
| Hotkey combobox shows only F-keys even though alphanumeric expected | Project compiled for WinCC Advanced RT, not Professional | Check Project > Properties > Protection > Licenses for the RT license entry | Upgrade RT to Professional or use Section 6 workaround |
| Configured F5 works locally on the engineering PC but not on the target panel | Hotkey set globally in PC Runtime project, not per HMI device | Check the download target in Online > HMI Device Operations | Compile and download to the actual HMI target, not the simulation |
| Arrow key press is detected by Windows but not by the HMI | WinCC Advanced Runtime does not enumerate arrow keys | Inspect the Hotkey combobox; no arrow entry | Section 6.1 or 6.2 |
| Button stays "depressed" after key release | Release event not wired | Open the button Properties > Events > Release; check the function list is bound | Bind Release event to clear the bit or zero the tag |
| Press works on the engineering PC but ignored on the panel after restart | Some Professional hotkeys need a system restart per the Runtime documentation | Cycle power on the panel | Re-image and reboot; verify in the diagnosis view that the hotkey is registered |
| External helper process cannot connect to the OPC server | OPC server not started, or DCOM firewall blocking loopback | Run opc.tcp://127.0.0.1:48010 from UA Expert |
Enable the WinCC OPC UA server, open the port in Windows Firewall |
| Hotkey fires multiple times for one physical key press | Keyboard autorepeat, or Release event missing | Hold a single key and observe tag state with a trace | Add edge detection in the PLC; bind the Release event to a clear |
9. Verification Checklist After Configuration
- Compile the HMI with "rebuild all" and resolve every warning in the Inspector output.
- Download to the target. Confirm in the Runtime diagnosis view that the configured hotkey is listed under Settings > Hotkeys.
- Start the Runtime in online mode. From the HMI focus, press the configured key. The button should visually depress and the bound tag should change in the HMI tag table.
- For jog-style operation, release the key and confirm the Release event clears the tag within 100 ms.
- For a PC Runtime, repeat the test with the engineering window focused, the Runtime window focused, and a third-party application focused. Only the Runtime-focused case should react to the Advanced hotkey; if it reacts in all cases, the helper from Section 6.2 has registered a global hotkey and is working as expected.
- Document the final mapping in the HMI plan: Function key F5 = Axis Z jog up, F6 = Axis Z jog down, Shift+F5 = fast jog, F8 = acknowledge alarm. Provide this as part of the operator manual.
10. Field-Proven Caveats
- On a TP1500 Comfort Panel with an attached USB keyboard, F1 is reserved by the Runtime Help system. Choose F2-F12 for application hotkeys to avoid stealing F1.
- On a PC Runtime, the Windows screen saver and the accessibility sticky-keys feature can swallow the configured hotkey. Disable both for operator PCs.
- When the HMI is in change mode (online editing from TIA Portal), hotkeys are not delivered to the application; this is by design.
- If the project will be commissioned on different panel sizes, the same hotkey list is honored across the entire RT Advanced line, so the same PLC logic and HMI script can be reused without rework.
- For 21 CFR Part 11 / audit trail projects, an external helper that writes through OPC may not be accepted; in that case upgrade to WinCC Professional so the hotkey binding is fully inside the audit-friendly Runtime.
11. Quick Reference Mapping
| Operator Request | Supported in WinCC Advanced? | Solution |
|---|---|---|
| Jog Z up with arrow up | No | External OPC bridge (Section 6.1) or upgrade to Professional (Section 6.3) |
| Jog X/Y with F5/F6 | Yes | Button > Properties > General > Hotkey = F5/F6 |
| Alarm ACK with Shift+F12 | Yes | Button > Properties > General > Hotkey = Shift+F12 |
| Toggle auto/manual with spacebar | No | Global hotkey helper (Section 6.2) or upgrade |
| Numeric input focus with Tab | Yes (default Runtime behavior) | No configuration required |
| Page change with Ctrl+F1 | Only in WinCC Professional | Use F1..F12 + Shift variant or upgrade |
FAQ
Which keys can I assign to a button hotkey in WinCC Advanced Runtime?
Only F1-F12 and Shift+F1..F12. The full list is exposed in Button > Properties > General > Hotkey. Arrow keys, alphanumeric keys, space, enter, and Ctrl/Alt combinations are not enumerable in the Advanced Runtime hotkey combobox.
Why does my arrow-key jog work in WinCC Professional but not in Advanced?
WinCC Professional exposes the full keyboard matrix in the same Hotkey combobox that Advanced uses. The Advanced Runtime is intentionally limited to F1-F12 and Shift variants to keep focus management and safety predictable. Either upgrade the runtime or use an external helper that writes the keystroke into an HMI tag via OPC UA.
How do I detect a non-F-key press from inside WinCC Advanced?
There is no built-in scripting API in WinCC Advanced for low-level keyboard hooks. Launch a small .NET or C++ helper process on the RT PC, register a RegisterHotKey callback or poll the console, and write the detected key code into an HMI tag over OPC UA. The HMI button then reacts to the tag instead of the key directly.
Does the Hotkey configuration in TIA Portal differ between Comfort Panels and WinCC RT Advanced on a PC?
The configuration steps are identical: open the button, go to Properties > General > Hotkey, and pick a value from the combobox. The key set is the same for both targets. The two-key shortcut behavior with first-key-held-then-second-pressed applies to Basic Panels with attached keyboards, not to PC Runtime.
Why does my configured hotkey only work in the local simulation?
Verify that the compiled project was downloaded to the actual HMI target and not only started in the TIA simulation. Also confirm that the HMI focus is on the screen that contains the bound button. Some Professional-style hotkey changes require a system restart of the Runtime; cycle power once to confirm.