
OpenDeck r3.1.2
shanteacontrols/OpenDeck
A platform for building interactive control and sensing devices using MIDI and OSC built with Zephyr RTOS.

ThinkPad X240 keyboard and ClickPad USB HID controller using Raspberry Pi Pico RP2040, QMK firmware, and OpenSCAD enclosure files.
X240 pico rev b is an open-source printed circuit board by nikolareljin, from the nikolareljin/x240-kbd repository on GitHub. It is a 2-layer board of 100 × 80 mm with 42 parts on 110 nets, routed with 1,665 tracks and 174 vias.
It is built around the 74HC165D. Its parts include 9 resistors, 8 connectors, 5 capacitors, 4 ICs and 1 transistor. It belongs with the keyboards and input boards and the RP2040 boards of this library.
A standalone USB keyboard with touchpad and TrackPoint, built from a ThinkPad X240 keyboard assembly (FRU 0C44020) and its Synaptics ClickPad, driven by a Raspberry Pi Pico (RP2040) running QMK.
Works on any OS without drivers — it enumerates as a standard USB HID composite device (keyboard + mouse + media keys).

Project status: design, not yet built. The matrix pinout is unverified until the probing step runs on real hardware, and the TrackPoint route (via the ClickPad's PS/2 pass-through) is the expected architecture, confirmed by the same step. Everything else here is designed to survive either answer. Track progress in the issues — nine milestones from documentation to release.
| Component | Detail |
|---|---|
| Controller | Raspberry Pi Pico, RP2040, 26 GPIO |
| Keyboard | X240 0C44020, 40-pin 0.5 mm FPC; matrix size measured by probing |
| Sense expansion | 3 × 74HC165 shift registers — 24 sense lines on 3 GPIO |
| Touchpad + TrackPoint | Synaptics ClickPad, PS/2 on GP21/GP22 (RP2040 PIO driver) |
| Backlight | LED strip via 2N7002/BS170 MOSFET on GP26 |
| Power button | GP27, active LOW |
| USB | Micro-USB; USB-C via the Pico's TP1/TP2/TP3 pads |
| Enclosure | Printed split case, or the original X240 base cover, laser-cut plates, a Hammond console or wood |
Why a shift register: the closest documented ThinkPad keyboard of this era needs 26 matrix
lines — every GPIO the Pico has. docs/hardware/gpio-budget.md.
| Build | All-in (USD, Aug 2026) |
|---|---|
| Rev A + your own printer | $90–130 |
| Rev A + reused X240 base cover, no printer | $110–150 |
| Rev B PCB | add $25–35 |
The donor keyboard and palmrest are most of it. Full tiers and part links:
docs/hardware/bom-and-cost.md.
x240-kbd/
├── firmware/qmk/keyboards/x240_pico/ QMK keyboard definition (corrected in milestone M4)
├── hardware/pinout/ FPC pin maps — filled by probing
├── hardware/wiring/ GPIO table (the single authoritative copy) and schematics
├── hardware/pcb/ Rev B KiCad project (milestone M7)
├── tools/matrix_probe/ CircuitPython matrix discovery
├── tools/ps2_sniffer/ CircuitPython PS/2 + Synaptics sniffer
├── cad/ OpenSCAD: split case and small printed parts
└── docs/ The documentation site (GitHub Pages from /docs)
├── hardware/ components, BOM & cost, GPIO budget, sense chain, TrackPoint, backlight, PCB
├── firmware/ architecture, QMK configuration, pointing stack
├── enclosure/ printed, hand-made, integration, durability, presentation
├── references.md · glossary.md
└── images/Everything runs through one entry point, ./dev (verbs from the workspace-wide
script-helpers template; toolchains in
Docker, so the host needs only docker, git and python3):
./dev install # submodules, docker images, a shallow qmk_firmware checkout
./dev build [firmware|docs|tools|cad|pcb|all]
./dev test # host pytest for the tools, link check, shellcheck
./dev preflight # everything CI runs: test + build all
./dev deploy # copy the UF2 to the Pico's RPI-RP2 drive (alias: ./flash)
./dev deploy matrix_probe # copy a probing tool to CIRCUITPY (alias: ./probe <tool>)
./dev devices # RPI-RP2 / CIRCUITPY mounts and serial ports
./dev logs # qmk console — the firmware's debug outputShims ./build, ./test, ./flash, ./probe, ./site wrap the same verbs. Artifacts
land in out/. The Docker images and the qmk_firmware commit are pinned by digest
in scripts/toolchain.env (scripts/pull_toolchain.sh pulls, saves or refreshes them),
so today's build can be repeated later. CI (.github/workflows/ci.yml, via
ci-helpers) runs ./dev test and
./dev build all on every push and PR.
docs/hardware/components.md,
docs/hardware/bom-and-cost.md../probe matrix_probe, then ./probe ps2_sniffer, following
hardware/pinout/probing_procedure.md. Do not
wire the Pico to anything before this is done.ASSEMBLY.md Phase 2, using
hardware/wiring/wiring_diagram.md../dev build then ./dev deploy (hold BOOTSEL while
plugging in). Without ./dev: copy firmware/qmk/keyboards/x240_pico into a QMK
checkout and qmk compile -kb x240_pico -km default. The firmware builds (custom
74HC165 matrix, PIO PS/2 host, Synaptics + TrackPoint decoding); the key map is a
placeholder until probing (#38). docs/firmware/qmk-configuration.md.docs/enclosure/printed.md; no printer:
docs/enclosure/handmade.md.docs/enclosure/presentation.md
has the assembly order.| FN + | Action | FN + | Action | |
|---|---|---|---|---|
| F1 | Mute | F9 | Settings | |
| F2 | Volume down | F10 | Bluetooth | |
| F3 | Volume up | F11 | Backlight step | |
| F4 | Mic mute (F20) | F12 | Print Screen | |
| F5 | Brightness down | PgUp / PgDn | Home / End | |
| F6 | Brightness up | Left / Right | Previous / next track | |
| F7 | External display | Esc | FN Lock | |
| F8 | Wireless toggle |
Wire a USB-C female breakout (one with 5.1 kΩ CC pull-downs) to the pads on the Pico's underside:
| Pico pad | Signal | Breakout |
|---|---|---|
| TP1 | GND | GND |
| TP2 | USB D− | D− |
| TP3 | USB D+ | D+ |
| VBUS (pin 40) | 5 V | VBUS |
Set usb_c = true in cad/bottom_case.scad for the USB-C cutout. No firmware change.
The illustration
docs/images/usb_c_wiring.pngis decorative; its pad labels predate this table and are not the wiring reference. Source: Pico datasheet, test points.
Alternatively use a Pimoroni Pico LiPo (USB-C native, same pinout).
RPI-RP2 drive → drag the .uf2../dev deploy, or hold the top-left key (Esc) while plugging in (Bootmagic).RUN pad, reachable through the
case, so BOOTSEL + reset works without opening anything.The site is built from docs/ (GitHub Pages, milestone M1). Start at
docs/README.md. Builder guides: ASSEMBLY.md,
PLAN.md. Changes: CHANGELOG.md.
Annotated list in docs/references.md. The projects this one stands
on: delingren/thinkpad_keyboards,
hamishcoleman/thinkpad-usbkb,
thedalles77/USB_Laptop_Keyboard_Controller.
nikolareljin/x240-kbd · GPL-2.0, matching QMK.
Updated daily. Total and unique cloners over the last 14 days.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 6 | 10k | R_Array_Convex_4x0603 | RN1, RN2, RN3, RN4, RN5, RN6 |
| 4 | MountingHole_2.2mm_M2 | H1, H2, H3, H4 | |
| 4 | 100n | C_0603_1608Metric | C1, C2, C3, C4 |
| 3 | MountingHole_2.7mm_M2.5 | H5, H6, H7 | |
| 3 | 100R | R_0603_1608Metric | R7, R8, R9 |
| 3 | 74HC165 | TSSOP-16_4.4x5mm_P0.65mm | U2, U3, U4 |
| 2 | 4.7k | R_0603_1608Metric | R1, R2 |
| 2 | DNP 4.7k | R_0603_1608Metric | R3, R4 |
| 1 | 100k | R_0603_1608Metric | R6 |
| 1 | 10k | R_0603_1608Metric | R5 |
| 1 | 10u | C_0805_2012Metric | C5 |
| 1 | 2N7002 | SOT-23 | Q1 |
| 1 | BL supply 3V3/VBUS | SolderJumper-3_P1.3mm_Open_RoundedPad1.0x1.5mm | JP1 |
| 1 | FH12-12S ClickPad FPC | Hirose_FH12-12S-0.5SH_1x12-1MP_P0.50mm_Horizontal | J2 |
| 1 | FH12-40S keyboard FPC | Hirose_FH12-40S-0.5SH_1x40-1MP_P0.50mm_Horizontal | J1 |
| 1 | J_KB FPC lines 1-40 | PinHeader_2x20_P2.54mm_Vertical | J3 |
| 1 | J_LED 3V3/GP28R/GND | PinHeader_1x03_P2.54mm_Vertical | J8 |
| 1 | J_MAT drive/sense/aux | PinHeader_2x17_P2.54mm_Vertical | J4 |
| 1 | J_PS2 bus/aux | PinHeader_1x08_P2.54mm_Vertical | J6 |
| 1 | J_TP ClickPad lines 1-12 | PinHeader_1x12_P2.54mm_Vertical | J5 |
| 1 | J_USBC TP1/TP2/TP3/VBUS | PinHeader_1x04_P2.54mm_Vertical | J7 |
| 1 | RESET | SW_PUSH_6mm | SW1 |
| 1 | Raspberry_Pi_Pico | RaspberryPi_Pico_Common_THT | U1 |

shanteacontrols/OpenDeck
A platform for building interactive control and sensing devices using MIDI and OSC built with Zephyr RTOS.

slu4coder/Minimal-64x4-Home-Computer
My DIY TTL home computer with VGA and PS/2 and 4x the processing power of a Commodore C64 or Apple II.

slu4coder/Minimal-UART-Computer-1-2
Legacy: Version 1 and 2 of my TTL-only CPU featuring UART I/O, an expansion port, 512KB SSD at up to 10MHz clock speed


westlicht/performer-hardware
PER|FORMER Eurorack Sequencer - Hardware Design Files

slu4coder/Minimal-64-Home-Computer
Legacy: Full TTL-only home computer with VGA and PS/2 and twice the processing power of a Commodore 64


It measures 100 × 80 mm and has 2 copper layers, 1.6 mm thick.
42 parts, built around the 74HC165D. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the nikolareljin/x240-kbd repository on GitHub, at the commit this page was made from: the board is hardware/pcb/x240_pico_rev_b.kicad_pcb and its schematic hardware/pcb/x240_pico_rev_b.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask nikolareljin before reusing the design.