Skip to content

Commit 2a6d856

Browse files
committed
Merge branch 'usbshiftkey' of https://github.com/bbx10/ArduinoCore-samd
2 parents f1c1833 + 69cf567 commit 2a6d856

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ SAMD CORE 1.6.3
1313
* variant.h/cpp: PWM capability is now determined by PIN_ATTR_PWM combined with
1414
PIN_ATTR_TIMER or PIN_ATTR_TIMER_ALT for timer selection.
1515
* Small fix to USBHost example "USB_desc.ino". Thanks @bbx10
16+
* USBHost: USB-Keyboard right shift key was ignored. Thanks @bbx10
1617

1718
SAMD CORE 1.6.2 2015.11.03
1819

libraries/USBHost/src/hidboot.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ uint8_t KeyboardReportParser::OemToAscii(uint8_t mod, uint8_t key) {
189189
// [a-z]
190190
if (VALUE_WITHIN(key, 0x04, 0x1d)) {
191191
// Upper case letters
192-
if ((kbdLockingKeys.kbdLeds.bmCapsLock == 0 && (mod & 2)) ||
193-
(kbdLockingKeys.kbdLeds.bmCapsLock == 1 && (mod & 2) == 0))
192+
if ((kbdLockingKeys.kbdLeds.bmCapsLock == 0 && shift) ||
193+
(kbdLockingKeys.kbdLeds.bmCapsLock == 1 && shift == 0))
194194
return (key - 4 + 'A');
195195

196196
// Lower case letters

0 commit comments

Comments
 (0)