hrvach / deskhop

Fast Desktop Switching Device
GNU General Public License v3.0
5.96k stars 166 forks source link

Mouse key support in QMK keyboard #115

Open ak66666 opened 3 days ago

ak66666 commented 3 days ago

This change made the mouse work with Deskhop in my QMK-base keyboard.

I added a special case to handle mouse keys and touchpad in QMK keyboard. It is uses report id 2 to detect the mouse endpoint and adjusts the offset value.

This data was captured in Wireshark for the mouse keys and trackpad used in my board: LEFT : HID Data: 0200f8000000 RIGHT : HID Data: 020008000000 UP : HID Data: 020000f80000 DOWN : HID Data: 020000080000

The original RC branch code treated LEFT mouse key (or trackpad gesture) as UP, so I figured the issue was in that one byte offset. I added the special case for report_id == 2 (which I believe describes the mouse USB endpoint).

ak66666 commented 3 days ago

Forgot to mention: this change also fixed all three mouse buttons and up/down wheel scroll too.