From f96e09c75b32e67df5fe4a964b8e7ad29af7eebe Mon Sep 17 00:00:00 2001 From: NicoHood Date: Mon, 4 Jan 2016 18:22:09 +0100 Subject: [PATCH] Fixed Keyboard modifier add() issue #68 --- Readme.md | 3 ++- src/HID-APIs/DefaultKeyboardAPI.hpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index dd27782..d36def5 100644 --- a/Readme.md +++ b/Readme.md @@ -50,7 +50,8 @@ Version History =============== ``` 2.4.2 Release (xx.xx.2016) -* RawHID >64 byte fix +* RawHID >64 byte fix (Arduino IDE 1.6.8 fix) +* Fixed Keyboard modifier add() issue #68 2.4.1 Release (19.12.2015) * RawHID Improvements diff --git a/src/HID-APIs/DefaultKeyboardAPI.hpp b/src/HID-APIs/DefaultKeyboardAPI.hpp index 7ca2071..06a1cab 100644 --- a/src/HID-APIs/DefaultKeyboardAPI.hpp +++ b/src/HID-APIs/DefaultKeyboardAPI.hpp @@ -33,7 +33,7 @@ size_t DefaultKeyboardAPI::set(KeyboardKeycode k, bool s) // Convert key into bitfield (0 - 7) k = KeyboardKeycode(uint8_t(k) - uint8_t(KEY_LEFT_CTRL)); if(s){ - _keyReport.modifiers = (1 << k); + _keyReport.modifiers |= (1 << k); } else{ _keyReport.modifiers &= ~(1 << k);