Keyboard (lv_keyboard)

An on-screen virtual keyboard, a specialized Button Matrix.

Overview

The Keyboard is a specialized Button Matrix with predefined keymaps that provides an on-screen virtual keyboard. It can be attached to a Text Area so key presses edit its text.

Learn more in the LVGL Open documentation.

Enumerations

lv_keyboard_mode — Keyboard layout modes

ValueDescription
text_upperShow uppercase letters
text_lowerShow lowercase letters
text_arabicShow Arabic characters
specialShow special characters and symbols
numberShow numeric keys
user_1User-defined layout 1
user_2User-defined layout 2
user_3User-defined layout 3
user_4User-defined layout 4

Properties

Parts

Style parts of the widget with local style (e.g. style_bg_color-knob="0xff0000") or with style sheets (e.g. <style name="style_knob" selector="knob">). See Styles to learn more.

PartDescription
mainThe background behind the keys (extends lv_buttonmatrix): background properties. pad_row and pad_column set the gaps between keys.
itemsThe keys: text and background properties. Combine with the 'checked', 'pressed', 'focused' and 'disabled' states, e.g. items|pressed.

Properties below are the widget's XML <api>; see API for how properties, parameters and elements work.

PropertyTypeDescription
modeenum:lv_keyboard_modeSet the keyboard layout
popoversboolShow enlarged key previews on press
textarealv_objConnect a textare to the keyboard

Last updated on

On this page