diff options
Diffstat (limited to 'Demos/Host/LowLevel')
-rw-r--r-- | Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c | 8 | ||||
-rw-r--r-- | Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c index 84e6145fb..6df052d72 100644 --- a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c +++ b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c @@ -173,9 +173,13 @@ void ReadNextReport(void) PressedKey = (KeyCode - HID_KEYBOARD_SC_A) + 'A'; } else if ((KeyCode >= HID_KEYBOARD_SC_1_AND_EXCLAMATION) & - (KeyCode <= HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS)) + (KeyCode < HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS)) { - PressedKey = (KeyCode - HID_KEYBOARD_SC_1_AND_EXCLAMATION) + '0'; + PressedKey = (KeyCode - HID_KEYBOARD_SC_1_AND_EXCLAMATION) + '1'; + } + else if (KeyCode == HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS) + { + PressedKey = '0'; } else if (KeyCode == HID_KEYBOARD_SC_SPACE) { diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c index 512cc1ae2..6ef7a9677 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c @@ -287,9 +287,13 @@ void ProcessKeyboardReport(uint8_t* KeyboardReport) PressedKey = (KeyCode - HID_KEYBOARD_SC_A) + 'A'; } else if ((KeyCode >= HID_KEYBOARD_SC_1_AND_EXCLAMATION) & - (KeyCode <= HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS)) + (KeyCode < HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS)) { - PressedKey = (KeyCode - HID_KEYBOARD_SC_1_AND_EXCLAMATION) + '0'; + PressedKey = (KeyCode - HID_KEYBOARD_SC_1_AND_EXCLAMATION) + '1'; + } + else if (KeyCode == HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS) + { + PressedKey = '0'; } else if (KeyCode == HID_KEYBOARD_SC_SPACE) { |