Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/arch/macppc/dev Pull up revisions 1.26-1.27 (reques...
details: https://anonhg.NetBSD.org/src/rev/d6acc4ad68e1
branches: netbsd-1-6
changeset: 530383:d6acc4ad68e1
user: grant <grant%NetBSD.org@localhost>
date: Thu Jun 19 11:37:00 2003 +0000
description:
Pull up revisions 1.26-1.27 (requested by aymeric in ticket #1324):
akbd's now have a raw mode, and implement the WSKBDIO_SETMODE ioctl.
Adapted from OpenBSD.
Remove the key repeating feature.
It is asking for trouble and is useless for the X server.
We can add it back later if need be.
diffstat:
sys/arch/macppc/dev/akbd.c | 30 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
diffs (58 lines):
diff -r 1fa1614f9b77 -r d6acc4ad68e1 sys/arch/macppc/dev/akbd.c
--- a/sys/arch/macppc/dev/akbd.c Thu Jun 19 11:27:02 2003 +0000
+++ b/sys/arch/macppc/dev/akbd.c Thu Jun 19 11:37:00 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: akbd.c,v 1.23 2002/03/17 19:40:44 atatat Exp $ */
+/* $NetBSD: akbd.c,v 1.23.6.1 2003/06/19 11:37:00 grant Exp $ */
/*
* Copyright (C) 1998 Colin Wood
@@ -452,6 +452,10 @@
int flag;
struct proc *p;
{
+#ifdef WSDISPLAY_COMPAT_RAWKBD
+ struct akbd_softc *sc = (struct akbd_softc *) v;
+#endif
+
switch (cmd) {
case WSKBDIO_GTYPE:
@@ -462,6 +466,11 @@
case WSKBDIO_GETLEDS:
*(int *)data = 0;
return 0;
+#ifdef WSDISPLAY_COMPAT_RAWKBD
+ case WSKBDIO_SETMODE:
+ sc->sc_rawkbd = *(int *)data == WSKBD_RAW;
+ return 0;
+#endif
}
/* kbdioctl(...); */
@@ -485,6 +494,25 @@
printf("akbd: dumping polled key 0x%02x\n",key);
}
#endif
+#ifdef WSDISPLAY_COMPAT_RAWKBD
+ } else if (sc->sc_rawkbd) {
+ char cbuf[2];
+ int s;
+ int j = 0;
+ int c = keyboard[ADBK_KEYVAL(key)][3];
+
+ if (c == 0) /* XXX */
+ return;
+
+ if (c & 0x80)
+ cbuf[j++] = 0xe0;
+
+ cbuf[j++] = (c & 0x7f) | (ADBK_PRESS(key)? 0 : 0x80);
+
+ s = spltty();
+ wskbd_rawinput(sc->sc_wskbddev, cbuf, j);
+ splx(s);
+#endif
} else {
int press, val;
int type;
Home |
Main Index |
Thread Index |
Old Index