Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / x68k / usr.bin / loadkmap / kbdmap.h
blobb844d2ed003f6e9a0934d9d5d7e4571ad49df0b3
1 /* $NetBSD$ */
3 #define NUL 0
4 #define SOH 1
5 #define STX 2
6 #define ETX 3
7 #define EOT 4
8 #define ENQ 5
9 #define ACK 6
10 #define BEL 7
11 #define BS 8
12 #define HT 9
13 #define LF 10
14 #define VT 11
15 #define FF 12
16 #define CR 13
17 #define SO 14
18 #define SI 15
19 #define DLE 16
20 #define DC1 17
21 #define DC2 18
22 #define DC3 19
23 #define DC4 20
24 #define NAK 21
25 #define SYN 22
26 #define ETB 23
27 #define CAN 24
28 #define EM 25
29 #define SUB 26
30 #define ESC 27
31 #define FS 28
32 #define GS 29
33 #define RS 30
34 #define US 31
35 #define DEL 127
36 #define IND 132
37 #define NEL 133
38 #define SSA 134
39 #define ESA 135
40 #define HTS 136
41 #define HTJ 137
42 #define VTS 138
43 #define PLD 139
44 #define PLU 140
45 #define RI 141
46 #define SS2 142
47 #define SS3 143
48 #define DCS 144
49 #define PU1 145
50 #define PU2 146
51 #define STS 147
52 #define CCH 148
53 #define MW 149
54 #define SPA 150
55 #define EPA 151
56 #define CSI 155
57 #define ST 156
58 #define OSC 157
59 #define PM 158
60 #define APC 159
63 /* a normal Amiga keyboard has 0x60 `normal' keys, plus modifier keys that
64 don't appear in the keymap */
65 #define KBD_NUM_KEYS 0x6d
67 /* size of string table */
68 #define KBD_STRTAB_SIZE 255
70 /* for dead keys, index into acctable */
71 #define KBD_ACC_GRAVE 0
72 #define KBD_ACC_ACUTE 1
73 #define KBD_ACC_CIRC 2
74 #define KBD_ACC_TILDE 3
75 #define KBD_ACC_DIER 4
76 #define KBD_NUM_ACC 5
79 struct key {
80 unsigned char mode; /* see possible values below */
81 unsigned char code;
84 #define KBD_MODE_STRING (1<<0) /* code is index into strings[] */
85 #define KBD_MODE_DEAD (1<<1) /* acc-index in upper nibble, code = plain acc */
86 #define KBD_MODE_CAPS (1<<2) /* key is capsable. Only used in non-shifted maps */
87 #define KBD_MODE_KPAD (1<<3) /* key is on keypad */
88 #define KBD_MODE_GRAVE (KBD_ACC_GRAVE << 4)
89 #define KBD_MODE_ACUTE (KBD_ACC_ACUTE << 4)
90 #define KBD_MODE_CIRC (KBD_ACC_CIRC << 4)
91 #define KBD_MODE_TILDE (KBD_ACC_TILDE << 4)
92 #define KBD_MODE_DIER (KBD_ACC_DIER << 4)
93 #define KBD_MODE_ACCENT(m) ((m) >> 4) /* get accent from mode */
94 #define KBD_MODE_ACCMASK (0xf0)
96 struct kbdmap {
97 struct key keys[KBD_NUM_KEYS],
98 shift_keys[KBD_NUM_KEYS],
99 alt_keys[KBD_NUM_KEYS],
100 alt_shift_keys[KBD_NUM_KEYS];
101 unsigned char strings[KBD_STRTAB_SIZE];
105 #ifdef KERNEL
106 /* XXX: ITE interface */
107 extern struct kbdmap kbdmap, ascii_kbdmap;
108 extern unsigned char acctable[KBD_NUM_ACC][64];
109 #endif