Changeset 72408 in vbox
- Timestamp:
- Jun 1, 2018 11:00:21 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Input/PS2K.cpp
r72407 r72408 658 658 } 659 659 660 /* Clears the currently active typematic key, if any. */ 661 static void ps2kStopTypematicRepeat(PPS2K pThis) 662 { 663 if (pThis->u8TypematicKey) 664 { 665 LogFunc(("Typematic key %02X\n", pThis->u8TypematicKey)); 666 pThis->enmTypematicState = KBD_TMS_IDLE; 667 pThis->u8TypematicKey = 0; 668 TMTimerStop(pThis->CTX_SUFF(pKbdTypematicTimer)); 669 } 670 } 671 660 672 /* Convert encoded typematic value to milliseconds. Note that the values are rated 661 673 * with +/- 20% accuracy, so there's no need for high precision. … … 686 698 ps2kSetupTypematic(pThis, KBD_DFL_RATE_DELAY); 687 699 /* Clear last typematic key?? */ 700 ps2kStopTypematicRepeat(pThis); 688 701 } 689 702 … … 719 732 pThis->fScanning = true; 720 733 ps2kClearQueue((GeneriQ *)&pThis->keyQ); 721 /* Clear last typematic key?? */734 ps2kStopTypematicRepeat(pThis); 722 735 ps2kInsertQueue((GeneriQ *)&pThis->cmdQ, KRSP_ACK); 723 736 pThis->u8CurrCmd = 0; … … 725 738 case KCMD_DFLT_DISABLE: 726 739 pThis->fScanning = false; 727 ps2kSetDefaults(pThis); 740 ps2kSetDefaults(pThis); /* Also clears buffer/typematic state. */ 728 741 ps2kInsertQueue((GeneriQ *)&pThis->cmdQ, KRSP_ACK); 729 742 pThis->u8CurrCmd = 0; … … 1060 1073 else 1061 1074 { 1062 pThis->u8TypematicKey = 0; 1063 pThis->enmTypematicState = KBD_TMS_IDLE; 1064 /// @todo Cancel timer right away? 1065 /// @todo Cancel timer before pushing key up code!? 1075 /* "Typematic operation stops when the last key pressed is released, even 1076 * if other keys are still held down." (IBM PS/2 Tech Ref). The last key pressed 1077 * is the one that's being repeated. 1078 */ 1079 if (pThis->u8TypematicKey == u8HidCode) 1080 { 1081 /* This disables the typematic repeat. */ 1082 pThis->u8TypematicKey = 0; 1083 pThis->enmTypematicState = KBD_TMS_IDLE; 1084 /* For good measure, we cancel the timer, too. */ 1085 TMTimerStop(pThis->CTX_SUFF(pKbdTypematicTimer)); 1086 Log(("Typematic action cleared for key %02X\n", u8HidCode)); 1087 } 1066 1088 } 1067 1089
Note:
See TracChangeset
for help on using the changeset viewer.