Skip to content

Commit 148cf26

Browse files
authored
Merge pull request #443 from felis/CR
0x13 was returned instead of a carriage return (0x0D or '\r')
2 parents 0bafc87 + f88e737 commit 148cf26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hidboot.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void KeyboardReportParser::Parse(USBHID *hid, bool is_rpt_id __attribute__((unus
160160
const uint8_t KeyboardReportParser::numKeys[10] PROGMEM = {'!', '@', '#', '$', '%', '^', '&', '*', '(', ')'};
161161
const uint8_t KeyboardReportParser::symKeysUp[12] PROGMEM = {'_', '+', '{', '}', '|', '~', ':', '"', '~', '<', '>', '?'};
162162
const uint8_t KeyboardReportParser::symKeysLo[12] PROGMEM = {'-', '=', '[', ']', '\\', ' ', ';', '\'', '`', ',', '.', '/'};
163-
const uint8_t KeyboardReportParser::padKeys[5] PROGMEM = {'/', '*', '-', '+', 0x13};
163+
const uint8_t KeyboardReportParser::padKeys[5] PROGMEM = {'/', '*', '-', '+', '\r'};
164164

165165
uint8_t KeyboardReportParser::OemToAscii(uint8_t mod, uint8_t key) {
166166
uint8_t shift = (mod & 0x22);
@@ -192,7 +192,7 @@ uint8_t KeyboardReportParser::OemToAscii(uint8_t mod, uint8_t key) {
192192
else {
193193
switch(key) {
194194
case UHS_HID_BOOT_KEY_SPACE: return (0x20);
195-
case UHS_HID_BOOT_KEY_ENTER: return (0x13);
195+
case UHS_HID_BOOT_KEY_ENTER: return ('\r'); // Carriage return (0x0D)
196196
case UHS_HID_BOOT_KEY_ZERO2: return ((kbdLockingKeys.kbdLeds.bmNumLock == 1) ? '0': 0);
197197
case UHS_HID_BOOT_KEY_PERIOD: return ((kbdLockingKeys.kbdLeds.bmNumLock == 1) ? '.': 0);
198198
}

0 commit comments

Comments
 (0)