Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/sys/dev/wscons Pull up revision 1.78 (requested by martin...



details:   https://anonhg.NetBSD.org/src/rev/ad8ffbf39234
branches:  netbsd-3
changeset: 575993:ad8ffbf39234
user:      riz <riz%NetBSD.org@localhost>
date:      Fri Jun 03 15:49:32 2005 +0000

description:
Pull up revision 1.78 (requested by martin in ticket #370):
Make it possible for a console driver to deliver raw ASCII characters
to wskbd. This is for special cases only, and may even be considered a
hack, but it is cheap and very local.

diffstat:

 sys/dev/wscons/wskbd.c |  15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r 9a16361c67b4 -r ad8ffbf39234 sys/dev/wscons/wskbd.c
--- a/sys/dev/wscons/wskbd.c    Fri Jun 03 15:49:29 2005 +0000
+++ b/sys/dev/wscons/wskbd.c    Fri Jun 03 15:49:32 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wskbd.c,v 1.77 2005/02/27 00:27:52 perry Exp $ */
+/* $NetBSD: wskbd.c,v 1.77.2.1 2005/06/03 15:49:32 riz Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.77 2005/02/27 00:27:52 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.77.2.1 2005/06/03 15:49:32 riz Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -1291,6 +1291,17 @@
                        (*wskbd_console_data.t_consops->getc)
                                (wskbd_console_data.t_consaccesscookie,
                                 &type, &data);
+                       if (type == WSCONS_EVENT_ASCII) {
+                               /*
+                                * We assume that when the driver falls back
+                                * to deliver pure ASCII it is in a state that
+                                * it can not track press/release events
+                                * reliable - so we clear all previously
+                                * accuulated modifier state.
+                                */
+                               wskbd_console_data.t_modifiers = 0;
+                               return(data);
+                       }
                        num = wskbd_translate(&wskbd_console_data, type, data);
                        pos = 0;
                }



Home | Main Index | Thread Index | Old Index