Skip to content

Instantly share code, notes, and snippets.

@bitboy85
bitboy85 / boot.py
Last active September 23, 2023 16:16
Circuit python 7 absolute mouse example
import usb_hid
# https://stackoverflow.com/questions/36750287/two-byte-report-count-for-hid-report-descriptor
absolute_mouse = usb_hid.Device(
report_descriptor=bytes(
# Absolute mouse
(0x05, 0x01) # Usage Page (Generic Desktop)
+ (0x09, 0x02) # Usage (Mouse)
+ (0xA1, 0x01) # Collection (Application)
+ (0x09, 0x01) # Usage (Pointer)
@bitboy85
bitboy85 / kbd1.txt
Last active March 9, 2021 08:16
Keyboard HID desciptors
Information for device USB-compliant keyboard (VID=0x062A PID=0x0201):
Connection Information:
------------------------------
Device current bus speed: LowSpeed
Device supports USB 1.1 specification
Device supports USB 2.0 specification
Device address: 0x0009
Current configuration value: 0x00
Number of open pipes: 0