Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/wscons Make it possible for a console driver to deli...
details: https://anonhg.NetBSD.org/src/rev/b9b312593f23
branches: trunk
changeset: 580532:b9b312593f23
user: martin <martin%NetBSD.org@localhost>
date: Thu Apr 28 07:15:44 2005 +0000
description:
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/wsconsio.h | 3 ++-
sys/dev/wscons/wskbd.c | 15 +++++++++++++--
2 files changed, 15 insertions(+), 3 deletions(-)
diffs (53 lines):
diff -r 50596bb2eb4a -r b9b312593f23 sys/dev/wscons/wsconsio.h
--- a/sys/dev/wscons/wsconsio.h Thu Apr 28 06:22:41 2005 +0000
+++ b/sys/dev/wscons/wsconsio.h Thu Apr 28 07:15:44 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsconsio.h,v 1.73 2005/02/27 00:27:52 perry Exp $ */
+/* $NetBSD: wsconsio.h,v 1.74 2005/04/28 07:15:44 martin Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -71,6 +71,7 @@
#define WSCONS_EVENT_MOUSE_DELTA_Z 10 /* Z delta amount */
#define WSCONS_EVENT_MOUSE_ABSOLUTE_Z 11 /* Z location */
#define WSCONS_EVENT_SCREEN_SWITCH 12 /* New screen number */
+#define WSCONS_EVENT_ASCII 13 /* key code is already ascii */
/*
diff -r 50596bb2eb4a -r b9b312593f23 sys/dev/wscons/wskbd.c
--- a/sys/dev/wscons/wskbd.c Thu Apr 28 06:22:41 2005 +0000
+++ b/sys/dev/wscons/wskbd.c Thu Apr 28 07:15:44 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.78 2005/04/28 07:15:44 martin 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.78 2005/04/28 07:15:44 martin 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