aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/USBAPI.h
diff options
context:
space:
mode:
authorZach Eveland <zeveland@blacklabel-development.com>2012-03-03 22:54:45 -0500
committerZach Eveland <zeveland@blacklabel-development.com>2012-03-03 22:54:45 -0500
commitfbea67532a03cbcb35c47209f902797c80c499f7 (patch)
tree00c32f51c060cc0105cedd8ee504802a45f6eb62 /cores/arduino/USBAPI.h
parent74863e4bdfdfc162bf8c349afc5529768c74300f (diff)
added Keyboard methods press(), release(), and releaseAll()
Changes mean that a single, persistent key report must be used so keys can be added or removed. Also reimplemented type() using the new methods.
Diffstat (limited to 'cores/arduino/USBAPI.h')
-rw-r--r--cores/arduino/USBAPI.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/cores/arduino/USBAPI.h b/cores/arduino/USBAPI.h
index 3c97ff1..6615fa8 100644
--- a/cores/arduino/USBAPI.h
+++ b/cores/arduino/USBAPI.h
@@ -100,12 +100,16 @@ class Keyboard_ : public Print
{
private:
KeyMap* _keyMap;
+ KeyReport _keyReport;
void sendReport(KeyReport* keys);
void setKeyMap(KeyMap* keyMap);
public:
Keyboard_();
- virtual size_t write(uint8_t c) {return type(c);};
- virtual size_t type(uint8_t c);
+ virtual size_t write(uint8_t k) {return type(k);};
+ virtual size_t type(uint8_t k);
+ virtual size_t press(uint8_t k);
+ virtual size_t release(uint8_t k);
+ virtual void releaseAll(void);
};
extern Keyboard_ Keyboard;