Just registered on the forum
(long time lurker
) to answer your question, as I have been toying with the same idea for a while.
My motivation is to have a pocket device that I could run a REPL
(preferably Common LISP, Clojure
) on and run code snippets like on a programmable calculator, while it still being a "smart" device, able to load documentation, PDFs, etc.
There used to be iPhone slide out bluetooth keyboards which seem perfect for a task like this. I can't find them anywhere for sale anymore
. The solutions I have found involve a bit of DIY, I hope you don't mind - it's just that there probably isn't anything like what we are looking for available as a product.
First of all, there is the Pinephone keyboard case. It's been designed to feel similar to Psion 5 keys, the layout is nice.
.
It connects to the Pinephone through the 6 shaped pads in the back of the case, that make contact with the phone's pogo pins. You can solder to these pads, or build your own pogo connector. The keyboard itself speaks I2C, so you could add a microcontroller that would present itself to your phone as a HID device and connect it over USB
(or Bluetooth...
). See docs here
https://wiki.pine64.org/wiki/PinePhone_%28Pro%29_Keyboard.
You'll probably need to do some plastic cutting to make the back shell fit your phone. The keyboard doesn't have a ready-to-use USB out for the keyboard, but it does have two USB-C connectors, one for the internal battery charging
(yes!
), another for connecting peripherals to the Pinephone. BTW maybe the chip connected to one of them could be reprogrammed to present itself as an USB HID device? I have one of these keyboards, it's one of my unfinished projects to convert it into something usable
(I don't have a Pinephone
).
Another idea is to repurpose a broken handheld PC.
https://liliputing.com/diy-smartphone-keyboard-made-from-salvaged-psion-5-pda-parts/
There are community designed PCBs to use particular keyboards
(like Psion 5's
) as USB devices
(e.g.
https://github.com/RasmusB/USB-Keyboard-Adapter), some of them sold on Tindie
(https://www.tindie.com/products/rasmusb/usb-keyboard-adapter-for-psion-series-5-keyboards/
). All that remains then is hollowing out the screen assembly of the donor palmtop and adding some brackets+connectors for your phone. Even if there are no ready-made adapters, a keyboard is usually a simple device, and its pins correspond to columns and rows of keys. See guides for DIY mechanical keyboard wiring like this one
(https://www.crackedthecode.co/a-complete-guide-to-building-a-hand-wired-keyboard/#hand-wiring-your-keyboard
) for a bit of understanding how keyboards generally work - even if the keyboard assembly has some weird chips in it and an odd pin-out, you can always tear it out and solder to the column/row lines
(or the switches/contacts directly
).
You could also get yourself one of thin pushbutton keyboards like M5Stack's CardKB or Bobricius's PiQWERTY
(https://www.tindie.com/stores/bobricius/
) and then try constructing a clamshell case around it - especially if you have access to a 3D printer. People are making "DIY tiny laptops" and publishing the enclosure STLs - maybe these could be repurposed?
Cheers
Jakub