From 58c36f76d51d1fe4859140acf5c9c056b4204da5 Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Mon, 26 Mar 2012 17:28:02 -0400 Subject: added methods to Keyboard to handle multiple simultaneous key presses or releases (up to six each) --- cores/arduino/USBAPI.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'cores/arduino/USBAPI.h') diff --git a/cores/arduino/USBAPI.h b/cores/arduino/USBAPI.h index c8948c1..e83089a 100644 --- a/cores/arduino/USBAPI.h +++ b/cores/arduino/USBAPI.h @@ -130,6 +130,21 @@ public: virtual size_t type(uint8_t k); virtual size_t press(uint8_t k); virtual size_t release(uint8_t k); + + virtual size_t press(uint8_t k[], uint8_t len); + virtual size_t press(uint8_t k1, uint8_t k2); + virtual size_t press(uint8_t k1, uint8_t k2, uint8_t k3); + virtual size_t press(uint8_t k1, uint8_t k2, uint8_t k3, uint8_t k4); + virtual size_t press(uint8_t k1, uint8_t k2, uint8_t k3, uint8_t k4, uint8_t k5); + virtual size_t press(uint8_t k1, uint8_t k2, uint8_t k3, uint8_t k4, uint8_t k5, uint8_t k6); + + virtual size_t release(uint8_t k[], uint8_t len); + virtual size_t release(uint8_t k1, uint8_t k2); + virtual size_t release(uint8_t k1, uint8_t k2, uint8_t k3); + virtual size_t release(uint8_t k1, uint8_t k2, uint8_t k3, uint8_t k4); + virtual size_t release(uint8_t k1, uint8_t k2, uint8_t k3, uint8_t k4, uint8_t k5); + virtual size_t release(uint8_t k1, uint8_t k2, uint8_t k3, uint8_t k4, uint8_t k5, uint8_t k6); + virtual void releaseAll(void); }; extern Keyboard_ Keyboard; -- cgit v1.2.3-18-g5258