2. Raspberry Pi Pico. Newer, so it's less well documented, but much more powerful.
For the RPi Pico specifically, the TinyUSB driver is the way to go. This also supports USB host (plugging a keyboard into the Pico), but that didn't support the mouse scrollwheel when I tried.
https://github.com/hathach/tinyusb/blob/master/examples/devi...
If you're interested in larger-scale manufacturing, and are willing to invest more time and effort in once-off R&D to reduce the per-unit cost, then there's a lot more options of other MCUs (e.g. PIC, Cypress, STM32).
https://en.wikipedia.org/wiki/List_of_common_microcontroller...
Mitch Davis gave a great talk at the Embedded Online Conference this year (which my wonderful manager assigned us time to watch during working hours!), where he bridges the gap between hobbyist Arduino development and professional Embedded engineering. (It's closer than you might think)
https://www.youtube.com/watch?v=mI4FDp5crhE
Miro Samek also has a great series of lectures (which I learned about in the same Embedded Online Conference), which then levels up from an Arduino-style "superloop" to an RTOS, Active Object design pattern, and beyond.
https://youtu.be/o3eyz1gEqGU?t=363
Welcome to embedded development, I hope you enjoy creating new gadgets, and don't forget to share your adventures with the community so we can encourage you along!
In addition, I programmed an ESP32 board to do the same thing, but as a Bluetooth keyboard. Both the Teensy and ESP32 can be programmed via the Arduino development environment.
Now there's cheap and there's cheap. The stuff I use is cheap in terms of, it won't break the bank for a R&D or hobby project. Then there's cheap in terms of wringing cost out of a commercial product, which I know little to nothing about.
This is a very astute distinction that hobbyists wanting to go from Arduino to production often miss.
I went from the basically cost-unconstrained world of Medical Devices to wearable consumer sensors (e.g., heart rate monitors, etc.) and it was a bit of a shock to see just how much impact cost had. I mean, you know that in a "theoretical" sense, but it's completely different when you are dealing with it on a daily basis.
The Edit feature is also very useful, and I often go back to add more details, like you added the (~$1) afterwards. In future, please can you write "Edit" when doing that? It appears that duskwuff has been downvoted, because they assumed that "cheap" meant for a personal hobbyist level, not a professional mass-produced level, and now their comment makes less sense because Arduino & RPi are more expensive than $1. Please do continue to use the Edit feature, it's cleaner than writing a new comment! Just please keep in mind how that affects others.
As for me, I use Arduino, RPi, and ESP8266 for personal use, and NXP i.MX RT1050 chips at work, all of which are outside the price range, so there's not much more I can say. I imagine that the chip shortage is raising many prices these days though.
LCSC is another option: https://lcsc.com/products/Microcontroller-Units-MCUs-MPUs-SO...