diff --git a/src/mouse_reporter.rs b/src/mouse_reporter.rs index e8fcdb3..1cad19a 100644 --- a/src/mouse_reporter.rs +++ b/src/mouse_reporter.rs @@ -224,8 +224,8 @@ impl MouseReporter { }; //Generate term codes - let x_iter = std::iter::repeat(lines_x.unsigned_abs()).take(button_no_x); - let y_iter = std::iter::repeat(lines_y.unsigned_abs()).take(button_no_y); + let x_iter = std::iter::repeat(button_no_x).take(lines_x.unsigned_abs()); + let y_iter = std::iter::repeat(button_no_y).take(lines_y.unsigned_abs()); x_iter .chain(y_iter)