File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ size_t USBHIDKeyboard::pressRaw(uint8_t k)
222222 uint8_t i;
223223 if (k >= 0xE0 && k < 0xE8 ) {
224224 // it's a modifier key
225- _keyReport.modifiers |= (1 <<(k-0x80 ));
225+ _keyReport.modifiers |= (1 <<(k-0xE0 ));
226226 } else if (k && k < 0xA5 ) {
227227 // Add k to the key report only if it's not already present
228228 // and if there is an empty slot.
@@ -253,7 +253,7 @@ size_t USBHIDKeyboard::releaseRaw(uint8_t k)
253253 uint8_t i;
254254 if (k >= 0xE0 && k < 0xE8 ) {
255255 // it's a modifier key
256- _keyReport.modifiers &= ~(1 <<(k-0x80 ));
256+ _keyReport.modifiers &= ~(1 <<(k-0xE0 ));
257257 } else if (k && k < 0xA5 ) {
258258 // Test the key report to see if k is present. Clear it if it exists.
259259 // Check all positions in case the key is present more than once (which it shouldn't be)
You can’t perform that action at this time.
0 commit comments