summaryrefslogtreecommitdiff
path: root/sys/dev/sun
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-01-22 19:02:32 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-01-22 19:02:32 +0000
commit1f54627b8e991b57d7b3ae44d49f0433ff07f145 (patch)
tree64cfe424d60568725fa9a6678816e854f9b78b52 /sys/dev/sun
parent4a4babd2f42be332fc8f494e653e8c50156ab36b (diff)
Recognize the Voyager ``Compact-1'' keyboard layouts.
Currently, they are mapped to the corresponding type 5 layouts, but some tweaks might be necessary in the future.
Diffstat (limited to 'sys/dev/sun')
-rw-r--r--sys/dev/sun/sunkbd.c47
-rw-r--r--sys/dev/sun/sunkbdvar.h6
2 files changed, 48 insertions, 5 deletions
diff --git a/sys/dev/sun/sunkbd.c b/sys/dev/sun/sunkbd.c
index 6b5fede66e6..4b288b4388e 100644
--- a/sys/dev/sun/sunkbd.c
+++ b/sys/dev/sun/sunkbd.c
@@ -1,6 +1,7 @@
-/* $OpenBSD: sunkbd.c,v 1.13 2003/01/01 17:51:36 miod Exp $ */
+/* $OpenBSD: sunkbd.c,v 1.14 2003/01/22 19:02:31 miod Exp $ */
/*
+ * Copyright (c) 2002, 2003 Miodrag Vallat.
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
* All rights reserved.
*
@@ -887,8 +888,10 @@ const struct wscons_keydesc sunkbd5_keydesctab[] = {
/*
* Keyboard layout to ID table
- * References: Sun Type 5 Keyboard Supplement Installation Guide, May 1992
- * and http://docs.sun.com/db/doc/806-6642/6jfipqu57?a=view
+ * References:
+ * Sun Type 5 Keyboard Supplement Installation Guide, May 1992
+ * http://docs.sun.com/db/doc/806-6642/6jfipqu57?a=view
+ * http://jp.sunsolve.sun.com/handbook_pub/Systems/SSVygr/INPUT_Compact1_Keyboard.html
*/
const int sunkbd_layouts[MAXSUNLAYOUT] = {
/* Type 4 layouts */
@@ -958,6 +961,44 @@ const int sunkbd_layouts[MAXSUNLAYOUT] = {
-1, /* 03d unaffected */
-1, /* 03e Turkey-F5 */
-1, /* 03f Canada/French */
+
+ /* Not affected range */
+ -1, /* 040 */
+ -1, /* 041 */
+ -1, /* 042 */
+ -1, /* 043 */
+ -1, /* 044 */
+ -1, /* 045 */
+ -1, /* 046 */
+ -1, /* 047 */
+ -1, /* 048 */
+ -1, /* 049 */
+ -1, /* 04a */
+ -1, /* 04b */
+ -1, /* 04c */
+ -1, /* 04d */
+ -1, /* 04e */
+ -1, /* 04f */
+
+ /* ``Compact-1'' layouts */
+ KB_US, /* 050 USA */
+ KB_US, /* 051 UNIX */
+ KB_FR, /* 052 France */
+ KB_DK, /* 053 Denmark */
+ KB_DE, /* 054 Germany */
+ KB_IT, /* 055 Italy */
+ KB_NL, /* 056 The Netherlands */
+ KB_NO, /* 057 Norway */
+ KB_PT, /* 058 Portugal */
+ KB_ES, /* 059 Spain */
+ KB_SV, /* 05a Sweden */
+ KB_SF, /* 05b Switzerland/French */
+ KB_SG, /* 05c Switzerland/German */
+ KB_UK, /* 05d Great Britain */
+ -1, /* 05e Korea */
+ -1, /* 05f Taiwan */
+ -1, /* 060 Japan */
+ -1, /* 061 Canada/French */
};
struct wskbd_mapdata sunkbd_keymapdata = {
diff --git a/sys/dev/sun/sunkbdvar.h b/sys/dev/sun/sunkbdvar.h
index aa599bdc55f..22d0435e1fc 100644
--- a/sys/dev/sun/sunkbdvar.h
+++ b/sys/dev/sun/sunkbdvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sunkbdvar.h,v 1.5 2002/11/29 01:00:51 miod Exp $ */
+/* $OpenBSD: sunkbdvar.h,v 1.6 2003/01/22 19:02:31 miod Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -45,8 +45,10 @@ extern struct wskbd_mapdata sunkbd5_keymapdata;
* Keyboard types 5 and 6 identify themselves as type 4, but might have
* different layouts. Fortunately they will have distinct layout codes, so
* here's a way to distinct types 5 and 6 from type 4.
+ *
+ * Note that ``Compact-1'' keyboards will be abusively reported as type 5.
*/
#define ISTYPE5(layout) ((layout) > 0x20)
-#define MAXSUNLAYOUT 0x040
+#define MAXSUNLAYOUT 0x061
extern const int sunkbd_layouts[MAXSUNLAYOUT];