xref: /openbsd/sys/dev/wscons/wskbdraw.h (revision d415bd75)
1 /*	$OpenBSD: wskbdraw.h,v 1.4 2023/07/24 19:28:40 miod Exp $	*/
2 
3 /*
4  * Copyright (c) 2005, Miodrag Vallat
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
19  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
24  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25  * POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 /*
29  * US keyboard XT scancodes
30  */
31 
32 #define	RAWKEY_Null			0x00
33 
34 /*
35  * These names match KS_xxx symbols whenever possible
36  */
37 
38 #define	RAWKEY_Escape			0x01
39 #define	RAWKEY_1			0x02
40 #define	RAWKEY_2			0x03
41 #define	RAWKEY_3			0x04
42 #define	RAWKEY_4			0x05
43 #define	RAWKEY_5			0x06
44 #define	RAWKEY_6			0x07
45 #define	RAWKEY_7			0x08
46 #define	RAWKEY_8			0x09
47 #define	RAWKEY_9			0x0a
48 #define	RAWKEY_0			0x0b
49 #define	RAWKEY_minus			0x0c
50 #define	RAWKEY_equal			0x0d
51 #define	RAWKEY_Tab			0x0f
52 #define	RAWKEY_q			0x10
53 #define	RAWKEY_w			0x11
54 #define	RAWKEY_e			0x12
55 #define	RAWKEY_r			0x13
56 #define	RAWKEY_t			0x14
57 #define	RAWKEY_y			0x15
58 #define	RAWKEY_u			0x16
59 #define	RAWKEY_i			0x17
60 #define	RAWKEY_o			0x18
61 #define	RAWKEY_p			0x19
62 #define	RAWKEY_bracketleft		0x1a
63 #define	RAWKEY_bracketright		0x1b
64 #define	RAWKEY_Return			0x1c
65 #define	RAWKEY_Control_L		0x1d
66 #define	RAWKEY_a			0x1e
67 #define	RAWKEY_s			0x1f
68 #define	RAWKEY_d			0x20
69 #define	RAWKEY_f			0x21
70 #define	RAWKEY_g			0x22
71 #define	RAWKEY_h			0x23
72 #define	RAWKEY_j			0x24
73 #define	RAWKEY_k			0x25
74 #define	RAWKEY_l			0x26
75 #define	RAWKEY_semicolon		0x27
76 #define	RAWKEY_apostrophe		0x28
77 #define	RAWKEY_grave			0x29
78 #define	RAWKEY_Shift_L			0x2a
79 #define	RAWKEY_backslash		0x2b
80 #define	RAWKEY_z			0x2c
81 #define	RAWKEY_x			0x2d
82 #define	RAWKEY_c			0x2e
83 #define	RAWKEY_v			0x2f
84 #define	RAWKEY_b			0x30
85 #define	RAWKEY_n			0x31
86 #define	RAWKEY_m			0x32
87 #define	RAWKEY_comma			0x33
88 #define	RAWKEY_period			0x34
89 #define	RAWKEY_slash			0x35
90 #define	RAWKEY_Shift_R			0x36
91 #define	RAWKEY_KP_Multiply		0x37
92 #define	RAWKEY_Alt_L			0x38
93 #define	RAWKEY_space			0x39
94 #define	RAWKEY_Caps_Lock		0x3a
95 #define	RAWKEY_f1			0x3b
96 #define	RAWKEY_f2			0x3c
97 #define	RAWKEY_f3			0x3d
98 #define	RAWKEY_f4			0x3e
99 #define	RAWKEY_f5			0x3f
100 #define	RAWKEY_f6			0x40
101 #define	RAWKEY_f7			0x41
102 #define	RAWKEY_f8			0x42
103 #define	RAWKEY_f9			0x43
104 #define	RAWKEY_f10			0x44
105 #define	RAWKEY_Num_Lock			0x45
106 #define	RAWKEY_Hold_Screen		0x46	/* Scroll Lock */
107 #define	RAWKEY_KP_Home			0x47
108 #define	RAWKEY_KP_Up			0x48
109 #define	RAWKEY_KP_Prior			0x49
110 #define	RAWKEY_KP_Subtract		0x4a
111 #define	RAWKEY_KP_Left			0x4b
112 #define	RAWKEY_KP_Begin			0x4c
113 #define	RAWKEY_KP_Right			0x4d
114 #define	RAWKEY_KP_Add			0x4e
115 #define	RAWKEY_KP_End			0x4f
116 #define	RAWKEY_KP_Down			0x50
117 #define	RAWKEY_KP_Next			0x51
118 #define	RAWKEY_KP_Insert		0x52
119 #define	RAWKEY_KP_Delete		0x53
120 #define	RAWKEY_less			0x56	/* < > on European keyboards */
121 #define	RAWKEY_f11			0x57
122 #define	RAWKEY_f12			0x58
123 #define	RAWKEY_Pause			0x6a
124 #define	RAWKEY_Meta_L			0x73
125 #define	RAWKEY_Meta_R			0x74
126 #define	RAWKEY_KP_Equal			0x76
127 #define	RAWKEY_KP_Enter			0x9c
128 #define	RAWKEY_Control_R		0x9d
129 #define	RAWKEY_KP_Divide		0xb5
130 #define	RAWKEY_Print_Screen		0xb7
131 #define	RAWKEY_Alt_R			0xb8
132 #define	RAWKEY_Home			0xc7
133 #define	RAWKEY_Up			0xc8
134 #define	RAWKEY_Prior			0xc9
135 #define	RAWKEY_Left			0xcb
136 #define	RAWKEY_Right			0xcd
137 #define	RAWKEY_End			0xcf
138 #define	RAWKEY_Down			0xd0
139 #define	RAWKEY_Next			0xd1
140 #define	RAWKEY_Insert			0xd2
141 #define	RAWKEY_Delete			0xd3
142 
143 #define	RAWKEY_Begin			0x5d
144 #define	RAWKEY_Menu			0x6d
145 #define	RAWKEY_Compose			0x72
146 
147 /*
148  * The following keys have no KS_xxx equivalents
149  */
150 
151 #define	RAWKEY_BackSpace		0x0e
152 #define	RAWKEY_SysReq			0x54
153 
154 #define	RAWKEY_Power			0x84
155 #define	RAWKEY_AudioMute		0x85
156 #define	RAWKEY_AudioLower		0x86
157 #define	RAWKEY_AudioRaise		0x87
158 #define	RAWKEY_Help			0x88
159 #define	RAWKEY_L1			0x89	/* Stop */
160 #define	RAWKEY_L2			0x8a	/* Again */
161 #define	RAWKEY_L3			0x8b	/* Props */
162 #define	RAWKEY_L4			0x8c	/* Undo */
163 #define	RAWKEY_L5			0x8d	/* Front */
164 #define	RAWKEY_L6			0x8e	/* Copy */
165 #define	RAWKEY_L7			0x8f	/* Open */
166 #define	RAWKEY_L8			0x90	/* Paste */
167 #define	RAWKEY_L9			0x91	/* Find */
168 #define	RAWKEY_L10			0x92	/* Cut */
169