Merge pull request #98 from davidbkemp/master

Make the right shift key work in OemToAscii (only the left shift key was...
This commit is contained in:
Kristian Sloth Lauszus 2015-03-03 18:31:15 +01:00
commit 13851a466f

View file

@ -168,8 +168,8 @@ uint8_t KeyboardReportParser::OemToAscii(uint8_t mod, uint8_t key) {
// [a-z]
if (VALUE_WITHIN(key, 0x04, 0x1d)) {
// Upper case letters
if ((kbdLockingKeys.kbdLeds.bmCapsLock == 0 && (mod & 2)) ||
(kbdLockingKeys.kbdLeds.bmCapsLock == 1 && (mod & 2) == 0))
if ((kbdLockingKeys.kbdLeds.bmCapsLock == 0 && shift) ||
(kbdLockingKeys.kbdLeds.bmCapsLock == 1 && shift == 0))
return (key - 4 + 'A');
// Lower case letters