diff options
| author | Vladimir Kondratyev <wulf@FreeBSD.org> | 2018-08-13 19:05:53 +0000 |
|---|---|---|
| committer | Vladimir Kondratyev <wulf@FreeBSD.org> | 2018-08-13 19:05:53 +0000 |
| commit | 48f2b006486019a1a238238ba32875a2c1ce16a0 (patch) | |
| tree | 4f6588852eec9128bcf6be3014baa737f7935c65 /sys/dev/atkbdc | |
| parent | 911aed94fa3a6b7c99aae26c48c0724ada8ab787 (diff) | |
Notes
Diffstat (limited to 'sys/dev/atkbdc')
| -rw-r--r-- | sys/dev/atkbdc/atkbd.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c index 7a87e71928ba..57772468a9b1 100644 --- a/sys/dev/atkbdc/atkbd.c +++ b/sys/dev/atkbdc/atkbd.c @@ -267,8 +267,10 @@ static int typematic_delay(int delay); static int typematic_rate(int rate); #ifdef EVDEV_SUPPORT +static evdev_event_t atkbd_ev_event; + static const struct evdev_methods atkbd_evdev_methods = { - .ev_event = evdev_ev_kbd_event, + .ev_event = atkbd_ev_event, }; #endif @@ -1205,6 +1207,22 @@ atkbd_reset(KBDC kbdc, int flags, int c) return (0); } +#ifdef EVDEV_SUPPORT +static void +atkbd_ev_event(struct evdev_dev *evdev, uint16_t type, uint16_t code, + int32_t value) +{ + keyboard_t *kbd = evdev_get_softc(evdev); + + if (evdev_rcpt_mask & EVDEV_RCPT_HW_KBD && + (type == EV_LED || type == EV_REP)) { + mtx_lock(&Giant); + kbd_ev_event(kbd, type, code, value); + mtx_unlock(&Giant); + } +} +#endif + /* local functions */ static int |
