Skip to content

Feature/kbd boards - #19592

Open
JorgeGzm wants to merge 3 commits into
apache:masterfrom
JorgeGzm:feature/kbd-boards
Open

Feature/kbd boards#19592
JorgeGzm wants to merge 3 commits into
apache:masterfrom
JorgeGzm:feature/kbd-boards

Conversation

@JorgeGzm

@JorgeGzm JorgeGzm commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

boards: follow the unified keyboard input in the two lvglterm configurations

Summary

This is the last of three parts. It names an application option, so it goes
with apache/nuttx-apps#3687

Those two cannot be green at the same time, and it is worth saying why
before anybody reads the CI. Each repository is built against the other's
master, and there is no way to pair two branches, so this one sees an apps
master where EXAMPLES_LVGLTERM_INPUT_KBD and SYSTEM_KBD do not exist
yet, and the apps side sees board configurations that still name the option
it renamed. The failures on both sides are confined to the normalisation
step of the same two configurations, and both go green once both are in.

The pair was verified together, see Testing.

The LVGL terminal used to have three input sources to choose from, one per
kind of keyboard, and now has two: touch, or any keyboard. The two in-tree
configurations that named the old option are updated here.

  • Linum STM32H753BI. Beyond the rename, the configuration now enables
    UINPUT_KEYBOARD and SYSTEM_KBD so that the terminal can be driven from
    the serial console with no keyboard plugged in, which is documented in the
    board page. INPUT_KEYBOARD_BYTESTREAM is no longer needed there, since
    the terminal reads events and this configuration has no other keyboard
    consumer.

  • M5Stack Cardputer. The rename only. Its driver was converted in
    Feature/kbd upperhalf #19586, so its cursor keys already arrive as keycodes.

The application documentation follows the same change: the lvglterm page
described the three sources and told the reader to pick the one matching the
hardware, the hidkbd page pointed at HIDKBD_ENCODED, which no longer
exists, and system/kbd had no page at all.

Impact

Left as it was, the unknown option would have been dropped when the
configuration was normalised and both boards would have fallen back to the
touch variant, which is the default. Neither has a touchscreen, so the
terminal would have had no input at all, and the build would have said
nothing about it.

UINPUT_KEYBOARD_BUFNUMBER is raised to 128 on the Linum. It counts events
rather than keys, so the default of eight holds four keystrokes, and a
console hands over a whole line at once. The keyboard upper half overwrites
the oldest event when the buffer is full, so a typed line arrived with its
beginning silently missing.

HIDKBD_NOGETREPORT is enabled on the Linum as well. Sampling the keyboard
over the control pipe every 40 ms loses any key pressed and released between
two samples, which on this board meant most of them.

Testing

Verified inside the CI container with this branch paired against the apps
branch, which is the state after both merge:

### Normalisation
  clean linum-stm32h753bi:lvglterm_kbda   clean sama5d4-ek:ipv6
  clean esp32s3-m5-cardputer:lvglterm     clean olimex-lpc1766stk:hidkbd
  clean sama5d4-ek:nsh                    clean nucleo-h753zi:jumbo
  clean sama5d4-ek:nxwm                   clean qemu-intel64:jumbo
  clean sim:nxdoom
### Build
  PASS linum-stm32h753bi:lvglterm_kbda    PASS olimex-lpc1766stk:hidkbd
  PASS esp32s3-m5-cardputer:lvglterm      PASS sim:nxdoom

The documentation was built the way CI builds it, with warnings treated as
errors:

$ python -m sphinx -b html -W --keep-going -q . /tmp/doc
$ echo $?
0

On the Linum, the terminal was driven on the board's LCD from a real USB
keyboard, from the serial console through the uinput bridge, and from both
at once with the USB keyboard forwarded into the same virtual keyboard.

The Cardputer was not available, so that configuration is checked by build
only.

Depends-On: apache/nuttx-apps#3687

…console

The terminal reads a keyboard device and does not care which one, so it
can be driven with no keyboard plugged in at all.  Enable UINPUT_KEYBOARD
and system/kbd so that the configuration can do it out of the box, and
document how, including how to have the USB keyboard and the console feed
the terminal at the same time.

The terminal no longer has a USB specific input source either, so the
device path has to be spelled out:  the USB HID driver names its devices
/dev/kbda onwards while the option defaults to /dev/kbd0.

INPUT_KEYBOARD_BYTESTREAM is not needed here.  The terminal reads events
now, and this configuration has no other keyboard consumer.

UINPUT_KEYBOARD_BUFNUMBER is raised to 128.  It counts events rather than
keys, so the default of eight holds four keystrokes, and a console hands
over a whole line at once.  The upper half overwrites the oldest event
when the buffer is full, so a typed line arrived with its beginning
silently missing.

HIDKBD_NOGETREPORT is enabled as well.  Sampling the keyboard over the
control pipe every 40 ms loses any key pressed and released between two
samples, which on this board meant most of them.

Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
The lvglterm page still told the reader to pick the input source that
matches the hardware, which was the whole thing being removed:  it has
one physical keyboard variant now, and reads whatever is registered.

The hidkbd page pointed at HIDKBD_ENCODED, which no longer exists.  What
produces that byte stream now is INPUT_KEYBOARD_BYTESTREAM.

system/kbd had no page at all.

Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
…rm input

The terminal no longer has separate matrix and USB input sources:  it
reads any keyboard through one path.

Left as it was, the unknown symbol would have been dropped and the
configuration would have fallen back to the touch variant, which is the
default.  This board has no touchscreen, so the terminal would have had
no input at all and the build would have said nothing.

Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation Size: M The size of the change in this PR is medium Board: arm Board: xtensa labels Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

@acassis please merge #19075, so we can make this pr and apache/nuttx-apps#3687 pass the ci together.
@JorgeGzm please follow ttps://github.com//pull/19075 to update the description in your pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Documentation Improvements or additions to documentation Board: arm Board: xtensa Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants