aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hid/hkbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/hid/hkbd.c')
-rw-r--r--sys/dev/hid/hkbd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/hid/hkbd.c b/sys/dev/hid/hkbd.c
index 6f4b71dd49b6..89325f9b2499 100644
--- a/sys/dev/hid/hkbd.c
+++ b/sys/dev/hid/hkbd.c
@@ -715,11 +715,16 @@ hkbd_intr_callback(void *context, void *data, hid_size_t len)
uint32_t key =
hid_get_data(buf + offset, len - offset,
&sc->sc_loc_key[i]);
+ if (key == KEY_ERROR) {
+ DPRINTF("KEY_ERROR\n");
+ sc->sc_ndata = sc->sc_odata;
+ return; /* ignore */
+ }
if (modifiers & MOD_FN)
key = hkbd_apple_fn(key);
if (sc->sc_flags & HKBD_FLAG_APPLE_SWAP)
key = hkbd_apple_swap(key);
- if (key == KEY_NONE || key == KEY_ERROR || key >= HKBD_NKEYCODE)
+ if (key == KEY_NONE || key >= HKBD_NKEYCODE)
continue;
/* set key in bitmap */
sc->sc_ndata.bitmap[key / 64] |= 1ULL << (key % 64);