Explainer
Why a numeric hotkey needs buffered entry to open one of many screens
Short answer
A hotkey that opens the entry window and the digit that must land in its I/O field are two separate keystroke events. Either the opening action writes the triggering digit into a buffered pending value that Enter validates, or the first digit selects a group of ten and the field value plus the group offset gives the screen number. With no mouse on the machine, the prefix method is the route a numeric hotkey alone can deliver.

On this page
Typing 13 to reach screen 13 fails because the keystroke that opens the entry window and the digit that should land in its I/O field are two separate events: the hotkey consumes the first digit. Navigation that starts on the first number therefore needs one of two designs. Either the opening action writes the triggering digit into a buffered pending value that Enter later validates, or the first digit selects a group of ten screens and the field value plus the group offset gives the screen number. With no mouse on the machine, the prefix design is the one a numeric hotkey alone can deliver.
Two keystroke events, not one #
A hotkey is a configured key whose press triggers an assigned action. An I/O field accepts typed characters only while it holds keyboard focus, that is, only while it is the object currently receiving keyboard input. These mechanisms are independent even when they share the same physical keys. When a hidden button configured with a numeric hotkey makes the entry picture window visible, the digit that triggered it has already been spent on the action; the runtime does not replay it into a field that was not yet on screen. That is why the window can open empty and stay empty: nothing owns the first digit.
Give the first keystroke an explicit owner. In the buffered design, the opening action initializes the pending value with the triggering digit before focus moves to the field. In the prefix design, the digit is spent deliberately as a group selector and never enters the field at all. An opening action that can do neither, a single hotkey that only toggles window visibility, cannot deliver direct entry by itself; the field will sit empty with no mouse to click into it.
Buffered entry: pending value, applied value, Enter #
Keep two values apart. The pending value is the number still being edited; the applied value is the validated number the picture change actually uses. Digits append to the pending value while the window is open. The Enter event on the I/O field, the event your runtime documents for confirming field input, is the only place where the pending value is checked against the project's screen numbering, resolved to a picture name, copied into the applied value and used to change the screen; the same script then hides the entry window.
If the picture window's Picture Name attribute follows the entry value live instead, every digit fires a picture request, so a two-digit entry briefly loads the screen belonging to its first digit. The principle is the same one a basic button follows for screen changes in TIA Portal: the change fires once, on a defined event, never on the changing value. How a WinCC Basic button changes screens in TIA Portal covers that event-driven change.
What each failure mode tells you #
| Behavior at the panel | Mechanism | What to check |
|---|---|---|
| The first digit opens the window, the field stays empty | The hotkey consumed the digit and nothing wrote it into the field | Watch the field immediately after the opening press, before any other key |
| The first digit appears, the second is lost | The field never took focus, or another shortcut intercepts digits | Compare field entry against every configured runtime hotkey |
| Screen 1 flashes while typing a two-digit number | The picture change follows the changing entry value, not the confirmed value | Check whether the picture name resolves from the pending value |
| Enter closes the window but the screen does not change | The close action runs before a valid selection is applied | Test selection apart from window visibility |
| The correct picture opens in the wrong display area | The change action addresses another picture window or work field | Identify the container the script targets, especially with OS Project Editor layouts |
Worked example: prefix entry for screen 13 of a 20-screen project #
Inputs and where each comes from:
- 20 screens in one container in a WinCC V6 project laid out by the OS Project Editor: the reader's project
- screens numbered 1 through 20: the assumed project numbering; the real mapping must come from the project's picture list
- operator presses 1 then 3 on the numeric keypad: the requested operation
- two hidden buttons with numeric hotkeys on keypad 0 and keypad 1: the prefix arrangement
Rule in words: the first digit is the group selector and never reaches the field. Group 0 covers the first ten screens, group 1 the second ten. The field receives only the position within the group, and the group's offset is added once, in the Enter script, to build the screen number.
Arithmetic: pressing 1 opens the entry window for the second group; the 1 is spent on the hotkey, the 3 lands in the I/O field. Screen number = field value + group offset = 3 + 10 = 13. The Enter script checks that this lies within 1 through 20, resolves it to the thirteenth picture, changes the screen and hides the window. For the first group the operator presses 0 then 5; the field holds 5 and screen number = 5 + 0 = 5, so single-digit screens are entered as 05, not 5.
Result: the two-digit entry opens screen 13 and 05 opens screen 5, with the entry window appearing on the first press and disappearing on Enter.
Decision: the two groups cover screens 1 through 19 only. The last screen needs a third hotkey group or a renumbering to 0 through 19. If operators must type 5 and 13 exactly as written, the prefix method cannot meet that requirement; use buffered entry with an opening action that owns the digit, or change the operator convention deliberately.
Building the change in an OS Project Editor layout #
Without the OS Project Editor, one picture window serves as the entry popup and a second picture window displays the selected screen. The Picture Name attribute of the display container is where the mapping lands: list every allowed number with its picture file and resolve the applied value through that list, so each number yields exactly one *.pdl picture and nothing else.
With the OS Project Editor, the screen container is a managed work field, and the change goes through the layout's work-field function rather than a bare picture change:
SSMChangeWorkField(SSMGetScreen(lpszPictureName),PIC_0,TRUE);
Here PIC_0 names the work field the layout generator created, and the first argument keeps the change inside the screen the call originates from. Where a screen change must also pass an area authorization check, pair ISSSM_ChangeWorkField() with SSMGetRootToPicture(), which determines the area the requested picture belongs to before the change is made. Where the selected number resolves through a screen map, that map must be valid: Why a WinCC I/O Field Page Number Needs a Valid Screen Map covers the requirements on the field that drives such a selection.
Bench checks before release #
- At idle, no entry window is visible anywhere on the screen.
- The first numeric press makes the window appear and the pending value read exactly the pressed digit, or show the group state in the prefix design.
- Each further digit appends, so a two-digit entry shows the full number before Enter.
- Enter on a valid number changes to that picture and hides the window in the same event.
- Enter on an empty or out-of-range pending value leaves the current screen unchanged.
- A second navigation attempt begins with a cleared pending value, never with the previous number.
Run these on the bench with the real picture list before the panel reaches the floor; each line is a pass condition, not a suggestion.
Which design fits your machine #
- Numeric-only keypad, no mouse, exact numbers as written required: buffered entry. It works only if the opening action can initialize the pending value with the triggering digit; a single visibility hotkey cannot.
- Numeric-only keypad, operator convention negotiable: prefix entry. Two hotkeys cover nineteen screens with the offset added in the Enter script, and it needs the least handling on a V6-class runtime.
- Mouse or trackball available: a modifier-key shortcut or a button can open the entry box and the operator clicks into the field, but this does not satisfy numeric-only operation.
Questions asked
Does a live Picture Name dynamic link on the picture window ever work?
It works only when the value it reads is complete before the link evaluates. With the link pointed at the entry value while the operator types, every digit fires a picture request, so a two-digit number briefly loads the screen belonging to its first digit. Keep the link reading a separate applied value that you write once, inside the Enter script, after validation.
How do I cover all 20 screens with prefix entry?
The two groups cover the numbers 1 through 19: hotkey 0 for 01 through 09 and hotkey 1 for 10 through 19. The last screen needs a third group, for example hotkey 2 with 20 added to the field value, or the project can be renumbered 0 through 19 so two groups cover everything. Build the mapping from the project's actual picture numbering before assigning hotkeys.
Is the same approach possible in later WinCC versions?
Yes, with the function names and events of that runtime. In WinCC Unified the documented focus function is SetFocusOnElement, which puts keyboard input into a specified screen object such as an input field. Entry events and screen change functions differ from one runtime to the next, so configure the popup, the focus transfer and the Enter confirmation against the documentation for the exact runtime in use.


