nuttx-apps/system/kbd
Jorge Guzman b62cec9eb1 system/kbd: inject keys into a uinput keyboard
Somebody porting a board has to work on the application side before the
keyboard driver exists, and somebody reviewing that work often does not
have the board at hand at all.

With -i the tool goes the other way and writes into a uinput keyboard,
either what it reads from its own stdin or every key of another keyboard.
So an application reading /dev/ukeyboard is driven from the serial
console, or from whatever is on the far end of it, and a real keyboard
and an injected one can drive it at the same time, which neither can do
on its own since an application opens a single device.

Nothing in the application changes:  it is reading a keyboard like any
other, which is the point.

Validated on a Linum STM32H753BI, forwarding a USB HID keyboard and the
serial console into the same virtual keyboard, with the LVGL terminal
reading it.  24 press and release pairs survived the crossing with no
duplicate, no orphan and three keys held at once.

Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2026-08-02 18:36:37 +08:00
..
CMakeLists.txt system/kbd: add a keyboard dump that reads any keyboard 2026-08-02 18:36:37 +08:00
kbd_main.c system/kbd: inject keys into a uinput keyboard 2026-08-02 18:36:37 +08:00
Kconfig system/kbd: add a keyboard dump that reads any keyboard 2026-08-02 18:36:37 +08:00
Make.defs system/kbd: add a keyboard dump that reads any keyboard 2026-08-02 18:36:37 +08:00
Makefile system/kbd: add a keyboard dump that reads any keyboard 2026-08-02 18:36:37 +08:00