|
|
@ -30,14 +30,11 @@ class NoMouse {
|
|
|
|
void begin() {}
|
|
|
|
void begin() {}
|
|
|
|
void sendReport() {}
|
|
|
|
void sendReport() {}
|
|
|
|
void move(int8_t x, int8_t y, int8_t vWheel, int8_t hWheel) {}
|
|
|
|
void move(int8_t x, int8_t y, int8_t vWheel, int8_t hWheel) {}
|
|
|
|
|
|
|
|
void stop(bool x, bool y, bool vWheel, bool hWheel) {}
|
|
|
|
void releaseAll() {}
|
|
|
|
void releaseAll() {}
|
|
|
|
void press(uint8_t buttons) {}
|
|
|
|
void press(uint8_t buttons) {}
|
|
|
|
void release(uint8_t buttons) {}
|
|
|
|
void release(uint8_t buttons) {}
|
|
|
|
void click(uint8_t buttons) {}
|
|
|
|
void click(uint8_t buttons) {}
|
|
|
|
HID_MouseReport_Data_t getReport() {
|
|
|
|
|
|
|
|
static HID_MouseReport_Data_t report;
|
|
|
|
|
|
|
|
return report;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct MouseProps {
|
|
|
|
struct MouseProps {
|
|
|
@ -63,17 +60,7 @@ class Mouse {
|
|
|
|
mouse_.move(x, y, vWheel, hWheel);
|
|
|
|
mouse_.move(x, y, vWheel, hWheel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void stop(bool x, bool y, bool vWheel = false, bool hWheel = false) {
|
|
|
|
void stop(bool x, bool y, bool vWheel = false, bool hWheel = false) {
|
|
|
|
HID_MouseReport_Data_t report = mouse_.getReport();
|
|
|
|
mouse_.stop(x, y, vWheel, hWheel);
|
|
|
|
|
|
|
|
|
|
|
|
if (x)
|
|
|
|
|
|
|
|
report.xAxis = 0;
|
|
|
|
|
|
|
|
if (y)
|
|
|
|
|
|
|
|
report.yAxis = 0;
|
|
|
|
|
|
|
|
if (vWheel)
|
|
|
|
|
|
|
|
report.vWheel = 0;
|
|
|
|
|
|
|
|
if (hWheel)
|
|
|
|
|
|
|
|
report.hWheel = 0;
|
|
|
|
|
|
|
|
move(report.xAxis, report.yAxis, report.vWheel, report.hWheel);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void releaseAllButtons() {
|
|
|
|
void releaseAllButtons() {
|
|
|
|
mouse_.releaseAll();
|
|
|
|
mouse_.releaseAll();
|
|
|
|