From f646c9186d33b26adeaada088e9549417463cdab Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Mon, 26 Mar 2012 17:00:16 -0400 Subject: [PATCH] Keyboard.type() now just presses and releases the key indicated - doesn't releaseAll() --- cores/arduino/HID.cpp | 11 ++++------- 1 file 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