diff --git a/include/m709/readers.cpp b/include/m709/readers.cpp index a92be60..de0a181 100644 --- a/include/m709/readers.cpp +++ b/include/m709/readers.cpp @@ -437,11 +437,11 @@ int mouse_m709::read_and_print_settings( std::ostream& output ){ if( macro_bytes[i][j] == 0x81 ){ // mouse button down - if( macro_bytes[i][j] == 0x01 ) + if( macro_bytes[i][j+1] == 0x01 ) output << ";# down\tmouse_left\n"; - else if( macro_bytes[i][j] == 0x02 ) + else if( macro_bytes[i][j+1] == 0x02 ) output << ";# down\tmouse_right\n"; - else if( macro_bytes[i][j] == 0x04 ) + else if( macro_bytes[i][j+1] == 0x04 ) output << ";# down\tmouse_middle\n"; else{ output << ";# unknown, please report as bug: "; @@ -453,11 +453,11 @@ int mouse_m709::read_and_print_settings( std::ostream& output ){ } else if( macro_bytes[i][j] == 0x01 ){ // mouse button up - if( macro_bytes[i][j] == 0x01 ) + if( macro_bytes[i][j+1] == 0x01 ) output << ";# up\tmouse_left\n"; - else if( macro_bytes[i][j] == 0x02 ) + else if( macro_bytes[i][j+1] == 0x02 ) output << ";# up\tmouse_right\n"; - else if( macro_bytes[i][j] == 0x04 ) + else if( macro_bytes[i][j+1] == 0x04 ) output << ";# up\tmouse_middle\n"; else{ output << ";# unknown, please report as bug: "; diff --git a/include/m711/readers.cpp b/include/m711/readers.cpp index 8af664e..dd106b0 100644 --- a/include/m711/readers.cpp +++ b/include/m711/readers.cpp @@ -442,11 +442,11 @@ int mouse_m711::read_and_print_settings( std::ostream& output ){ if( macro_bytes[i][j] == 0x81 ){ // mouse button down - if( macro_bytes[i][j] == 0x01 ) + if( macro_bytes[i][j+1] == 0x01 ) output << ";# down\tmouse_left\n"; - else if( macro_bytes[i][j] == 0x02 ) + else if( macro_bytes[i][j+1] == 0x02 ) output << ";# down\tmouse_right\n"; - else if( macro_bytes[i][j] == 0x04 ) + else if( macro_bytes[i][j+1] == 0x04 ) output << ";# down\tmouse_middle\n"; else{ output << ";# unknown, please report as bug: "; @@ -458,11 +458,11 @@ int mouse_m711::read_and_print_settings( std::ostream& output ){ } else if( macro_bytes[i][j] == 0x01 ){ // mouse button up - if( macro_bytes[i][j] == 0x01 ) + if( macro_bytes[i][j+1] == 0x01 ) output << ";# up\tmouse_left\n"; - else if( macro_bytes[i][j] == 0x02 ) + else if( macro_bytes[i][j+1] == 0x02 ) output << ";# up\tmouse_right\n"; - else if( macro_bytes[i][j] == 0x04 ) + else if( macro_bytes[i][j+1] == 0x04 ) output << ";# up\tmouse_middle\n"; else{ output << ";# unknown, please report as bug: "; diff --git a/include/m715/readers.cpp b/include/m715/readers.cpp index 8f1a267..aaf9dca 100644 --- a/include/m715/readers.cpp +++ b/include/m715/readers.cpp @@ -442,11 +442,11 @@ int mouse_m715::read_and_print_settings( std::ostream& output ){ if( macro_bytes[i][j] == 0x81 ){ // mouse button down - if( macro_bytes[i][j] == 0x01 ) + if( macro_bytes[i][j+1] == 0x01 ) output << ";# down\tmouse_left\n"; - else if( macro_bytes[i][j] == 0x02 ) + else if( macro_bytes[i][j+1] == 0x02 ) output << ";# down\tmouse_right\n"; - else if( macro_bytes[i][j] == 0x04 ) + else if( macro_bytes[i][j+1] == 0x04 ) output << ";# down\tmouse_middle\n"; else{ output << ";# unknown, please report as bug: "; @@ -458,11 +458,11 @@ int mouse_m715::read_and_print_settings( std::ostream& output ){ } else if( macro_bytes[i][j] == 0x01 ){ // mouse button up - if( macro_bytes[i][j] == 0x01 ) + if( macro_bytes[i][j+1] == 0x01 ) output << ";# up\tmouse_left\n"; - else if( macro_bytes[i][j] == 0x02 ) + else if( macro_bytes[i][j+1] == 0x02 ) output << ";# up\tmouse_right\n"; - else if( macro_bytes[i][j] == 0x04 ) + else if( macro_bytes[i][j+1] == 0x04 ) output << ";# up\tmouse_middle\n"; else{ output << ";# unknown, please report as bug: "; diff --git a/include/m908/readers.cpp b/include/m908/readers.cpp index 830a57e..34336a8 100644 --- a/include/m908/readers.cpp +++ b/include/m908/readers.cpp @@ -436,11 +436,11 @@ int mouse_m908::read_and_print_settings( std::ostream& output ){ if( macro_bytes[i][j] == 0x81 ){ // mouse button down - if( macro_bytes[i][j] == 0x01 ) + if( macro_bytes[i][j+1] == 0x01 ) output << ";# down\tmouse_left\n"; - else if( macro_bytes[i][j] == 0x02 ) + else if( macro_bytes[i][j+1] == 0x02 ) output << ";# down\tmouse_right\n"; - else if( macro_bytes[i][j] == 0x04 ) + else if( macro_bytes[i][j+1] == 0x04 ) output << ";# down\tmouse_middle\n"; else{ output << ";# unknown, please report as bug: "; @@ -452,11 +452,11 @@ int mouse_m908::read_and_print_settings( std::ostream& output ){ } else if( macro_bytes[i][j] == 0x01 ){ // mouse button up - if( macro_bytes[i][j] == 0x01 ) + if( macro_bytes[i][j+1] == 0x01 ) output << ";# up\tmouse_left\n"; - else if( macro_bytes[i][j] == 0x02 ) + else if( macro_bytes[i][j+1] == 0x02 ) output << ";# up\tmouse_right\n"; - else if( macro_bytes[i][j] == 0x04 ) + else if( macro_bytes[i][j+1] == 0x04 ) output << ";# up\tmouse_middle\n"; else{ output << ";# unknown, please report as bug: ";