vbox的更動 40280 路徑 trunk/src/VBox/Devices/Input/PS2K.cpp
- 時間撮記:
- 2012-2-28 下午07:47:00 (13 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/Input/PS2K.cpp
r40133 r40280 120 120 } name 121 121 122 /* Internal keyboard queue sizes. The input queue doesn't need to be 122 /* Internal keyboard queue sizes. The input queue doesn't need to be 123 123 * extra huge and the command queue only needs to handle a few bytes. 124 124 */ … … 537 537 case SS_EXT1: 538 538 /* The sequence is E1 1D 45 E1 9D C5. We take the easy way out and remain 539 * in the SS_EXT1 state until 45 or C5 is received. 539 * in the SS_EXT1 state until 45 or C5 is received. 540 540 */ 541 541 if ((scanCode & 0x7F) == 0x45) { … … 621 621 * @param pSSM SSM handle to read the state from. 622 622 * @param pQ Pointer to the queue. 623 * 623 * 624 624 * @return int VBox status/error code. 625 625 */ … … 654 654 * @param pQ Pointer to the queue. 655 655 * @param pVal Pointer to storage for the byte. 656 * 656 * 657 657 * @return int VINF_TRY_AGAIN if queue is empty, 658 658 * VINF_SUCCESS if a byte was read. … … 692 692 period = (8 + A) * (1 << B) * 417 / 100; 693 693 pThis->uTypematicRepeat = period; 694 LogRel(("Typematic delay %u ms, repeat period %u ms\n", 694 LogRel(("Typematic delay %u ms, repeat period %u ms\n", 695 695 pThis->uTypematicDelay, pThis->uTypematicRepeat)); 696 696 } … … 773 773 case KCMD_LEDS: 774 774 #ifndef IN_RING3 775 return VINF_IOM_ HC_IOPORT_WRITE;775 return VINF_IOM_R3_IOPORT_WRITE; 776 776 #else 777 777 { … … 822 822 823 823 /** 824 * Send a byte (keystroke or command response) to the the 825 * keyboard controller. 824 * Send a byte (keystroke or command response) to the the 825 * keyboard controller. 826 826 * 827 827 * @param pThis The keyboard. … … 958 958 PS2InsertQueue((GeneriQ *)&pThis->keyQ, 0xF0); 959 959 PS2InsertQueue((GeneriQ *)&pThis->keyQ, pKeyDef->makeS2); 960 960 961 961 /* Restore shift state for gray keys. */ 962 962 if (pKeyDef->keyFlags & KF_GK) … … 983 983 Assert(i < sizeof(abCodes)); 984 984 } 985 } 985 } 986 986 else if (pThis->u8ScanSet == 1) 987 987 { … … 1010 1010 /* Send a key release code unless it's a make only key. */ 1011 1011 //@todo: Look up the current typematic setting, not the default! 1012 if (pKeyDef->keyMatic != T_M) 1012 if (pKeyDef->keyMatic != T_M) 1013 1013 { 1014 1014 PS2InsertQueue((GeneriQ *)&pThis->keyQ, 0xF0); … … 1108 1108 NOREF(pszArgs); 1109 1109 1110 pHlp->pfnPrintf(pHlp, "PS/2 Keyboard: scan set %d, scanning %s\n", 1110 pHlp->pfnPrintf(pHlp, "PS/2 Keyboard: scan set %d, scanning %s\n", 1111 1111 pThis->u8ScanSet, pThis->fScanning ? "enabled" : "disabled"); 1112 1112 pHlp->pfnPrintf(pHlp, "Active command %02X\n", pThis->u8CurrCmd); 1113 pHlp->pfnPrintf(pHlp, "LED state %02X, Num Lock %s\n", pThis->u8LEDs, 1113 pHlp->pfnPrintf(pHlp, "LED state %02X, Num Lock %s\n", pThis->u8LEDs, 1114 1114 pThis->fNumLockOn ? "on" : "off"); 1115 1115 pHlp->pfnPrintf(pHlp, "Typematic delay %ums, repeat period %ums\n", … … 1141 1141 * @returns VBox status code. 1142 1142 * @param pInterface Pointer to the keyboard port interface (KBDState::Keyboard.IPort). 1143 * @param u32Usage USB HID usage code with key 1143 * @param u32Usage USB HID usage code with key 1144 1144 * press/release flag. 1145 1145 */ … … 1178 1178 rc = PDMCritSectEnter(&pThis->KbdCritSect, VERR_SEM_BUSY); 1179 1179 AssertReleaseRC(rc); 1180 1180 1181 1181 rc = PS2KProcessKeyEvent(pThis, u8HidCode, fKeyDown); 1182 1182 1183 1183 PDMCritSectLeave(&pThis->KbdCritSect); 1184 1184 } … … 1207 1207 * Attach command. 1208 1208 * 1209 * This is called to let the device attach to a driver for a 1209 * This is called to let the device attach to a driver for a 1210 1210 * specified LUN. 1211 1211 * 1212 * This is like plugging in the keyboard after turning on the 1213 * system. 1212 * This is like plugging in the keyboard after turning on the 1213 * system. 1214 1214 * 1215 1215 * @returns VBox status code. … … 1445 1445 1446 1446 /* Table used by the keyboard controller to optionally translate the incoming 1447 * keyboard data. Note that the translation is designed for essentially taking 1448 * Scan Set 2 input and producing Scan Set 1 output, but can be turned on and 1449 * off regardless of what the keyboard is sending. 1447 * keyboard data. Note that the translation is designed for essentially taking 1448 * Scan Set 2 input and producing Scan Set 1 output, but can be turned on and 1449 * off regardless of what the keyboard is sending. 1450 1450 */ 1451 1451 static uint8_t aAT2PC[128] = { … … 1463 1463 * Convert an AT (Scan Set 2) scancode to PC (Scan Set 1). 1464 1464 * 1465 * @param state Current state of the translator 1465 * @param state Current state of the translator 1466 1466 * (xlat_state_t). 1467 1467 * @param scanIn Incoming scan code. 1468 * @param pScanOut Pointer to outgoing scan code. The 1468 * @param pScanOut Pointer to outgoing scan code. The 1469 1469 * contents are only valid if returned 1470 1470 * state is not XS_BREAK. … … 1481 1481 1482 1482 /* Preprocess the scan code for a 128-entry translation table. */ 1483 if (scanIn == 0x83) /* Check for F7 key. */ 1483 if (scanIn == 0x83) /* Check for F7 key. */ 1484 1484 scan_in = 0x02; 1485 1485 else if (scanIn == 0x84) /* Check for SysRq key. */ … … 1487 1487 else 1488 1488 scan_in = scanIn; 1489 1489 1490 1490 /* Values 0x80 and above are passed through, except for 0xF0 1491 1491 * which indicates a key release.
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器