usb/110681: [ukbd][patch] multiple keys will be repeated
URATAN Shigenobu
uratan at po.iijnet.or.jp
Thu Mar 22 15:50:08 UTC 2007
>Number: 110681
>Category: usb
>Synopsis: [ukbd][patch] multiple keys will be repeated
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-usb
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Mar 22 15:50:04 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: URATAN Shigenobu
>Release: 6.2-RELEASE
>Organization:
personal
>Environment:
FreeBSD 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root at dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
when using USB keyboard on syscons, and keep pressing multiple keys,
all pressed keys will be repeated, like:
"jjjjjjjjjjjjdjjjjjdjdjdjdjdjdjdjdjdjdjdjdjdjdjdjdjdjdjdjd"
(expample: first press 'j', then press 'd')
with the patch, only latest one key will be repeated.
"jjjjjjjjjjjjdddddddddddddddddddddddddddddddddddddddddd"
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
--- ukbd.c.orig Sun Oct 29 16:30:06 2006
+++ ukbd.c Fri Mar 23 00:20:35 2007
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ukbd.c,v 1.52.2.3 2006/10/29 07:30:06 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/ukbd.c,v 1.52.2.3 2006/10/29 07:30:06 xx Exp $");
/*
* HID spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf
@@ -772,6 +772,16 @@
}
}
ADDKEY1(key | KEY_PRESS);
+ /*
+ * here, some key detected to be pressed,
+ * so kill repeat of all other keys.
+ * (postpone repeat trigger time 100sec from now)
+ */
+ for(j=0; j<NKEYCODE; j++) {
+ if(j != i)
+ state->ks_ntime[j] = now + 100*1000;
+ }
+
pfound:
;
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-usb
mailing list