Skip to content

Commit b818ca5

Browse files
committed
Merge pull request #30 from NicoHood/master
Mouse fix
2 parents 3e1fac7 + 2c5317f commit b818ca5

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
@@ -77,6 +77,7 @@ Version History
7777
* Consumer Key fix (issue #3)
7878
* Gamepad fix (issue #14)
7979
* Added Keycode example
80+
* Mouse press + release fix
8081
8182
2.1 Release (28.01.2015)
8283
* 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)