mirror of
https://github.com/apache/nuttx.git
synced 2026-08-10 23:15:15 +00:00
The HID keyboard driver registers /dev/kbd[n] as a byte stream and only ever reports key presses: there is no way for it to say that a key was released. That is enough to type with, but not for an application that has to know how long a key is held down, such as a game, where a movement key would never stop being pressed. Add CONFIG_HIDKBD_KBDUPPER, which registers the device through the keyboard upper-half driver instead, so that reads return struct keyboard_event_s. Presses and releases are derived by comparing each HID report against the previous one, which is the only way to tell them apart given that the specification gives no significance to the order of the keycodes in a report. Modifiers are reported as keys of their own, so an application can see that Ctrl is down and which key it is held with. The two interfaces are mutually exclusive because they share the device name, so the byte stream is not built in this mode. Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| hid_parser.c | ||
| Kconfig | ||
| Make.defs | ||
| usbhost_bthci.c | ||
| usbhost_cdcacm.c | ||
| usbhost_cdcecm.c | ||
| usbhost_cdcmbim.c | ||
| usbhost_composite.c | ||
| usbhost_composite.h | ||
| usbhost_devaddr.c | ||
| usbhost_drivers.c | ||
| usbhost_enumerate.c | ||
| usbhost_findclass.c | ||
| usbhost_ft232r.c | ||
| usbhost_hidkbd.c | ||
| usbhost_hidmouse.c | ||
| usbhost_hub.c | ||
| usbhost_max3421e.c | ||
| usbhost_registerclass.c | ||
| usbhost_registry.c | ||
| usbhost_registry.h | ||
| usbhost_skeleton.c | ||
| usbhost_storage.c | ||
| usbhost_trace.c | ||
| usbhost_waiter.c | ||
| usbhost_xboxcontroller.c | ||
| usbhost_xhci.h | ||
| usbhost_xhci_pci.c | ||
| usbhost_xhci_trace.c | ||
| usbhost_xhci_trace.h | ||