VirtualBox

Changeset 997 in vbox


Ignore:
Timestamp:
Feb 20, 2007 10:06:17 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
18829
Message:

Updated the Linux keyboard code for Japanese and Korean keys

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/linux/XKeyboardNew.cpp

    r984 r997  
    3636    http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html
    3737    and the Xorg keyboard configuration files in /etc/X11/xkb for interesting information. */
    38 static int ExtKeySymToScanCode[21] =
     38static int ExtKeySymToScanCode[37] =
    3939{
    40     0x47 /* 97 non-KP-home */, 0x48 /* 98 non-KP-up */, 0x49 /* 99 non-KP-PgUp */,
    41     0x4b /* 100 non-KP-left */, 0 /* 101 empty */, 0x4d /* 102 non-KP-right */,
    42     0x4f /* 103 non-KP-end */, 0x50 /* 104 non-KP-down */, 0x51 /* 105 non-KP-PgDn */,
    43     0x52 /* 106 non-KP-insert */, 0x53 /* 107 non-KP-del */, 0x1c /* 108 KP ENTER */,
    44     0x1d /* 109 RCTRL */, 0 /* 110 pause */, 0 /* 111 PrtScn */, 0x35 /* 112 / (KP) */,
    45     0x38 /* 113 R-ALT, */, 0 /* 114 break */, 0x5b /* 115 left-Windows */,
    46     0x5c /* 116 right-Windows */, 0x5d /* 117 Windows-Menu */
     40    0x147 /* 97 non-KP-home */, 0x148 /* 98 non-KP-up */, 0x149 /* 99 non-KP-PgUp */,
     41    0x14b /* 100 non-KP-left */, 0 /* 101 empty */, 0x14d /* 102 non-KP-right */,
     42    0x14f /* 103 non-KP-end */, 0x150 /* 104 non-KP-down */, 0x151 /* 105 non-KP-PgDn */,
     43    0x152 /* 106 non-KP-insert */, 0x153 /* 107 non-KP-del */, 0x11c /* 108 KP ENTER */,
     44    0x11d /* 109 RCTRL */, 0 /* 110 pause */, 0 /* 111 PrtScn */, 0x135 /* 112 / (KP) */,
     45    0x138 /* 113 R-ALT */, 0 /* 114 break */, 0x15b /* 115 left-Windows */,
     46    0x15c /* 116 right-Windows */, 0x15d /* 117 Windows-Menu */, 0 /* 118 */, 0 /* 119 */,
     47    0 /* 120 */, 0xf1 /* 121 Korean Hangul to Latin */, 0xf2 /* 122 Korean Hangul to Hanja */,
     48    0 /* 123 */, 0 /* 124 */, 0 /* 125 */, 0 /* 126 */, 0 /* 127 */, 0 /* 128 */,
     49    0x79 /* 129 Japanese Henkan */, 0 /* 130 */, 0x7b /* 131 Japanese Muhenkan */, 0 /* 132 */,
     50    0x7d /* 133 Japanese Yen */
    4751};
    4852
     
    8286    }
    8387    /* Extended scancodes need to be looked up in a table. */
    84     if ((uKeyCode >= 97) && (uKeyCode <= 117))
     88    if ((uKeyCode >= 97) && (uKeyCode <= 133))
    8589    {
    86         wineKbdInfo->wScan = ExtKeySymToScanCode[uKeyCode - 97];
    87         wineKbdInfo->dwFlags = 1;
     90        wineKbdInfo->wScan = ExtKeySymToScanCode[uKeyCode - 97] & 255;
     91        wineKbdInfo->dwFlags = ExtKeySymToScanCode[uKeyCode - 97] >> 8;
    8892        return;
    8993    }
     94    if (uKeyCode == 208) /* Japanese Hiragana to Katakana */
     95        wineKbdInfo->wScan = 0x70;
     96    else if (uKeyCode == 211) /* Japanese backslash/underscore */
     97        wineKbdInfo->wScan = 0x73;
    9098    /* If we couldn't find a translation, we just return 0. */
    9199    return;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette