Detailed explanation of VisualHMI keyboard: default keyboard/10 keyboard management/SysKB system register/virtual button

freeFree Technical Resource

This content is free to read, suitable for basic learning and search traffic.

Keyboard pops up for numerical, text, and password input. The keyboard in VisualHMI is aprogrammable screen- the keys on the keyboard are "virtual button" controls, driven by several system registers. This article will clarify keyboard management and system registers. Understanding this will make customizing keyboards easier.

1. Default Keyboard

By default, two keyboards are generated when creating a new project:Full KeyboardAndNumeric Keyboard. Text input supports GBK and UTF8 encoding.

Detailed explanation of VisualHMI keyboard: default keyboard/10 keyboard management/SysKB system register/virtual button插图

Detailed explanation of VisualHMI keyboard: default keyboard/10 keyboard management/SysKB system register/virtual button插图1

The default generated keyboard layout varies depending on different models and rotation angles.For screens of small sizes such as 2.4 inches and 2.8 inches, only the numeric keyboard is generated by defaultAfter switching the model/angle, click "Restore Default Keyboard" in "Engineering" → "Keyboard" to regenerate.

2. Keyboard Management

The HMI supports up to10 keyboardsIn the "Engineering" → "Keyboard" settings:

  • Enable: After checking, the keyboard screen can be used
  • Keyboard screen: After enabling, select the corresponding screen as the keyboard screen; the keyboard screen can be reused (e.g., a numeric keyboard and a password keyboard share the same screen)
  • Restore default keyboard: Restore the default keyboard screen according to the screen resolution 100_digitxxxxxx, 101_digitxxxxxx

Detailed explanation of VisualHMI keyboard: default keyboard/10 keyboard management/SysKB system register/virtual button插图2

⚠️ If the password keyboard is deleted,passwords cannot be entered under the security level. Think carefully before deleting the keyboard.

3. Keyboard system register (core of custom keyboard)

RegisterFunction
SysKBMax / SysKBMinMaximum/minimum value of numeric keyboard display range (follows the range configured by numeric control)
SysKBSelectKeyboard mode: 0=English, 1=numeric symbols, 2=Chinese
SysKBPinyin / SysKBHanziPinyin and preselected Chinese characters display for Chinese input
SysKBTextDisplay data entered via keyboard

Detailed explanation of VisualHMI keyboard: default keyboard/10 keyboard management/SysKB system register/virtual button插图3

3.1 SysKBMax/Min: Range limit display

When a numeric control is configured with a range (e.g., 0~100), the pop-up numeric keyboard will display the limited maximum/minimum value. Two numeric controls are used on the keyboard screen to display SysKBMin/SysKBMax, and SysKBStatus.1 is used to control display/hide (1=configured with range limit).

Detailed explanation of VisualHMI keyboard: default keyboard/10 keyboard management/SysKB system register/virtual button插图4

3.2 SysKBSelect: Mode switching

0=English (a~z, A~Z), 1=numeric symbols (!#123), 2=Chinese. The keyboard features increment/decrement buttons labeled SysKBSelect (0~2 cycle), accompanied by three multi-state indicator lights to display the current mode.

Detailed explanation of VisualHMI keyboard: default keyboard/10 keyboard management/SysKB system register/virtual button插图5

3.3 SysKBPinyin/SysKBHanzi: Chinese input

Enter "guang", SysKBHanzi pre selects Chinese characters to display "Guangguangwandang...". Add two text controls to the keyboard screen and associate them with these two registers respectively.

Detailed explanation of VisualHMI keyboard: default keyboard/10 keyboard management/SysKB system register/virtual button插图6

3.4 SysKBText: Enter Data Display

Display the content entered via the keyboard, and add a text control to the keyboard interface to associate with it.

Detailed explanation of VisualHMI keyboard: default keyboard/10 keyboard management/SysKB system register/virtual button插图7

4. Virtual keys (the "keys" of the keyboard)

The purpose of the function buttons is set tovirtual button, it becomes a key on the keyboard. Supported key types:

TypeDescriptionTypeDescription
Character0~9, a~z, visual characters, etc.LeftPage left for pre-selected Chinese characters
Switch keyboardSwitch to target keyboardRightPage right for pre-selected Chinese characters
EnterEnterShitfCharacter switch (upper/lower case/symbol)
SpaceSpaceESCExit
ClearDelete all inputsDeleteDelete single character

Detailed explanation of VisualHMI keyboard: default keyboard/10 keyboard management/SysKB system register/virtual button插图8

Characterkey can be filled with up to 4 characters, and multi character switching can be done by Shitf or SysKBSelect:

  • Fill in "q1": When SysKBSelect=0 (letter), the key code is q; when SysKBSelect=1 (character), the key code is 1
  • Fill in "a~^": In letter mode, Shitf=0 records a, Shitf=1 records A; in character mode, Shitf=0 records~, Shitf=1 records ^

Detailed explanation of VisualHMI keyboard: default keyboard/10 keyboard management/SysKB system register/virtual button插图9

, as well asgallery status(associated with pop-up/press gallery),cropping, using text(displaying the content of the character bar directly) and other properties.

5. Chinese input: Left/Right page flipping

Enter "da" on the Chinese keyboard, and the pre selected Chinese characters will display "Da Da Da Da Da Ta Tai...". Add two function buttons (virtual key → Left/Right) on the keyboard screen to flip pages left and right of the pre selected Chinese characters.

Detailed explanation of VisualHMI keyboard: default keyboard/10 keyboard management/SysKB system register/virtual button插图10

Detailed explanation of VisualHMI keyboard: default keyboard/10 keyboard management/SysKB system register/virtual button插图11

6. Keyboard Switching

Keyboard screens can be switched between using virtual buttons (type=switch keyboard). In the routine, create three screens: "105_abc", "106_number", and "107_char", and use the switch button to navigate between the keyboards.

Detailed explanation of VisualHMI keyboard: default keyboard/10 keyboard management/SysKB system register/virtual button插图12

Custom keyboard debugging sequence: First confirm whether the system register values are correct (mode/range/entry), then check the virtual button type and character column - 90% of keyboard issues arise from "incorrect selection of key type" or "incorrect filling of character column".

Compiled from the "Keyboard" resource introduction in the VisualHMI development document of Guangzhou Dacai Technology (hmi-doc.gz-dc.com), with copyright owned by Dacai Technology.

Put this resource to use in a real project?

Go to the Tool Center for message parsing, CRC verification and device debugging, or submit your requirements for selection and integration advice.

Engineer Membership

Turn this article into actionable debugging resources

After activation, you can use advanced message parsing, resource pack downloads, code examples, engineering cases and priority technical support, suitable for real project delivery.

Unlimited Advanced Tools
Resource & Code Packs
Complete Engineering Case Library
Priority Technical Support

Leave a Reply

Your email address will not be published. Required fields are marked *.