Skip to content

Commit 18dbbc4

Browse files
authored
Merge pull request #1837 from jepler/nkro-update
update boot.py for 7.0.0
2 parents 1692867 + cde16c9 commit 18dbbc4

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

CircuitPython_MacroPad_NKRO/boot.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
0x05, 0x01, # Usage Page (Generic Desktop),
77
0x09, 0x06, # Usage (Keyboard),
88
0xA1, 0x01, # Collection (Application),
9-
0x85, 0xFF, # 6,7 Report ID [SET AT RUNTIME]
9+
0x85, 0x04, # 6,7 Report ID
1010
# bitmap of modifiers
1111
0x75, 0x01, # Report Size (1),
1212
0x95, 0x08, # Report Count (8),
@@ -39,19 +39,19 @@
3939
))
4040

4141
bitmap_keyboard = usb_hid.Device(
42-
report_descriptor = bitmap_keyboard_descriptor,
43-
usage_page = 0x1,
44-
usage = 0x6,
45-
in_report_length = 16,
46-
out_report_length = 1,
47-
report_id_index = BITMAP_KEYBOARD_DESCRIPTOR_REPORT_ID,
42+
report_descriptor=bitmap_keyboard_descriptor,
43+
usage_page=0x1,
44+
usage=0x6,
45+
report_ids=(4,),
46+
in_report_lengths=(16,),
47+
out_report_lengths=(1,),
4848
)
4949

50-
print(bitmap_keyboard)
51-
devices = [
52-
bitmap_keyboard,
53-
usb_hid.Device.CONSUMER_CONTROL,
54-
usb_hid.Device.MOUSE,
55-
]
56-
usb_hid.enable(devices)
57-
print("enabled HID with custom keyboard device")
50+
usb_hid.enable(
51+
(
52+
bitmap_keyboard,
53+
usb_hid.Device.MOUSE,
54+
usb_hid.Device.CONSUMER_CONTROL,
55+
)
56+
)
57+
print("enabled HID with custom keyboard device")

0 commit comments

Comments
 (0)