Changeset 80040 in vbox
- Timestamp:
- Jul 29, 2019 10:49:00 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Input/PS2M.cpp
r80039 r80040 52 52 * commands with arguments 200, 200, 80 switch to ImEx mode. The Read ID (0F2h) 53 53 * command will report the currently selected protocol. 54 * 54 * 55 55 * There is an extended ImEx mode with support for horizontal scrolling. It is 56 56 * entered from ImEx mode with a 200, 80, 40 sequence of Set Sampling Rate … … 95 95 * | Byte 4 | 0 | 0 | Btn 5 | Btn 4 | Z mov't delta (two's complement) | 96 96 * +--------+--------+--------+--------+--------+--------+--------+--------+--------+ 97 * 97 * 98 98 * - The Z delta values are in practice only -1/+1; some mice (A4tech?) report 99 99 * horizontal scrolling as -2/+2. … … 106 106 * | Byte 4 | V | H | Z or W movement delta (two's complement) | 107 107 * +--------+--------+--------+--------+--------+--------+--------+--------+--------+ 108 * 108 * 109 109 * - Buttons 4 and 5 are reported as with the regular ImEx protocol, but not when 110 110 * scrolling. This is a departure from the usual logic because when the mouse 111 111 * sends scroll events, the state of buttons 4/5 is not reported and the last 112 112 * reported state should be assumed. 113 * 113 * 114 114 * - When the V bit (bit 7) is set, vertical scroll (Z axis) is being reported. 115 115 * When the H bit (bit 6) is set, horizontal scroll (W axis) is being reported. 116 116 * The H and V bits are never set at the same time (also see below). When 117 117 * the H and V bits are both clear, button 4/5 state is being reported. 118 * 118 * 119 119 * - The Z/W delta is extended to 6 bits. Z (vertical) values are not restricted 120 120 * to -1/+1, although W (horizontal) values are. Z values of at least -20/+20 121 121 * can be seen in practice. 122 * 122 * 123 123 * - Horizontal and vertical scroll is mutually exclusive. When the button is 124 124 * tilted, no vertical scrolling is reported, i.e. horizontal scrolling 125 125 * has priority over vertical. 126 * 126 * 127 127 * - Positive values indicate down/right direction, negative values up/left. 128 * 128 * 129 129 * - When the scroll button is tilted to engage horizontal scrolling, the mouse 130 130 * keeps sending events at a rate of 4 or 5 per second as long as the button 131 131 * is tilted. 132 * 132 * 133 133 * All report formats were verified with a real Microsoft IntelliMouse Explorer 4.0 134 134 * mouse attached through a PS/2 port. 135 * 135 * 136 136 * The button "accumulator" is necessary to avoid missing brief button presses. 137 137 * Without it, a very fast mouse button press + release might be lost if it 138 138 * happened between sending reports. The accumulator latches button presses to 139 139 * prevent that. 140 * 140 * 141 141 */ 142 142 … … 634 634 { 635 635 /* ImEx + horizontal reporting Horizontal scroll has 636 * precedence over vertical. Buttons cannot be reported 637 * this way. 636 * precedence over vertical. Buttons cannot be reported 637 * this way. 638 638 */ 639 639 if (pThis->iAccumW) … … 1017 1017 pThis->u8State & AUX_STATE_ENABLED ? "enabled" : "disabled"); 1018 1018 pHlp->pfnPrintf(pHlp, "Protocol: %s, scaling %u:1\n", 1019 pcszProtocols[pThis->enmProtocol], 1019 pcszProtocols[pThis->enmProtocol], 1020 1020 pThis->u8State & AUX_STATE_SCALING ? 2 : 1); 1021 1021 pHlp->pfnPrintf(pHlp, "Active command %02X\n", pThis->u8CurrCmd); … … 1069 1069 1070 1070 /* Ditch accumulated data that can't be reported by the current protocol. 1071 * This avoids sending phantom empty reports when un-reportable events 1072 * are received. 1071 * This avoids sending phantom empty reports when un-reportable events 1072 * are received. 1073 1073 */ 1074 1074 if (pThis->enmProtocol < PS2M_PROTO_IMEX_HORZ)
Note:
See TracChangeset
for help on using the changeset viewer.