mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
fixed otg mouse for apple m1
This commit is contained in:
parent
994b8a62ea
commit
597bbd8b78
@ -65,6 +65,10 @@ def _make_absolute_hid(horizontal_wheel: bool, report_id: Optional[int]) -> Hid:
|
|||||||
# Report ID
|
# Report ID
|
||||||
*([0x85, report_id] if report_id is not None else []),
|
*([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
|
# 8 Buttons
|
||||||
0x05, 0x09, # USAGE_PAGE (Button)
|
0x05, 0x09, # USAGE_PAGE (Button)
|
||||||
0x19, 0x01, # USAGE_MINIMUM (Button 1)
|
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 []),
|
*(_HORIZONTAL_WHEEL if horizontal_wheel else []),
|
||||||
|
|
||||||
# End
|
# End
|
||||||
|
0xC0, # END_COLLECTION (Physical)
|
||||||
0xC0, # END_COLLECTION
|
0xC0, # END_COLLECTION
|
||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
@ -119,6 +124,10 @@ def _make_relative_hid(horizontal_wheel: bool, report_id: Optional[int]) -> Hid:
|
|||||||
# Report ID
|
# Report ID
|
||||||
*([0x85, report_id] if report_id is not None else []),
|
*([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
|
# 8 Buttons
|
||||||
0x05, 0x09, # USAGE_PAGE (Button)
|
0x05, 0x09, # USAGE_PAGE (Button)
|
||||||
0x19, 0x01, # USAGE_MINIMUM (Button 1)
|
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 []),
|
*(_HORIZONTAL_WHEEL if horizontal_wheel else []),
|
||||||
|
|
||||||
# End
|
# End
|
||||||
|
0xC0, # END_COLLECTION (Physical)
|
||||||
0xC0, # END_COLLECTION
|
0xC0, # END_COLLECTION
|
||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user