summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-05-19 18:09:07 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-05-19 18:09:07 +0000
commit79134f428b2abf53e65b62cde34f418edb5dd6b6 (patch)
tree779926199fc8c0530696251abe0e3aff3da69225 /sys/dev/usb
parent35778e7cd089d49062b347a407ef47d7b651fb0f (diff)
Add the Sun extended keys (L keys, volume keys) to the console mode layouts.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/makemap.awk28
-rw-r--r--sys/dev/usb/ukbd.c8
2 files changed, 30 insertions, 6 deletions
diff --git a/sys/dev/usb/makemap.awk b/sys/dev/usb/makemap.awk
index 6b0900fa8c1..9626bf44e62 100644
--- a/sys/dev/usb/makemap.awk
+++ b/sys/dev/usb/makemap.awk
@@ -1,5 +1,5 @@
#! /usr/bin/awk -f
-# $OpenBSD: makemap.awk,v 1.7 2007/06/17 07:53:11 mbalmer Exp $
+# $OpenBSD: makemap.awk,v 1.8 2008/05/19 18:09:06 miod Exp $
#
# Copyright (c) 2005, Miodrag Vallat
#
@@ -31,12 +31,13 @@
#
BEGIN {
- rcsid = "$OpenBSD: makemap.awk,v 1.7 2007/06/17 07:53:11 mbalmer Exp $"
+ rcsid = "$OpenBSD: makemap.awk,v 1.8 2008/05/19 18:09:06 miod Exp $"
ifdepth = 0
ignore = 0
declk = 0
haskeys = 0
kbfr = 0
+ nmaps = 0
# PS/2 id -> UKBD conversion table, or "sanity lossage 102"
# (101 is for GSC keyboards!)
@@ -307,6 +308,29 @@ $1 == "#define" || $1 == "#undef" {
sub("50", "49", lines[49])
}
+ #
+ # Sun USB keyboards extra keys do not appear in the PS/2
+ # maps. We add them here, except for the Compose key (101)
+ # which conflicts with the ``menu'' key.
+ #
+ if (nmaps++ == 0) {
+ # 102 Suspend
+ lines[116] = " KC(116),\tKS_Open,"
+ lines[117] = " KC(117),\tKS_Help,"
+ lines[118] = " KC(118),\tKS_Props,"
+ lines[119] = " KC(119),\tKS_Front,"
+ lines[120] = " KC(120),\tKS_Cmd,"
+ lines[121] = " KC(121),\tKS_Again,"
+ lines[122] = " KC(122),\tKS_Undo,"
+ lines[123] = " KC(123),\tKS_Cut,"
+ lines[124] = " KC(124),\tKS_Copy,"
+ lines[125] = " KC(125),\tKS_Paste,"
+ lines[126] = " KC(126),\tKS_Find,"
+ lines[127] = " KC(127),\tKS_AudioMute,"
+ lines[128] = " KC(128),\tKS_AudioRaise,"
+ lines[129] = " KC(129),\tKS_AudioLower,"
+ }
+
for (i = 0; i < 256; i++)
if (lines[i]) {
print lines[i]
diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c
index ff6c16459cd..274ce44b69d 100644
--- a/sys/dev/usb/ukbd.c
+++ b/sys/dev/usb/ukbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ukbd.c,v 1.40 2008/04/16 16:08:39 mk Exp $ */
+/* $OpenBSD: ukbd.c,v 1.41 2008/05/19 18:09:06 miod Exp $ */
/* $NetBSD: ukbd.c,v 1.85 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -113,11 +113,11 @@ const u_int8_t ukbd_trtab[256] = {
0x7f, 0xd2, 0xc7, 0xc9, 0xd3, 0xcf, 0xd1, 0xcd, /* 48 - 4f */
0xcb, 0xd0, 0xc8, 0x45, 0xb5, 0x37, 0x4a, 0x4e, /* 50 - 57 */
0x9c, 0x4f, 0x50, 0x51, 0x4b, 0x4c, 0x4d, 0x47, /* 58 - 5f */
- 0x48, 0x49, 0x52, 0x53, 0x56, 0xdd, NN, 0x59, /* 60 - 67 */
+ 0x48, 0x49, 0x52, 0x53, 0x56, 0xdd, 0x84, 0x59, /* 60 - 67 */
0x5d, 0x5e, 0x5f, NN, NN, NN, NN, NN, /* 68 - 6f */
NN, NN, NN, NN, 0x97, NN, 0x93, 0x95, /* 70 - 77 */
- 0x91, 0x92, 0x94, 0x9a, 0x96, 0x98, 0x99, NN, /* 78 - 7f */
- NN, NN, NN, NN, NN, 0x7e, NN, 0x73, /* 80 - 87 */
+ 0x91, 0x92, 0x94, 0x9a, 0x96, 0x98, 0x99, 0xa0, /* 78 - 7f */
+ 0xb0, 0xae, NN, NN, NN, 0x7e, NN, 0x73, /* 80 - 87 */
0x70, 0x7d, 0x79, 0x7b, 0x5c, NN, NN, NN, /* 88 - 8f */
NN, NN, 0x78, 0x77, 0x76, NN, NN, NN, /* 90 - 97 */
NN, NN, NN, NN, NN, NN, NN, NN, /* 98 - 9f */