Restart the USB keyboard repeat timer at every valid key-press.

This fixes a regression issue after r357861.

Reported by:	James Wright <james.wright@jigsawdezign.com>
PR:	224592
PR:	233884
MFC after:	3 days
Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2020-03-04 09:46:42 +00:00
parent 37bf88e790
commit 0e5670a9a0

View File

@ -522,15 +522,9 @@ ukbd_interrupt(struct ukbd_softc *sc)
if (ukbd_is_modifier_key(key))
continue;
/*
* Check for first new key and set
* initial delay and [re]start timer:
*/
if (sc->sc_repeat_key == 0) {
sc->sc_co_basetime = sbinuptime();
sc->sc_delay = sc->sc_kbd.kb_delay1;
ukbd_start_timer(sc);
}
sc->sc_co_basetime = sbinuptime();
sc->sc_delay = sc->sc_kbd.kb_delay1;
ukbd_start_timer(sc);
/* set repeat time for last key */
sc->sc_repeat_time = now + sc->sc_kbd.kb_delay1;