Repository navigation
examples/hidcombo: Add USB HID keyboard + mouse combo example - #3911
Conversation
Add an example that reads a USB HID keyboard and a USB HID mouse at the same time from a single task using poll(). It is meant to test devices that expose both a keyboard and a mouse, like the wireless keyboard + touchpad receivers, and uses less memory than running hidkbd and tc side by side, which matters on small boards (e.g. stm32f103-minimum). Signed-off-by: Alan C. Assis <acassis@gmail.com> Assisted-by: Claude Code Opus 5.5
|
Great stuff @acassis :D My proposition is to use name
|
Thank you @cederom !!! About the name there is already hidkbd that Greg added many years ago and it is for USB. I think the Kconfig already makes it clean: "USB HID keyboard + mouse combo example". Probably for Bluetooth people will create a ble_kdb or similar :-) |
|
Yeah, but does this |
Actually they are working like on a host device (like in the computer), so to work like a device it needs to mimic a keyboard or a mouse to fake they are device. I kind messing with "client" USB "host" is not a good idea, let the user get it right from the documentation: https://nuttx.apache.org/docs/latest/applications/examples/hidkbd/index.html |
This is still confusing, but from the description it may seem like this is universal HID not matter what transport, so we can leave it that way unless someone adds new stuff and update the documentation :-) I am asking because I was looking for some usb-hid-combo-device example myself :D |
Summary
Add an example that reads a USB HID keyboard and a USB HID mouse at the same time from a single task using poll(). It is meant to test devices that expose both a keyboard and a mouse, like the wireless keyboard + touchpad receivers, and uses less memory than running hidkbd and tc side by side, which matters on small boards (e.g. stm32f103-minimum).
Impact
Users will be able to use a HID keyboard with mouse/touchpad on NuttX.
Testing