So It's very hacky and probably a bit off topic but I wanted to share this fun project I worked on, I called it Playwrite. It's a combination of a custom made, Teensy (Arduino compatible microcontroller) based dock and bespoke Lua "game".
The 3D printed dock uses USB serial to proxy inputs from a USB keyboard (here the mechanical Logitech POP Keys which is just perfect for the job). Arrow keys, Enter and Escape are directly mapped to the directions, A and B buttons respectively (and so are the A and S keys when not in the dedicated Playwrite game). So the keyboard can be used anywhere in the OS or in games that don't rely on the crank (not because it's unusable; but because it's just not convenient).
Then for the Playwrite app, I'm encoding keyspresses for the rest of the keys as crankchange angles in the dock and decoding them back to chars in the app. The rest is basically a text editor manipulating a Lua table. You can then export your prose to a .txt in the data directory.
Haha thanks. I didn't know about freewrite before doing this project but it sure looks similar. A foldable/portable version of the Playwrite dock is certainly doable and with a bit of software development would come fairly close. @dave told me that it should also eventually become much simpler to send data to the playdate via serial, making my hack obsolete and most importantly the data transmission faster and more reliable.
So yeah, I'm not going to start a business but a v2 of this dock is certainly within reach and could bring us close to the freewrite use case, along with better external controller support.
And for V3 we can add an HDMI out for a full Switch-style dock experience
Necro'ing this thread to say if your keyboard already has a user-addressable microcontroller with USB host support in it, you can skip the dock and talk to the Playdate directly!
Here, I've bodged Tom's crank encoder from the dock into the Solder Party BBQ20KBD, which has an RP2040 under the hood. This method only needs a powered USB-C connection between the two (there's a powered USB hub in the background), no intermediary microcontroller.
Video at aworkth.ing, too. Is this the first "third-party" keyboard for Playwrite?
This would come in very handy for using my MicroPython REPL on the go!
If anyone is working on defining a standard protocol for keyboard input over the msg serial command (preferably one that can coexist with my protocol for byte-stream input), I would be interested in supporting that in PewPew.
The msg command didn't exist when I made this project, which is why I came up with the crank encoder hack. In the camera project I used another hack which allows executing a lua function with an arbitrary payload in order to stream images to the playdate. But yes now that msg is a thing it feels like it's the way forward, and it shouldn't be hard to rewrite the Playwrite app to support this protocol.