nuttx-apps/examples/lvglterm/Kconfig
Jorge Guzman 47b3f92f9d examples/lvglterm: read any keyboard through one input path
The terminal had three input sources to choose from, and its own help
text explained why:  the physical keyboard options "differ in the data
the keyboard device delivers on read(), so pick the one that matches the
hardware".  That is the abstraction leaking.  A user had to know that
the keyboard was USB rather than a matrix in order to compile the
terminal, and swapping one for the other meant rebuilding.

There are two sources now, touch and physical, and the physical one
reads any keyboard registered with keyboard_register().  Which format
arrives is decided by INPUT_KEYBOARD_BYTESTREAM, a property of the build
rather than of the hardware, so the terminal no longer asks.

Cursor keys reported as special events scroll the terminal, which is
what a driver following the current contract sends.  The out of band
codes that the M5Stack Cardputer reports as ordinary presses are still
honoured, so that board keeps working until its driver is converted.

Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2026-08-02 18:36:37 +08:00

77 lines
2.1 KiB
Text

#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
menuconfig EXAMPLES_LVGLTERM
tristate "LVGL Terminal"
default n
depends on GRAPHICS_LVGL
---help---
Enable LVGL Terminal
if EXAMPLES_LVGLTERM
choice
prompt "LVGL Terminal input source"
default EXAMPLES_LVGLTERM_INPUT_TOUCH
---help---
Select how the terminal receives keystrokes. Only one input source
is built at a time.
config EXAMPLES_LVGLTERM_INPUT_TOUCH
bool "On-screen keyboard (touch)"
---help---
Input comes from an on-screen LVGL keyboard operated by touch; a
command line is typed and submitted with Enter. This is the default
and matches the original behaviour.
config EXAMPLES_LVGLTERM_INPUT_KBD
bool "Physical keyboard"
depends on INPUT_KEYBOARD
---help---
Any keyboard registered with keyboard_register(): USB HID, a matrix,
the simulator, virtio. The terminal does not need to know which one
it is. Cursor Up and Down scroll the terminal, everything else goes
to the shell.
endchoice
config EXAMPLES_LVGLTERM_KBD_DEV
string "Keyboard device path"
default "/dev/kbd0"
depends on EXAMPLES_LVGLTERM_INPUT_KBD
---help---
Keyboard device the terminal reads from. Can also be overridden at
run time by passing the path as the first command-line argument
(useful when more than one keyboard is present).
Note that the USB HID driver names its devices /dev/kbda onwards,
since they come and go as keyboards are plugged in.
choice
prompt "LVGL Terminal font"
default EXAMPLES_LVGLTERM_FONT_UNSCII_16
---help---
Monospaced font used to render the terminal. Use the smaller UNSCII 8
on low-resolution displays where UNSCII 16 shows too few columns.
config EXAMPLES_LVGLTERM_FONT_UNSCII_8
bool "UNSCII 8 (small)"
select LV_FONT_UNSCII_8
config EXAMPLES_LVGLTERM_FONT_UNSCII_16
bool "UNSCII 16"
select LV_FONT_UNSCII_16
endchoice
config EXAMPLES_LVGLTERM_PRIORITY
int "lvglterm task priority"
default 100
config EXAMPLES_LVGLTERM_STACKSIZE
int "lvglterm stack size"
default 16384
endif # EXAMPLES_LVGLTERM