Changeset 40392 in vbox for trunk/src/VBox/Frontends/Common/VBoxKeyboard
- Timestamp:
- Mar 7, 2012 2:16:40 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 76701
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/Common/VBoxKeyboard/keyboard-tables.h
r40326 r40392 69 69 }; 70 70 71 /** @note On the whole we use Microsoft's "USB HID to PS/2 Scan Code 72 * Translation Table" and 73 * http://www.win.tue.nl/~aeb/linux/kbd/scancodes-6.html 74 * as a reference for scan code numbers. 75 * Sun keyboards have eleven additional keys on the left-hand side. 76 * These keys never had PC scan codes assigned to them. We map all X11 77 * keycodes which can correspond to these keys to the PC scan codes for 78 * F13 to F23 (as per Microsoft's translation table) and the USB keyboard 79 * code translates them back to the correct usage codes. */ 80 71 81 /* Scan code table for non-character keys */ 72 73 82 static const unsigned nonchar_key_scan[256] = 74 83 { … … 97 106 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* FF58 */ 98 107 /* misc keys */ 99 /* Menu */ 100 #ifdef sun 101 /*?*/ 0, 0x137, 0x7b, 0x152, 0x00, 0x00, 0x00, 0x15D, /* FF60 */ 102 #else 103 /*?*/ 0, 0x137, 0, 0x152, 0x00, 0x00, 0x00, 0x15D, /* FF60 */ 104 #endif /* sun */ 105 /* Help (invented scan code) */ 106 0x00, 0x00, 0x13B, 0x146, 0x00, 0x00, 0x00, 0x00, /* FF68 */ 108 /* Print Open Insert Undo Again Menu */ 109 /* ->F17 ->F14 ->F22 */ 110 0x00, 0x137, 0x68, 0x152, 0x00, 0x65, 0x6d, 0x15D, /* FF60 */ 111 /* Find Stop Help Break */ 112 /* ->F19 ->F21 ->F23 */ 113 0x6a, 0x6c, 0x6e, 0x146, 0x00, 0x00, 0x00, 0x00, /* FF68 */ 107 114 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* FF70 */ 108 115 /* keypad keys */ … … 120 127 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, /* FFC0 */ 121 128 #ifdef sun 122 /* On Solaris for historical reasons the STOP and AGAIN keys are reported 123 * as F11 and F12 respectively. We send invented type 1 scan codes for 124 * which can be translated to real ones again by the USB keyboard 125 * emulation. */ 126 0x13C, 0x13D, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, /* FFC8 */ 127 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x76, 0x00, 0x00, /* FFD0 */ 129 /* Stop Again F13 F14 F15 F16 F17 F18 */ 130 /* ->F21 ->F22 */ 131 0x6c, 0x6d, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, /* FFC8 */ 128 132 #else 129 0x57, 0x58, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, /* FFC8*/130 0x 6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x76, 0x00, 0x00, /* FFD0*/133 /* F11 F12 */ 134 0x57, 0x58, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, /* FFC8 */ 131 135 #endif 136 /* F19 F20 F21 F22 F23 F24 */ 137 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x76, 0x00, 0x00, /* FFD0 */ 132 138 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* FFD8 */ 133 139 /* modifier keys */ … … 139 145 140 146 /* This list was put together using /usr/include/X11/XF86keysym.h and 141 http://www.win.tue.nl/~aeb/linux/kbd/scancodes-6.html. It has not yet147 the documents referenced above for scan code numbers. It has not yet 142 148 been extensively tested. The scancodes are those used by MicroSoft 143 149 keyboards. */ … … 160 166 0, 0, 0, 0, 0, 0, 0, 0, /* 1008FF48 */ 161 167 /* AppL AppR Calc Close Copy */ 162 0x109, 0x11e, 0, 0, 0x121, 0, 0x140, 0x118, /* 1008FF50 */ 163 /* Cut Docmnts Excel */ 164 0x117, 0, 0, 0x105, 0x114, 0, 0, 0, /* 1008FF58 */ 168 /* ->F16 */ 169 0x109, 0x11e, 0, 0, 0x121, 0, 0x140, 0x67, /* 1008FF50 */ 170 /* Cut Docmnts Excel */ 171 /* ->F20 */ 172 0x6b, 0, 0, 0x105, 0x114, 0, 0, 0, /* 1008FF58 */ 165 173 /* LogOff */ 166 174 0, 0x116, 0, 0, 0, 0, 0, 0, /* 1008FF60 */ 167 /* OffcHm Open Paste */ 168 0, 0, 0x13c, 0x13f, 0, 0x10a, 0, 0, /* 1008FF68 */ 175 /* OffcHm Open Paste */ 176 /* ->F17 ->F18 */ 177 0, 0, 0x13c, 0x68, 0, 0x69, 0, 0, /* 1008FF68 */ 169 178 /* Reply Refresh Save */ 170 179 0, 0, 0x141, 0x167, 0, 0, 0, 0x157, /* 1008FF70 */ … … 213 222 0, 0, 0, 0, 0, 0, 0, 0, /* 1005FF60 */ 214 223 0, 0, 0, 0, 0, 0, 0, 0, /* 1005FF68 */ 215 /* Props Front Copy Paste Cut Power Vol- Mute */ 216 0x106, 0x10c, 0x178, 0x65, 0x13c, 0x15e, 0x12e, 0x120, /* 1005FF70 */ 224 /* Props Front Copy Paste Cut Power Vol- Mute */ 225 /* ->F13 ->F15 ->F16 ->F18 ->F20 */ 226 0x64, 0x66, 0x67, 0x69, 0x6b, 0x15e, 0x12e, 0x120, /* 1005FF70 */ 217 227 /* Vol+ */ 218 228 0x130, 0, 0, 0, 0, 0, 0, 0, /* 1005FF78 */
Note:
See TracChangeset
for help on using the changeset viewer.