mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
ukbd: Fix handling of keyboard ErrorRollOver reports
Ignore fantom keyboard state reports entirelly rather than ignore RollOver states for each key separatelly. Latter results in spurious release/push pairs of events on each fantom keyboard state report. Reported by: Jan Martin Mikkelsen <janm_AT_transactionware_DOT_com> Submitted by: Jan Martin Mikkelsen (initial version) PR: 253249 MFC after: 1 week
This commit is contained in:
parent
88db1cc9f1
commit
032d315387
1 changed files with 6 additions and 1 deletions
|
|
@ -722,11 +722,16 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t error)
|
|||
hid_get_udata(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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue