diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2011-09-16 16:59:14 -0400 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2011-09-16 16:59:14 -0400 |
commit | d004d6a9b490a51f776a89fcd284985f72f72bc6 (patch) | |
tree | a036bd8f9a98d9f72b13138c47f93439c1f233fa /cores/arduino/USBAPI.h | |
parent | 3287477db1c2903e173034af9039c4273dccf58d (diff) |
added Mouse.isPressed() method
Diffstat (limited to 'cores/arduino/USBAPI.h')
-rw-r--r-- | cores/arduino/USBAPI.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cores/arduino/USBAPI.h b/cores/arduino/USBAPI.h index 759079b..26a2032 100644 --- a/cores/arduino/USBAPI.h +++ b/cores/arduino/USBAPI.h @@ -46,6 +46,7 @@ extern Serial_ Serial; #define MOUSE_LEFT 1 #define MOUSE_RIGHT 2 #define MOUSE_MIDDLE 4 +#define MOUSE_ALL (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE) class Mouse_ { @@ -58,6 +59,7 @@ public: void move(signed char x, signed char y, signed char wheel = 0); void press(uint8_t b = MOUSE_LEFT); // press LEFT by default void release(uint8_t b = MOUSE_LEFT); // release LEFT by default + bool isPressed(uint8_t b = MOUSE_ALL); // check all buttons by default }; extern Mouse_ Mouse; |