summaryrefslogtreecommitdiff
path: root/sys/dev/usb/input
diff options
context:
space:
mode:
authorVladimir Kondratyev <wulf@FreeBSD.org>2021-02-13 18:12:56 +0000
committerVladimir Kondratyev <wulf@FreeBSD.org>2021-02-23 23:43:28 +0000
commit9bdb559d97268967e893b9f37dc556ae5dcd44fb (patch)
treee10a637e61d838d00d496751b96c99b04d5c530d /sys/dev/usb/input
parentdfb372f5d38c302953a6a4e2838179cd0a1a6438 (diff)
Diffstat (limited to 'sys/dev/usb/input')
-rw-r--r--sys/dev/usb/input/ukbd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c
index e438a1521f97..52b358c20324 100644
--- a/sys/dev/usb/input/ukbd.c
+++ b/sys/dev/usb/input/ukbd.c
@@ -721,11 +721,16 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t error)
hid_get_data_unsigned(sc->sc_buffer, len, &tmp_loc);
/* advance to next location */
tmp_loc.pos += tmp_loc.size;
+ if (key == KEY_ERROR) {
+ DPRINTF("KEY_ERROR\n");
+ sc->sc_ndata = sc->sc_odata;
+ goto tr_setup; /* ignore */
+ }
if (modifiers & MOD_FN)
key = ukbd_apple_fn(key);
if (sc->sc_flags & UKBD_FLAG_APPLE_SWAP)
key = ukbd_apple_swap(key);
- if (key == KEY_NONE || key == KEY_ERROR || key >= UKBD_NKEYCODE)
+ if (key == KEY_NONE || key >= UKBD_NKEYCODE)
continue;
/* set key in bitmap */
sc->sc_ndata.bitmap[key / 64] |= 1ULL << (key % 64);