diff options
author | Maxim Devaev <[email protected]> | 2022-07-22 08:43:27 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-07-22 08:43:27 +0300 |
commit | d3dbf19399c09399fce96d5303fe684d2aeb1150 (patch) | |
tree | ca86b92dd148d544109254aa41cf529f7531a875 /hid | |
parent | 3ba15e824e319926c810414b44fb30a7d98419c3 (diff) |
avr hid: removed KEY_ERROR_UNDEFINED
Diffstat (limited to 'hid')
-rw-r--r-- | hid/lib/drivers-avr/usb/hid.h | 2 | ||||
-rw-r--r-- | hid/lib/drivers-avr/usb/keymap.h | 2 | ||||
-rw-r--r-- | hid/lib/drivers-avr/usb/keymap.h.mako | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/hid/lib/drivers-avr/usb/hid.h b/hid/lib/drivers-avr/usb/hid.h index 1fc80eeb..6b334af8 100644 --- a/hid/lib/drivers-avr/usb/hid.h +++ b/hid/lib/drivers-avr/usb/hid.h @@ -99,7 +99,7 @@ class UsbKeyboard : public DRIVERS::Keyboard { void sendKey(uint8_t code, bool state) override { uint8_t usb_code = keymapUsb(code); - if (usb_code != KEY_ERROR_UNDEFINED) { + if (usb_code > 0) { if (state ? _kbd.add(usb_code) : _kbd.remove(usb_code)) { _sendCurrent(); } diff --git a/hid/lib/drivers-avr/usb/keymap.h b/hid/lib/drivers-avr/usb/keymap.h index 2a37b8d9..dd7486ed 100644 --- a/hid/lib/drivers-avr/usb/keymap.h +++ b/hid/lib/drivers-avr/usb/keymap.h @@ -134,6 +134,6 @@ uint8_t keymapUsb(uint8_t code) { case 105: return 102; // Power case 106: return 100; // IntlBackslash case 107: return 137; // IntlYen - default: return KEY_ERROR_UNDEFINED; + default: return 0; } } diff --git a/hid/lib/drivers-avr/usb/keymap.h.mako b/hid/lib/drivers-avr/usb/keymap.h.mako index 41986981..71b33b19 100644 --- a/hid/lib/drivers-avr/usb/keymap.h.mako +++ b/hid/lib/drivers-avr/usb/keymap.h.mako @@ -34,6 +34,6 @@ uint8_t keymapUsb(uint8_t code) { case ${km.mcu_code}: return ${km.usb_key.code}; // ${km.web_name} % endif % endfor - default: return KEY_ERROR_UNDEFINED; + default: return 0; } } |