Hello,
I am new to micropython and just picked up a Raspberry Pi Pico to experiment with. I was trying to create macros to type into the connected device as a HID keyboard. I attempted to use the pyd library with pyd.USB_HID() to send keystrokes with send(), however then realised that this was for a different board altogether.
What options do I have to perform such tasks?
Thank you
Keyboard input
Re: Keyboard input
I've got the same question myself.
It's definately possible to do it on the Pico itself, since TinyUSB is mentioned in chapter 2.3.6 of the C/C++ SDK document (https://datasheets.raspberrypi.org/pico ... -c-sdk.pdf). However, looking at the source for the rp2 module (https://github.com/raspberrypi/micropyt ... les/rp2.py), it would appear that there's only stuff for PIO in there. To me (and I may have missed something), it doesn't look like there's an easy way to use USB device mode on the Pico yet without writing C/C++ code.
It's definately possible to do it on the Pico itself, since TinyUSB is mentioned in chapter 2.3.6 of the C/C++ SDK document (https://datasheets.raspberrypi.org/pico ... -c-sdk.pdf). However, looking at the source for the rp2 module (https://github.com/raspberrypi/micropyt ... les/rp2.py), it would appear that there's only stuff for PIO in there. To me (and I may have missed something), it doesn't look like there's an easy way to use USB device mode on the Pico yet without writing C/C++ code.

Re: Keyboard input
I've found a solution involving using Adafruit's CircuitPython instead of MicroPython.
CircuitPython has a beta release for the Pi Pico (https://circuitpython.org/board/raspberry_pi_pico/) that supports usb_hid and Adafruit has a handly library to simplify HID interactions (https://github.com/adafruit/Adafruit_CircuitPython_HID). I've been able to get keyboard inputs working this way.

CircuitPython has a beta release for the Pi Pico (https://circuitpython.org/board/raspberry_pi_pico/) that supports usb_hid and Adafruit has a handly library to simplify HID interactions (https://github.com/adafruit/Adafruit_CircuitPython_HID). I've been able to get keyboard inputs working this way.
