Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/dev/usb Pull up following revision(s) (requested by k...
details: https://anonhg.NetBSD.org/src/rev/5bf16e5a9927
branches: netbsd-6
changeset: 774345:5bf16e5a9927
user: riz <riz%NetBSD.org@localhost>
date: Fri Jul 20 23:55:54 2012 +0000
description:
Pull up following revision(s) (requested by khorben in ticket #428):
sys/dev/usb/ukbd.c: revision 1.120
Convert keycodes 0x7f, 0x80 and 0x81 to PMF events VOLUME_TOGGLE,
VOLUME_UP and VOLUME_DOWN as observed on my Sun Type 7 USB keyboard, and
according to the documentation mentioned above.
"works here" macallan@ and myself
diffstat:
sys/dev/usb/ukbd.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (41 lines):
diff -r 5cbb9a64f68d -r 5bf16e5a9927 sys/dev/usb/ukbd.c
--- a/sys/dev/usb/ukbd.c Fri Jul 20 23:49:31 2012 +0000
+++ b/sys/dev/usb/ukbd.c Fri Jul 20 23:55:54 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ukbd.c,v 1.115.2.1 2012/07/20 23:49:31 riz Exp $ */
+/* $NetBSD: ukbd.c,v 1.115.2.2 2012/07/20 23:55:54 riz Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.115.2.1 2012/07/20 23:49:31 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.115.2.2 2012/07/20 23:55:54 riz Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -174,6 +174,13 @@
};
#endif
+Static const struct ukbd_keycodetrans trtab_generic[] = {
+ { 0x7f, IS_PMF | PMFE_AUDIO_VOLUME_TOGGLE },
+ { 0x80, IS_PMF | PMFE_AUDIO_VOLUME_UP },
+ { 0x81, IS_PMF | PMFE_AUDIO_VOLUME_DOWN },
+ { 0x00, 0x00 }
+};
+
#if defined(__NetBSD__) && defined(WSDISPLAY_COMPAT_RAWKBD)
#define NN 0 /* no translation */
/*
@@ -669,6 +676,8 @@
}
#endif
+ ukbd_translate_keycodes(sc, ud, trtab_generic);
+
if ((sc->sc_flags & FLAG_DEBOUNCE) && !(sc->sc_flags & FLAG_POLLING)) {
/*
* Some keyboards have a peculiar quirk. They sometimes
Home |
Main Index |
Thread Index |
Old Index