Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for using the Keyboard or Mouse as a boot device #52

Open
jmalfara opened this issue Dec 1, 2023 · 0 comments
Open

Example for using the Keyboard or Mouse as a boot device #52

jmalfara opened this issue Dec 1, 2023 · 0 comments

Comments

@jmalfara
Copy link

jmalfara commented Dec 1, 2023

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant