| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: wskbdmap_mfii.c,v 1.19 2009/07/28 18:48:27 ahoka Exp $ */ | | 1 | /* $NetBSD: wskbdmap_mfii.c,v 1.20 2011/07/22 18:17:11 christos Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1997 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1997 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Juergen Hannken-Illjes. | | 8 | * by Juergen Hannken-Illjes. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -20,27 +20,27 @@ | | | @@ -20,27 +20,27 @@ |
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 | * POSSIBILITY OF SUCH DAMAGE. | | 29 | * POSSIBILITY OF SUCH DAMAGE. |
30 | */ | | 30 | */ |
31 | | | 31 | |
32 | #include <sys/cdefs.h> | | 32 | #include <sys/cdefs.h> |
33 | __KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.19 2009/07/28 18:48:27 ahoka Exp $"); | | 33 | __KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.20 2011/07/22 18:17:11 christos Exp $"); |
34 | | | 34 | |
35 | #include "opt_wskbdmap.h" | | 35 | #include "opt_wskbdmap.h" |
36 | #include <sys/types.h> | | 36 | #include <sys/types.h> |
37 | #include <dev/wscons/wsksymdef.h> | | 37 | #include <dev/wscons/wsksymdef.h> |
38 | #include <dev/wscons/wsksymvar.h> | | 38 | #include <dev/wscons/wsksymvar.h> |
39 | #include <dev/pckbport/wskbdmap_mfii.h> | | 39 | #include <dev/pckbport/wskbdmap_mfii.h> |
40 | | | 40 | |
41 | #define KC(n) KS_KEYCODE(n) | | 41 | #define KC(n) KS_KEYCODE(n) |
42 | | | 42 | |
43 | static const keysym_t pckbd_keydesc_us[] = { | | 43 | static const keysym_t pckbd_keydesc_us[] = { |
44 | /* pos command normal shifted */ | | 44 | /* pos command normal shifted */ |
45 | KC(1), KS_Cmd_Debugger, KS_Escape, | | 45 | KC(1), KS_Cmd_Debugger, KS_Escape, |
46 | KC(2), KS_1, KS_exclam, | | 46 | KC(2), KS_1, KS_exclam, |
| @@ -179,26 +179,94 @@ static const keysym_t pckbd_keydesc_gr[] | | | @@ -179,26 +179,94 @@ static const keysym_t pckbd_keydesc_gr[] |
179 | KC(37), KS_k, KS_K, KS_gr_k, KS_gr_K, | | 179 | KC(37), KS_k, KS_K, KS_gr_k, KS_gr_K, |
180 | KC(38), KS_l, KS_L, KS_gr_l, KS_gr_L, | | 180 | KC(38), KS_l, KS_L, KS_gr_l, KS_gr_L, |
181 | KC(39), KS_semicolon, KS_colon, KS_dead_semi, KS_dead_colon, | | 181 | KC(39), KS_semicolon, KS_colon, KS_dead_semi, KS_dead_colon, |
182 | KC(44), KS_z, KS_Z, KS_gr_z, KS_gr_Z, | | 182 | KC(44), KS_z, KS_Z, KS_gr_z, KS_gr_Z, |
183 | KC(45), KS_x, KS_X, KS_gr_x, KS_gr_X, | | 183 | KC(45), KS_x, KS_X, KS_gr_x, KS_gr_X, |
184 | KC(46), KS_c, KS_C, KS_gr_c, KS_gr_C, | | 184 | KC(46), KS_c, KS_C, KS_gr_c, KS_gr_C, |
185 | KC(47), KS_v, KS_V, KS_gr_v, KS_gr_V, | | 185 | KC(47), KS_v, KS_V, KS_gr_v, KS_gr_V, |
186 | KC(48), KS_b, KS_B, KS_gr_b, KS_gr_B, | | 186 | KC(48), KS_b, KS_B, KS_gr_b, KS_gr_B, |
187 | KC(49), KS_n, KS_N, KS_gr_n, KS_gr_N, | | 187 | KC(49), KS_n, KS_N, KS_gr_n, KS_gr_N, |
188 | KC(50), KS_m, KS_M, KS_gr_m, KS_gr_M, | | 188 | KC(50), KS_m, KS_M, KS_gr_m, KS_gr_M, |
189 | KC(184), KS_Mode_switch, KS_Multi_key, | | 189 | KC(184), KS_Mode_switch, KS_Multi_key, |
190 | }; | | 190 | }; |
191 | | | 191 | |
| | | 192 | static const keysym_t pckbd_keydesc_nl[] = { |
| | | 193 | /* pos normal shifted altgr shift-altgr */ |
| | | 194 | KC(2), KS_1, KS_exclam, KS_onesuperior, |
| | | 195 | KC(3), KS_2, KS_quotedbl, KS_twosuperior, |
| | | 196 | KC(4), KS_3, KS_numbersign, KS_threesuperior, |
| | | 197 | KC(5), KS_4, KS_dollar, KS_onequarter, |
| | | 198 | KC(6), KS_5, KS_percent, KS_onehalf, |
| | | 199 | KC(7), KS_6, KS_ampersand, KS_threequarters, |
| | | 200 | KC(8), KS_7, KS_underscore, KS_sterling, |
| | | 201 | KC(9), KS_8, KS_parenleft, KS_bracketleft, |
| | | 202 | KC(10), KS_9, KS_parenright, KS_bracketright, |
| | | 203 | KC(11), KS_0, KS_apostrophe, |
| | | 204 | KC(12), KS_slash, KS_question, KS_backslash, |
| | | 205 | KC(13), KS_degree, KS_dead_tilde, KS_dead_cedilla, |
| | | 206 | KC(18), KS_e, KS_E, KS_currency, |
| | | 207 | KC(26), KS_dead_diaeresis, KS_dead_circumflex, |
| | | 208 | KC(27), KS_asterisk, KS_bar, |
| | | 209 | KC(30), KS_s, KS_S, KS_ssharp, |
| | | 210 | KC(39), KS_plus, KS_plusminus, |
| | | 211 | KC(40), KS_dead_acute, KS_dead_grave, |
| | | 212 | KC(41), KS_at, KS_paragraph, KS_notsign, |
| | | 213 | KC(43), KS_less, KS_greater, |
| | | 214 | KC(44), KS_z, KS_Z, KS_guillemotleft, |
| | | 215 | KC(45), KS_x, KS_X, KS_guillemotright, |
| | | 216 | KC(46), KS_c, KS_C, KS_cent, |
| | | 217 | KC(50), KS_m, KS_M, KS_mu, |
| | | 218 | KC(51), KS_comma, KS_semicolon, |
| | | 219 | KC(52), KS_period, KS_colon, |
| | | 220 | KC(53), KS_minus, KS_equal, |
| | | 221 | KC(86), KS_braceleft, KS_braceright, KS_brokenbar, |
| | | 222 | KC(184), KS_Mode_switch, KS_Multi_key, |
| | | 223 | }; |
| | | 224 | |
| | | 225 | |
| | | 226 | static const keysym_t pckbd_keydesc_nl[] = { |
| | | 227 | /* pos normal shifted altgr shift-altgr */ |
| | | 228 | KC(2), KS_1, KS_exclam, KS_onesuperior, |
| | | 229 | KC(3), KS_2, KS_quotedbl, KS_twosuperior, |
| | | 230 | KC(4), KS_3, KS_numbersign, KS_threesuperior, |
| | | 231 | KC(5), KS_4, KS_dollar, KS_onequarter, |
| | | 232 | KC(6), KS_5, KS_percent, KS_onehalf, |
| | | 233 | KC(7), KS_6, KS_ampersand, KS_threequarters, |
| | | 234 | KC(8), KS_7, KS_underscore, KS_sterling, |
| | | 235 | KC(9), KS_8, KS_parenleft, KS_braceleft, |
| | | 236 | KC(10), KS_9, KS_parenright, KS_braceright, |
| | | 237 | KC(11), KS_0, KS_apostrophe, |
| | | 238 | KC(12), KS_slash, KS_question, KS_backslash, |
| | | 239 | KC(13), KS_degree, KS_dead_tilde, KS_dead_cedilla, |
| | | 240 | KC(18), KS_e, KS_E, KS_currency, |
| | | 241 | KC(26), KS_dead_diaeresis, KS_dead_circumflex, |
| | | 242 | KC(27), KS_asterisk, KS_bar, |
| | | 243 | KC(31), KS_s, KS_S, KS_ssharp, |
| | | 244 | KC(39), KS_plus, KS_plusminus, |
| | | 245 | KC(40), KS_dead_acute, KS_dead_grave, |
| | | 246 | KC(41), KS_at, KS_paragraph, KS_notsign, |
| | | 247 | KC(43), KS_less, KS_greater, |
| | | 248 | KC(44), KS_z, KS_Z, KS_guillemotleft, |
| | | 249 | KC(45), KS_x, KS_X, KS_guillemotright, |
| | | 250 | KC(46), KS_c, KS_C, KS_cent, |
| | | 251 | KC(50), KS_m, KS_M, KS_mu, |
| | | 252 | KC(51), KS_comma, KS_semicolon, |
| | | 253 | KC(52), KS_period, KS_colon, |
| | | 254 | KC(53), KS_minus, KS_equal, |
| | | 255 | KC(86), KS_bracketright, KS_bracketleft, KS_brokenbar, |
| | | 256 | KC(184), KS_Mode_switch, KS_Multi_key, |
| | | 257 | }; |
| | | 258 | |
| | | 259 | |
192 | static const keysym_t pckbd_keydesc_de[] = { | | 260 | static const keysym_t pckbd_keydesc_de[] = { |
193 | /* pos normal shifted altgr shift-altgr */ | | 261 | /* pos normal shifted altgr shift-altgr */ |
194 | KC(3), KS_2, KS_quotedbl, KS_twosuperior, | | 262 | KC(3), KS_2, KS_quotedbl, KS_twosuperior, |
195 | KC(4), KS_3, KS_section, KS_threesuperior, | | 263 | KC(4), KS_3, KS_section, KS_threesuperior, |
196 | KC(7), KS_6, KS_ampersand, | | 264 | KC(7), KS_6, KS_ampersand, |
197 | KC(8), KS_7, KS_slash, KS_braceleft, | | 265 | KC(8), KS_7, KS_slash, KS_braceleft, |
198 | KC(9), KS_8, KS_parenleft, KS_bracketleft, | | 266 | KC(9), KS_8, KS_parenleft, KS_bracketleft, |
199 | KC(10), KS_9, KS_parenright, KS_bracketright, | | 267 | KC(10), KS_9, KS_parenright, KS_bracketright, |
200 | KC(11), KS_0, KS_equal, KS_braceright, | | 268 | KC(11), KS_0, KS_equal, KS_braceright, |
201 | KC(12), KS_ssharp, KS_question, KS_backslash, | | 269 | KC(12), KS_ssharp, KS_question, KS_backslash, |
202 | KC(13), KS_dead_acute, KS_dead_grave, | | 270 | KC(13), KS_dead_acute, KS_dead_grave, |
203 | KC(16), KS_q, KS_Q, KS_at, | | 271 | KC(16), KS_q, KS_Q, KS_at, |
204 | KC(21), KS_z, | | 272 | KC(21), KS_z, |
| @@ -743,31 +811,32 @@ const struct wscons_keydesc pckbd_keydes | | | @@ -743,31 +811,32 @@ const struct wscons_keydesc pckbd_keydes |
743 | KBD_MAP(KB_NO, KB_DK, pckbd_keydesc_no), | | 811 | KBD_MAP(KB_NO, KB_DK, pckbd_keydesc_no), |
744 | KBD_MAP(KB_NO | KB_NODEAD, KB_NO, pckbd_keydesc_no_nodead), | | 812 | KBD_MAP(KB_NO | KB_NODEAD, KB_NO, pckbd_keydesc_no_nodead), |
745 | KBD_MAP(KB_US | KB_DECLK, KB_US, pckbd_keydesc_us_declk), | | 813 | KBD_MAP(KB_US | KB_DECLK, KB_US, pckbd_keydesc_us_declk), |
746 | KBD_MAP(KB_US | KB_DVORAK, KB_US, pckbd_keydesc_us_dvorak), | | 814 | KBD_MAP(KB_US | KB_DVORAK, KB_US, pckbd_keydesc_us_dvorak), |
747 | KBD_MAP(KB_US | KB_COLEMAK, KB_US, pckbd_keydesc_us_colemak), | | 815 | KBD_MAP(KB_US | KB_COLEMAK, KB_US, pckbd_keydesc_us_colemak), |
748 | KBD_MAP(KB_US | KB_SWAPCTRLCAPS, KB_US, pckbd_keydesc_swapctrlcaps), | | 816 | KBD_MAP(KB_US | KB_SWAPCTRLCAPS, KB_US, pckbd_keydesc_swapctrlcaps), |
749 | KBD_MAP(KB_US | KB_IOPENER, KB_US, pckbd_keydesc_iopener), | | 817 | KBD_MAP(KB_US | KB_IOPENER, KB_US, pckbd_keydesc_iopener), |
750 | KBD_MAP(KB_JP | KB_SWAPCTRLCAPS, KB_JP, pckbd_keydesc_swapctrlcaps), | | 818 | KBD_MAP(KB_JP | KB_SWAPCTRLCAPS, KB_JP, pckbd_keydesc_swapctrlcaps), |
751 | KBD_MAP(KB_FR | KB_SWAPCTRLCAPS, KB_FR, pckbd_keydesc_swapctrlcaps), | | 819 | KBD_MAP(KB_FR | KB_SWAPCTRLCAPS, KB_FR, pckbd_keydesc_swapctrlcaps), |
752 | KBD_MAP(KB_US | KB_DVORAK | KB_SWAPCTRLCAPS, KB_US | KB_DVORAK, | | 820 | KBD_MAP(KB_US | KB_DVORAK | KB_SWAPCTRLCAPS, KB_US | KB_DVORAK, |
753 | pckbd_keydesc_swapctrlcaps), | | 821 | pckbd_keydesc_swapctrlcaps), |
754 | KBD_MAP(KB_US | KB_IOPENER | KB_SWAPCTRLCAPS, KB_US | KB_IOPENER, | | 822 | KBD_MAP(KB_US | KB_IOPENER | KB_SWAPCTRLCAPS, KB_US | KB_IOPENER, |
755 | pckbd_keydesc_swapctrlcaps), | | 823 | pckbd_keydesc_swapctrlcaps), |
756 | KBD_MAP(KB_ES , KB_US, pckbd_keydesc_es), | | 824 | KBD_MAP(KB_ES, KB_US, pckbd_keydesc_es), |
757 | KBD_MAP(KB_PT, KB_US, pckbd_keydesc_pt), | | 825 | KBD_MAP(KB_PT, KB_US, pckbd_keydesc_pt), |
758 | KBD_MAP(KB_GR, KB_US, pckbd_keydesc_gr), | | 826 | KBD_MAP(KB_GR, KB_US, pckbd_keydesc_gr), |
759 | KBD_MAP(KB_CZ, KB_US, pckbd_keydesc_cz), | | 827 | KBD_MAP(KB_CZ, KB_US, pckbd_keydesc_cz), |
760 | KBD_MAP(KB_HU, KB_US, pckbd_keydesc_hu), | | 828 | KBD_MAP(KB_HU, KB_US, pckbd_keydesc_hu), |
| | | 829 | KBD_MAP(KB_NL, KB_US, pckbd_keydesc_nl), |
761 | #endif /* WSKBD_USONLY */ | | 830 | #endif /* WSKBD_USONLY */ |
762 | | | 831 | |
763 | /* placeholders */ | | 832 | /* placeholders */ |
764 | KBD_NULLMAP(KB_US | KB_MACHDEP, KB_US), | | 833 | KBD_NULLMAP(KB_US | KB_MACHDEP, KB_US), |
765 | #ifndef WSKBD_USONLY | | 834 | #ifndef WSKBD_USONLY |
766 | KBD_NULLMAP(KB_DE | KB_MACHDEP, KB_DE), | | 835 | KBD_NULLMAP(KB_DE | KB_MACHDEP, KB_DE), |
767 | KBD_NULLMAP(KB_SG | KB_MACHDEP, KB_SG), | | 836 | KBD_NULLMAP(KB_SG | KB_MACHDEP, KB_SG), |
768 | KBD_NULLMAP(KB_ES | KB_MACHDEP, KB_ES), | | 837 | KBD_NULLMAP(KB_ES | KB_MACHDEP, KB_ES), |
769 | KBD_NULLMAP(KB_FR | KB_MACHDEP, KB_FR), | | 838 | KBD_NULLMAP(KB_FR | KB_MACHDEP, KB_FR), |
770 | KBD_NULLMAP(KB_JP | KB_MACHDEP, KB_JP), | | 839 | KBD_NULLMAP(KB_JP | KB_MACHDEP, KB_JP), |
771 | KBD_NULLMAP(KB_US | KB_MACHDEP | KB_SWAPCTRLCAPS, | | 840 | KBD_NULLMAP(KB_US | KB_MACHDEP | KB_SWAPCTRLCAPS, |
772 | KB_US | KB_SWAPCTRLCAPS), | | 841 | KB_US | KB_SWAPCTRLCAPS), |
773 | KBD_NULLMAP(KB_JP | KB_MACHDEP | KB_SWAPCTRLCAPS, | | 842 | KBD_NULLMAP(KB_JP | KB_MACHDEP | KB_SWAPCTRLCAPS, |