Fixed Keyboard modifier add() issue #68

This commit is contained in:
NicoHood 2016-01-04 18:22:09 +01:00
parent 8e5d8571e2
commit f96e09c75b
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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);