From owner-freebsd-bugs@FreeBSD.ORG Sat Sep 27 00:50:21 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 33A4716A4B3 for ; Sat, 27 Sep 2003 00:50:21 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B313F4401F for ; Sat, 27 Sep 2003 00:50:19 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h8R7oJFY096792 for ; Sat, 27 Sep 2003 00:50:19 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h8R7oJXt096791; Sat, 27 Sep 2003 00:50:19 -0700 (PDT) (envelope-from gnats) Resent-Date: Sat, 27 Sep 2003 00:50:19 -0700 (PDT) Resent-Message-Id: <200309270750.h8R7oJXt096791@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, plasma Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E844316A4B3 for ; Sat, 27 Sep 2003 00:42:43 -0700 (PDT) Received: from freebsd.sinica.edu.tw (freebsd.sinica.edu.tw [140.109.13.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C40244022 for ; Sat, 27 Sep 2003 00:42:43 -0700 (PDT) (envelope-from plasma@freebsd.sinica.edu.tw) Received: by freebsd.sinica.edu.tw (Postfix, from userid 1026) id B5656999; Sat, 27 Sep 2003 15:42:43 +0800 (CST) Message-Id: <20030927074243.B5656999@freebsd.sinica.edu.tw> Date: Sat, 27 Sep 2003 15:42:43 +0800 (CST) From: plasma To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/57273: PATCH, fix usb keyboard repeat problem X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: plasma List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Sep 2003 07:50:21 -0000 >Number: 57273 >Category: kern >Synopsis: PATCH, fix usb keyboard repeat problem >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Sep 27 00:50:19 PDT 2003 >Closed-Date: >Last-Modified: >Originator: plasma >Release: FreeBSD 4.9-PRERELEASE i386 >Organization: >Environment: System: FreeBSD freebsd.sinica.edu.tw 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #4: Mon Sep 15 18:44:48 CST 2003 root@freebsd.sinica.edu.tw:/usr/src/sys/compile/GENERIC i386 >Description: Using a usb keyboard, the keystrokes will repeat itself if typing too fast. See http://docs.freebsd.org/cgi/getmsg.cgi?fetch=984685+0+current/freebsd-stable for details. >How-To-Repeat: 1. Plug a usb keyboard. 2. Do 'kbdcontrol -k /dev/kbd1 < /dev/console', activate the usb keyboard. 3. Type. Make sure you type fast enough that one key is pressed before the previous key is not released yet. >Fix: Apply the following patch: --- /usr/src/sys/dev/usb/ukbd.c.orig Mon Mar 31 08:31:35 2003 +++ /usr/src/sys/dev/usb/ukbd.c Sat Sep 27 15:13:31 2003 @@ -732,10 +732,10 @@ for (i = 0; i < NKEYCODE; i++) { key = state->ks_odata.keycode[i]; if (key == 0) - break; + continue; for (j = 0; j < NKEYCODE; j++) { if (ud->keycode[j] == 0) - break; + continue; if (key == ud->keycode[j]) goto rfound; } @@ -748,11 +748,11 @@ for (i = 0; i < NKEYCODE; i++) { key = ud->keycode[i]; if (key == 0) - break; + continue; state->ks_ntime[i] = now + kbd->kb_delay1; for (j = 0; j < NKEYCODE; j++) { if (state->ks_odata.keycode[j] == 0) - break; + continue; if (key == state->ks_odata.keycode[j]) { state->ks_ntime[i] = state->ks_otime[j]; if (state->ks_otime[j] > now) >Release-Note: >Audit-Trail: >Unformatted: