From owner-freebsd-usb@freebsd.org Wed Mar 4 08:49:33 2020 Return-Path: Delivered-To: freebsd-usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8E6B26905C for ; Wed, 4 Mar 2020 08:49:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48XSHJ0dfnz45HF for ; Wed, 4 Mar 2020 08:49:31 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 982AD2604A3; Wed, 4 Mar 2020 09:49:23 +0100 (CET) Subject: Re: ukbd key repeat behaviour changed? To: James Wright Cc: freebsd-usb@freebsd.org References: <8FF6BA04-2216-4FF4-AF6F-9310F9516C1B@jigsawdezign.com> <1bc72129-83e5-ced7-b04a-8b374a950c86@selasky.org> <5523FE74-80F8-404C-AE10-A2CDA3D35E7D@jigsawdezign.com> From: Hans Petter Selasky Message-ID: Date: Wed, 4 Mar 2020 09:49:10 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <5523FE74-80F8-404C-AE10-A2CDA3D35E7D@jigsawdezign.com> Content-Type: multipart/mixed; boundary="------------DC3674773B2BBD09DF4404A4" Content-Language: en-US X-Rspamd-Queue-Id: 48XSHJ0dfnz45HF X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-4.35 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.93)[-0.927,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; HAS_ATTACHMENT(0.00)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain]; DMARC_NA(0.00)[selasky.org]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(-3.12)[ip: (-9.30), ipnet: 88.99.0.0/16(-4.71), asn: 24940(-1.56), country: DE(-0.02)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 08:49:33 -0000 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--