1 /* $NetBSD: kbdmap.h,v 1.10 1996/04/21 21:12:08 veego Exp $ */
4 * Copyright (c) 1993 Markus Wild
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by Markus Wild.
18 * 4. The name of the author may not be used to endorse or promote products
19 * derived from this software without specific prior written permission
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
92 /* a normal Amiga keyboard has 0x60 `normal' keys, plus modifier keys that
93 don't appear in the keymap */
94 #define KBD_NUM_KEYS 0x60
96 /* size of string table */
97 #define KBD_STRTAB_SIZE 255
99 /* for dead keys, index into acctable (plus 1!) */
100 #define KBD_ACC_GRAVE 1
101 #define KBD_ACC_ACUTE 2
102 #define KBD_ACC_CIRC 3
103 #define KBD_ACC_TILDE 4
104 #define KBD_ACC_DIER 5
105 #define KBD_NUM_ACC 6
109 unsigned char mode
; /* see possible values below */
113 #define KBD_MODE_STRING (1<<0) /* code is index into strings[] */
114 #define KBD_MODE_DEAD (1<<1) /* acc-index in upper nibble, code = plain acc */
115 #define KBD_MODE_CAPS (1<<2) /* key is capsable. Only used in non-shifted maps */
116 #define KBD_MODE_KPAD (1<<3) /* key is on keypad */
117 #define KBD_MODE_GRAVE (KBD_ACC_GRAVE << 4)
118 #define KBD_MODE_ACUTE (KBD_ACC_ACUTE << 4)
119 #define KBD_MODE_CIRC (KBD_ACC_CIRC << 4)
120 #define KBD_MODE_TILDE (KBD_ACC_TILDE << 4)
121 #define KBD_MODE_DIER (KBD_ACC_DIER << 4)
122 #define KBD_MODE_ACCENT(m) (((m) >> 4) - 1) /* get accent from mode */
123 #define KBD_MODE_ACCMASK (0xf0)
126 struct key keys
[KBD_NUM_KEYS
],
127 shift_keys
[KBD_NUM_KEYS
],
128 alt_keys
[KBD_NUM_KEYS
],
129 alt_shift_keys
[KBD_NUM_KEYS
];
130 unsigned char strings
[KBD_STRTAB_SIZE
];
135 /* XXX: ITE interface */
136 extern struct kbdmap kbdmap
, ascii_kbdmap
;
137 extern unsigned char acctable
[KBD_NUM_ACC
][64];
138 #include <sys/cdefs.h>
139 void kbdenable(void);