Skip to main content

Virtual keyboard with highlighting

Virtual keyboard can be used to simulate the scene of external keyboard controlling the interface during interface editing and debugging. There are two ways to implement the virtual keyboard: one is to simulate keystrokes in the runtime debugging interface by using the left, right, and ok keys; the other is to input the value of the external keyboard by using the "Pass Keycode" variable.


Highlight

For the Time, Button, and Button Group controls, after selecting Enable Highlighting in the property bar, you can simulate keystrokes on the controls by selecting Highlighting in the runtime debug screen. After selecting "Enable Highlighting" in the property bar, you can simulate keystrokes on the control by selecting the highlighting option in the runtime debugging interface. This is shown in the following figure:


Click on the left and right buttons

The hour, minute, second (or year, month and day) and buttons of the Time control will be highlighted one by one. The controls are sorted top to bottom, then left to right.

For example, the hour (10) in the above figure is currently highlighted, click "ok" to select it, click the left button to indicate that the value is minus one, click the right button to indicate that the value is plus one, click the ok button to confirm the change, and exit the editing of the hour. At this point you can click right to select minutes (56), click again to select seconds (07), and click again to select the button. When the button is highlighted, click "ok" to press the button. The button groups are similar.


Pass the button code

In the Variable Settings in the Properties column, there is the system default variable - "Pass Key Code". When the register is enabled, a specific key value is entered through the register, which corresponds to the corresponding key function. The key value table is as follows: