hid: using KEY_ERROR_UNDEFINED instead of 0

This commit is contained in:
Devaev Maxim
2018-07-13 06:34:32 +00:00
parent 30f7fc052e
commit 65b3bd8866
3 changed files with 3 additions and 4 deletions

View File

@@ -20,8 +20,7 @@ INLINE void cmdResetHid() {
INLINE void cmdKeyEvent() {
uint8_t state = CMD_SERIAL.read();
KeyboardKeycode code = keymap((uint8_t)CMD_SERIAL.read());
CMD_SERIAL.read(); // unused now
if (code) {
if (code != KEY_ERROR_UNDEFINED) {
if (state) {
Keyboard.press(code);
} else {