mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
The driver kept a character device, a ring buffer, a poll waiter list and an encoder of its own, in parallel with everything the keyboard upper half already provides. A USB keyboard was therefore the one keyboard an application could not read like any other. Register with keyboard_register() and report with keyboard_event(), which removes the private character device and the four hundred lines that served it. Special keys are reported with the SPEC event types carrying a keycode, so an application no longer has to guess whether a value in the character range is a character or an arrow key. HIDKBD_ENCODED and HIDKBD_NODEBOUNCE go away with the code they guarded. Encoding is now inherent to the event, and the previous report is no longer an optimisation: a HID keyboard reports the keys that are down rather than the transitions, so it is what tells a new press from a key still held, and what tells that a key has been released. Reporting the modifiers as keys is new, so it is behind HIDKBD_REPORT_MODIFIERS and off by default. 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 | ||