mirror of
https://github.com/apache/nuttx.git
synced 2026-08-18 11:41:51 +08:00
keyboard.h declares KEYBOARD_PRESS and KEYBOARD_RELEASE only, but the type field of struct keyboard_event_s has four values: the two special key types live in kbd_codec.h, under a different prefix. Somebody writing a keyboard driver reads keyboard.h, sees two types, and implements two types. Six of the nine drivers that register a keyboard never report a special key at all, and the failure is silent: the build is clean and the symptom is a key that does nothing. Define all four here, as aliases of the kbd_decode() return values so that a driver can feed both this interface and the byte stream codec from a single source. Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>