Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Mar 2020 09:49:10 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        James Wright <james.wright@jigsawdezign.com>
Cc:        freebsd-usb@freebsd.org
Subject:   Re: ukbd key repeat behaviour changed?
Message-ID:  <a36bae5a-8ec4-65dd-1c72-cebe758de9e0@selasky.org>
In-Reply-To: <5523FE74-80F8-404C-AE10-A2CDA3D35E7D@jigsawdezign.com>
References:  <8FF6BA04-2216-4FF4-AF6F-9310F9516C1B@jigsawdezign.com> <dca972b3-241f-f7e2-7ad5-d8d83b7dfd53@selasky.org> <1bc72129-83e5-ced7-b04a-8b374a950c86@selasky.org> <5523FE74-80F8-404C-AE10-A2CDA3D35E7D@jigsawdezign.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------DC3674773B2BBD09DF4404A4
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

> 
> However, to confirm it's not just my typing, I booted into my old kernel (r357365) and I don't see the issue as in the newer revision (r358484).
> 
> I think it may be something to do with the latest version not resetting the initial repeat delay when another key is pressed, e.g.
> 
> 1) Hold down the 'a' key.
> 2) Wait a split second just before the 'a' key should start repeating, and press 'l' key whilst still holding the 'a' key.
> 3) There should be a renewed initial delay before the 'l' key starts repeating, but I think it starts repeating almost immediately (as if it were still counting from the press of the 'a' key).
> 
> Hope that makes some sense! :-)
> 

Hi,

Can you try the attached patch?

Does it solve the issue?

--HPS

--------------DC3674773B2BBD09DF4404A4
Content-Type: text/x-patch; charset=UTF-8;
 name="ukbd.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="ukbd.diff"

Index: sys/dev/usb/input/ukbd.c
===================================================================
--- sys/dev/usb/input/ukbd.c	(revision 358536)
+++ sys/dev/usb/input/ukbd.c	(working copy)
@@ -522,15 +522,9 @@
 				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;

--------------DC3674773B2BBD09DF4404A4--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a36bae5a-8ec4-65dd-1c72-cebe758de9e0>