Skip to main content

Keyboard

The Keyboard implements the numeric Keyboard touchscreen input function. Input from the Keyboard is passed to the external device via a bound variable.

Click the "Add Control" button in the "Edit" menu, and then click "Keyboard" in the drop-down list of controls.

In the upper right corner of the interface, a message "Add Widget Successfully" will pop up, and you can see the newly added control in the "Edit Area". Select the control, you can edit it in the "Properties" column.


Name, ID, Coordinate, Width, Height, Block Touch, Transform, Texture Compression Mode, Replaceable Upgrade, Texture are common properties, which are introduced in "Basic Design - Edit Properties" section, so we won't repeat them here.

For highlighting settings, please refer to the following chapter [Virtual Keyboard and Highlighting](/gao-jie-she-ji liu-cheng/xu-ni-jian-pan-yu-gao-liang-xian-shi.md).

Keyboard keys include 0-9 numbers, clear one (<-), clear all (ESC), enter (enter), plus and minus signs (+/-).

The texture of the Keyboard control is similar to that of the buttons, you can set the "before press", "after press", and if highlighting is enabled, you can also set the texture of the highlighting. The Keyboard must be bound to a numeric variable in order to be used.

In the runtime debugging interface, you can see that the Keyboard control is a button in appearance. Clicking on the button brings up the numeric Keyboard input interface. The contents of the Keyboard clicked will appear in the display bar, and the value is assigned to the variable bound to the Keyboard control.

Example:

In the following project the number control is bound to the same variable (number type) as the Keyboard control and the Keyboard control is grayed out and placed below the number control.