Annotation of sys/dev/hil/hilkbdmap.c, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: hilkbdmap.c,v 1.7 2005/05/07 22:42:30 miod Exp $ */
! 2: /*
! 3: * Copyright (c) 2003, Miodrag Vallat.
! 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:
! 29: #include <sys/types.h>
! 30: #include <dev/wscons/wsksymdef.h>
! 31: #include <dev/wscons/wsksymvar.h>
! 32: #include <dev/hil/hilkbdmap.h>
! 33:
! 34: #ifdef WSDISPLAY_COMPAT_RAWKBD
! 35: #include <dev/wscons/wskbdraw.h>
! 36:
! 37: /*
! 38: * Translate HIL keycodes to US keyboard XT scancodes, for proper
! 39: * X11-over-wsmux operation.
! 40: */
! 41: const u_int8_t hilkbd_raw[0x80] = {
! 42: RAWKEY_Control_R,
! 43: RAWKEY_Null,
! 44: RAWKEY_Alt_R,
! 45: RAWKEY_Alt_L,
! 46: RAWKEY_Shift_R,
! 47: RAWKEY_Shift_L,
! 48: RAWKEY_Control_L,
! 49: RAWKEY_Pause, /* 7 Break/Reset */
! 50: RAWKEY_KP_Left,
! 51: RAWKEY_KP_Up,
! 52: RAWKEY_KP_Begin,
! 53: RAWKEY_KP_Prior,
! 54: RAWKEY_KP_Right,
! 55: RAWKEY_KP_Home,
! 56: RAWKEY_KP_Delete,
! 57: RAWKEY_KP_Enter,
! 58: RAWKEY_KP_End,
! 59: RAWKEY_KP_Divide,
! 60: RAWKEY_KP_Down,
! 61: RAWKEY_KP_Add,
! 62: RAWKEY_KP_Next,
! 63: RAWKEY_KP_Multiply,
! 64: RAWKEY_KP_Insert,
! 65: RAWKEY_KP_Subtract,
! 66: RAWKEY_b,
! 67: RAWKEY_v,
! 68: RAWKEY_c,
! 69: RAWKEY_x,
! 70: RAWKEY_z,
! 71: RAWKEY_Null, /* 29 Kanji Left */
! 72: RAWKEY_Null, /* 30 */
! 73: RAWKEY_Escape,
! 74: RAWKEY_Null,
! 75: RAWKEY_f10,
! 76: RAWKEY_Null,
! 77: RAWKEY_f11,
! 78: RAWKEY_KP_Delete,
! 79: RAWKEY_f9,
! 80: RAWKEY_Tab,
! 81: RAWKEY_f12,
! 82: RAWKEY_h,
! 83: RAWKEY_g,
! 84: RAWKEY_f,
! 85: RAWKEY_d,
! 86: RAWKEY_s,
! 87: RAWKEY_a,
! 88: RAWKEY_Null, /* 46 */
! 89: RAWKEY_Caps_Lock,
! 90: RAWKEY_u,
! 91: RAWKEY_y,
! 92: RAWKEY_t,
! 93: RAWKEY_r,
! 94: RAWKEY_e,
! 95: RAWKEY_w,
! 96: RAWKEY_q,
! 97: RAWKEY_Tab,
! 98: RAWKEY_7,
! 99: RAWKEY_6,
! 100: RAWKEY_5,
! 101: RAWKEY_4,
! 102: RAWKEY_3,
! 103: RAWKEY_2,
! 104: RAWKEY_1,
! 105: RAWKEY_grave,
! 106: RAWKEY_Null, /* 64 */
! 107: RAWKEY_Null, /* 65 */
! 108: RAWKEY_Null, /* 66 */
! 109: RAWKEY_Null, /* 67 */
! 110: RAWKEY_Null, /* 68 */
! 111: RAWKEY_Null, /* 69 */
! 112: RAWKEY_Null, /* 70 */
! 113: RAWKEY_Null, /* 71 */
! 114: RAWKEY_Print_Screen,
! 115: RAWKEY_f4,
! 116: RAWKEY_f3,
! 117: RAWKEY_f2,
! 118: RAWKEY_f1,
! 119: RAWKEY_Null, /* 77 */
! 120: RAWKEY_Hold_Screen,
! 121: RAWKEY_Return,
! 122: RAWKEY_Num_Lock,
! 123: RAWKEY_f5,
! 124: RAWKEY_f6,
! 125: RAWKEY_f7,
! 126: RAWKEY_f8,
! 127: RAWKEY_Null, /* 85 */
! 128: RAWKEY_Null, /* 86 Clear line */
! 129: RAWKEY_Null, /* 87 Clear display */
! 130: RAWKEY_8,
! 131: RAWKEY_9,
! 132: RAWKEY_0,
! 133: RAWKEY_minus,
! 134: RAWKEY_equal,
! 135: RAWKEY_BackSpace,
! 136: RAWKEY_Null, /* 94 Insert line */
! 137: RAWKEY_Null, /* 95 Delete line */
! 138: RAWKEY_i,
! 139: RAWKEY_o,
! 140: RAWKEY_p,
! 141: RAWKEY_bracketleft,
! 142: RAWKEY_bracketright,
! 143: RAWKEY_backslash,
! 144: RAWKEY_Insert,
! 145: RAWKEY_Delete,
! 146: RAWKEY_j,
! 147: RAWKEY_k,
! 148: RAWKEY_l,
! 149: RAWKEY_semicolon,
! 150: RAWKEY_apostrophe,
! 151: RAWKEY_Return,
! 152: RAWKEY_Home,
! 153: RAWKEY_Prior,
! 154: RAWKEY_m,
! 155: RAWKEY_comma,
! 156: RAWKEY_period,
! 157: RAWKEY_slash,
! 158: RAWKEY_Null, /* 116 */
! 159: RAWKEY_End,
! 160: RAWKEY_Null, /* 118 */
! 161: RAWKEY_Next,
! 162: RAWKEY_n,
! 163: RAWKEY_space,
! 164: RAWKEY_Null, /* 122 */
! 165: RAWKEY_Null, /* 123 Kanji Right */
! 166: RAWKEY_Left,
! 167: RAWKEY_Down,
! 168: RAWKEY_Up,
! 169: RAWKEY_Right
! 170: };
! 171: #endif
! 172:
! 173: #define KC(n) KS_KEYCODE(n)
! 174:
! 175: /*
! 176: * 1f. US ASCII
! 177: *
! 178: * We use the same table for PS/2 and old HIL keyboards, as the only
! 179: * differences are a few keys which are only present in one of both layouts,
! 180: * and the one-function-only keypad in the old HIL flavour (hilkbd.c knows
! 181: * about this and does The Right Thing).
! 182: */
! 183:
! 184: static const keysym_t hilkbd_keydesc_us[] = {
! 185: /* pos command normal shifted */
! 186: KC(0), KS_Cmd1, KS_Control_R,
! 187: KC(2), KS_Cmd2, KS_Mode_switch, KS_Multi_key,
! 188: KC(3), KS_Cmd2, KS_Alt_L,
! 189: KC(4), KS_Shift_R,
! 190: KC(5), KS_Shift_L,
! 191: KC(6), KS_Cmd1, KS_Control_L,
! 192: KC(7), KS_Cmd_KbdReset, /* Break/Reset */
! 193: KC(8), KS_KP_Left, KS_KP_4,
! 194: KC(9), KS_KP_Up, KS_KP_8,
! 195: KC(10), KS_KP_Begin, KS_KP_5,
! 196: KC(11), KS_KP_Prior, KS_KP_9,
! 197: KC(12), KS_KP_Right, KS_KP_6,
! 198: KC(13), KS_KP_Home, KS_KP_7,
! 199: KC(14), KS_KP_Separator,
! 200: KC(15), KS_KP_Enter,
! 201: KC(16), KS_KP_End, KS_KP_1,
! 202: KC(17), KS_KP_Divide,
! 203: KC(18), KS_KP_Down, KS_KP_2,
! 204: KC(19), KS_KP_Add,
! 205: KC(20), KS_KP_Next, KS_KP_3,
! 206: KC(21), KS_KP_Multiply,
! 207: KC(22), KS_KP_Insert, KS_KP_0,
! 208: KC(23), KS_KP_Subtract,
! 209: KC(24), KS_b,
! 210: KC(25), KS_v, KS_V, KS_section,
! 211: KC(26), KS_c, KS_C, KS_ccedilla,
! 212: KC(27), KS_x, KS_X, KS_L2_scaron,
! 213: KC(28), KS_z, KS_Z, KS_paragraph,
! 214: /* 29 Kanji Left */
! 215:
! 216: KC(31), KS_Cmd_Debugger, KS_Escape, KS_Delete,
! 217: KC(33), KS_Cmd_Screen9, KS_f10, /* also KS_KP_F2 */
! 218: KC(35), KS_Cmd_Screen10, KS_f11, /* also KS_KP_F3 */
! 219: KC(36), KS_KP_Delete, KS_KP_Decimal,
! 220: KC(37), KS_Cmd_Screen8, KS_f9, /* also KS_KP_F1 */
! 221: KC(38), KS_Tab, /* numeric pad */
! 222: KC(39), KS_Cmd_Screen11, KS_f12, /* also KS_KP_F4 */
! 223: KC(40), KS_h, KS_H, KS_yen,
! 224: KC(41), KS_g, KS_G, KS_currency,
! 225: KC(42), KS_f,
! 226: KC(43), KS_d, KS_D, KS_eth,
! 227: KC(44), KS_s, KS_S, KS_ssharp,
! 228: KC(45), KS_a, KS_A, KS_aring,
! 229: /* 46 Mode_Switch ??? */
! 230: KC(47), KS_Caps_Lock,
! 231: KC(48), KS_u, KS_U, KS_dead_diaeresis,
! 232: KC(49), KS_y, KS_Y, KS_dead_circumflex,
! 233: KC(50), KS_t, KS_T, KS_dead_grave,
! 234: KC(51), KS_r, KS_R, KS_dead_acute,
! 235: KC(52), KS_e, KS_E, KS_ae,
! 236: KC(53), KS_w, KS_W, KS_asciitilde,
! 237: KC(54), KS_q, KS_Q, KS_periodcentered,
! 238: KC(55), KS_Tab,
! 239: KC(56), KS_7, KS_ampersand, KS_backslash,
! 240: KC(57), KS_6, KS_asciicircum, KS_asciicircum,
! 241: KC(58), KS_5, KS_percent, KS_onehalf,
! 242: KC(59), KS_4, KS_dollar,
! 243: KS_onequarter, KS_threequarters,
! 244: KC(60), KS_3, KS_numbersign, KS_numbersign,
! 245: KC(61), KS_2, KS_at, KS_at,
! 246: KC(62), KS_1, KS_exclam, KS_exclamdown,
! 247: KC(63), KS_grave, KS_asciitilde,
! 248: KS_guillemotleft,KS_guillemotright,
! 249:
! 250: KC(72), KS_Print_Screen, /* Menu */
! 251: KC(73), KS_Cmd_Screen3, KS_f4,
! 252: KC(74), KS_Cmd_Screen2, KS_f3,
! 253: KC(75), KS_Cmd_Screen1, KS_f2,
! 254: KC(76), KS_Cmd_Screen0, KS_f1,
! 255:
! 256: KC(78), KS_Hold_Screen,
! 257: KC(79), KS_Return, KS_Print_Screen,
! 258: KC(80), KS_Num_Lock, /* System/User */
! 259: KC(81), KS_Cmd_Screen4, KS_f5,
! 260: KC(82), KS_Cmd_Screen5, KS_f6,
! 261: KC(83), KS_Cmd_Screen6, KS_f7,
! 262: KC(84), KS_Cmd_Screen7, KS_f8,
! 263:
! 264: /* 86 Clear line */
! 265: KC(87), KS_Clear,
! 266: KC(88), KS_8, KS_asterisk,
! 267: KS_bracketleft, KS_braceleft,
! 268: KC(89), KS_9, KS_parenleft,
! 269: KS_bracketright,KS_braceright,
! 270: KC(90), KS_0, KS_parenright, KS_questiondown,
! 271: KC(91), KS_minus, KS_underscore, KS_macron,
! 272: KC(92), KS_equal, KS_plus, KS_plusminus,
! 273: KC(93), KS_Cmd_ResetEmul, KS_Delete, /* Backspace */
! 274: /* 94 Insert line */
! 275: /* 95 Delete line */
! 276: KC(96), KS_i, KS_I, KS_dead_tilde,
! 277: KC(97), KS_o, KS_O, KS_oslash,
! 278: KC(98), KS_p, KS_P, KS_thorn,
! 279: KC(99), KS_bracketleft, KS_braceleft, KS_degree,
! 280: KC(100), KS_bracketright,KS_braceright,
! 281: KS_bar, KS_brokenbar,
! 282: KC(101), KS_backslash, KS_bar, KS_mu,
! 283: KC(102), KS_Insert,
! 284: KC(103), KS_Delete,
! 285: KC(104), KS_j, KS_J, KS_dollar,
! 286: KC(105), KS_k, KS_K, KS_cent,
! 287: KC(106), KS_l, KS_L, KS_sterling,
! 288: KC(107), KS_semicolon, KS_colon,
! 289: KC(108), KS_apostrophe, KS_quotedbl,
! 290: KS_grave, KS_apostrophe,
! 291: KC(109), KS_Return,
! 292: KC(110), KS_Home,
! 293: KC(111), KS_Cmd_ScrollBack, KS_Prior,
! 294: KC(112), KS_m, KS_M, KS_masculine,
! 295: KC(113), KS_comma, KS_less, KS_less,
! 296: KC(114), KS_period, KS_greater, KS_greater,
! 297: KC(115), KS_slash, KS_question, KS_underscore,
! 298:
! 299: KC(117), KS_End, /* Select */
! 300:
! 301: KC(119), KS_Cmd_ScrollFwd, KS_Next,
! 302: KC(120), KS_n, KS_N, KS_ordfeminine,
! 303: KC(121), KS_space,
! 304:
! 305: /* 123 Kanji Right */
! 306: KC(124), KS_Left,
! 307: KC(125), KS_Down,
! 308: KC(126), KS_Up,
! 309: KC(127), KS_Right,
! 310: };
! 311:
! 312: /*
! 313: * 0e. Swedish
! 314: */
! 315:
! 316: static const keysym_t hilkbd_keydesc_sv[] = {
! 317: KC(56), KS_7, KS_slash, KS_backslash,
! 318: KC(57), KS_6, KS_ampersand, KS_asciicircum,
! 319: KC(61), KS_2, KS_quotedbl, KS_at,
! 320: KC(63), KS_less, KS_greater,
! 321: KS_guillemotleft,KS_guillemotright,
! 322: KC(88), KS_8, KS_parenleft, KS_bracketleft, KS_braceleft,
! 323: KC(89), KS_9, KS_parenright, KS_bracketright,KS_braceright,
! 324: KC(90), KS_0, KS_equal, KS_exclamdown,
! 325: KC(91), KS_plus, KS_question, KS_macron,
! 326: KC(92), KS_eacute, KS_Eacute, KS_plusminus,
! 327: KC(97), KS_aring, KS_Aring, KS_degree,
! 328: KC(98), KS_udiaeresis, KS_Udiaeresis, KS_bar, KS_brokenbar,
! 329: KC(99), KS_apostrophe, KS_asterisk, KS_mu,
! 330: KC(107), KS_odiaeresis,
! 331: KC(108), KS_adiaeresis, KS_Adiaeresis, KS_grave, KS_apostrophe,
! 332: KC(113), KS_comma, KS_semicolon, KS_less,
! 333: KC(114), KS_period, KS_colon, KS_greater,
! 334: KC(115), KS_minus, KS_underscore, KS_underscore
! 335: };
! 336:
! 337: static const keysym_t hilkbd_keydesc_sv_nodead[] = {
! 338: KC(48), KS_u, KS_U, KS_diaeresis,
! 339: KC(49), KS_y, KS_Y, KS_asciicircum,
! 340: KC(50), KS_t, KS_T, KS_grave,
! 341: KC(51), KS_r, KS_R, KS_apostrophe,
! 342: KC(96), KS_i, KS_I, KS_asciitilde,
! 343: };
! 344:
! 345: static const keysym_t hilkbd_keydesc_sv_ps2[] = {
! 346: KC(24), KS_b,
! 347: KC(25), KS_v,
! 348: KC(26), KS_c,
! 349: KC(27), KS_x,
! 350: KC(28), KS_z,
! 351: KC(36), KS_KP_Separator,KS_KP_Delete,
! 352: KC(40), KS_h,
! 353: KC(41), KS_g,
! 354: KC(42), KS_f,
! 355: KC(43), KS_d,
! 356: KC(44), KS_s,
! 357: KC(45), KS_a,
! 358: KC(48), KS_u,
! 359: KC(49), KS_y,
! 360: KC(50), KS_t,
! 361: KC(51), KS_r,
! 362: KC(52), KS_e,
! 363: KC(53), KS_w,
! 364: KC(54), KS_q,
! 365: KC(56), KS_7, KS_slash, KS_braceleft,
! 366: KC(57), KS_6, KS_ampersand,
! 367: KC(58), KS_5, KS_percent,
! 368: KC(59), KS_4, KS_currency, KS_dollar,
! 369: KC(60), KS_3, KS_numbersign, KS_sterling,
! 370: KC(61), KS_2, KS_quotedbl, KS_at,
! 371: KC(62), KS_1, KS_exclam,
! 372: KC(63), KS_section, KS_onehalf,
! 373: KC(88), KS_8, KS_parenleft, KS_bracketleft,
! 374: KC(89), KS_9, KS_parenright, KS_bracketright,
! 375: KC(90), KS_0, KS_equal, KS_braceright,
! 376: KC(91), KS_minus, KS_question, KS_backslash,
! 377: KC(92), KS_dead_acute, KS_dead_grave,
! 378: KC(96), KS_i,
! 379: KC(97), KS_o,
! 380: KC(98), KS_p,
! 381: KC(99), KS_aring,
! 382: KC(100), KS_dead_diaeresis,KS_dead_circumflex,KS_dead_tilde,
! 383: KC(104), KS_j,
! 384: KC(105), KS_k,
! 385: KC(106), KS_l,
! 386: KC(107), KS_odiaeresis,
! 387: KC(108), KS_adiaeresis,
! 388: KC(112), KS_m,
! 389: KC(113), KS_comma, KS_semicolon,
! 390: KC(114), KS_period, KS_colon,
! 391: KC(115), KS_minus, KS_underscore,
! 392: KC(116), KS_apostrophe, KS_asterisk,
! 393: KC(118), KS_less, KS_greater, KS_bar,
! 394: KC(120), KS_n
! 395: };
! 396:
! 397: static const keysym_t hilkbd_keydesc_sv_ps2_nodead[] = {
! 398: KC(92), KS_apostrophe, KS_grave,
! 399: KC(100), KS_diaeresis, KS_asciicircum, KS_asciitilde,
! 400: };
! 401:
! 402: /*
! 403: * 0f. German
! 404: */
! 405:
! 406: static const keysym_t hilkbd_keydesc_de[] = {
! 407: KC(28), KS_y, KS_Y, KS_paragraph,
! 408: KC(49), KS_z, KS_Z, KS_dead_circumflex,
! 409: KC(56), KS_7, KS_slash, KS_backslash,
! 410: KC(57), KS_6, KS_ampersand, KS_asciicircum,
! 411: KC(60), KS_3, KS_section, KS_numbersign,
! 412: KC(61), KS_2, KS_quotedbl, KS_at,
! 413: KC(63), KS_less, KS_greater,
! 414: KS_guillemotleft,KS_guillemotright,
! 415: KC(88), KS_8, KS_parenleft,
! 416: KS_bracketleft, KS_braceleft,
! 417: KC(89), KS_9, KS_parenright,
! 418: KS_bracketright,KS_braceright,
! 419: KC(90), KS_0, KS_equal, KS_exclamdown,
! 420: KC(91), KS_ssharp, KS_question, KS_macron,
! 421: KC(92), KS_dead_acute, KS_dead_grave, KS_plusminus,
! 422: KC(99), KS_udiaeresis, KS_Udiaeresis, KS_dead_abovering,
! 423: KC(100), KS_plus, KS_asterisk, KS_bar, KS_brokenbar,
! 424: KC(101), KS_sterling, KS_dead_circumflex,KS_mu,
! 425: KC(107), KS_odiaeresis,
! 426: KC(108), KS_adiaeresis, KS_Adiaeresis, KS_grave, KS_apostrophe,
! 427: KC(113), KS_comma, KS_semicolon, KS_less,
! 428: KC(114), KS_period, KS_colon, KS_greater,
! 429: KC(115), KS_minus, KS_underscore, KS_underscore
! 430: };
! 431:
! 432: static const keysym_t hilkbd_keydesc_de_nodead[] = {
! 433: KC(48), KS_u, KS_U, KS_diaeresis,
! 434: KC(49), KS_z, KS_Z, KS_asciicircum,
! 435: KC(50), KS_t, KS_T, KS_grave,
! 436: KC(51), KS_r, KS_R, KS_apostrophe,
! 437: KC(92), KS_apostrophe, KS_grave, KS_plusminus,
! 438: KC(99), KS_udiaeresis, KS_Udiaeresis, KS_degree,
! 439: KC(101), KS_sterling, KS_asciicircum, KS_mu,
! 440: KC(96), KS_i, KS_I, KS_asciitilde
! 441: };
! 442:
! 443: static const keysym_t hilkbd_keydesc_de_ps2[] = {
! 444: KC(24), KS_b,
! 445: KC(25), KS_v,
! 446: KC(26), KS_c,
! 447: KC(27), KS_x,
! 448: KC(28), KS_y,
! 449: KC(36), KS_KP_Separator,KS_KP_Delete,
! 450: KC(40), KS_h,
! 451: KC(41), KS_g,
! 452: KC(42), KS_f,
! 453: KC(43), KS_d,
! 454: KC(44), KS_s,
! 455: KC(45), KS_a,
! 456: KC(48), KS_u,
! 457: KC(49), KS_z, KS_Z, KS_dead_circumflex,
! 458: KC(50), KS_t,
! 459: KC(51), KS_r,
! 460: KC(52), KS_e,
! 461: KC(53), KS_w,
! 462: KC(54), KS_q, KS_Q, KS_at,
! 463: KC(56), KS_7, KS_slash, KS_braceleft,
! 464: KC(57), KS_6, KS_ampersand,
! 465: KC(58), KS_5, KS_percent,
! 466: KC(59), KS_4, KS_dollar,
! 467: KC(60), KS_3, KS_section, KS_threesuperior,
! 468: KC(61), KS_2, KS_quotedbl, KS_twosuperior,
! 469: KC(62), KS_1, KS_exclam,
! 470: KC(63), KS_dead_circumflex, KS_dead_abovering,
! 471: KC(88), KS_8, KS_parenleft, KS_bracketleft,
! 472: KC(89), KS_9, KS_parenright, KS_bracketright,
! 473: KC(90), KS_0, KS_equal, KS_braceright,
! 474: KC(91), KS_ssharp, KS_question, KS_backslash,
! 475: KC(92), KS_dead_acute, KS_dead_grave,
! 476: KC(96), KS_i,
! 477: KC(97), KS_o,
! 478: KC(98), KS_p,
! 479: KC(99), KS_udiaeresis,
! 480: KC(100), KS_plus, KS_asterisk, KS_dead_tilde,
! 481: KC(104), KS_j,
! 482: KC(105), KS_k,
! 483: KC(106), KS_l,
! 484: KC(107), KS_odiaeresis,
! 485: KC(108), KS_adiaeresis,
! 486: KC(112), KS_m, KS_M, KS_mu,
! 487: KC(113), KS_comma, KS_semicolon,
! 488: KC(114), KS_period, KS_colon,
! 489: KC(115), KS_minus, KS_underscore,
! 490: KC(116), KS_numbersign, KS_apostrophe,
! 491: KC(118), KS_less, KS_greater, KS_bar,
! 492: KC(120), KS_n
! 493: };
! 494:
! 495: static const keysym_t hilkbd_keydesc_de_ps2_nodead[] = {
! 496: KC(49), KS_z, KS_Z, KS_asciicircum,
! 497: KC(63), KS_asciicircum, KS_degree,
! 498: KC(92), KS_apostrophe, KS_grave,
! 499: KC(100), KS_plus, KS_asterisk, KS_asciitilde
! 500: };
! 501:
! 502: /*
! 503: * 17. English
! 504: */
! 505:
! 506: static const keysym_t hilkbd_keydesc_uk[] = {
! 507: KC(56), KS_7, KS_asciicircum, KS_backslash,
! 508: KC(57), KS_6, KS_ampersand, KS_asciicircum,
! 509: KC(60), KS_3, KS_sterling, KS_numbersign,
! 510: KC(61), KS_2, KS_quotedbl, KS_at,
! 511: KC(88), KS_8, KS_parenleft, KS_bracketleft, KS_braceleft,
! 512: KC(89), KS_9, KS_parenright, KS_bracketright,KS_braceright,
! 513: KC(90), KS_0, KS_equal, KS_questiondown,
! 514: KC(91), KS_plus, KS_question, KS_macron,
! 515: KC(92), KS_apostrophe, KS_slash, KS_plusminus,
! 516: KC(101), KS_less, KS_greater, KS_mu,
! 517: KC(107), KS_asterisk, KS_at,
! 518: KC(108), KS_backslash, KS_bar, KS_grave, KS_apostrophe,
! 519: KC(113), KS_comma, KS_semicolon, KS_less,
! 520: KC(114), KS_period, KS_colon, KS_greater,
! 521: KC(115), KS_minus, KS_underscore, KS_underscore
! 522: };
! 523:
! 524: static const keysym_t hilkbd_keydesc_uk_ps2[] = {
! 525: KC(24), KS_b,
! 526: KC(25), KS_v,
! 527: KC(26), KS_c,
! 528: KC(27), KS_x,
! 529: KC(28), KS_z,
! 530: KC(40), KS_h,
! 531: KC(41), KS_g,
! 532: KC(42), KS_f,
! 533: KC(43), KS_d,
! 534: KC(44), KS_s,
! 535: KC(45), KS_a,
! 536: KC(48), KS_u,
! 537: KC(49), KS_y,
! 538: KC(50), KS_t,
! 539: KC(51), KS_r,
! 540: KC(52), KS_e,
! 541: KC(53), KS_w,
! 542: KC(54), KS_q,
! 543: KC(56), KS_7, KS_ampersand,
! 544: KC(57), KS_6, KS_asciicircum,
! 545: KC(58), KS_5, KS_percent,
! 546: KC(59), KS_4, KS_dollar,
! 547: KC(60), KS_3, KS_sterling,
! 548: KC(61), KS_2, KS_quotedbl,
! 549: KC(62), KS_1, KS_exclam,
! 550: KC(63), KS_grave, KS_notsign, KS_bar,
! 551: KC(88), KS_8, KS_asterisk,
! 552: KC(89), KS_9, KS_parenleft,
! 553: KC(90), KS_0, KS_parenright,
! 554: KC(91), KS_minus, KS_underscore,
! 555: KC(92), KS_equal, KS_plus,
! 556: KC(96), KS_i,
! 557: KC(97), KS_o,
! 558: KC(98), KS_p,
! 559: KC(99), KS_bracketleft, KS_braceleft,
! 560: KC(100), KS_bracketright,KS_braceright,
! 561: KC(104), KS_j,
! 562: KC(105), KS_k,
! 563: KC(106), KS_l,
! 564: KC(107), KS_semicolon, KS_colon,
! 565: KC(108), KS_apostrophe, KS_at,
! 566: KC(112), KS_m,
! 567: KC(113), KS_comma, KS_less,
! 568: KC(114), KS_period, KS_greater,
! 569: KC(115), KS_slash, KS_question,
! 570: KC(116), KS_numbersign, KS_asciitilde,
! 571: KC(118), KS_backslash, KS_brokenbar,
! 572: KC(120), KS_n
! 573: };
! 574:
! 575: /*
! 576: * 1b. French
! 577: */
! 578:
! 579: static const keysym_t hilkbd_keydesc_fr[] = {
! 580: KC(28), KS_w, KS_W, KS_paragraph,
! 581: KC(45), KS_q, KS_Q, KS_aring,
! 582: KC(53), KS_z, KS_Z, KS_asciitilde,
! 583: KC(54), KS_a, KS_A, KS_periodcentered,
! 584: KC(56), KS_egrave, KS_7, KS_backslash,
! 585: KC(57), KS_section, KS_6, KS_asciicircum,
! 586: KC(58), KS_parenleft, KS_5, KS_onehalf,
! 587: KC(59), KS_apostrophe, KS_4, KS_onequarter, KS_threequarters,
! 588: KC(60), KS_quotedbl, KS_3, KS_numbersign,
! 589: KC(61), KS_eacute, KS_2, KS_at,
! 590: KC(62), KS_ampersand, KS_1, KS_exclamdown,
! 591: KC(63), KS_dollar, KS_sterling,
! 592: KS_guillemotleft,KS_guillemotright,
! 593: KC(88), KS_exclam, KS_8, KS_bracketleft, KS_braceleft,
! 594: KC(89), KS_ccedilla, KS_9, KS_bracketright,KS_braceright,
! 595: KC(90), KS_agrave, KS_0, KS_questiondown,
! 596: KC(91), KS_parenright, KS_degree, KS_macron,
! 597: KC(92), KS_minus, KS_underscore, KS_plusminus,
! 598: KC(99), KS_dead_circumflex, KS_dead_diaeresis, KS_dead_abovering,
! 599: KC(100), KS_grave, KS_asterisk, KS_bar, KS_brokenbar,
! 600: KC(101), KS_less, KS_greater, KS_mu,
! 601: KC(107), KS_m,
! 602: KC(108), KS_ugrave, KS_percent, KS_grave, KS_apostrophe,
! 603: KC(112), KS_comma, KS_question, KS_masculine,
! 604: KC(113), KS_semicolon, KS_period, KS_less,
! 605: KC(114), KS_colon, KS_slash, KS_greater,
! 606: KC(115), KS_equal, KS_plus, KS_underscore
! 607: };
! 608:
! 609: static const keysym_t hilkbd_keydesc_fr_ps2[] = {
! 610: KC(24), KS_b,
! 611: KC(25), KS_v,
! 612: KC(26), KS_c,
! 613: KC(27), KS_x,
! 614: KC(28), KS_w,
! 615: KC(40), KS_h,
! 616: KC(41), KS_g,
! 617: KC(42), KS_f,
! 618: KC(43), KS_d,
! 619: KC(44), KS_s,
! 620: KC(45), KS_q,
! 621: KC(48), KS_u,
! 622: KC(49), KS_y,
! 623: KC(50), KS_t,
! 624: KC(51), KS_r,
! 625: KC(52), KS_e,
! 626: KC(53), KS_z,
! 627: KC(54), KS_a,
! 628: KC(56), KS_egrave, KS_7, KS_grave,
! 629: KC(57), KS_minus, KS_6, KS_bar,
! 630: KC(58), KS_parenleft, KS_5, KS_bracketleft,
! 631: KC(59), KS_apostrophe, KS_4, KS_braceleft,
! 632: KC(60), KS_quotedbl, KS_3, KS_numbersign,
! 633: KC(61), KS_eacute, KS_2, KS_asciitilde,
! 634: KC(62), KS_ampersand, KS_1,
! 635: KC(63), KS_twosuperior,
! 636: KC(88), KS_underscore, KS_8, KS_backslash,
! 637: KC(89), KS_ccedilla, KS_9, KS_asciicircum,
! 638: KC(90), KS_agrave, KS_0, KS_at,
! 639: KC(91), KS_parenright, KS_degree, KS_bracketright,
! 640: KC(92), KS_equal, KS_plus, KS_braceright,
! 641: KC(96), KS_i,
! 642: KC(97), KS_o,
! 643: KC(98), KS_p,
! 644: KC(99), KS_dead_circumflex,KS_dead_diaeresis,
! 645: KC(100), KS_dollar, KS_sterling, KS_currency,
! 646: KC(104), KS_j,
! 647: KC(105), KS_k,
! 648: KC(106), KS_l,
! 649: KC(107), KS_m,
! 650: KC(108), KS_ugrave, KS_percent,
! 651: KC(112), KS_comma, KS_question,
! 652: KC(113), KS_semicolon, KS_period,
! 653: KC(114), KS_colon, KS_slash,
! 654: KC(115), KS_exclam, KS_section,
! 655: KC(116), KS_asterisk, KS_mu,
! 656: KC(118), KS_less, KS_greater,
! 657: KS_guillemotleft,KS_guillemotright,
! 658: KC(120), KS_n
! 659: };
! 660:
! 661: #define KBD_MAP(name, base, map) \
! 662: { name, base, sizeof(map)/sizeof(keysym_t), map }
! 663:
! 664: const struct wscons_keydesc hilkbd_keydesctab[] = {
! 665: KBD_MAP(KB_US, 0, hilkbd_keydesc_us),
! 666: KBD_MAP(KB_DE, KB_US, hilkbd_keydesc_de),
! 667: KBD_MAP(KB_DE | KB_NODEAD, KB_DE, hilkbd_keydesc_de_nodead),
! 668: KBD_MAP(KB_FR, KB_US, hilkbd_keydesc_fr),
! 669: KBD_MAP(KB_UK, KB_US, hilkbd_keydesc_uk),
! 670: KBD_MAP(KB_SV, KB_US, hilkbd_keydesc_sv),
! 671: KBD_MAP(KB_SV | KB_NODEAD, KB_SV, hilkbd_keydesc_sv_nodead),
! 672: {0, 0, 0, 0},
! 673: };
! 674:
! 675: const struct wscons_keydesc hilkbd_keydesctab_ps2[] = {
! 676: KBD_MAP(KB_US, 0, hilkbd_keydesc_us),
! 677: KBD_MAP(KB_DE, KB_US, hilkbd_keydesc_de_ps2),
! 678: KBD_MAP(KB_DE | KB_NODEAD, KB_DE, hilkbd_keydesc_de_ps2_nodead),
! 679: KBD_MAP(KB_FR, KB_US, hilkbd_keydesc_fr_ps2),
! 680: KBD_MAP(KB_UK, KB_US, hilkbd_keydesc_uk_ps2),
! 681: KBD_MAP(KB_SV, KB_US, hilkbd_keydesc_sv_ps2),
! 682: KBD_MAP(KB_SV | KB_NODEAD, KB_SV, hilkbd_keydesc_sv_ps2_nodead),
! 683: {0, 0, 0, 0},
! 684: };
! 685:
! 686: /*
! 687: * Keyboard ID to layout table
! 688: */
! 689: const kbd_t hilkbd_layouts[MAXHILKBDLAYOUT] = {
! 690: -1, /* 00 Undefined or custom layout */
! 691: -1, /* 01 Undefined */
! 692: -1, /* 02 Japanese */
! 693: -1, /* 03 Swiss french */
! 694: -1, /* 04 Portuguese */
! 695: -1, /* 05 Arabic */
! 696: -1, /* 06 Hebrew */
! 697: -1, /* 07 Canadian English */
! 698: -1, /* 08 Turkish */
! 699: -1, /* 09 Greek */
! 700: -1, /* 0a Thai */
! 701: -1, /* 0b Italian */
! 702: -1, /* 0c Korean */
! 703: -1, /* 0d Dutch */
! 704: KB_SV, /* 0e Swedish */
! 705: KB_DE, /* 0f German */
! 706: -1, /* 10 Simplified Chinese */
! 707: -1, /* 11 Traditional Chinese */
! 708: -1, /* 12 Swiss French 2 */
! 709: -1, /* 13 Euro Spanish */
! 710: -1, /* 14 Swiss German 2 */
! 711: -1, /* 15 Belgian */
! 712: -1, /* 16 Finnish */
! 713: KB_UK, /* 17 UK English */
! 714: -1, /* 18 Canadian French */
! 715: -1, /* 19 Swiss German */
! 716: -1, /* 1a Norwegian */
! 717: KB_FR, /* 1b French */
! 718: -1, /* 1c Danish */
! 719: -1, /* 1d Katakana */
! 720: -1, /* 1e Latin Spanish */
! 721: KB_US, /* 1f US ASCII */
! 722: };
CVSweb