From e77ff674867e1265508041fbefa78593a617ec6f Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Fri, 22 Oct 2021 00:52:49 +0200 Subject: [PATCH] wip: hid::RCMComposite: BootKeyboard -> 6KRO Signed-off-by: Gergely Nagy --- src/kaleidoscope/driver/hid/RCMComposite.cpp | 2 +- src/kaleidoscope/driver/hid/RCMComposite.h | 2 +- .../driver/hid/rcmcomposite/Keyboard.h | 32 +++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/kaleidoscope/driver/hid/RCMComposite.cpp b/src/kaleidoscope/driver/hid/RCMComposite.cpp index 2d1b2271..3a7a230b 100644 --- a/src/kaleidoscope/driver/hid/RCMComposite.cpp +++ b/src/kaleidoscope/driver/hid/RCMComposite.cpp @@ -23,7 +23,7 @@ namespace hid { namespace rcmcomposite { USBHID RCMHID; -HIDKeyboard RCMBootKeyboard(RCMHID, 1); +HIDKeyboard RCMKeyboard(RCMHID); HIDConsumer RCMConsumer(RCMHID); HIDMouse RCMMouse(RCMHID); USBCompositeSerial CompositeSerial; diff --git a/src/kaleidoscope/driver/hid/RCMComposite.h b/src/kaleidoscope/driver/hid/RCMComposite.h index 8ce637d2..7b501648 100644 --- a/src/kaleidoscope/driver/hid/RCMComposite.h +++ b/src/kaleidoscope/driver/hid/RCMComposite.h @@ -35,7 +35,7 @@ extern USBHID RCMHID; extern USBCompositeSerial CompositeSerial; const uint8_t report_description_[] = { - HID_BOOT_KEYBOARD_REPORT_DESCRIPTOR(), + HID_KEYBOARD_REPORT_DESCRIPTOR(), HID_CONSUMER_REPORT_DESCRIPTOR(), HID_MOUSE_REPORT_DESCRIPTOR() }; diff --git a/src/kaleidoscope/driver/hid/rcmcomposite/Keyboard.h b/src/kaleidoscope/driver/hid/rcmcomposite/Keyboard.h index 27f278e6..cd860ae8 100644 --- a/src/kaleidoscope/driver/hid/rcmcomposite/Keyboard.h +++ b/src/kaleidoscope/driver/hid/rcmcomposite/Keyboard.h @@ -27,56 +27,56 @@ namespace driver { namespace hid { namespace rcmcomposite { -extern HIDKeyboard RCMBootKeyboard; +extern HIDKeyboard RCMKeyboard; extern HIDConsumer RCMConsumer; -class BootKeyboardWrapper { +class KeyboardWrapper { public: - BootKeyboardWrapper() {} + KeyboardWrapper() {} void begin() {} uint8_t getProtocol() { - return 0; + return 1; } void setProtocol(uint8_t protocol) {} void setDefaultProtocol(uint8_t protocol) {} void sendReport() { - RCMBootKeyboard.sendReport(); + RCMKeyboard.sendReport(); } void press(uint8_t code) { - RCMBootKeyboard.press(code); + RCMKeyboard.press(code); } void release(uint8_t code) { - RCMBootKeyboard.release(code); + RCMKeyboard.release(code); } void releaseAll() { - RCMBootKeyboard.releaseAll(); + RCMKeyboard.releaseAll(); } bool isKeyPressed(uint8_t code) { - return RCMBootKeyboard.isKeyPressed(code); + return RCMKeyboard.isKeyPressed(code); } bool wasKeyPressed(uint8_t code) { - return RCMBootKeyboard.wasKeyPressed(code); + return RCMKeyboard.wasKeyPressed(code); } bool isModifierActive(uint8_t code) { - return RCMBootKeyboard.isModifierActive(code); + return RCMKeyboard.isModifierActive(code); } bool wasModifierActive(uint8_t code) { - return RCMBootKeyboard.wasModifierActive(code); + return RCMKeyboard.wasModifierActive(code); } bool isAnyModifierActive() { - return RCMBootKeyboard.isAnyModifierActive(); + return RCMKeyboard.isAnyModifierActive(); } bool wasAnyModifierActive() { - return RCMBootKeyboard.wasAnyModifierActive(); + return RCMKeyboard.wasAnyModifierActive(); } uint8_t getLeds() { - return RCMBootKeyboard.getLEDs(); + return RCMKeyboard.getLEDs(); } }; @@ -103,7 +103,7 @@ class ConsumerControlWrapper { }; struct KeyboardProps: public base::KeyboardProps { - typedef BootKeyboardWrapper BootKeyboard; + typedef KeyboardWrapper NKROKeyboard; typedef ConsumerControlWrapper ConsumerControl; };