adafruit / adafruit/Adafruit_CircuitPython_MacroPad

Example for using the Keyboard or Mouse as a boot device

Open
#52 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
99
Forks
26
PR merge metrics
No merged PRs in 30d

Description

To start off. Thanks for this awesome library and MacroPad. I've been having an absolute blast with it for the last week.

I may be able to help out with the example but I'm not exactly sure where to start.
I want to use the keyboard functions on the RP2040 to interact with GRUB (Dual boot windows and linux selection) but it seems like whatever I do, I cant get GRUB to detect the keyboard as a boot device.

[https://docs.circuitpython.org/en/latest/shared-bindings/usb_hid/index.html#usb_hid.enable](https://docs.circuitpython.org/en/latest/shared-bindings/usb_hid/index.html#usb_hid.enable)

I've enabled the `usb_hid` as stated in the docs about but either the host never requests the boot device or the device isn't reporting it correctly.

I added `usb_hid.enable((Device.KEYBOARD), boot_device=1) # 1 for a keyboard` to my `boot.py` and confirmed its being run, but when I call `usb_hid.get_boot_device()` from `code.py` it's always 0.

Hoping there is a simple example thats known to work.

Just as a note. My PC setup is not conventional, so there is a good possibility that its something weird not related to CircuitPython or this lib.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked usb_hid.enable documentation and the reported boot.py and code.py calls, then check how get_boot_device() is expected to behave for the RP2040 keyboard device. Verify the behavior with GRUB on a comparable setup and document a confirmed working example or the relevant limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.