The write-up
How Cyberdeck is built
a handheld computer from spare parts
hardware · embedded
What
A handheld computer from spare parts: a ThinkPad X100e keyboard, a main screen, a side screen and a black shell, all exposed wiring.
Why
Laptop keyboards do not speak USB. They are a bare grid on a ribbon cable, and nobody publishes the X100e’s.
How
A Teensy 4.1 does the laptop’s job, scanning the grid and reporting a normal keyboard and mouse. A mapper asks for each of 86 keys and prints the keymap, and with no diodes, the firmware spots the rectangle three held keys make and ignores the fourth they fake.
Built with
- Teensy 4.1
- ARM Cortex-M7
- C++
- Teensyduino
- ThinkPad X100e keyboard
- TrackPoint
- Vanilla JS
- Hand-drawn SVG
- FFmpeg
By the numbers
- lines of source
- 2,108
- days from unboxing to every pin wired
- 10
- MHz on the Teensy 4.1
- 600
- stop-motion frames
- 29
- keys on the X100e
- 83
- diodes in its matrix
- 0
- keys the mapper asks for
- 86
- bytes per TrackPoint packet
- 3
- panels on the page
- 12
Languages
| C++ / Teensyduino | 639 | 30.3% |
| JavaScript | 588 | 27.9% |
| CSS | 583 | 27.7% |
| HTML | 298 | 14.1% |
On the wire
- USB HID
- keyboard, mouse and media keys on one cable
- Matrix
- one row driven low at a time, columns on pull-ups
- PS/2
- TrackPoint frames, read on the falling clock edge
- GPIO
- every ribbon contact on its own pin, 3.3 V only
- Serial
- 115200 baud, the mapper prints keymap.h
Firmware
- Matrix scan
- Ghost blocking
- Debounce
- Fn layer
- PS/2 host
- Middle-button scroll
- Matrix mapper
APIs
- USB HID keyboard
- USB HID mouse
- USB media keys
- PS/2
- Serial monitor
Also
29 frames of stop-motion, shot by hand.