From 44fbac40898c1bff370a440610803915a498ff06 Mon Sep 17 00:00:00 2001 From: Scyntrus Date: Fri, 26 Feb 2016 16:03:35 -0800 Subject: [PATCH] Use OR assignment for NKRO modifier keys The DefaultKeyboardAPI implementation uses OR assignment instead of basic assignment. --- src/HID-APIs/NKROKeyboardAPI.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HID-APIs/NKROKeyboardAPI.hpp b/src/HID-APIs/NKROKeyboardAPI.hpp index 44e04b3..ee51902 100644 --- a/src/HID-APIs/NKROKeyboardAPI.hpp +++ b/src/HID-APIs/NKROKeyboardAPI.hpp @@ -45,7 +45,7 @@ size_t NKROKeyboardAPI::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);