summaryrefslogtreecommitdiff
path: root/hid/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'hid/src/main.cpp')
-rw-r--r--hid/src/main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/hid/src/main.cpp b/hid/src/main.cpp
index 162636ab..7d575b54 100644
--- a/hid/src/main.cpp
+++ b/hid/src/main.cpp
@@ -285,11 +285,17 @@ static void _sendResponse(uint8_t code) {
# endif
if (_usb_kbd) {
response[1] |= _usb_kbd->isOffline() ? PROTO::PONG::KEYBOARD_OFFLINE : 0;
- response[1] |= _usb_kbd->getLedsAs(PROTO::PONG::CAPS, PROTO::PONG::SCROLL, PROTO::PONG::NUM);
+ KeyboardLedsState leds = _usb_kbd->getLeds();
+ response[1] |= leds.caps ? PROTO::PONG::CAPS : 0;
+ response[1] |= leds.num ? PROTO::PONG::NUM : 0;
+ response[1] |= leds.scroll ? PROTO::PONG::SCROLL : 0;
response[2] |= PROTO::OUTPUTS1::KEYBOARD::USB;
} else if (_ps2_kbd) {
response[1] |= _ps2_kbd->isOffline() ? PROTO::PONG::KEYBOARD_OFFLINE : 0;
- response[1] |= _ps2_kbd->getLedsAs(PROTO::PONG::CAPS, PROTO::PONG::SCROLL, PROTO::PONG::NUM);
+ KeyboardLedsState leds = _usb_kbd->getLeds();
+ response[1] |= leds.caps ? PROTO::PONG::CAPS : 0;
+ response[1] |= leds.num ? PROTO::PONG::NUM : 0;
+ response[1] |= leds.scroll ? PROTO::PONG::SCROLL : 0;
response[2] |= PROTO::OUTPUTS1::KEYBOARD::PS2;
}
if (_usb_mouse_abs) {