Changeset 4716 in vbox for trunk/src/VBox
- Timestamp:
- Sep 11, 2007 9:35:40 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/linux/keyboard.c
r4574 r4716 29 29 #ifdef OUTOFWINE 30 30 #include "keyboard_outofwine.h" 31 int use_xkb = 1; 31 /* I don't see any advantage for us of using Xkb here. The only effect of it in 32 the code is to cause the keyboard symbols we are looking up to be translated 33 according to the locale, so that we potentially need additional look-up tables 34 for ambiguous situations (or the translation can fail if the combination of 35 locale and keyboard does not match). */ 36 int use_xkb = 0; 32 37 #endif /* OUTOFWINE defined */ 33 38 … … 165 170 166 171 #ifdef OUTOFWINE 172 /* Not FIXed as it should still work, even though it is completely unnecessary. */ 167 173 /* What is this supposed to be? This is just the same as the qwerty layout, with one key 168 174 in a different place. */ … … 275 281 /* Remember to also add your new table to the layout index table far below! */ 276 282 283 #ifndef OUTOFWINE 277 284 /*** German Logitech Desktop Pro keyboard layout */ 278 285 static const char main_key_DE_logitech[MAIN_LEN][4] = … … 284 291 "<>|" 285 292 }; 293 #endif 286 294 287 295 /*** United States keyboard layout (mostly contributed by Uwe Bonnes) */ … … 364 372 "aA","sS","dD","fF","gG","hH","jJ","kK","lL","öÖ","äÄ","#'", 365 373 "yY","xX","cC","vV","bB","nN","mM",",;",".:","-_", 374 #ifndef OUTOFWINE 366 375 "<>|" 367 }; 368 376 #else 377 "<>" 378 #endif 379 }; 380 381 #ifndef OUTOFWINE 369 382 /*** German keyboard layout without dead keys */ 370 383 static const char main_key_DE_nodead[MAIN_LEN][4] = … … 385 398 "<>|","yY","xX","cC","vV","bB","nN","mM",",;",".:","-_", 386 399 }; 400 #endif 387 401 388 402 /*** Swiss German keyboard layout (setxkbmap ch -variant de) */ … … 406 420 }; 407 421 422 #ifndef OUTOFWINE 408 423 /*** Norwegian keyboard layout (contributed by Ove Kåven) */ 409 424 static const char main_key_NO[MAIN_LEN][4] = … … 415 430 "<>" 416 431 }; 432 #else 433 /* innotek FIX */ 434 /*** Norwegian keyboard layout (contributed by Ove Kåven) */ 435 static const char main_key_NO[MAIN_LEN][4] = 436 { 437 "|§","1!","2\"","3#","4¤","5%","6&","7/","8(","9)","0=","+?","\\`", 438 "qQ","wW","eE","rR","tT","yY","uU","iI","oO","pP","åÅ","¨^", 439 "aA","sS","dD","fF","gG","hH","jJ","kK","lL","øØ","æÆ","'", 440 "zZ","xX","cC","vV","bB","nN","mM",",;",".:","-_", 441 "<>" 442 }; 443 #endif 417 444 418 445 /*** Danish keyboard layout (setxkbmap dk) */ … … 446 473 }; 447 474 475 #ifndef OUTOFWINE 448 476 /*** Canadian French keyboard layout (setxkbmap ca_enhanced) */ 449 477 static const char main_key_CF[MAIN_LEN][4] = … … 455 483 "«»°" 456 484 }; 485 #endif 457 486 458 487 /*** Canadian French keyboard layout (setxkbmap ca -variant fr) */ … … 466 495 }; 467 496 497 #ifndef OUTOFWINE 468 498 /*** Canadian keyboard layout (setxkbmap ca) */ 469 499 static const char main_key_CA[MAIN_LEN][4] = … … 475 505 "ùÙ" 476 506 }; 507 #else 508 /*** Canadian keyboard layout (setxkbmap ca) */ 509 static const char main_key_CA[MAIN_LEN][4] = 510 { 511 "/\\","1!","2@","3#","4$","5%","6?","7&","8*","9(","0)","-_","=+", 512 "qQ","wW","eE","rR","tT","yY","uU","iI","oO","pP","^¨","çÇ", 513 "aA","sS","dD","fF","gG","hH","jJ","kK","lL",";:","èÈ","àÀ", 514 "zZ","xX","cC","vV","bB","nN","mM",",'",".\"","éÉ", 515 "ùÙ" 516 }; 517 #endif 477 518 478 519 /*** Portuguese keyboard layout (setxkbmap pt) */ … … 506 547 }; 507 548 549 #ifndef OUTOFWINE 508 550 /*** Bulgarian bds keyboard layout */ 509 551 static const char main_key_BG_bds[MAIN_LEN][4] = … … 535 577 "zZÑñ","xXÞþ","cCÓó","vVÍí","bB¦¶","nNÔô","mMØø",",<Ââ",".>Àà","/?.,", "<>|¦", 536 578 }; 537 538 579 #else 580 /*** Bulgarian bds keyboard layout */ 581 static const char main_key_BG_bds[MAIN_LEN][4] = 582 { 583 "()","1!","2?","3+","4\"","5%","6=","7:","8/","9\xa9","0\xb0","-I",".V", 584 ",\xd9","\xd5\xf5","\xc5\xe5","\xc9\xe9","\xdb\xfb","\xdd\xfd","\xcb\xeb","\xd3\xf3","\xc4\xe4","\xda\xfa","\xc3\xe3",";\xa7", 585 "\xd8\xf8","\xd1\xf1","\xc1\xe1","\xcf\xef","\xd6\xf6","\xc7\xe7","\xd4\xf4","\xce\xee","\xd7\xf7","\xcd\xed","\xde\xfe","'\xf9", 586 "\xc0\xe0","\xca\xea","\xdf\xff","\xdc\xfc","\xc6\xe6","\xc8\xe8","\xd0\xf0","\xd2\xf2","\xcc\xec","\xc2\xe2", 587 "<>" /* the phantom key */ 588 }; 589 590 /*** Bulgarian phonetic keyboard layout */ 591 static const char main_key_BG_phonetic[MAIN_LEN][4] = 592 { 593 "\xde\xfe","1!","2@","3#","4$","5%","6^","7&","8*","9(","0)","-_","=+", 594 "\xd1\xf1","\xd7\xf7","\xc5\xe5","\xd2\xf2","\xd4\xf4","\xdf\xff","\xd5\xf5","\xc9\xe9","\xcf\xef","\xd0\xf0","\xdb\xfb","\xdd\xfd", 595 "\xc1\xe1","\xd3\xf3","\xc4\xe4","\xc6\xe6","\xc7\xe7","\xc8\xe8","\xca\xea","\xcb\xeb","\xcc\xec",";:","'\"","\xc0\xe0", 596 "\xda\xfa","\xd8\xf8","\xc3\xe3","\xd6\xf6","\xc2\xe2","\xce\xee","\xcd\xed",",<",".>","/?", 597 "<>" /* the phantom key */ 598 }; 599 600 /*** Belarusian standard keyboard layout (contributed by Hleb Valoska) */ 601 /*** It matches belarusian layout for XKB from Alexander Mikhailian */ 602 static const char main_key_BY[MAIN_LEN][4] = 603 { 604 "£³","1!","2\"","3#","4;","5%","6:","7?","8*","9(","0)","-_","=+", 605 "Êê","Ãã","Õõ","Ëë","Åå","Îî","Çç","Ûû","®¾","Úú","Èè","''", 606 "Ææ","Ùù","×÷","Áá","Ðð","Òò","Ïï","Ìì","Ää","Öö","Üü","/|", 607 "Ññ","Þþ","Óó","Íí","¦¶","Ôô","Øø","Ââ","Àà",".,", "|¦", 608 }; 609 #endif 610 611 612 #ifndef OUTOFWINE 539 613 /*** Russian keyboard layout (contributed by Pavel Roskin) */ 540 614 static const char main_key_RU[MAIN_LEN][4] = … … 565 639 "<>" /* the phantom key */ 566 640 }; 567 641 #else 642 /*** Russian keyboard layout KOI8-R */ 643 static const char main_key_RU_koi8r[MAIN_LEN][4] = 644 { 645 "£³","1!","2\"","3#","4*","5:","6,","7.","8;","9(","0)","-_","=+", 646 "Êê","Ãã","Õõ","Ëë","Åå","Îî","Çç","Ûû","Ýý","Úú","Èè","ßÿ", 647 "Ææ","Ùù","×÷","Áá","Ðð","Òò","Ïï","Ìì","Ää","Öö","Üü","\\|", 648 "Ññ","Þþ","Óó","Íí","Éé","Ôô","Øø","Ââ","Àà","/?", 649 "/|" /* the phantom key */ 650 }; 651 #endif 652 653 #ifndef OUTOFWINE 568 654 /*** Russian keyboard layout cp1251 */ 569 655 static const char main_key_RU_cp1251[MAIN_LEN][4] = … … 585 671 "<>" /* the phantom key */ 586 672 }; 587 673 #else 674 /*** Russian phonetic keyboard layout */ 675 static const char main_key_RU_phonetic[MAIN_LEN][4] = 676 { 677 "Àà","1!","2@","3£","4³","5ß","6ÿ","7&","8*","9(","0)","-_","Þþ", 678 "Ññ","×÷","Åå","Òò","Ôô","Ùù","Õõ","Éé","Ïï","Ðð","Ûû","Ýý", 679 "Áá","Óó","Ää","Ææ","Çç","Èè","Êê","Ëë","Ìì",";:","'\"","Üü", 680 "Úú","Øø","Ãã","Öö","Ââ","Îî","Íí",",<",".>","/?", 681 "|¦" /* the phantom key */ 682 }; 683 #endif 684 685 #ifndef OUTOFWINE 588 686 /*** Ukrainian keyboard layout KOI8-U */ 589 687 static const char main_key_UA[MAIN_LEN][4] = … … 595 693 "<>" /* the phantom key */ 596 694 }; 695 #else 696 /*** Ukrainian keyboard layout KOI8-U */ 697 static const char main_key_UA[MAIN_LEN][4] = 698 { 699 "½","1!","2\"","3#","4*","5:","6,","7.","8;","9(","0)","-_","=+", 700 "Êê","Ãã","Õõ","Ëë","Åå","Îî","Çç","Ûû","Ýý","Úú","Èè","§·", 701 "Ææ","¦¶","×÷","Áá","Ðð","Òò","Ïï","Ìì","Ää","Öö","¤´","\\|", 702 "Ññ","Þþ","Óó","Íí","Éé","Ôô","Øø","Ââ","Àà","/?", 703 "<>" /* the phantom key */ 704 }; 705 #endif 597 706 598 707 /*** Ukrainian keyboard layout KOI8-U by O. Nykyforchyn */ … … 932 1041 }; 933 1042 1043 #ifndef OUTOFWINE 934 1044 /*** Thai (Kedmanee) keyboard layout by Supphachoke Suntiwichaya <[email protected]> */ 935 1045 static const char main_key_th[MAIN_LEN][4] = … … 940 1050 "zZ¼(","xX»)","cCá©","vVÍÎ","bBÚ","nN×ì","mM·?",",<Á²",".>ãÌ","/?½Æ" 941 1051 }; 1052 #else 1053 /*** Thai (Kedmanee) keyboard layout by Supphachoke Suntiwichaya <[email protected]> */ 1054 static const char main_key_th[MAIN_LEN][4] = 1055 { 1056 "_%","å+","/ñ","-ò","Àó","¶ô","ØÙ","Öß","¤õ","µö","¨÷","¢ø","ªù", 1057 "æð","ä\"","Ó®","¾±","и","Ñí","Õê","ó","¹Ï","Â","º°","Å,", 1058 "¿Ä","˦","¡¯","´â","à¬","éç","èë","ÒÉ","ÊÈ","Ç«","§.","£¥", 1059 "¼(","»)","á©","ÍÎ","\xd4\xda","×ì","·?","Á²","ãÌ","½Æ", 1060 "<>" /* The phantom key. */ 1061 }; 1062 #endif 942 1063 943 1064 /*** VNC keyboard layout */ … … 997 1118 {0x0809, "British keyboard layout", &main_key_UK, &main_key_scan_qwerty, &main_key_vkey_qwerty}, 998 1119 {0x0407, "German keyboard layout", &main_key_DE, &main_key_scan_qwerty, &main_key_vkey_qwertz}, 1120 #ifndef OUTOFWINE 999 1121 {0x0407, "German keyboard layout without dead keys", &main_key_DE_nodead, &main_key_scan_qwerty, &main_key_vkey_qwertz}, 1000 1122 {0x0407, "German keyboard layout for logitech desktop pro", &main_key_DE_logitech, &main_key_scan_qwerty, &main_key_vkey_qwertz}, 1001 1123 {0x0407, "German keyboard layout without dead keys 105", &main_key_DE_nodead_105, &main_key_scan_qwerty, &main_key_vkey_qwertz_105}, 1124 #endif 1002 1125 {0x0807, "Swiss German keyboard layout", &main_key_SG, &main_key_scan_qwerty, &main_key_vkey_qwertz}, 1003 1126 {0x100c, "Swiss French keyboard layout", &main_key_SF, &main_key_scan_qwerty, &main_key_vkey_qwertz}, … … 1007 1130 {0x0406, "Danish keyboard layout", &main_key_DA, &main_key_scan_qwerty, &main_key_vkey_qwerty}, 1008 1131 {0x040c, "French keyboard layout", &main_key_FR, &main_key_scan_qwerty, &main_key_vkey_azerty}, 1132 #ifndef OUTOFWINE 1009 1133 {0x0c0c, "Canadian French keyboard layout", &main_key_CF, &main_key_scan_qwerty, &main_key_vkey_qwerty}, 1134 #endif 1010 1135 {0x0c0c, "Canadian French keyboard layout (CA_fr)", &main_key_CA_fr, &main_key_scan_qwerty, &main_key_vkey_qwerty}, 1011 1136 {0x0c0c, "Canadian keyboard layout", &main_key_CA, &main_key_scan_qwerty, &main_key_vkey_qwerty}, … … 1018 1143 {0x0402, "Bulgarian phonetic keyboard layout", &main_key_BG_phonetic, &main_key_scan_qwerty, &main_key_vkey_qwerty}, 1019 1144 {0x0423, "Belarusian keyboard layout", &main_key_BY, &main_key_scan_qwerty, &main_key_vkey_qwerty}, 1145 #ifndef OUTOFWINE 1020 1146 {0x0419, "Russian keyboard layout", &main_key_RU, &main_key_scan_qwerty, &main_key_vkey_qwerty}, 1021 1147 {0x0419, "Russian keyboard layout (phantom key version)", &main_key_RU_phantom, &main_key_scan_qwerty, &main_key_vkey_qwerty}, 1148 #endif 1022 1149 {0x0419, "Russian keyboard layout KOI8-R", &main_key_RU_koi8r, &main_key_scan_qwerty, &main_key_vkey_qwerty}, 1150 #ifndef OUTOFWINE 1023 1151 {0x0419, "Russian keyboard layout cp1251", &main_key_RU_cp1251, &main_key_scan_qwerty, &main_key_vkey_qwerty}, 1152 #endif 1024 1153 {0x0419, "Russian phonetic keyboard layout", &main_key_RU_phonetic, &main_key_scan_qwerty, &main_key_vkey_qwerty}, 1025 1154 {0x0422, "Ukrainian keyboard layout KOI8-U", &main_key_UA, &main_key_scan_qwerty, &main_key_vkey_qwerty}, … … 1688 1817 #endif 1689 1818 { 1819 #ifndef OUTOFWINE 1690 1820 TRACE("XKB could not translate keysym %ld\n", keysym); 1821 #endif 1691 1822 /* FIXME: query what keysym is used as Mode_switch, fill XKeyEvent 1692 1823 * with appropriate ShiftMask and Mode_switch, use XLookupString … … 1753 1884 for (i = 0; i < 4; i++) str[i] = ckey[keyc][i] ? ckey[keyc][i] : ' '; 1754 1885 str[4] = 0; 1886 #ifndef OUTOFWINE 1755 1887 TRACE_(key)("mismatch for keysym 0x%04lX, keycode %d, got %s\n", keysym, keyc, str ); 1888 #else 1889 TRACE_(key)("mismatch for keycode %d, got %s (0x%.2hx 0x%.2hx)\n", 1890 keyc, str, str[0], str[1]); 1891 #endif 1756 1892 mismatch++; 1757 1893 score -= syms;
Note:
See TracChangeset
for help on using the changeset viewer.