summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-08-23 23:38:08 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-08-23 23:38:08 +0000
commit8535feda839f1ae28d672fc7d72ade1f6b8cc06f (patch)
treedd7b67809babe9ae10f6d0f1bf1916c46647f7fe /sys
parent88589d6200be995404948503584ce3966f58abd6 (diff)
From NetBSD: new keymap handling (should be integrated with kbd later)
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amiga/stand/loadkmap/Makefile.inc13
-rw-r--r--sys/arch/amiga/stand/loadkmap/din/Makefile6
-rw-r--r--sys/arch/amiga/stand/loadkmap/din/din-kbdmap.c484
-rw-r--r--sys/arch/amiga/stand/loadkmap/sw/Makefile6
-rw-r--r--sys/arch/amiga/stand/loadkmap/sw/sw-kbdmap.c513
-rw-r--r--sys/arch/amiga/stand/loadkmap/us/Makefile6
-rw-r--r--sys/arch/amiga/stand/loadkmap/us/us-kbdmap.c481
7 files changed, 1509 insertions, 0 deletions
diff --git a/sys/arch/amiga/stand/loadkmap/Makefile.inc b/sys/arch/amiga/stand/loadkmap/Makefile.inc
new file mode 100644
index 00000000000..715255fa93d
--- /dev/null
+++ b/sys/arch/amiga/stand/loadkmap/Makefile.inc
@@ -0,0 +1,13 @@
+# $OpenBSD: Makefile.inc,v 1.1 1996/08/23 23:38:04 niklas Exp $
+# $NetBSD: Makefile.inc,v 1.1.2.3 1996/06/25 01:13:36 jtc Exp $
+
+BINDIR=$(DESTDIR)/usr/share/keymaps/amiga
+NOMAN=
+
+realinstall: ${PROG}
+.if !.exists(${BINDIR}(
+ mkdir -p ${BINDIR}
+.endif
+ ./${PROG} > ${BINDIR}/${MAP}
+ chmod 555 ${BINDIR}/${MAP}
+ chown ${BINOWN}.${BINGRP} ${BINDIR}/${MAP}
diff --git a/sys/arch/amiga/stand/loadkmap/din/Makefile b/sys/arch/amiga/stand/loadkmap/din/Makefile
new file mode 100644
index 00000000000..c69a17627cc
--- /dev/null
+++ b/sys/arch/amiga/stand/loadkmap/din/Makefile
@@ -0,0 +1,6 @@
+# $NetBSD: Makefile,v 1.2 1996/06/08 15:42:00 is Exp $
+
+PROG=din-kbdmap
+MAP=din.map
+
+.include <bsd.prog.mk>
diff --git a/sys/arch/amiga/stand/loadkmap/din/din-kbdmap.c b/sys/arch/amiga/stand/loadkmap/din/din-kbdmap.c
new file mode 100644
index 00000000000..087c2be2780
--- /dev/null
+++ b/sys/arch/amiga/stand/loadkmap/din/din-kbdmap.c
@@ -0,0 +1,484 @@
+/* $NetBSD: din-kbdmap.c,v 1.4.6.1 1996/06/08 16:03:59 is Exp $ */
+
+#include "../../../dev/kbdmap.h"
+
+/* define a default keymap. This can be changed by keyboard ioctl's
+ (later at least..) */
+
+/* mode shortcuts: */
+#define S KBD_MODE_STRING
+#define DG (KBD_MODE_DEAD | KBD_MODE_GRAVE)
+#define DA (KBD_MODE_DEAD | KBD_MODE_ACUTE)
+#define DC (KBD_MODE_DEAD | KBD_MODE_CIRC)
+#define DT (KBD_MODE_DEAD | KBD_MODE_TILDE)
+#define DD (KBD_MODE_DEAD | KBD_MODE_DIER)
+#define C KBD_MODE_CAPS
+#define K KBD_MODE_KPAD
+
+struct kbdmap kbdmap = {
+ /* normal map */
+ {
+ 0, '`', /* 0x00 */
+ 0, '1',
+ 0, '2',
+ 0, '3',
+ 0, '4',
+ 0, '5',
+ 0, '6',
+ 0, '7',
+ 0, '8', /* 0x08 */
+ 0, '9',
+ 0, '0',
+ 0, 'ß',
+ DA, '\'',
+ 0, '\\',
+ 0, 0,
+ K, '0',
+ C, 'q', /* 0x10 */
+ C, 'w',
+ C, 'e',
+ C, 'r',
+ C, 't',
+ C, 'z',
+ C, 'u',
+ C, 'i',
+ C, 'o', /* 0x18 */
+ C, 'p',
+ C, 'ü',
+ 0, '+',
+ 0, 0,
+ K, '1',
+ K, '2',
+ K, '3',
+ C, 'a', /* 0x20 */
+ C, 's',
+ C, 'd',
+ C, 'f',
+ C, 'g',
+ C, 'h',
+ C, 'j',
+ C, 'k',
+ C, 'l', /* 0x28 */
+ C, 'ö',
+ C, 'ä',
+ 0, '#',
+ 0, 0,
+ K, '4',
+ K, '5',
+ K, '6',
+ 0, '<', /* 0x30 */
+ C, 'y',
+ C, 'x',
+ C, 'c',
+ C, 'v',
+ C, 'b',
+ C, 'n',
+ C, 'm',
+ 0, ',', /* 0x38 */
+ 0, '.',
+ 0, '-',
+ 0, 0,
+ K, '.',
+ K, '7',
+ K, '8',
+ K, '9',
+ 0, ' ', /* 0x40 */
+ 0, DEL, /* really BS, DEL & BS swapped */
+ 0, '\t',
+ K, '\r', /* enter */
+ 0, '\r', /* return */
+ 0, ESC,
+ 0, '\b', /* really DEL, BS & DEL swapped */
+ 0, 0,
+ 0, 0, /* 0x48 */
+ 0, 0,
+ K, '-',
+ 0, 0,
+ S, 0x00, /* now it gets hairy.. CRSR UP */
+ S, 0x04, /* CRSR DOWN */
+ S, 0x08, /* CRSR RIGHT */
+ S, 0x0C, /* CRSR LEFT */
+ S, 0x10, /* 0x50 F1 */
+ S, 0x15, /* F2 */
+ S, 0x1A, /* F3 */
+ S, 0x1F, /* F4 */
+ S, 0x24, /* F5 */
+ S, 0x29, /* F6 */
+ S, 0x2E, /* F7 */
+ S, 0x33, /* F8 */
+ S, 0x38, /* 0x58 F9 */
+ S, 0x3D, /* F10 */
+ K, '[',
+ K, ']',
+ K, '/',
+ K, '*',
+ K, '+',
+ S, 0x42, /* HELP */
+ },
+
+ /* shifted map */
+ {
+ 0, '~', /* 0x00 */
+ 0, '!',
+ 0, '"',
+ 0, '§',
+ 0, '$',
+ 0, '%',
+ 0, '&',
+ 0, '/',
+ 0, '(', /* 0x08 */
+ 0, ')',
+ 0, '=',
+ 0, '?',
+ DG, '`',
+ 0, '|',
+ 0, 0,
+ K, '0',
+ C, 'Q', /* 0x10 */
+ C, 'W',
+ C, 'E',
+ C, 'R',
+ C, 'T',
+ C, 'Z',
+ C, 'U',
+ C, 'I',
+ C, 'O', /* 0x18 */
+ C, 'P',
+ C, 'Ü',
+ 0, '*',
+ 0, 0,
+ K, '1',
+ K, '2',
+ K, '3',
+ C, 'A', /* 0x20 */
+ C, 'S',
+ C, 'D',
+ C, 'F',
+ C, 'G',
+ C, 'H',
+ C, 'J',
+ C, 'K',
+ C, 'L', /* 0x28 */
+ C, 'Ö',
+ C, 'Ä',
+ 0, '^',
+ 0, 0,
+ K, '4',
+ K, '5',
+ K, '6',
+ 0, '>', /* 0x30 */
+ C, 'Y',
+ C, 'X',
+ C, 'C',
+ C, 'V',
+ C, 'B',
+ C, 'N',
+ C, 'M',
+ 0, ';', /* 0x38 */
+ 0, ':',
+ 0, '_',
+ 0, 0,
+ K, '.',
+ K, '7',
+ K, '8',
+ K, '9',
+ 0, ' ', /* 0x40 */
+ 0, DEL, /* really BS, DEL & BS swapped */
+ S, 0x99, /* shift TAB */
+ K, '\r', /* enter */
+ 0, '\r', /* return */
+ 0, ESC,
+ 0, '\b', /* really DEL, BS & DEL swapped */
+ 0, 0,
+ 0, 0, /* 0x48 */
+ 0, 0,
+ K, '-',
+ 0, 0,
+ S, 0x47, /* shift CRSR UP */
+ S, 0x4C, /* shift CRSR DOWN */
+ S, 0x51, /* shift CRSR RIGHT */
+ S, 0x57, /* shift CRSR LEFT */
+ S, 0x5D, /* 0x50 shift F1 */
+ S, 0x63, /* shift F2 */
+ S, 0x69, /* shift F3 */
+ S, 0x6F, /* shift F4 */
+ S, 0x75, /* shift F5 */
+ S, 0x7B, /* shift F6 */
+ S, 0x81, /* shift F7 */
+ S, 0x87, /* shift F8 */
+ S, 0x8D, /* 0x58 shift F9 */
+ S, 0x93, /* shift F10 */
+ K, '{',
+ K, '}',
+ K, '/',
+ K, '*',
+ K, '+',
+ S, 0x42, /* HELP (no special shift code) */
+ },
+
+
+ /* alt map */
+ {
+ 0, '`', /* 0x00 */
+ 0, '¹',
+ 0, '@',
+ 0, '³',
+ 0, '°',
+ 0, '¼',
+ 0, '½',
+ 0, '¾',
+ 0, '·', /* 0x08 */
+ 0, '«',
+ 0, '»',
+ 0, '-',
+ 0, '=',
+ 0, '\\',
+ 0, 0,
+ K, '0',
+ C, 'å', /* 0x10 */
+ 0, '°',
+ 0, '©',
+ 0, '®',
+ C, 'þ',
+ 0, '¤',
+ 0, 'µ',
+ 0, '¡',
+ C, 'ø', /* 0x18 */
+ 0, '¶',
+ 0, '[',
+ 0, ']',
+ 0, 0,
+ K, '1',
+ K, '2',
+ K, '3',
+ C, 'æ', /* 0x20 */
+ 0, 'ß',
+ C, 'ð',
+ DA, '\'',
+ DG, '`',
+ DC, '^',
+ DT, '~',
+ DD, '¨',
+ 0, '£', /* 0x28 */
+ 0, ';',
+ 0, '\'',
+ 0, 0,
+ 0, 0,
+ K, '4',
+ K, '5',
+ K, '6',
+ 0, '<', /* 0x30 */
+ 0, '±',
+ 0, '×',
+ C, 'ç',
+ 0, 'ª',
+ 0, 'º',
+ 0, '­',
+ 0, '¸',
+ 0, ',', /* 0x38 */
+ 0, '.',
+ 0, '/',
+ 0, 0,
+ K, '.',
+ K, '7',
+ K, '8',
+ K, '9',
+ 0, ' ', /* 0x40 */
+ 0, DEL, /* really BS, DEL & BS swapped */
+ 0, '\t',
+ K, '\r', /* enter */
+ 0, '\r', /* return */
+ S, 0x9d, /* CSI */
+ 0, '\b', /* really DEL, BS & DEL swapped */
+ 0, 0,
+ 0, 0, /* 0x48 */
+ 0, 0,
+ K, '-',
+ 0, 0,
+ S, 0x00, /* now it gets hairy.. CRSR UP */
+ S, 0x04, /* CRSR DOWN */
+ S, 0x08, /* CRSR RIGHT */
+ S, 0x0C, /* CRSR LEFT */
+ S, 0x10, /* 0x50 F1 */
+ S, 0x15, /* F2 */
+ S, 0x1A, /* F3 */
+ S, 0x1F, /* F4 */
+ S, 0x24, /* F5 */
+ S, 0x29, /* F6 */
+ S, 0x2E, /* F7 */
+ S, 0x33, /* F8 */
+ S, 0x38, /* 0x58 F9 */
+ S, 0x3D, /* F10 */
+ K, '[',
+ K, ']',
+ K, '/',
+ K, '*',
+ K, '+',
+ S, 0x42, /* HELP */
+ },
+
+ /* shift alt map */
+ {
+ 0, '~', /* 0x00 */
+ 0, '!',
+ 0, '²',
+ 0, '#',
+ 0, '¢',
+ 0, '%',
+ 0, '^',
+ 0, '&',
+ 0, '*', /* 0x08 */
+ 0, '(',
+ 0, ')',
+ 0, '_',
+ 0, '+',
+ 0, '|',
+ 0, 0,
+ K, '0',
+ C, 'Å', /* 0x10 */
+ 0, '°',
+ 0, '©',
+ 0, '®',
+ C, 'Þ',
+ 0, '¥',
+ 0, 'µ',
+ 0, '¦',
+ C, 'Ø', /* 0x18 */
+ 0, '¶',
+ 0, '{',
+ 0, '}',
+ 0, 0,
+ K, '1',
+ K, '2',
+ K, '3',
+ C, 'Æ', /* 0x20 */
+ 0, '§',
+ C, 'Ð',
+ DA, '\'',
+ DG, '`',
+ DC, '^',
+ DT, '~',
+ DD, '¨',
+ 0, '£', /* 0x28 */
+ 0, ':',
+ 0, '"',
+ 0, '^',
+ 0, 0,
+ K, '4',
+ K, '5',
+ K, '6',
+ 0, '>', /* 0x30 */
+ 0, '¬',
+ 0, '÷',
+ C, 'Ç',
+ 0, 'ª',
+ 0, 'º',
+ 0, '¯',
+ 0, '¿',
+ 0, '<', /* 0x38 */
+ 0, '>',
+ 0, '?',
+ 0, 0,
+ K, '.',
+ K, '7',
+ K, '8',
+ K, '9',
+ 0, ' ', /* 0x40 */
+ 0, DEL, /* really BS, DEL & BS swapped */
+ 0, '\t',
+ K, '\r', /* enter */
+ 0, '\r', /* return */
+ S, 0x9d, /* CSI */
+ 0, '\b', /* really DEL, BS & DEL swapped */
+ 0, 0,
+ 0, 0, /* 0x48 */
+ 0, 0,
+ K, '-',
+ 0, 0,
+ S, 0x00, /* now it gets hairy.. CRSR UP */
+ S, 0x04, /* CRSR DOWN */
+ S, 0x08, /* CRSR RIGHT */
+ S, 0x0C, /* CRSR LEFT */
+ S, 0x10, /* 0x50 F1 */
+ S, 0x15, /* F2 */
+ S, 0x1A, /* F3 */
+ S, 0x1F, /* F4 */
+ S, 0x24, /* F5 */
+ S, 0x29, /* F6 */
+ S, 0x2E, /* F7 */
+ S, 0x33, /* 0x58 F8 */
+ S, 0x38, /* F9 */
+ S, 0x3D, /* F10 */
+ K, '{',
+ K, '}',
+ K, '/',
+ K, '*',
+ K, '+',
+ S, 0x42, /* HELP */
+ },
+
+ {
+ /* string table. If there's a better way to get the offsets into the
+ above table, please tell me..
+
+ NOTE: save yourself and others a lot of grief by *not* using
+ CSI == 0x9b, using the two-character sequence gives
+ much less trouble, especially in GNU-Emacs.. */
+
+ 3, ESC, '[', 'A', /* 0x00: CRSR UP */
+ 3, ESC, '[', 'B', /* 0x04: CRSR DOWN */
+ 3, ESC, '[', 'C', /* 0x08: CRSR RIGHT */
+ 3, ESC, '[', 'D', /* 0x0C: CRSR LEFT */
+ 4, ESC, '[', '0', '~', /* 0x10: F1 */
+ 4, ESC, '[', '1', '~', /* 0x15: F2 */
+ 4, ESC, '[', '2', '~', /* 0x1A: F3 */
+ 4, ESC, '[', '3', '~', /* 0x1F: F4 */
+ 4, ESC, '[', '4', '~', /* 0x24: F5 */
+ 4, ESC, '[', '5', '~', /* 0x29: F6 */
+ 4, ESC, '[', '6', '~', /* 0x2E: F7 */
+ 4, ESC, '[', '7', '~', /* 0x33: F8 */
+ 4, ESC, '[', '8', '~', /* 0x38: F9 */
+ 4, ESC, '[', '9', '~', /* 0x3D: F10 */
+ 4, ESC, '[', '?', '~', /* 0x42: HELP */
+
+ 4, ESC, '[', 'T', '~', /* 0x47: shift CRSR UP */
+ 4, ESC, '[', 'S', '~', /* 0x4C: shift CRSR DOWN */
+ 5, ESC, '[', ' ', '@', '~', /* 0x51: shift CRSR RIGHT */
+ 5, ESC, '[', ' ', 'A', '~', /* 0x57: shift CRSR LEFT */
+ 5, ESC, '[', '1', '0', '~', /* 0x5D: shift F1 */
+ 5, ESC, '[', '1', '1', '~', /* 0x63: shift F2 */
+ 5, ESC, '[', '1', '2', '~', /* 0x69: shift F3 */
+ 5, ESC, '[', '1', '3', '~', /* 0x6F: shift F4 */
+ 5, ESC, '[', '1', '4', '~', /* 0x75: shift F5 */
+ 5, ESC, '[', '1', '5', '~', /* 0x7B: shift F6 */
+ 5, ESC, '[', '1', '6', '~', /* 0x81: shift F7 */
+ 5, ESC, '[', '1', '7', '~', /* 0x87: shift F8 */
+ 5, ESC, '[', '1', '8', '~', /* 0x8D: shift F9 */
+ 5, ESC, '[', '1', '9', '~', /* 0x93: shift F10 */
+ 3, ESC, '[', 'Z', /* 0x99: shift TAB */
+ 2, ESC, '[', /* 0x9D: alt ESC == CSI */
+ },
+};
+
+unsigned char acctable[KBD_NUM_ACC][64] = {
+ { "@ÀBCDÈFGHÌJKLMNÒPQRSTÙVWXYZ[\\]^_"
+ "`àbcdèfghìjklmnòpqrstùvwxyz{|}~\177"}, /* KBD_ACC_GRAVE */
+
+ { "@ÁBCDÉFGHÍJKLMNÓPQRSTÚVWXYZ[\\]^_"
+ "`ábcdéfghíjklmnópqrstúvwxyz{|}~\177"}, /* KBD_ACC_ACUTE */
+
+ { "@ÂBCDÊFGHÎJKLMNÔPQRSTÛVWXYZ[\\]^_"
+ "`âbcdêfghîjklmnôpqrstûvwxyz{|}~\177"}, /* KBD_ACC_CIRC */
+
+ { "@ÃBCDEFGHIJKLMÑÕPQRSTUVWXYZ[\\]^_"
+ "`ãbcdefghijklmñÕpqrstuvwxyz{|}~\177"}, /* KBD_ACC_TILDE */
+
+ { "@ÄBCDËFGHÏJKLMNÖPQRSTÜVWXYZ[\\]^_"
+ "`äbcdëfghïjklmnöpqrstüvwxyz{|}~\177"}, /* KBD_ACC_DIER */
+};
+
+
+main()
+{
+ write (1, &kbdmap, sizeof (kbdmap));
+}
diff --git a/sys/arch/amiga/stand/loadkmap/sw/Makefile b/sys/arch/amiga/stand/loadkmap/sw/Makefile
new file mode 100644
index 00000000000..524206f93d6
--- /dev/null
+++ b/sys/arch/amiga/stand/loadkmap/sw/Makefile
@@ -0,0 +1,6 @@
+# $NetBSD: Makefile,v 1.2.2.1 1996/07/31 16:11:27 jtc Exp $
+
+PROG=sw-kbdmap
+MAP=sw.map
+
+.include <bsd.prog.mk>
diff --git a/sys/arch/amiga/stand/loadkmap/sw/sw-kbdmap.c b/sys/arch/amiga/stand/loadkmap/sw/sw-kbdmap.c
new file mode 100644
index 00000000000..1f31b730c60
--- /dev/null
+++ b/sys/arch/amiga/stand/loadkmap/sw/sw-kbdmap.c
@@ -0,0 +1,513 @@
+/* $NetBSD: sw-kbdmap.c,v 1.2.4.1 1996/06/08 16:04:02 is Exp $ */
+
+/*
+ * Copyright (c) 1993 Markus Wild
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Markus Wild.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "../../../dev/kbdmap.h"
+
+/* define a default keymap. This can be changed by keyboard ioctl's
+ (later at least..) */
+/*
+ * Modified to standard swedish keyboard layout by Stefan Pedersen
+ * di4ped@cse.hks.se 960103
+*/
+
+/* mode shortcuts: */
+#define S KBD_MODE_STRING
+#define DG (KBD_MODE_DEAD | KBD_MODE_GRAVE)
+#define DA (KBD_MODE_DEAD | KBD_MODE_ACUTE)
+#define DC (KBD_MODE_DEAD | KBD_MODE_CIRC)
+#define DT (KBD_MODE_DEAD | KBD_MODE_TILDE)
+#define DD (KBD_MODE_DEAD | KBD_MODE_DIER)
+#define C KBD_MODE_CAPS
+#define K KBD_MODE_KPAD
+
+struct kbdmap kbdmap = {
+ /* normal map */
+ {
+ 0, '`', /* 0x00 */
+ 0, '1',
+ 0, '2',
+ 0, '3',
+ 0, '4',
+ 0, '5',
+ 0, '6',
+ 0, '7',
+ 0, '8', /* 0x08 */
+ 0, '9',
+ 0, '0',
+ 0, '+',
+ 0, '\'',
+ 0, '\\',
+ 0, 0,
+ K, '0',
+ C, 'q', /* 0x10 */
+ C, 'w',
+ C, 'e',
+ C, 'r',
+ C, 't',
+ C, 'y',
+ C, 'u',
+ C, 'i',
+ C, 'o', /* 0x18 */
+ C, 'p',
+ C, 'â',
+ 0, ']',
+ 0, 0,
+ K, '1',
+ K, '2',
+ K, '3',
+ C, 'a', /* 0x20 */
+ C, 's',
+ C, 'd',
+ C, 'f',
+ C, 'g',
+ C, 'h',
+ C, 'j',
+ C, 'k',
+ C, 'l', /* 0x28 */
+ C, 'ö',
+ C, 'ä',
+ C, '\'',
+ 0, 0,
+ K, '4',
+ K, '5',
+ K, '6',
+ 0, '<', /* 0x30 */
+ C, 'z',
+ C, 'x',
+ C, 'c',
+ C, 'v',
+ C, 'b',
+ C, 'n',
+ C, 'm',
+ 0, ',', /* 0x38 */
+ 0, '.',
+ 0, '-',
+ 0, 0,
+ K, '.',
+ K, '7',
+ K, '8',
+ K, '9',
+ 0, ' ', /* 0x40 */
+ 0, DEL, /* really BS, DEL & BS swapped */
+ 0, '\t',
+ K, '\r', /* enter */
+ 0, '\r', /* return */
+ 0, ESC,
+ 0, '\b', /* really DEL, BS & DEL swapped */
+ 0, 0,
+ 0, 0, /* 0x48 */
+ 0, 0,
+ 0, '-',
+ 0, 0,
+ S, 0x00, /* now it gets hairy.. CRSR UP */
+ S, 0x04, /* CRSR DOWN */
+ S, 0x08, /* CRSR RIGHT */
+ S, 0x0C, /* CRSR LEFT */
+ S, 0x10, /* 0x50 F1 */
+ S, 0x15, /* F2 */
+ S, 0x1A, /* F3 */
+ S, 0x1F, /* F4 */
+ S, 0x24, /* F5 */
+ S, 0x29, /* F6 */
+ S, 0x2E, /* F7 */
+ S, 0x33, /* 0x58 F8 */
+ S, 0x38, /* F9 */
+ S, 0x3D, /* F10 */
+ K, '[',
+ K, ']',
+ K, '/',
+ K, '*',
+ S, 0x42, /* HELP */
+ },
+
+ /* shifted map */
+ {
+ 0, '~', /* 0x00 */
+ 0, '!',
+ 0, '\"',
+ 0, '#',
+ 0, '$',
+ 0, '%',
+ 0, '&',
+ 0, '/',
+ 0, '(', /* 0x08 */
+ 0, ')',
+ 0, '=',
+ 0, '?',
+ 0, '`',
+ 0, '|',
+ 0, 0,
+ K, '0',
+ C, 'Q', /* 0x10 */
+ C, 'W',
+ C, 'E',
+ C, 'R',
+ C, 'T',
+ C, 'Y',
+ C, 'U',
+ C, 'I',
+ C, 'O', /* 0x18 */
+ C, 'P',
+ C, 'Â',
+ C, '^',
+ 0, 0,
+ K, '1',
+ K, '2',
+ K, '3',
+ C, 'A', /* 0x20 */
+ C, 'S',
+ C, 'D',
+ C, 'F',
+ C, 'G',
+ C, 'H',
+ C, 'J',
+ C, 'K',
+ C, 'L', /* 0x28 */
+ C, 'Ö',
+ C, 'Ä',
+ C, '*',
+ 0, 0,
+ K, '4',
+ K, '5',
+ K, '6',
+ 0, '>', /* 0x30 */
+ C, 'Z',
+ C, 'X',
+ C, 'C',
+ C, 'V',
+ C, 'B',
+ C, 'N',
+ C, 'M',
+ 0, ';', /* 0x38 */
+ 0, ':',
+ 0, '_',
+ 0, 0,
+ K, '.',
+ K, '7',
+ K, '8',
+ K, '9',
+ 0, ' ', /* 0x40 */
+ 0, DEL, /* really BS, DEL & BS swapped */
+ S, 0x99, /* shift TAB */
+ K, '\r', /* enter */
+ 0, '\r', /* return */
+ 0, ESC,
+ 0, '\b', /* really DEL, BS & DEL swapped */
+ 0, 0,
+ 0, 0, /* 0x48 */
+ 0, 0,
+ K, '-',
+ 0, 0,
+ S, 0x47, /* shift CRSR UP */
+ S, 0x4C, /* shift CRSR DOWN */
+ S, 0x51, /* shift CRSR RIGHT */
+ S, 0x57, /* shift CRSR LEFT */
+ S, 0x5D, /* 0x50 shift F1 */
+ S, 0x63, /* shift F2 */
+ S, 0x69, /* shift F3 */
+ S, 0x6F, /* shift F4 */
+ S, 0x75, /* shift F5 */
+ S, 0x7B, /* shift F6 */
+ S, 0x81, /* shift F7 */
+ S, 0x87, /* 0x58 shift F8 */
+ S, 0x8D, /* shift F9 */
+ S, 0x93, /* shift F10 */
+ K, '{',
+ K, '}',
+ K, '/',
+ K, '*',
+ S, 0x42, /* HELP (no special shift code) */
+ },
+
+
+ /* alt map */
+ {
+ 0, '`', /* 0x00 */
+ 0, '¹',
+ 0, '²',
+ 0, '³',
+ 0, '¢',
+ 0, '¼',
+ 0, '½',
+ 0, '¾',
+ 0, '·', /* 0x08 */
+ 0, '«',
+ 0, '»',
+ 0, '-',
+ 0, '=',
+ 0, '\\',
+ 0, 0,
+ K, '0',
+ C, 'å', /* 0x10 */
+ 0, '°',
+ 0, '©',
+ 0, '®',
+ C, 'þ',
+ 0, '¤',
+ 0, 'µ',
+ 0, '¡',
+ C, 'ø', /* 0x18 */
+ 0, '¶',
+ 0, '[',
+ 0, ']',
+ 0, 0,
+ K, '1',
+ K, '2',
+ K, '3',
+ C, 'æ', /* 0x20 */
+ 0, 'ß',
+ C, 'ð',
+ DA, '´',
+ DG, '`',
+ DC, '^',
+ DT, '~',
+ DD, '¨',
+ 0, '£', /* 0x28 */
+ 0, ',',
+ 0, '\'',
+ 0, 0,
+ 0, 0,
+ K, '4',
+ K, '5',
+ K, '6',
+ 0, 0, /* 0x30 */
+ 0, '±',
+ 0, '×',
+ C, 'ç',
+ 0, 'ª',
+ 0, 'º',
+ 0, '­',
+ 0, '¸',
+ 0, ',', /* 0x38 */
+ 0, '.',
+ 0, '/',
+ 0, 0,
+ K, '.',
+ K, '7',
+ K, '8',
+ K, '9',
+ 0, ' ', /* 0x40 */
+ 0, DEL, /* really BS, DEL & BS swapped */
+ 0, '\t',
+ K, '\r', /* enter */
+ 0, '\r', /* return */
+ S, 0x9d, /* CSI */
+ 0, '\b', /* really DEL, BS & DEL swapped */
+ 0, 0,
+ 0, 0, /* 0x48 */
+ 0, 0,
+ K, '-',
+ 0, 0,
+ S, 0x00, /* now it gets hairy.. CRSR UP */
+ S, 0x04, /* CRSR DOWN */
+ S, 0x08, /* CRSR RIGHT */
+ S, 0x0C, /* CRSR LEFT */
+ S, 0x10, /* 0x50 F1 */
+ S, 0x15, /* F2 */
+ S, 0x1A, /* F3 */
+ S, 0x1F, /* F4 */
+ S, 0x24, /* F5 */
+ S, 0x29, /* F6 */
+ S, 0x2E, /* F7 */
+ S, 0x33, /* 0x58 F8 */
+ S, 0x38, /* F9 */
+ S, 0x3D, /* F10 */
+ K, '(',
+ K, ')',
+ K, '/',
+ K, '*',
+ S, 0x42, /* HELP */
+ },
+
+ /* shift alt map */
+ {
+ 0, '~', /* 0x00 */
+ 0, '!',
+ 0, '@',
+ 0, '#',
+ 0, '$',
+ 0, '%',
+ 0, '^',
+ 0, '&',
+ 0, '*', /* 0x08 */
+ 0, '(',
+ 0, ')',
+ 0, '_',
+ 0, '+',
+ 0, '|',
+ 0, 0,
+ K, '0',
+ C, 'Å', /* 0x10 */
+ 0, '°',
+ 0, '©',
+ 0, '®',
+ C, 'Þ',
+ 0, '¥',
+ 0, 'µ',
+ 0, '¦',
+ C, 'Ø', /* 0x18 */
+ 0, '¶',
+ 0, '[',
+ 0, ']',
+ 0, 0,
+ K, '1',
+ K, '2',
+ K, '3',
+ C, 'Æ', /* 0x20 */
+ 0, '§',
+ C, 'Ð',
+ DA, '´',
+ DG, '`',
+ DC, '^',
+ DT, '~',
+ DD, '¨',
+ 0, '£', /* 0x28 */
+ 0, ':',
+ 0, '\"',
+ 0, 0,
+ 0, 0,
+ K, '4',
+ K, '5',
+ K, '6',
+ 0, 0, /* 0x30 */
+ 0, '±',
+ 0, '×',
+ C, 'ç',
+ 0, 'ª',
+ 0, 'º',
+ 0, '­',
+ 0, '¸',
+ 0, '<', /* 0x38 */
+ 0, '>',
+ 0, '?',
+ 0, 0,
+ K, '.',
+ K, '7',
+ K, '8',
+ K, '9',
+ 0, ' ', /* 0x40 */
+ 0, DEL, /* really BS, DEL & BS swapped */
+ 0, '\t',
+ K, '\r', /* enter */
+ 0, '\r', /* return */
+ S, 0x9d, /* CSI */
+ 0, '\b', /* really DEL, BS & DEL swapped */
+ 0, 0,
+ 0, 0, /* 0x48 */
+ 0, 0,
+ K, '-',
+ 0, 0,
+ S, 0x00, /* now it gets hairy.. CRSR UP */
+ S, 0x04, /* CRSR DOWN */
+ S, 0x08, /* CRSR RIGHT */
+ S, 0x0C, /* CRSR LEFT */
+ S, 0x10, /* 0x50 F1 */
+ S, 0x15, /* F2 */
+ S, 0x1A, /* F3 */
+ S, 0x1F, /* F4 */
+ S, 0x24, /* F5 */
+ S, 0x29, /* F6 */
+ S, 0x2E, /* F7 */
+ S, 0x33, /* 0x58 F8 */
+ S, 0x38, /* F9 */
+ S, 0x3D, /* F10 */
+ K, '(',
+ K, ')',
+ K, '/',
+ K, '*',
+ S, 0x42, /* HELP */
+ },
+
+ {
+ /* string table. If there's a better way to get the offsets into the
+ above table, please tell me..
+
+ NOTE: save yourself and others a lot of grief by *not* using
+ CSI == 0x9b, using the two-character sequence gives
+ much less trouble, especially in GNU-Emacs.. */
+
+ 3, ESC, '[', 'A', /* 0x00: CRSR UP */
+ 3, ESC, '[', 'B', /* 0x04: CRSR DOWN */
+ 3, ESC, '[', 'C', /* 0x08: CRSR RIGHT */
+ 3, ESC, '[', 'D', /* 0x0C: CRSR LEFT */
+ 4, ESC, '[', '0', '~', /* 0x10: F1 */
+ 4, ESC, '[', '1', '~', /* 0x15: F2 */
+ 4, ESC, '[', '2', '~', /* 0x1A: F3 */
+ 4, ESC, '[', '3', '~', /* 0x1F: F4 */
+ 4, ESC, '[', '4', '~', /* 0x24: F5 */
+ 4, ESC, '[', '5', '~', /* 0x29: F6 */
+ 4, ESC, '[', '6', '~', /* 0x2E: F7 */
+ 4, ESC, '[', '7', '~', /* 0x33: F8 */
+ 4, ESC, '[', '8', '~', /* 0x38: F9 */
+ 4, ESC, '[', '9', '~', /* 0x3D: F10 */
+ 4, ESC, '[', '?', '~', /* 0x42: HELP */
+
+ 4, ESC, '[', 'T', '~', /* 0x47: shift CRSR UP */
+ 4, ESC, '[', 'S', '~', /* 0x4C: shift CRSR DOWN */
+ 5, ESC, '[', ' ', '@', '~', /* 0x51: shift CRSR RIGHT */
+ 5, ESC, '[', ' ', 'A', '~', /* 0x57: shift CRSR LEFT */
+ 5, ESC, '[', '1', '0', '~', /* 0x5D: shift F1 */
+ 5, ESC, '[', '1', '1', '~', /* 0x63: shift F2 */
+ 5, ESC, '[', '1', '2', '~', /* 0x69: shift F3 */
+ 5, ESC, '[', '1', '3', '~', /* 0x6F: shift F4 */
+ 5, ESC, '[', '1', '4', '~', /* 0x75: shift F5 */
+ 5, ESC, '[', '1', '5', '~', /* 0x7B: shift F6 */
+ 5, ESC, '[', '1', '6', '~', /* 0x81: shift F7 */
+ 5, ESC, '[', '1', '7', '~', /* 0x87: shift F8 */
+ 5, ESC, '[', '1', '8', '~', /* 0x8D: shift F9 */
+ 5, ESC, '[', '1', '9', '~', /* 0x93: shift F10 */
+ 3, ESC, '[', 'Z', /* 0x99: shift TAB */
+ 2, ESC, '[', /* 0x9d: alt ESC == CSI */
+ },
+};
+
+unsigned char acctable[KBD_NUM_ACC][64] = {
+ { "@ÀBCDÈFGHÌJKLMNÒPQRSTÙVWXYZ[\\]^_"
+ "`àbcdèfghìjklmnòpqrstùvwxyz{|}~\177"}, /* KBD_ACC_GRAVE */
+
+ { "@ÁBCDÉFGHÍJKLMNÓPQRSTÚVWXYZ[\\]^_"
+ "`ábcdéfghíjklmnópqrstúvwxyz{|}~\177"}, /* KBD_ACC_ACUTE */
+
+ { "@ÂBCDÊFGHÎJKLMNÔPQRSTÛVWXYZ[\\]^_"
+ "`âbcdêfghîjklmnôpqrstûvwxyz{|}~\177"}, /* KBD_ACC_CIRC */
+
+ { "@ÃBCDEFGHIJKLMÑÕPQRSTUVWXYZ[\\]^_"
+ "`ãbcdefghijklmñÕpqrstuvwxyz{|}~\177"}, /* KBD_ACC_TILDE */
+
+ { "@ÄBCDËFGHÏJKLMNÖPQRSTÜVWXYZ[\\]^_"
+ "`äbcdëfghïjklmnöpqrstüvwxyz{|}~\177"}, /* KBD_ACC_DIER */
+};
+
+
+main()
+{
+ write (1, &kbdmap, sizeof (kbdmap));
+}
diff --git a/sys/arch/amiga/stand/loadkmap/us/Makefile b/sys/arch/amiga/stand/loadkmap/us/Makefile
new file mode 100644
index 00000000000..3f3ffc216b4
--- /dev/null
+++ b/sys/arch/amiga/stand/loadkmap/us/Makefile
@@ -0,0 +1,6 @@
+# $NetBSD: Makefile,v 1.2 1996/06/08 15:42:03 is Exp $
+
+PROG=us-kbdmap
+MAP=us.map
+
+.include <bsd.prog.mk>
diff --git a/sys/arch/amiga/stand/loadkmap/us/us-kbdmap.c b/sys/arch/amiga/stand/loadkmap/us/us-kbdmap.c
new file mode 100644
index 00000000000..cfb5f9900a6
--- /dev/null
+++ b/sys/arch/amiga/stand/loadkmap/us/us-kbdmap.c
@@ -0,0 +1,481 @@
+/* $NetBSD: us-kbdmap.c,v 1.3.6.1 1996/06/08 16:04:03 is Exp $ */
+
+#include "../../../dev/kbdmap.h"
+
+/* define a default keymap. This can be changed by keyboard ioctl's
+ (later at least..) */
+
+/* mode shortcuts: */
+#define S KBD_MODE_STRING
+#define DG (KBD_MODE_DEAD | KBD_MODE_GRAVE)
+#define DA (KBD_MODE_DEAD | KBD_MODE_ACUTE)
+#define DC (KBD_MODE_DEAD | KBD_MODE_CIRC)
+#define DT (KBD_MODE_DEAD | KBD_MODE_TILDE)
+#define DD (KBD_MODE_DEAD | KBD_MODE_DIER)
+#define C KBD_MODE_CAPS
+#define K KBD_MODE_KPAD
+
+struct kbdmap kbdmap = {
+ /* normal map */
+ {
+ 0, '`', /* 0x00 */
+ 0, '1',
+ 0, '2',
+ 0, '3',
+ 0, '4',
+ 0, '5',
+ 0, '6',
+ 0, '7',
+ 0, '8', /* 0x08 */
+ 0, '9',
+ 0, '0',
+ 0, '-',
+ 0, '=',
+ 0, '\\',
+ 0, 0,
+ K, '0',
+ C, 'q', /* 0x10 */
+ C, 'w',
+ C, 'e',
+ C, 'r',
+ C, 't',
+ C, 'y',
+ C, 'u',
+ C, 'i',
+ C, 'o', /* 0x18 */
+ C, 'p',
+ 0, '[',
+ 0, ']',
+ 0, 0,
+ K, '1',
+ K, '2',
+ K, '3',
+ C, 'a', /* 0x20 */
+ C, 's',
+ C, 'd',
+ C, 'f',
+ C, 'g',
+ C, 'h',
+ C, 'j',
+ C, 'k',
+ C, 'l', /* 0x28 */
+ 0, ';',
+ 0, '\'',
+ 0, 0,
+ 0, 0,
+ K, '4',
+ K, '5',
+ K, '6',
+ 0, 0, /* 0x30 */
+ C, 'z',
+ C, 'x',
+ C, 'c',
+ C, 'v',
+ C, 'b',
+ C, 'n',
+ C, 'm',
+ 0, ',', /* 0x38 */
+ 0, '.',
+ 0, '/',
+ 0, 0,
+ K, '.',
+ K, '7',
+ K, '8',
+ K, '9',
+ 0, ' ', /* 0x40 */
+ 0, DEL, /* really BS, DEL & BS swapped */
+ 0, '\t',
+ K, '\r', /* enter */
+ 0, '\r', /* return */
+ 0, ESC,
+ 0, '\b', /* really DEL, BS & DEL swapped */
+ 0, 0,
+ 0, 0, /* 0x48 */
+ 0, 0,
+ K, '-',
+ 0, 0,
+ S, 0x00, /* now it gets hairy.. CRSR UP */
+ S, 0x04, /* CRSR DOWN */
+ S, 0x08, /* CRSR RIGHT */
+ S, 0x0C, /* CRSR LEFT */
+ S, 0x10, /* 0x50 F1 */
+ S, 0x15, /* F2 */
+ S, 0x1A, /* F3 */
+ S, 0x1F, /* F4 */
+ S, 0x24, /* F5 */
+ S, 0x29, /* F6 */
+ S, 0x2E, /* F7 */
+ S, 0x33, /* 0x58 F8 */
+ S, 0x38, /* F9 */
+ S, 0x3D, /* F10 */
+ K, '(',
+ K, ')',
+ K, '/',
+ K, '*',
+ S, 0x42, /* HELP */
+ },
+
+ /* shifted map */
+ {
+ 0, '~', /* 0x00 */
+ 0, '!',
+ 0, '@',
+ 0, '#',
+ 0, '$',
+ 0, '%',
+ 0, '^',
+ 0, '&',
+ 0, '*', /* 0x08 */
+ 0, '(',
+ 0, ')',
+ 0, '_',
+ 0, '+',
+ 0, '|',
+ 0, 0,
+ K, '0',
+ C, 'Q', /* 0x10 */
+ C, 'W',
+ C, 'E',
+ C, 'R',
+ C, 'T',
+ C, 'Y',
+ C, 'U',
+ C, 'I',
+ C, 'O', /* 0x18 */
+ C, 'P',
+ 0, '{',
+ 0, '}',
+ 0, 0,
+ K, '1',
+ K, '2',
+ K, '3',
+ C, 'A', /* 0x20 */
+ C, 'S',
+ C, 'D',
+ C, 'F',
+ C, 'G',
+ C, 'H',
+ C, 'J',
+ C, 'K',
+ C, 'L', /* 0x28 */
+ 0, ':',
+ 0, '\"',
+ 0, 0,
+ 0, 0,
+ K, '4',
+ K, '5',
+ K, '6',
+ 0, 0, /* 0x30 */
+ C, 'Z',
+ C, 'X',
+ C, 'C',
+ C, 'V',
+ C, 'B',
+ C, 'N',
+ C, 'M',
+ 0, '<', /* 0x38 */
+ 0, '>',
+ 0, '?',
+ 0, 0,
+ K, '.',
+ K, '7',
+ K, '8',
+ K, '9',
+ 0, ' ', /* 0x40 */
+ 0, DEL, /* really BS, DEL & BS swapped */
+ S, 0x99, /* shift TAB */
+ K, '\r', /* enter */
+ 0, '\r', /* return */
+ 0, ESC,
+ 0, '\b', /* really DEL, BS & DEL swapped */
+ 0, 0,
+ 0, 0, /* 0x48 */
+ 0, 0,
+ K, '-',
+ 0, 0,
+ S, 0x47, /* shift CRSR UP */
+ S, 0x4C, /* shift CRSR DOWN */
+ S, 0x51, /* shift CRSR RIGHT */
+ S, 0x57, /* shift CRSR LEFT */
+ S, 0x5D, /* 0x50 shift F1 */
+ S, 0x63, /* shift F2 */
+ S, 0x69, /* shift F3 */
+ S, 0x6F, /* shift F4 */
+ S, 0x75, /* shift F5 */
+ S, 0x7B, /* shift F6 */
+ S, 0x81, /* shift F7 */
+ S, 0x87, /* 0x58 shift F8 */
+ S, 0x8D, /* shift F9 */
+ S, 0x93, /* shift F10 */
+ K, '(',
+ K, ')',
+ K, '/',
+ K, '*',
+ S, 0x42, /* HELP (no special shift code) */
+ },
+
+
+ /* alt map */
+ {
+ 0, '`', /* 0x00 */
+ 0, '¹',
+ 0, '²',
+ 0, '³',
+ 0, '¢',
+ 0, '¼',
+ 0, '½',
+ 0, '¾',
+ 0, '·', /* 0x08 */
+ 0, '«',
+ 0, '»',
+ 0, '-',
+ 0, '=',
+ 0, '\\',
+ 0, 0,
+ K, '0',
+ C, 'å', /* 0x10 */
+ 0, '°',
+ 0, '©',
+ 0, '®',
+ C, 'þ',
+ 0, '¤',
+ 0, 'µ',
+ 0, '¡',
+ C, 'ø', /* 0x18 */
+ 0, '¶',
+ 0, '[',
+ 0, ']',
+ 0, 0,
+ K, '1',
+ K, '2',
+ K, '3',
+ C, 'æ', /* 0x20 */
+ 0, 'ß',
+ C, 'ð',
+ DA, '´',
+ DG, '`',
+ DC, '^',
+ DT, '~',
+ DD, '¨',
+ 0, '£', /* 0x28 */
+ 0, ';',
+ 0, '\'',
+ 0, 0,
+ 0, 0,
+ K, '4',
+ K, '5',
+ K, '6',
+ 0, 0, /* 0x30 */
+ 0, '±',
+ 0, '×',
+ C, 'ç',
+ 0, 'ª',
+ 0, 'º',
+ 0, '­',
+ 0, '¸',
+ 0, ',', /* 0x38 */
+ 0, '.',
+ 0, '/',
+ 0, 0,
+ K, '.',
+ K, '7',
+ K, '8',
+ K, '9',
+ 0, ' ', /* 0x40 */
+ 0, DEL, /* really BS, DEL & BS swapped */
+ 0, '\t',
+ K, '\r', /* enter */
+ 0, '\r', /* return */
+ S, 0x9d, /* CSI */
+ 0, '\b', /* really DEL, BS & DEL swapped */
+ 0, 0,
+ 0, 0, /* 0x48 */
+ 0, 0,
+ K, '-',
+ 0, 0,
+ S, 0x00, /* now it gets hairy.. CRSR UP */
+ S, 0x04, /* CRSR DOWN */
+ S, 0x08, /* CRSR RIGHT */
+ S, 0x0C, /* CRSR LEFT */
+ S, 0x10, /* 0x50 F1 */
+ S, 0x15, /* F2 */
+ S, 0x1A, /* F3 */
+ S, 0x1F, /* F4 */
+ S, 0x24, /* F5 */
+ S, 0x29, /* F6 */
+ S, 0x2E, /* F7 */
+ S, 0x33, /* 0x58 F8 */
+ S, 0x38, /* F9 */
+ S, 0x3D, /* F10 */
+ K, '(',
+ K, ')',
+ K, '/',
+ K, '*',
+ S, 0x42, /* HELP */
+ },
+
+ /* shift alt map */
+ {
+ 0, '~', /* 0x00 */
+ 0, '!',
+ 0, '@',
+ 0, '#',
+ 0, '$',
+ 0, '%',
+ 0, '^',
+ 0, '&',
+ 0, '*', /* 0x08 */
+ 0, '(',
+ 0, ')',
+ 0, '_',
+ 0, '+',
+ 0, '|',
+ 0, 0,
+ K, '0',
+ C, 'Å', /* 0x10 */
+ 0, '°',
+ 0, '©',
+ 0, '®',
+ C, 'Þ',
+ 0, '¥',
+ 0, 'µ',
+ 0, '¦',
+ C, 'Ø', /* 0x18 */
+ 0, '¶',
+ 0, '[',
+ 0, ']',
+ 0, 0,
+ K, '1',
+ K, '2',
+ K, '3',
+ C, 'Æ', /* 0x20 */
+ 0, '§',
+ C, 'Ð',
+ DA, '´',
+ DG, '`',
+ DC, '^',
+ DT, '~',
+ DD, '¨',
+ 0, '£', /* 0x28 */
+ 0, ';',
+ 0, '\'',
+ 0, 0,
+ 0, 0,
+ K, '4',
+ K, '5',
+ K, '6',
+ 0, 0, /* 0x30 */
+ 0, '±',
+ 0, '×',
+ C, 'ç',
+ 0, 'ª',
+ 0, 'º',
+ 0, '­',
+ 0, '¸',
+ 0, ',', /* 0x38 */
+ 0, '.',
+ 0, '/',
+ 0, 0,
+ K, '.',
+ K, '7',
+ K, '8',
+ K, '9',
+ 0, ' ', /* 0x40 */
+ 0, DEL, /* really BS, DEL & BS swapped */
+ 0, '\t',
+ K, '\r', /* enter */
+ 0, '\r', /* return */
+ S, 0x9d, /* CSI */
+ 0, '\b', /* really DEL, BS & DEL swapped */
+ 0, 0,
+ 0, 0, /* 0x48 */
+ 0, 0,
+ K, '-',
+ 0, 0,
+ S, 0x00, /* now it gets hairy.. CRSR UP */
+ S, 0x04, /* CRSR DOWN */
+ S, 0x08, /* CRSR RIGHT */
+ S, 0x0C, /* CRSR LEFT */
+ S, 0x10, /* 0x50 F1 */
+ S, 0x15, /* F2 */
+ S, 0x1A, /* F3 */
+ S, 0x1F, /* F4 */
+ S, 0x24, /* F5 */
+ S, 0x29, /* F6 */
+ S, 0x2E, /* F7 */
+ S, 0x33, /* 0x58 F8 */
+ S, 0x38, /* F9 */
+ S, 0x3D, /* F10 */
+ K, '(',
+ K, ')',
+ K, '/',
+ K, '*',
+ S, 0x42, /* HELP */
+ },
+
+ {
+ /* string table. If there's a better way to get the offsets into the
+ above table, please tell me..
+
+ NOTE: save yourself and others a lot of grief by *not* using
+ CSI == 0x9b, using the two-character sequence gives
+ much less trouble, especially in GNU-Emacs.. */
+
+ 3, ESC, '[', 'A', /* 0x00: CRSR UP */
+ 3, ESC, '[', 'B', /* 0x04: CRSR DOWN */
+ 3, ESC, '[', 'C', /* 0x08: CRSR RIGHT */
+ 3, ESC, '[', 'D', /* 0x0C: CRSR LEFT */
+ 4, ESC, '[', '0', '~', /* 0x10: F1 */
+ 4, ESC, '[', '1', '~', /* 0x15: F2 */
+ 4, ESC, '[', '2', '~', /* 0x1A: F3 */
+ 4, ESC, '[', '3', '~', /* 0x1F: F4 */
+ 4, ESC, '[', '4', '~', /* 0x24: F5 */
+ 4, ESC, '[', '5', '~', /* 0x29: F6 */
+ 4, ESC, '[', '6', '~', /* 0x2E: F7 */
+ 4, ESC, '[', '7', '~', /* 0x33: F8 */
+ 4, ESC, '[', '8', '~', /* 0x38: F9 */
+ 4, ESC, '[', '9', '~', /* 0x3D: F10 */
+ 4, ESC, '[', '?', '~', /* 0x42: HELP */
+
+ 4, ESC, '[', 'T', '~', /* 0x47: shift CRSR UP */
+ 4, ESC, '[', 'S', '~', /* 0x4C: shift CRSR DOWN */
+ 5, ESC, '[', ' ', '@', '~', /* 0x51: shift CRSR RIGHT */
+ 5, ESC, '[', ' ', 'A', '~', /* 0x57: shift CRSR LEFT */
+ 5, ESC, '[', '1', '0', '~', /* 0x5D: shift F1 */
+ 5, ESC, '[', '1', '1', '~', /* 0x63: shift F2 */
+ 5, ESC, '[', '1', '2', '~', /* 0x69: shift F3 */
+ 5, ESC, '[', '1', '3', '~', /* 0x6F: shift F4 */
+ 5, ESC, '[', '1', '4', '~', /* 0x75: shift F5 */
+ 5, ESC, '[', '1', '5', '~', /* 0x7B: shift F6 */
+ 5, ESC, '[', '1', '6', '~', /* 0x81: shift F7 */
+ 5, ESC, '[', '1', '7', '~', /* 0x87: shift F8 */
+ 5, ESC, '[', '1', '8', '~', /* 0x8D: shift F9 */
+ 5, ESC, '[', '1', '9', '~', /* 0x93: shift F10 */
+ 3, ESC, '[', 'Z', /* 0x99: shift TAB */
+ 2, ESC, '[', /* 0x9d: alt ESC == CSI */
+ },
+};
+
+unsigned char acctable[KBD_NUM_ACC][64] = {
+ { "@ÀBCDÈFGHÌJKLMNÒPQRSTÙVWXYZ[\\]^_"
+ "`àbcdèfghìjklmnòpqrstùvwxyz{|}~\177"}, /* KBD_ACC_GRAVE */
+
+ { "@ÁBCDÉFGHÍJKLMNÓPQRSTÚVWXYZ[\\]^_"
+ "`ábcdéfghíjklmnópqrstúvwxyz{|}~\177"}, /* KBD_ACC_ACUTE */
+
+ { "@ÂBCDÊFGHÎJKLMNÔPQRSTÛVWXYZ[\\]^_"
+ "`âbcdêfghîjklmnôpqrstûvwxyz{|}~\177"}, /* KBD_ACC_CIRC */
+
+ { "@ÃBCDEFGHIJKLMÑÕPQRSTUVWXYZ[\\]^_"
+ "`ãbcdefghijklmñÕpqrstuvwxyz{|}~\177"}, /* KBD_ACC_TILDE */
+
+ { "@ÄBCDËFGHÏJKLMNÖPQRSTÜVWXYZ[\\]^_"
+ "`äbcdëfghïjklmnöpqrstüvwxyz{|}~\177"}, /* KBD_ACC_DIER */
+};
+
+
+
+main()
+{
+ write (1, &kbdmap, sizeof (kbdmap));
+}