summaryrefslogtreecommitdiff
path: root/sys/dev/sun/kbd_tables.c
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1997-08-08 08:17:21 +0000
committerJason Downs <downsj@cvs.openbsd.org>1997-08-08 08:17:21 +0000
commit7821f17fddb4a6d07986dcec35b5853ba97a0d1b (patch)
tree4ab17be4cb15f5a7b51aaba09e01828619e6c736 /sys/dev/sun/kbd_tables.c
parent19e72f4e42c523b94256ffd89b7ab9ac14bab51f (diff)
Mostly sync to NetBSD-current 970804 + tags.
Diffstat (limited to 'sys/dev/sun/kbd_tables.c')
-rw-r--r--sys/dev/sun/kbd_tables.c58
1 files changed, 26 insertions, 32 deletions
diff --git a/sys/dev/sun/kbd_tables.c b/sys/dev/sun/kbd_tables.c
index 7b22797591a..52e1b92c0ed 100644
--- a/sys/dev/sun/kbd_tables.c
+++ b/sys/dev/sun/kbd_tables.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: kbd_tables.c,v 1.3 1997/01/15 07:00:19 kstailey Exp $ */
-/* $NetBSD: kbd_tables.c,v 1.2 1996/02/29 19:32:18 gwr Exp $ */
+/* $OpenBSD: kbd_tables.c,v 1.4 1997/08/08 08:17:16 downsj Exp $ */
+/* $NetBSD: kbd_tables.c,v 1.4 1997/05/02 17:41:37 gwr Exp $ */
/*
* Copyright (c) 1996 Gordon W. Ross
@@ -35,26 +35,20 @@
* Keyboard translation tables. (See kbd_tables.h)
*/
-#define _KERNEL 1
-#include "kbd_tables.h"
+#include <sys/types.h>
+#define _KERNEL 1 /* XXX */
+#include "kbd_tables.h"
-/*
- * Toggle keys are not yet supported, but could be with
- * fairly simple changes. Both CapsLock and NumLock
- * could be easily done with "post-translation" on the
- * keysymbols from these tables (WITHOUT new tables).
- *
- * The "compose" operations are not implemented.
- */
+/* The "compose" operations are not implemented. */
#define KEYSYM_COMPOSE KEYSYM_NOP
/*
* Key release codes are decoded in this map.
*/
-struct keymap keymap_release = {{
+u_short keymap_release[KEYMAP_SIZE] = {
/* 0: */ KEYSYM_HOLE,
/* 1: L1/Stop */ KEYSYM_NOP,
/* 2: */ KEYSYM_HOLE,
@@ -183,14 +177,14 @@ struct keymap keymap_release = {{
/* 125: KP_Add */ KEYSYM_NOP,
/* 126: */ KEYSYM_LAYOUT, /* layout next */
/* 127: */ KEYSYM_RESET, /* kbd ID next */
-}};
+};
/*
* This map is used when a control key is down.
*/
#define CTL(c) ((c)&0x1F)
-struct keymap keymap_control = {{
+u_short keymap_control[KEYMAP_SIZE] = {
/* 0: */ KEYSYM_HOLE,
/* 1: L1/Stop */ KEYSYM_NOP,
/* 2: */ KEYSYM_HOLE,
@@ -319,7 +313,7 @@ struct keymap keymap_control = {{
/* 125: KP_Add */ KEYSYM_NOP,
/* 126: */ KEYSYM_HW_ERR,
/* 127: */ KEYSYM_ALL_UP,
-}};
+};
#undef CTL
@@ -328,7 +322,7 @@ struct keymap keymap_control = {{
* (lower-case, upper-case)
*/
-struct keymap keymap_s3_lc = {{
+u_short keymap_s3_lc[KEYMAP_SIZE] = {
/* 0: */ KEYSYM_HOLE,
/* 1: L1/Stop */ KEYSYM_FUNC_L(1),
/* 2: */ KEYSYM_HOLE,
@@ -457,10 +451,10 @@ struct keymap keymap_s3_lc = {{
/* 125: KP_Add */ KEYSYM_HOLE,
/* 126: */ KEYSYM_HW_ERR,
/* 127: */ KEYSYM_ALL_UP,
-}};
+};
-struct keymap keymap_s3_uc = {{
+u_short keymap_s3_uc[KEYMAP_SIZE] = {
/* 0: */ KEYSYM_HOLE,
/* 1: L1/Stop */ KEYSYM_FUNC_L(1),
/* 2: */ KEYSYM_HOLE,
@@ -589,7 +583,7 @@ struct keymap keymap_s3_uc = {{
/* 125: KP_Add */ KEYSYM_HOLE,
/* 126: */ KEYSYM_HW_ERR,
/* 127: */ KEYSYM_ALL_UP,
-}};
+};
/*
@@ -597,7 +591,7 @@ struct keymap keymap_s3_uc = {{
* (lower-case, upper-case)
*/
-struct keymap keymap_s4_lc = {{
+u_short keymap_s4_lc[KEYMAP_SIZE] = {
/* 0: */ KEYSYM_HOLE,
/* 1: L1/Stop */ KEYSYM_FUNC_L(1),
/* 2: */ KEYSYM_HOLE,
@@ -726,10 +720,10 @@ struct keymap keymap_s4_lc = {{
/* 125: KP_Add */ KEYSYM_FUNC_N(14),
/* 126: */ KEYSYM_HW_ERR,
/* 127: */ KEYSYM_ALL_UP,
-}};
+};
-struct keymap keymap_s4_uc = {{
+u_short keymap_s4_uc[KEYMAP_SIZE] = {
/* 0: */ KEYSYM_HOLE,
/* 1: L1/Stop */ KEYSYM_FUNC_L(1),
/* 2: */ KEYSYM_HOLE,
@@ -858,7 +852,7 @@ struct keymap keymap_s4_uc = {{
/* 125: KP_Add */ KEYSYM_FUNC_N(14),
/* 126: */ KEYSYM_HW_ERR,
/* 127: */ KEYSYM_ALL_UP,
-}};
+};
@@ -908,17 +902,17 @@ unsigned short kbd_numlock_map[64] = {
#define kbd_type2 kbd_type3
static struct keyboard kbd_type3 = {
- &keymap_release,
- &keymap_control,
- &keymap_s3_lc,
- &keymap_s3_uc,
+ keymap_release,
+ keymap_control,
+ keymap_s3_lc,
+ keymap_s3_uc,
};
static struct keyboard kbd_type4 = {
- &keymap_release,
- &keymap_control,
- &keymap_s4_lc,
- &keymap_s4_uc,
+ keymap_release,
+ keymap_control,
+ keymap_s4_lc,
+ keymap_s4_uc,
};
/* Treat type 5 as type 4 (close enough) */