diff options
-rw-r--r-- | mousetsr.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -766,10 +766,13 @@ static void handle_ps2_packet(void) if (data.ps2_packet[3] & PS2M_IMEX_VERTICAL_SCROLL) { // Vertical scrolling, with 6 bits of precision. z = sign_extend(data.ps2_packet[3], 6); + // Assume 4th/5th buttons are still pressed if they were + buttons |= data.buttons & (INT33_BUTTON_MASK_4TH|INT33_BUTTON_MASK_5TH); } else if (data.ps2_packet[3] & PS2M_IMEX_HORIZONTAL_SCROLL) { // Horizontal scrolling, with 6 bits of precision. z = sign_extend(data.ps2_packet[3], 6); wheeln = 1; + buttons |= data.buttons & (INT33_BUTTON_MASK_4TH|INT33_BUTTON_MASK_5TH); } else { // Or 2 extra buttons (4, 5) if (data.ps2_packet[3] & PS2M_IMEX_BUTTON_4) { |