X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=protocol%2Fiwrap%2Fiwrap.c;h=6a404116a15cccff2724c779e952b7c1133c7589;hb=190dd9a18cefdcc453c6aa9fb14c477b9cc17382;hp=9c68761bf0f79086dd894a8318ce5ddc04600847;hpb=f4125707399d11a7d80587659c464b9bcddb8c56;p=max%2Ftmk_keyboard.git
diff --git a/protocol/iwrap/iwrap.c b/protocol/iwrap/iwrap.c
index 9c68761b..6a404116 100644
--- a/protocol/iwrap/iwrap.c
+++ b/protocol/iwrap/iwrap.c
@@ -29,7 +29,7 @@ along with this program. If not, see .
#include
#include
#include
-#include "usb_keycodes.h"
+#include "keycode.h"
#include "suart.h"
#include "uart.h"
#include "report.h"
@@ -334,8 +334,8 @@ static void send_keyboard(report_keyboard_t *report)
// HID raw mode header
xmit(0x9f);
xmit(0x0a); // Length
- xmit(0xa1); // keyboard report
- xmit(0x01);
+ xmit(0xa1); // DATA(Input)
+ xmit(0x01); // Report ID
xmit(report->mods);
xmit(0x00); // reserved byte(always 0)
xmit(report->keys[0]);
@@ -351,15 +351,17 @@ static void send_mouse(report_mouse_t *report)
{
#if defined(MOUSEKEY_ENABLE) || defined(PS2_MOUSE_ENABLE)
if (!iwrap_connected() && !iwrap_check_connection()) return;
- MUX_HEADER(0x01, 0x07);
+ MUX_HEADER(0x01, 0x09);
// HID raw mode header
xmit(0x9f);
- xmit(0x05); // Length
- xmit(0xa1); // mouse report
- xmit(0x02);
+ xmit(0x07); // Length
+ xmit(0xa1); // DATA(Input)
+ xmit(0x02); // Report ID
xmit(report->buttons);
xmit(report->x);
xmit(report->y);
+ xmit(report->v);
+ xmit(report->h);
MUX_FOOTER(0x01);
#endif
}
@@ -457,8 +459,8 @@ static void send_consumer(uint16_t data)
MUX_HEADER(0x01, 0x07);
xmit(0x9f);
xmit(0x05); // Length
- xmit(0xa1); // consumer report
- xmit(0x03);
+ xmit(0xa1); // DATA(Input)
+ xmit(0x03); // Report ID
xmit(bits1);
xmit(bits2);
xmit(bits3);