Feature/kbd boards - #19592
Open
JorgeGzm wants to merge 3 commits into
Open
Conversation
…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>
JorgeGzm
requested review from
hartmannathan,
linguini1 and
rcsim
as code owners
August 1, 2026 04:14
Contributor
|
@acassis please merge #19075, so we can make this pr and apache/nuttx-apps#3687 pass the ci together. |
xiaoxiang781216
approved these changes
Aug 1, 2026
acassis
approved these changes
Aug 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_KBDandSYSTEM_KBDdo not existyet, 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_KEYBOARDandSYSTEM_KBDso that the terminal can be driven fromthe serial console with no keyboard plugged in, which is documented in the
board page.
INPUT_KEYBOARD_BYTESTREAMis no longer needed there, sincethe 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 longerexists, and
system/kbdhad 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_BUFNUMBERis raised to 128 on the Linum. It counts eventsrather 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_NOGETREPORTis enabled on the Linum as well. Sampling the keyboardover 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:
The documentation was built the way CI builds it, with warnings treated as
errors:
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