mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
hkbd: 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
(cherry picked from commit 812c59ed61)
This commit is contained in:
parent
e7211ca03a
commit
98b3658c4e
1 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue