← ~/portfolio /dev/cyberdeck REC --:--:-- uid=1000(aarav)

CYBERDECK

hello, friend.

A handheld computer built from the parts of other machines. A ThinkPad X100e keyboard, a main screen, a side screen, and a Teensy 4.1 that makes a bare laptop ribbon cable speak USB.

MOD-01OPTICS // TURNTABLEFRM 01/29
8 FPS
MOD-02SPECREV C
INPUT
ThinkPad X100e keyboard, 83 keys + TrackPoint
CONTROLLER
Teensy 4.1 · ARM Cortex-M7 @ 600 MHz
DISPLAY
main LCD + side display
INTERFACE
USB HID: keyboard + mouse
MATRIX
no diodes, ghost-blocked in firmware
FIRMWARE
C++ / Teensyduino
STATUS
● OPERATIONAL

⚠ 3.3V LOGIC ONLY. DO NOT FEED IT 5V.

MOD-03CAM_03 // LIVECH-03
NO SIGNALawaiting feed
LIVE
MOD-04SCOPE // TRACKPOINT PS/2~12 kHz
CH1 CLKCH2 DATA

> pkt 29 05 FE → dx +5 · dy −2 · [L]

MOD-05README.TXT2.1K

A cyberdeck is a DIY portable computer: part laptop, part art project, all exposed wiring. Mine is a black shell with a ThinkPad keyboard across the bottom, a main display that lifts off to get at the guts, and a smaller screen hanging off the side.

The hard part was the keyboard. Laptop keyboards don't speak USB. They're a grid of traces on a flat ribbon cable. No controller, no diodes, and for the X100e, no published pinout. So the Teensy does the job the laptop's embedded controller used to do: scan the grid, work out which key is down, and report it as a normal USB keyboard.

> the TrackPoint is its own PS/2 device on the same ribbon. The Teensy talks to that too.

MOD-06EVIDENCE // BUILD LOG5 FILES
A Teensy 4.1 with Ethernet, still in its anti-static bag
EXHIBIT A: the brain arrives
Breadboard with a Teensy, a bundle of jumper wires, the side display and the X100e keyboard on a desk
EXHIBIT B: breadboard + ribbon spaghetti
The Teensy 4.1 pinout reference card
EXHIBIT C: the pinout card
Soldering station with helping hands and a magnifier holding the Teensy
EXHIBIT D: helping hands, loupe, flux
The underside of the Teensy with dozens of colored wires soldered to its pins
EXHIBIT E: every pin wired. no going back
CASE NOTES

10 days from unboxing to every pin wired.

suspects: 1 teensy, ~40 wires, 1 keyboard with no manual.

status: solved.

MOD-07PROTOCOL // HOW IT TALKS5 STEPS
  1. Drive a row. The Teensy pulls one row of the grid low and floats the rest.
  2. Read the columns. Any column that follows it low has a key pressed where it crosses that row.
  3. Repeat. Every row, over and over. A full sweep takes well under a millisecond.
  4. Kill the ghosts. With no diodes, holding three corners of a rectangle fakes the fourth. The firmware spots that shape and ignores it.
  5. TrackPoint. It speaks PS/2. The Teensy decodes its 3-byte packets into USB mouse moves. Hold middle + push = scroll.
MOD-08MATRIX_SCOPE8×14

> press keys on your keyboard (or tap the grid). try holding 3.

demo grid. the real X100e map is learned by the mapper.

MOD-09TTY // SERIAL @ 115200x100e_mapper

        
      
MOD-10SRC // x100e_usb.inoscanMatrix()
void scanMatrix() {
  for (int r = 0; r < N_ROWS; r++) {
    pinMode(ROW_PINS[r], OUTPUT);
    digitalWrite(ROW_PINS[r], LOW);
    delayMicroseconds(SETTLE_US);

    uint32_t bits = 0;
    for (int c = 0; c < N_COLS; c++)
      if (digitalRead(COL_PINS[c]) == LOW)
        bits |= (1UL << c);
    raw[r] = bits;

    // snap high, then float, so a held key
    // can't leak into the next row
    digitalWrite(ROW_PINS[r], HIGH);
    pinMode(ROW_PINS[r], INPUT_PULLUP);
  }
}
MOD-11MANIFEST12 ITEMS
IDPARTQTY
0x01Teensy 4.1 (w/ Ethernet)1
0x02ThinkPad X100e keyboard1
0x03TrackPoint + buttons1
0x04Main LCD + driver board1
0x05Side display1
0x06Single-board computer1
0x07Black enclosure1
0x08Breadboard1
0x09Jumper wires~40
0x0AHelping hands + loupe1
0x0BSoldertoo much
0x0CSleep0
MOD-12$ ls -l firmware/3 FILES