Raw Gadget is a kernel module that allows to emulate USB devices from userspace
github.com
github.com
When you plug an embedded Linux device like a phone into something, it could use USB gadgets to expose internal storage as a mass storage device, create a tty and expose that as a USB ACM/CDC device, etc- and using the gadget mechanism, allocate USB endpoints to each of these functions, and enable or disable them at runtime.
So, this project seems to be allowing a Linux device to emulate arbitrary peripherals to an external USB host.
Prior work in this area: see Facedancer. Neat.
That's why they have a separate subproject for it-
https://github.com/xairy/raw-gadget/blob/master/dummy_hcd/RE...
But you certainly could know more than me about it! Why do you think it's exclusively for acting as a USB gadget connected to the Linux kernel it's running on?
I found documentation about this in the submission to mainline: https://lwn.net/ml/linux-usb/461a787e63a9a01d83edc563575b858...
For final integration tests, you can use an additional microcontroller to be the key matrix. Instead of wiring up keyswitches, wire the microcontroller to the matrix pins, and have it accept commands over the serial port to set the matrix to a certain state. This way, you can do a full end-to-end test on your real hardware.
The only place USB gadget emulation might be helpful is in writing the code that switches the keyboard from compatibility mode (6KRO) to the NKRO mode. It's been done a million times, though, so there is plenty of library code to just copy.
While I could achieve all of that with OS driver and plover the sad reality is that I am unable to install my own software on my corporate PC and I would like to have consistent environment at my home and office.
Do keep in mind that /usr/share/dict/words is about 10x larger than the flash on microcontrollers. This is why most people do the steno conversion in software, not on the keyboard itself.
If it wasn't clear yet it is my personal project, I don't plan to make product from it.
The F103 is also interesting in that it is well-supported by Rust and Tinygo, if C isn't your thing. I picked it because QMK supports it (and works great), but I'm actually planning to write the firmware in Go and ditch all the things that bug me about QMK. However the USB stack is not there and I dread writing it. I might pull a QMK and just have ChibiOS run my Go code ;)
I was initially thinking about something that is already bluetooth enabled like ESP32 or CC2640R2 (I have development boards for both of these) but the design suddenly gets exponentially more complex if you want to get it right. Also, neither has a package that I can easily solder. I know it is just aesthetics, but I really like a clean board.
The base layout will be a small grid that will fit traditional (ie. dvorak;) layout but that I will also be able to change to my liking. I plan to be able to experiment with 3d printed keys to support traditional steno or maybe some other chorded method. I don't have much experience with steno so I want to keep my options open.
Configuration and dictionaries will be provided on an SD card.
The keyboard will be reversible (ie. the enclosure such that it will be possible to rotate entire mounting plate with the switches and PCB) to provide negative slope.
And yes, it will be RGB because even if the keys are not marked it is still nice to be able to see individual keys in the dark for more complicated Emacs bindings...
If I were trying to do the project you are talking about, I would experiment with coming up with a way for a Raspberry Pi running Plover to act as a usb gadget to connect to your work PC. I'd think it'd also be quite simple to get Plover to output words over serial to an atmega32u4 that can act as a HID keyboard.
So you have keyboard -> RPi with Plover -> Atmega32u4 -> Work PC.
Then you don't have to come up with the chording/dictionary support yourself.
In fact I've had a very similar project on the backburner myself. I'm planning to eventually end up with an nrf52840 combined with a RPi Zero W, so the entire device can act as a bluetooth keyboard with chording support for any PC or phone that can use a bluetooth keyboard.
I haven't made a lot of progress so far however.
I was planning to have a way to disable the RPi and have it just act as a basic bluetooth keyboard so I can save battery when I'm not using Plover.
What this new module provides is new userspace API to the gadget subsystem, making the dummy hcd much more practical especially for testing USB driver code