diff options
Diffstat (limited to 'Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c')
-rw-r--r-- | Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c index abb391cee..d7df58f07 100644 --- a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c +++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c @@ -157,9 +157,13 @@ int main(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) { |