Skip to content

Commit 2c5317f

Browse files
author
Nico
committed
Mouse fix
1 parent bfc20c9 commit 2c5317f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

plugins/KeyboardioHID/Readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Version History
7575
* Consumer Key fix (issue #3)
7676
* Gamepad fix (issue #14)
7777
* Added Keycode example
78+
* Mouse press + release fix
7879
7980
2.1 Release (28.01.2015)
8081
* Reworked the whole USB-Core from scratch

plugins/KeyboardioHID/avr/cores/hid/USB-Core/Mouse.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ class Mouse_
8787
{
8888
private:
8989
uint8_t _buttons;
90-
void buttons(uint8_t b);
90+
inline void buttons(uint8_t b){
91+
if (b != _buttons){
92+
_buttons = b;
93+
move(0, 0, 0);
94+
}
95+
}
9196
public:
9297
inline Mouse_(void) {
9398
// removed this to avoid creating an instance of Mouse if not needed

0 commit comments

Comments
 (0)