From 597bbd8b78f97a754e001733052a87c9b9de53bb Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Sat, 10 Jul 2021 14:52:35 +0300 Subject: fixed otg mouse for apple m1 --- kvmd/apps/otg/hid/mouse.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'kvmd/apps/otg') diff --git a/kvmd/apps/otg/hid/mouse.py b/kvmd/apps/otg/hid/mouse.py index 40f7280f..762dedb2 100644 --- a/kvmd/apps/otg/hid/mouse.py +++ b/kvmd/apps/otg/hid/mouse.py @@ -65,6 +65,10 @@ def _make_absolute_hid(horizontal_wheel: bool, report_id: Optional[int]) -> Hid: # Report ID *([0x85, report_id] if report_id is not None else []), + # Pointer and Physical are required by Apple Recovery + 0x09, 0x01, # USAGE (Pointer) + 0xA1, 0x00, # COLLECTION (Physical) + # 8 Buttons 0x05, 0x09, # USAGE_PAGE (Button) 0x19, 0x01, # USAGE_MINIMUM (Button 1) @@ -96,6 +100,7 @@ def _make_absolute_hid(horizontal_wheel: bool, report_id: Optional[int]) -> Hid: *(_HORIZONTAL_WHEEL if horizontal_wheel else []), # End + 0xC0, # END_COLLECTION (Physical) 0xC0, # END_COLLECTION ]), ) @@ -119,6 +124,10 @@ def _make_relative_hid(horizontal_wheel: bool, report_id: Optional[int]) -> Hid: # Report ID *([0x85, report_id] if report_id is not None else []), + # Pointer and Physical are required by Apple Recovery + 0x09, 0x01, # USAGE (Pointer) + 0xA1, 0x00, # COLLECTION (Physical) + # 8 Buttons 0x05, 0x09, # USAGE_PAGE (Button) 0x19, 0x01, # USAGE_MINIMUM (Button 1) @@ -145,6 +154,7 @@ def _make_relative_hid(horizontal_wheel: bool, report_id: Optional[int]) -> Hid: *(_HORIZONTAL_WHEEL if horizontal_wheel else []), # End + 0xC0, # END_COLLECTION (Physical) 0xC0, # END_COLLECTION ]), ) -- cgit v1.2.3