1 /* $NetBSD: zkbdmap.h,v 1.2.20.1 2007/10/03 19:26:20 garbled Exp $ */
2 /* $OpenBSD: zaurus_kbdmap.h,v 1.19 2005/05/10 08:26:12 espie Exp $ */
5 * Copyright (c) 2005 Dale Rahn <drahn@openbsd.org>
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 #define KC(n) KS_KEYCODE(n)
22 static const keysym_t zkbd_keydesc_us
[] = {
24 KC(2), KS_Tab
, KS_Tab
, KS_Caps_Lock
,
25 KC(3), KS_Cmd_Screen1
, KS_f2
, /* Addr, */
26 KC(4), KS_Cmd_Screen0
, KS_f1
, /* Cal, */
27 KC(5), KS_Cmd_Screen2
, KS_f3
, /* Mail, */
28 KC(6), KS_Cmd_Screen3
, KS_f4
, /* Home, */
29 KC(8), KS_1
, KS_exclam
,
30 KC(9), KS_2
, KS_quotedbl
,
32 KC(11), KS_w
, KS_W
, KS_asciicircum
,
35 KC(14), KS_Cmd
, KS_Alt_L
,
36 KC(16), KS_Cmd_BrightnessDown
, KS_3
, KS_numbersign
,
37 KC(17), KS_Cmd_BrightnessUp
, KS_4
, KS_dollar
,
38 KC(18), KS_e
, KS_E
, KS_equal
,
40 KC(20), KS_d
, KS_D
, KS_grave
,
42 /* KC(22), ^/t (right japanese) */
43 KC(24), KS_5
, KS_percent
,
44 KC(25), KS_r
, KS_R
, KS_plus
,
45 KC(26), KS_t
, KS_T
, KS_bracketleft
,
46 KC(27), KS_f
, KS_F
, KS_backslash
,
48 KC(29), KS_minus
, KS_minus
, KS_at
,
49 KC(30), KS_Cmd_Debugger
,KS_Escape
, /* Cancel */
50 KC(32), KS_6
, KS_ampersand
,
51 KC(33), KS_y
, KS_Y
, KS_bracketright
,
52 KC(34), KS_g
, KS_G
, KS_semicolon
,
54 KC(36), KS_b
, KS_B
, KS_underscore
,
56 KC(38), KS_KP_Enter
, /* ok */
57 KC(40), KS_7
, KS_apostrophe
,
58 KC(41), KS_8
, KS_parenleft
,
59 KC(42), KS_u
, KS_U
, KS_braceleft
,
60 KC(43), KS_h
, KS_H
, KS_colon
,
62 KC(45), KS_comma
, KS_slash
, KS_less
,
63 KC(46), KS_Cmd_Screen4
, KS_f5
, /* Menu, */
64 KC(48), KS_9
, KS_parenright
,
65 KC(49), KS_i
, KS_I
, KS_braceright
,
66 KC(50), KS_j
, KS_J
, KS_asterisk
,
68 KC(52), KS_period
, KS_question
, KS_greater
,
69 KC(54), KS_KP_Left
, KS_KP_Left
, KS_Home
, /* left, */
70 KC(56), KS_0
, KS_asciitilde
,
73 KC(59), KS_l
, KS_L
, KS_bar
,
74 KC(61), KS_KP_Up
, KS_KP_Up
, KS_Prior
, /* up, */
75 KC(62), KS_KP_Down
, KS_KP_Down
, KS_Next
, /* down, */
76 KC(64), KS_Delete
, KS_BackSpace
,
79 KC(70), KS_KP_Right
, KS_KP_Right
, KS_End
, /* right, */
80 KC(80), KS_KP_Right
, /* OK, (ext) */
81 KC(81), KS_KP_Down
, /* tog left, */
84 KC(88), KS_KP_Left
, /* cancel (ext), */
85 KC(89), KS_KP_Up
, /* tog right, */
86 KC(93), KS_Mode_switch
/* Fn */
89 #ifdef WSDISPLAY_COMPAT_RAWKBD
90 static const char xt_keymap
[] = {
91 /* KC(0), */ 0x1d, /* KS_Control_L, */
92 /* KC(1), */ 0x00, /* NC */
93 /* KC(2), */ 0x0f, /* KS_Tab, KS_Tab, KS_Caps_Lock, */
94 /* KC(3), */ 0x3c, /* KS_Cmd_Screen1, KS_f2, Addr, */
95 /* KC(4), */ 0x3b, /* KS_Cmd_Screen0, KS_f1, Cal, */
96 /* KC(5), */ 0x3d, /* KS_Cmd_Screen2, KS_f3, Mail, */
97 /* KC(6), */ 0x3e, /* KS_Cmd_Screen3, KS_f4, Home, */
98 /* KC(7), */ 0x00, /* NC */
99 /* KC(8), */ 0x02, /* KS_1, KS_exclam, */
100 /* KC(9), */ 0x03, /* KS_2, KS_quotedbl, */
101 /* KC(10), */ 0x10, /* KS_q, */
102 /* KC(11), */ 0x11, /* KS_w, KS_W, KS_asciicircum, */
103 /* KC(12), */ 0x1e, /* KS_a, */
104 /* KC(13), */ 0x2c, /* KS_z, */
105 /* KC(14), */ 0x38, /* KS_Cmd, KS_Alt_L, */
106 /* KC(15), */ 0x00, /* NC */
107 /* KC(16), */ 0x04, /* KS_3, KS_numbersign, */
108 /* KC(17), */ 0x05, /* KS_4, KS_dollar, */
109 /* KC(18), */ 0x12, /* KS_e, KS_E, KS_equal, */
110 /* KC(19), */ 0x1f, /* KS_s, */
111 /* KC(20), */ 0x20, /* KS_d, KS_D, KS_grave, */
112 /* KC(21), */ 0x2d, /* KS_x, */
113 /* KC(22), */ 0x00, /* ^/t (right japanese) */
114 /* KC(23), */ 0x00, /* NC */
115 /* KC(24), */ 0x06, /* KS_5, KS_percent, */
116 /* KC(25), */ 0x13, /* KS_r, KS_R, KS_plus, */
117 /* KC(26), */ 0x14, /* KS_t, KS_T, KS_bracketleft, */
118 /* KC(27), */ 0x21, /* KS_f, KS_F, KS_backslash, */
119 /* KC(28), */ 0x2e, /* KS_c, */
120 /* KC(29), */ 0x0c, /* KS_minus, KS_minus, KS_at, */
121 /* KC(30), */ 0x01, /* KS_Escape, Cancel */
122 /* KC(31), */ 0x00, /* NC */
123 /* KC(32), */ 0x07, /* KS_6, KS_ampersand, */
124 /* KC(33), */ 0x15, /* KS_y, KS_Y, KS_bracketright, */
125 /* KC(34), */ 0x22, /* KS_g, KS_G, KS_semicolon, */
126 /* KC(35), */ 0x2f, /* KS_v, */
127 /* KC(36), */ 0x30, /* KS_b, KS_B, KS_underscore, */
128 /* KC(37), */ 0x39, /* KS_space, */
129 /* KC(38), */ 0x9c, /* KS_KP_Enter, ok */
130 /* KC(39), */ 0x00, /* NC */
131 /* KC(40), */ 0x08, /* KS_7, KS_apostrophe, */
132 /* KC(41), */ 0x09, /* KS_8, KS_parenleft, */
133 /* KC(42), */ 0x16, /* KS_u, KS_U, KS_braceleft, */
134 /* KC(43), */ 0x23, /* KS_h, KS_H, KS_colon, */
135 /* KC(44), */ 0x31, /* KS_n, */
136 /* KC(45), */ 0x33, /* KS_comma, KS_slash, KS_less, */
137 /* KC(46), */ 0x3f, /* KS_Cmd_Screen4, KS_f5, Menu, */
138 /* KC(47), */ 0x00, /* NC */
139 /* KC(48), */ 0x0a, /* KS_9, KS_parenright, */
140 /* KC(49), */ 0x17, /* KS_i, KS_I, KS_braceright, */
141 /* KC(50), */ 0x24, /* KS_j, KS_J, KS_asterisk, */
142 /* KC(51), */ 0x32, /* KS_m, */
143 /* KC(52), */ 0x34, /* KS_period, KS_question, KS_greater, */
144 /* KC(53), */ 0x00, /* NC */
145 /* KC(54), */ 0xcb, /* KS_KP_Left, left, */
146 /* KC(55), */ 0x00, /* NC */
147 /* KC(56), */ 0x0b, /* KS_0, KS_asciitilde, */
148 /* KC(57), */ 0x18, /* KS_o, */
149 /* KC(58), */ 0x25, /* KS_k, */
150 /* KC(59), */ 0x26, /* KS_l, KS_L, KS_bar, */
151 /* KC(60), */ 0x00, /* NC */
152 /* KC(61), */ 0xc8, /* KS_KP_Up, up, */
153 /* KC(62), */ 0xd0, /* KS_KP_Down, down, */
154 /* KC(63), */ 0x00, /* NC */
155 /* KC(64), */ 0x0e, /* KS_Delete, KS_BackSpace, */
156 /* KC(65), */ 0x19, /* KS_p, */
157 /* KC(66), */ 0x00, /* NC */
158 /* KC(67), */ 0x00, /* NC */
159 /* KC(68), */ 0x1c, /* KS_Return, */
160 /* KC(69), */ 0x00, /* NC */
161 /* KC(70), */ 0xcd, /* KS_KP_Right, right, */
162 /* KC(71), */ 0x00, /* NC */
163 /* KC(72), */ 0x00, /* NC */
164 /* KC(73), */ 0x00, /* NC */
165 /* KC(74), */ 0x00, /* NC */
166 /* KC(75), */ 0x00, /* NC */
167 /* KC(76), */ 0x00, /* NC */
168 /* KC(77), */ 0x00, /* NC */
169 /* KC(78), */ 0x00, /* NC */
170 /* KC(79), */ 0x00, /* NC */
171 /* KC(80), */ 0xcd, /* KS_KP_Right, OK, (ext) */
172 /* KC(81), */ 0xd0, /* KS_KP_Down, tog left, */
173 /* KC(82), */ 0x00, /* NC */
174 /* KC(83), */ 0x36, /* KS_Shift_R, */
175 /* KC(84), */ 0x2a, /* KS_Shift_L, */
176 /* KC(85), */ 0x00, /* NC */
177 /* KC(86), */ 0x00, /* NC */
178 /* KC(87), */ 0x00, /* NC */
179 /* KC(88), */ 0xcb, /* KS_KP_Left, cancel (ext), */
180 /* KC(89), */ 0xc8, /* KS_KP_Up, tog right, */
181 /* KC(90), */ 0x00, /* NC */
182 /* KC(91), */ 0x00, /* NC */
183 /* KC(92), */ 0x00, /* NC */
184 /* KC(93), */ 0xb8, /* KS_Mode_switch Fn */
188 #define KBD_MAP(name, base, map) \
189 { (name), (base), __arraycount(map), (map) }
191 static const struct wscons_keydesc zkbd_keydesctab
[] = {
192 KBD_MAP(KB_US
, 0, zkbd_keydesc_us
),