diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2012-03-26 17:00:16 -0400 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2012-03-26 17:00:16 -0400 |
commit | f646c9186d33b26adeaada088e9549417463cdab (patch) | |
tree | 99a0440c2e2f22d3429667fcefee3bbf2382f7bc | |
parent | 9c040a8a2bcc7ec8d128df05479b2e741fe192c2 (diff) |
Keyboard.type() now just presses and releases the key indicated - doesn't releaseAll()
-rw-r--r-- | cores/arduino/HID.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/cores/arduino/HID.cpp b/cores/arduino/HID.cpp index e7ee249..b0ef6e3 100644 --- a/cores/arduino/HID.cpp +++ b/cores/arduino/HID.cpp @@ -523,13 +523,10 @@ void Keyboard_::releaseAll(void) // type() does a press and release of the specified key. size_t Keyboard_::type(uint8_t c) -{ - releaseAll(); - // Keydown - press(c); - // Keyup - releaseAll(); - return 1; +{ + uint8_t p = press(c); // Keydown + uint8_t r = release(c); // Keyup + return (p&r); } #endif |