epockbdmap.h revision 1.2.10.2 1 /* $NetBSD: epockbdmap.h,v 1.2.10.2 2014/05/22 11:39:38 yamt Exp $ */
2 /*
3 * Copyright (c) 2013 KIYOHARA Takashi
4 * All rights reserved.
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 #include <dev/wscons/wsksymdef.h>
29 #include <dev/wscons/wsksymvar.h>
30
31 #define KC(n) KS_KEYCODE(n)
32
33 static const keysym_t epockbd_keysym_us[] = {
34 /* pos normal shifted altgr shift+altgr */
35 KC(1), KS_6, KS_asciicircum, KS_greater,
36 KC(2), KS_5, KS_percent, KS_less,
37 KC(3), KS_4, KS_dollar, KS_slash, KS_Cmd_Screen3,
38 KC(4), KS_3, KS_numbersign, KS_backslash, KS_Cmd_Screen2,
39 KC(5), KS_2, KS_at, KS_asciitilde, KS_Cmd_Screen1,
40 KC(6), KS_1, KS_exclam, KS_underscore, KS_Cmd_Screen0,
41 // KC(7), REC
42 KC(9), KS_colon, KS_quotedbl, KS_semicolon,
43 KC(10), KS_Delete, KS_BackSpace,
44 KC(11), KS_0, KS_parenright, KS_braceright,
45 KC(12), KS_9, KS_parenleft, KS_braceleft,
46 KC(13), KS_8, KS_asterisk, KS_bracketright,
47 KC(14), KS_7, KS_ampersand, KS_bracketleft,
48 // KC(15), Play
49 KC(17), KS_y, KS_Y, KS_asterisk,
50 KC(18), KS_t,
51 KC(19), KS_r,
52 KC(20), KS_e,
53 KC(21), KS_w,
54 KC(22), KS_q,
55 KC(23), KS_Escape,
56 KC(25), KS_Return,
57 KC(26), KS_l,
58 KC(27), KS_p, KS_P, KS_equal,
59 KC(28), KS_o, KS_O, KS_minus,
60 KC(29), KS_i, KS_I, KS_plus,
61 KC(30), KS_u, KS_U, KS_slash,
62 KC(31), KS_Menu,
63 KC(33), KS_g,
64 KC(34), KS_f,
65 KC(35), KS_d,
66 KC(36), KS_s,
67 KC(37), KS_a,
68 KC(38), KS_Tab, KS_Tab, KS_Caps_Lock,
69 KC(39), KS_Control_L,
70 KC(41), KS_Down,
71 KC(42), KS_period, KS_apostrophe, KS_plus,
72 KC(43), KS_m, KS_M, KS_minus,
73 KC(44), KS_k,
74 KC(45), KS_j,
75 KC(46), KS_h,
76 KC(47), KS_Mode_switch, KS_Multi_key,
77 KC(49), KS_n,
78 KC(50), KS_b,
79 KC(51), KS_v,
80 KC(52), KS_c,
81 KC(53), KS_x,
82 KC(54), KS_z,
83 KC(55), KS_Shift_R,
84 KC(57), KS_Right, KS_Right, KS_End,
85 KC(58), KS_Left, KS_Left, KS_Home,
86 KC(59), KS_comma, KS_question, KS_Help,
87 KC(60), KS_Up,
88 KC(61), KS_space, KS_space, KS_Cmd_BacklightToggle,
89 // KC(62), Stop
90 KC(63), KS_Shift_L,
91 };
92
93 static const keysym_t epockbd_keysym_uk[] = {
94 /* pos normal shifted altgr */
95 KC(3), KS_4, KS_dollar, KS_at, KS_Cmd_Screen3,
96 KC(4), KS_3, KS_sterling, KS_backslash, KS_Cmd_Screen2,
97 KC(5), KS_2, KS_quotedbl, KS_numbersign, KS_Cmd_Screen1,
98 KC(9), KS_apostrophe, KS_asciitilde, KS_colon,
99 KC(26), KS_l, KS_L, KS_semicolon,
100 KC(42), KS_period, KS_question, KS_plus,
101 KC(59), KS_comma, KS_slash, KS_Help,
102 };
103
104 static const keysym_t epockbd_keysym_de[] = {
105 /* pos normal shifted altgr shift+altgr */
106 KC(1), KS_6, KS_ampersand, KS_greater,
107 KC(3), KS_4, KS_dollar, KS_asciitilde, KS_Cmd_Screen3,
108 KC(4), KS_3, KS_section, KS_backslash, KS_Cmd_Screen2,
109 KC(5), KS_2, KS_quotedbl, KS_slash, KS_Cmd_Screen1,
110 KC(9), KS_numbersign, KS_asterisk, KS_equal,
111 KC(11), KS_0, KS_apostrophe, KS_braceright,
112 KC(12), KS_9, KS_parenright, KS_braceleft,
113 KC(13), KS_8, KS_parenleft, KS_bracketright,
114 KC(14), KS_7, KS_question, KS_bracketleft,
115 KC(19), KS_r, KS_R, KS_masculine,
116 KC(20), KS_e, KS_E, KS_currency,
117 KC(21), KS_w, KS_W, KS_asciicircum,
118 KC(22), KS_q, KS_Q, KS_at,
119 KC(26), KS_l, KS_L, KS_minus,
120 KC(27), KS_p, KS_P, KS_ssharp,
121 KC(28), KS_o, KS_O, KS_diaeresis,
122 KC(29), KS_i, KS_I, KS_mu,
123 KC(30), KS_u, KS_U, KS_udiaeresis,
124 KC(31), KS_Menu,
125 KC(37), KS_a, KS_A, KS_adiaeresis,
126 KC(42), KS_comma, KS_semicolon,
127 KC(43), KS_m,
128 KC(44), KS_k, KS_K, KS_plus,
129 KC(45), KS_j, KS_J, KS_slash,
130 KC(47), KS_Mode_switch, KS_Multi_key,
131 KC(50), KS_b, KS_B, KS_dead_caron,
132 KC(51), KS_v, KS_V, KS_dead_breve,
133 KC(52), KS_c, KS_C, KS_acute,
134 KC(54), KS_y, KS_Y, KS_diaeresis,
135 KC(59), KS_period, KS_colon,
136 };
137
138 static const keysym_t epockbd_keysym_fr[] = {
139 /* pos normal shifted altgr shift+altgr */
140 KC(1), KS_6, KS_dollar, KS_parenright,
141 KC(2), KS_5, KS_degree, KS_parenleft,
142 KC(3), KS_4, KS_dead_tilde, KS_apostrophe, KS_Cmd_Screen3,
143 KC(4), KS_3, KS_numbersign, KS_quotedbl, KS_Cmd_Screen2,
144 KC(5), KS_2, KS_percent, KS_eacute, KS_Cmd_Screen1,
145 KC(6), KS_1, KS_exclam, KS_ampersand, KS_Cmd_Screen0,
146 KC(9), KS_m, KS_M, KS_minus,
147 KC(11), KS_0, KS_at, KS_agrave,
148 KC(12), KS_9, KS_dead_circumflex, KS_ccedilla,
149 KC(13), KS_8, KS_backslash, KS_underscore,
150 KC(14), KS_7, KS_sterling, KS_eacute,
151 KC(17), KS_y, KS_Y, KS_braceright,
152 KC(18), KS_t, KS_T, KS_braceleft,
153 KC(19), KS_r, KS_R, KS_bracketright,
154 KC(20), KS_e, KS_E, KS_bracketleft,
155 KC(21), KS_z, KS_Z, KS_greater,
156 KC(22), KS_a, KS_A, KS_less,
157 KC(26), KS_l, KS_L, KS_plus,
158 KC(28), KS_o,
159 KC(29), KS_i, KS_I, KS_bar,
160 KC(30), KS_u, KS_U, KS_ugrave,
161 KC(37), KS_q,
162 KC(42), KS_period, KS_semicolon, KS_slash,
163 KC(43), KS_question, KS_comma,
164 KC(44), KS_k, KS_K, KS_KP_Divide,
165 KC(50), KS_b, KS_B, KS_dead_circumflex,
166 KC(51), KS_v, KS_V, KS_dead_tilde,
167 KC(52), KS_c, KS_C, KS_apostrophe,
168 KC(53), KS_x, KS_X, KS_grave,
169 KC(54), KS_w, KS_W, KS_dead_diaeresis,
170 KC(59), KS_colon, KS_mu,
171 };
172
173 #define KBD_MAP(name, base, map) \
174 { name, base, sizeof(map)/sizeof(keysym_t), map }
175
176 struct wscons_keydesc epockbd_keydesctab[] = {
177 KBD_MAP(KB_UK, KB_US, epockbd_keysym_uk),
178 KBD_MAP(KB_US, 0, epockbd_keysym_us),
179 KBD_MAP(KB_DE, KB_US, epockbd_keysym_de),
180 KBD_MAP(KB_FR, KB_US, epockbd_keysym_fr),
181
182 { 0, 0, 0, NULL }
183 };
184