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