summaryrefslogtreecommitdiff
path: root/kvmd
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2021-07-10 14:52:35 +0300
committerDevaev Maxim <[email protected]>2021-07-10 14:52:35 +0300
commit597bbd8b78f97a754e001733052a87c9b9de53bb (patch)
treea4761457103602370e54e64b9625ca01f1bd3591 /kvmd
parent994b8a62ea256a53585e6ef22c82004bea626839 (diff)
fixed otg mouse for apple m1
Diffstat (limited to 'kvmd')
-rw-r--r--kvmd/apps/otg/hid/mouse.py10
1 files changed, 10 insertions, 0 deletions
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
]),
)