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 @@ -219,7 +219,7 @@ size_t USBHIDKeyboard::pressRaw(uint8_t k)
219219 uint8_t i;
220220 if (k >= 0xE0 && k < 0xE8 ) {
221221 // it's a modifier key
222- _keyReport.modifiers |= (1 <<(k-0x80 ));
222+ _keyReport.modifiers |= (1 <<(k-0xE0 ));
223223 } else if (k && k < 0xA5 ) {
224224 // Add k to the key report only if it's not already present
225225 // and if there is an empty slot.
@@ -250,7 +250,7 @@ size_t USBHIDKeyboard::releaseRaw(uint8_t k)
250250 uint8_t i;
251251 if (k >= 0xE0 && k < 0xE8 ) {
252252 // it's a modifier key
253- _keyReport.modifiers &= ~(1 <<(k-0x80 ));
253+ _keyReport.modifiers &= ~(1 <<(k-0xE0 ));
254254 } else if (k && k < 0xA5 ) {
255255 // Test the key report to see if k is present. Clear it if it exists.
256256 // 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