Module Name: src
Committed By: jakllsch
Date: Thu Jul 16 20:44:54 UTC 2009
Modified Files:
src/sys/dev/pckbport: pckbd.c
Log Message:
Ignore scancodes E0 2A, E0 AA, E0 36, E0 B6 when decoding.
For the 10 keys on the editing keypad, these prefix/postfix
scancodes indicate the state of the Left Shift and Right Shift
keys and Num Lock indicator.
This change prevents a spurious WSCONS_EVENT_KEY_UP event upon
press as well as the corresponding WSCONS_EVENT_KEY_DOWN event
upon release.
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pckbport/pckbd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pckbport/pckbd.c
diff -u src/sys/dev/pckbport/pckbd.c:1.26 src/sys/dev/pckbport/pckbd.c:1.27
--- src/sys/dev/pckbport/pckbd.c:1.26 Sun Mar 8 15:06:56 2009
+++ src/sys/dev/pckbport/pckbd.c Thu Jul 16 20:44:54 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbd.c,v 1.26 2009/03/08 15:06:56 ad Exp $ */
+/* $NetBSD: pckbd.c,v 1.27 2009/07/16 20:44:54 jakllsch Exp $ */
/*-
* Copyright (c) 1998, 2009 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.26 2009/03/08 15:06:56 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.27 2009/07/16 20:44:54 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -459,6 +459,17 @@
return 0;
}
+ if (id->t_extended0 == 1) {
+ switch (datain & 0x7f) {
+ case 0x2a:
+ case 0x36:
+ id->t_extended0 = 0;
+ return 0;
+ default:
+ break;
+ }
+ }
+
/* map extended keys to (unused) codes 128-254 */
key = (datain & 0x7f) | (id->t_extended0 ? 0x80 : 0);
id->t_extended0 = 0;