Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/dev/pckbc pullup 1.18->1.19 (drochner)
details: https://anonhg.NetBSD.org/src/rev/2886679ac677
branches: netbsd-1-4
changeset: 469072:2886679ac677
user: perry <perry%NetBSD.org@localhost>
date: Fri Jun 25 20:59:16 1999 +0000
description:
pullup 1.18->1.19 (drochner)
diffstat:
sys/dev/pckbc/pckbd.c | 41 +++++++++++++++++++++++++----------------
1 files changed, 25 insertions(+), 16 deletions(-)
diffs (80 lines):
diff -r 722f28e279bf -r 2886679ac677 sys/dev/pckbc/pckbd.c
--- a/sys/dev/pckbc/pckbd.c Fri Jun 25 20:57:51 1999 +0000
+++ b/sys/dev/pckbc/pckbd.c Fri Jun 25 20:59:16 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbd.c,v 1.17 1999/03/26 12:39:13 drochner Exp $ */
+/* $NetBSD: pckbd.c,v 1.17.2.1 1999/06/25 20:59:16 perry Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -376,7 +376,8 @@
return (res);
}
- res = pckbd_set_xtscancode(sc->id->t_kbctag, sc->id->t_kbcslot);
+ res = pckbd_set_xtscancode(sc->id->t_kbctag,
+ sc->id->t_kbcslot);
if (res)
return (res);
@@ -408,6 +409,8 @@
u_int *type;
int *dataout;
{
+ int key;
+
if (datain == KBR_EXTENDED0) {
id->t_extended = 1;
return(0);
@@ -416,31 +419,37 @@
return(0);
}
- /* process BREAK key (EXT1 1D 45 EXT1 9D C5) map to (unused) code 7F */
+ /* map extended keys to (unused) codes 128-254 */
+ key = (datain & 0x7f) | (id->t_extended ? 0x80 : 0);
+ id->t_extended = 0;
+
+ /*
+ * process BREAK key (EXT1 1D 45 EXT1 9D C5):
+ * map to (unused) code 7F
+ */
if (id->t_extended1 == 2 && (datain == 0x1d || datain == 0x9d)) {
id->t_extended1 = 1;
return(0);
- } else if (id->t_extended1 == 1 && (datain == 0x45 || datain == 0xc5)) {
+ } else if (id->t_extended1 == 1 &&
+ (datain == 0x45 || datain == 0xc5)) {
id->t_extended1 = 0;
- datain = (datain & 0x80) | 0x7f;
+ key = 0x7f;
} else if (id->t_extended1 > 0) {
id->t_extended1 = 0;
}
-
- /* Always ignore typematic keys */
- if (datain == id->t_lastchar)
- return(0);
- id->t_lastchar = datain;
- if (datain & 0x80)
+ if (datain & 0x80) {
+ id->t_lastchar = 0;
*type = WSCONS_EVENT_KEY_UP;
- else
+ } else {
+ /* Always ignore typematic keys */
+ if (key == id->t_lastchar)
+ return(0);
+ id->t_lastchar = key;
*type = WSCONS_EVENT_KEY_DOWN;
+ }
- /* map extended keys to (unused) codes 128-254 */
- *dataout = (datain & 0x7f) | (id->t_extended ? 0x80 : 0);
-
- id->t_extended = 0;
+ *dataout = key;
return(1);
}
Home |
Main Index |
Thread Index |
Old Index