Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Sep 2003 15:42:43 +0800 (CST)
From:      plasma <plasma@freebsd.sinica.edu.tw>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/57273: PATCH, fix usb keyboard repeat problem
Message-ID:  <20030927074243.B5656999@freebsd.sinica.edu.tw>
Resent-Message-ID: <200309270750.h8R7oJXt096791@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030927074243.B5656999>