When releasing a modifier, we were computing the bit index wrong: we substracted HID_KEYBOARD_LAST_MODIFIER from the keycode (going into negatives and wrapping around) instead of HID_KEYBOARD_FIRST_MODIFIER. Computing the index wrong meant that BootKeyboard.release(Key_LeftShift.keyCode) never cleared the shift bit from _keyReport.modifiers. This had undesired effects when BootKeyboard was active, and we explicitly wanted to release a single key, but keep the rest of the report intact.
When releasing a modifier, we were computing the bit index wrong: we substracted
HID_KEYBOARD_LAST_MODIFIER
from the keycode (going into negatives and wrapping around) instead ofHID_KEYBOARD_FIRST_MODIFIER
. Computing the index wrong meant thatBootKeyboard.release(Key_LeftShift.keyCode)
never cleared the shift bit from_keyReport.modifiers
. This had undesired effects when BootKeyboard was active, and we explicitly wanted to release a single key, but keep the rest of the report intact.