Skip to content

Commit 4205f04

Browse files
Nicoobra
Nico
authored andcommitted
Mouse fix
1 parent aeae455 commit 4205f04

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
@@ -111,6 +111,7 @@ Version History
111111
* Consumer Key fix (issue #3)
112112
* Gamepad fix (issue #14)
113113
* Added Keycode example
114+
* Mouse press + release fix
114115
115116
2.1 Release (28.01.2015)
116117
* 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)