summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Kondratyev <wulf@FreeBSD.org>2020-12-24 18:56:33 +0000
committerVladimir Kondratyev <wulf@FreeBSD.org>2020-12-24 18:56:33 +0000
commit769935a4edf8a75805000900d44a66ad5d2eaabe (patch)
treef8c5689ccdf3ce89bc04b4109a7e308d19ebedf7
parenta1d783675213798620550f4af137340458abe6c5 (diff)
downloadsrc-test-769935a4edf8a75805000900d44a66ad5d2eaabe.tar.gz
src-test-769935a4edf8a75805000900d44a66ad5d2eaabe.zip
ukbd(4): Do not serialize evdev key events
Unlike AT keyboards, HID devices are able to send all pc105 key states within a single report. Let evdev to transmit all key state changes within a single report too. Reviewed by: hselasky Obtained from: sysutils/iichid MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D27749
-rw-r--r--sys/dev/usb/input/ukbd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c
index 9fb3acbd7ba1a..1ab26ccfb2587 100644
--- a/sys/dev/usb/input/ukbd.c
+++ b/sys/dev/usb/input/ukbd.c
@@ -389,11 +389,9 @@ ukbd_put_key(struct ukbd_softc *sc, uint32_t key)
(key & KEY_RELEASE) ? "released" : "pressed");
#ifdef EVDEV_SUPPORT
- if (evdev_rcpt_mask & EVDEV_RCPT_HW_KBD && sc->sc_evdev != NULL) {
+ if (evdev_rcpt_mask & EVDEV_RCPT_HW_KBD && sc->sc_evdev != NULL)
evdev_push_event(sc->sc_evdev, EV_KEY,
evdev_hid2key(KEY_INDEX(key)), !(key & KEY_RELEASE));
- evdev_sync(sc->sc_evdev);
- }
#endif
if (sc->sc_inputs < UKBD_IN_BUF_SIZE) {
@@ -559,6 +557,11 @@ ukbd_interrupt(struct ukbd_softc *sc)
}
}
+#ifdef EVDEV_SUPPORT
+ if (evdev_rcpt_mask & EVDEV_RCPT_HW_KBD && sc->sc_evdev != NULL)
+ evdev_sync(sc->sc_evdev);
+#endif
+
/* wakeup keyboard system */
ukbd_event_keyinput(sc);
}