File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -172,8 +172,11 @@ void postSerialMouse() {
172
172
packet [1 ] = ( 0x00 | (mouse_data .mpkt .x & 0x3F ));
173
173
packet [2 ] = ( 0x00 | (mouse_data .mpkt .y & 0x3F ));
174
174
175
+ // according to: https://sourceforge.net/p/cutemouse/trunk/ci/master/tree/cutemouse/PROTOCOL.TXT
176
+ // for a wheel mouse, the middle button should be reported in bit 0x10
177
+ // for a 3-button mouse, the middle button should be reported in bit 0x20
175
178
if ( mouse_data .persistent .mousetype == WHEELBTN ){ // Add Wheel Data + Third Button
176
- packet [3 ] = (0x00 | (mouse_data .mpkt .middle ? 0x20 : 0 ) | (- mouse_data .mpkt .wheel & 0x0f ));
179
+ packet [3 ] = (0x00 | (mouse_data .mpkt .middle ? 0x10 : 0 ) | (- mouse_data .mpkt .wheel & 0x0f ));
177
180
serial_putc (packet , 3 );
178
181
}
179
182
else if ( mouse_data .persistent .mousetype == THREEBTN ){ // Add Third Button
You can’t perform that action at this time.
0 commit comments