Skip to the content
PCBKitNew board
2 layers97.4 × 91 mmKeypad, the printed circuit board in 3D

The crljn keypad: six keys, a rotary encoder with a push button and a 1.69 inch display, on an ESP32-S3 Super Mini. This repository holds its firmware and its circuit board.

Size
97.4 × 91 mm
Copper layers
2
Thickness
1.6 mm
Parts
19
Nets
18
Pads
82
Tracks, vias
63, 0
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
13 Aug 2026
Updated
5 Nov 2026

Overview

Keypad is an open-source printed circuit board by crljnlabs, from the crljnlabs/keyboard repository on GitHub, published under the MIT licence. It is a 2-layer board of 97.4 × 91 mm with 19 parts on 18 nets, routed with 63 tracks and 0 vias.

It belongs with the keyboards and input boards and the ESP32 boards of this library.

README

README.md

keyboard

The crljn keypad: six keys, a rotary encoder with a push button and a 1.69 inch display, on an ESP32-S3 Super Mini. This repository holds its firmware and its circuit board.

Over USB the keypad is a vendor-defined HID device, so no operating system treats it as a keyboard and nothing it sends ever types into a window. What a key does is up to the program on the PC, anydeck, whose device contract (docs/device-protocol.md there) this firmware keeps to.

  • What the keypad says over USB, byte for byte: docs/hid.md

The firmware itself is short: src/main.cpp names the keypad's parts, and the anydeck library does everything between them and the PC. PlatformIO fetches it from GitHub.

What the firmware does

  • Reads the six keys and the encoder, and reports them to the PC.
  • Tells the PC what it is made of, the display included.
  • Plays anydeck's intro on the display at the start, then shows what the PC sends, put together from pieces.
  • Shows a status screen of its own while the PC does not draw: the encoder's position and last direction, and which keys are held.
  • Sleeps: the display after 5 minutes on its own screen, the whole keypad while the Mac sleeps; a key wakes the Mac if the Mac allows it.
  • Logs over the same USB cable, as a serial port.

Building and flashing

Needs Python 3 and PlatformIO (pio). Everything else - the toolchain, the anydeck library, LovyanGFX, esptool - PlatformIO fetches itself on the first build. Before every build the scripts fetch the anydeck library's newest commit, and the build's manifest.json says which one went in.

Working on the library at the same time: clone it next to this repository and link it instead, so every change there is in the next build here.

bash
git clone https://github.com/crljnlabs/anydeck-library.git ../anydeck-library
ini
lib_deps = symlink://../anydeck-library
bash
python3 scripts/flash.py

The everyday command: compiles, flashes the board and opens the serial monitor. It remembers the port that worked and only asks again when that one is gone. -p <port> picks a port once, --no-monitor leaves the monitor closed.

bash
python3 scripts/build.py

Compiles only, into build/<timestamp>/, which is not tracked.

bash
python3 scripts/deploy.py

Publishes a build that already exists as a version, release/<version>/, which is tracked. It never compiles, so the bytes that were tested are the bytes that get published. It suggests the newest build and the next minor version.

bash
python3 release/install.py

Flashes a published version, the newest unless one is named; --list shows them. Nothing is published yet.

Technology

  • C++ with PlatformIO and the Arduino framework, for the ESP32-S3 Super Mini (module ESP32-S3FH4R2: 4 MB flash, 2 MB PSRAM). The platform is pioarduino's, pinned to Arduino core 3.3.12 (ESP-IDF 5.5.5), so a build is reproducible. PlatformIO's own platform ends at core 2.0.17, whose USB driver dropped the keypad off the bus while reports and display packets crossed; platformio.ini says more.
  • USB through TinyUSB (ARDUINO_USB_MODE=0), which a vendor-defined HID interface needs; the serial port sits next to it on the same device.
  • The display, an ST7789 panel, through the anydeck library and LovyanGFX; its panel, size and pins are in src/main.cpp.

Where things are

src/main.cppthe firmware: which parts the keypad has, on which pins
include/pins.hevery GPIO the firmware touches, and why the pins do not match the schematic's net names
platformio.inithe board and the USB setup
docs/the USB protocol
kicad/schematic, board, 3D model, gerbers and an interactive BOM
scripts/building, flashing and publishing
release/published versions, and the script that installs them

Parts

19
QtyValueFootprintReferences
1ESP32 Left SiteConnector_PinSocket_2.54mm:PinSocket_1x09_P2.54mm_VerticalESP_LS1
1ESP32 Right SiteConnector_PinSocket_2.54mm:PinSocket_1x09_P2.54mm_VerticalESP_RS1
1Rotary EncoderConnector_PinSocket_2.54mm:PinSocket_1x05_P2.54mm_HorizontalRE1
1SW_Push_1PCM_Switch_Keyboard_Hotswap_Kailh:SW_Hotswap_Kailh_MX_1.00uSW1
1SW_Push_2PCM_Switch_Keyboard_Hotswap_Kailh:SW_Hotswap_Kailh_MX_1.00uSW2
1SW_Push_3PCM_Switch_Keyboard_Hotswap_Kailh:SW_Hotswap_Kailh_MX_1.00uSW3
1SW_Push_4PCM_Switch_Keyboard_Hotswap_Kailh:SW_Hotswap_Kailh_MX_1.00uSW4
1SW_Push_5PCM_Switch_Keyboard_Hotswap_Kailh:SW_Hotswap_Kailh_MX_1.00uSW5
1SW_Push_6PCM_Switch_Keyboard_Hotswap_Kailh:SW_Hotswap_Kailh_MX_1.00uSW6
1TFT DisplayConnector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_VerticalTFT1

The 10 most common of 19 parts.

Questions

How big is the Keypad PCB?

It measures 97.4 × 91 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Keypad use?

19 parts. 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.

Where can I download the Keypad KiCad files?

From the crljnlabs/keyboard repository on GitHub, at the commit this page was made from: the board is kicad/Keypad.kicad_pcb and its schematic kicad/Keypad.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Keypad design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers43.9 × 27.7 mmTcd1304-4v, the printed circuit board in 3D

    Tcd1304-4v

    OpnTec/open-spectrometer-hardware

    Open source VIS spectrometer

    19 parts1.5k
  • 2 layers50 × 60 mmDebate Device, the printed circuit board in 3D

    Debate Device

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    19 parts915
  • 2 layers102.9 × 96.7 mmISA adapter, the printed circuit board in 3D

    ISA adapter

    polpo/picogus

    Emulation of ISA sound cards and CD-ROM on Raspberry Pi Pico (GUS, SB/Adlib, MPU-401, Tandy, CMS, Panasonic CD-ROM) with USB mouse/joystick support

    19 parts805
  • 2 layers60 × 39 mmPs2usb, the printed circuit board in 3D

    Ps2usb

    rasteri/HIDman

    Adapting USB devices to work on old computers

    19 parts432
  • 2 layers70.1 × 43.2 mmIaq device, the printed circuit board in 3D

    Iaq device

    nkitanov/iaq_board

    IAQ Board is a DIY (Do-It-Yourself) device for measuring internal air quality

    19 parts396
  • 2 layers80 × 80 mmGB BRK CPU G1, the printed circuit board in 3D

    GB BRK CPU G1

    Gekkio/gb-hardware

    Game Boy -related custom hardware by gekkio

    19 parts379CC-BY-4.0
  • 2 layers25.4 × 25.4 mmIna169, the printed circuit board in 3D

    Ina169

    Ardumower/ardumower

    Develop an open source robotic lawn mower (HW+SW reference platform)

    19 parts282
  • 2 layers58.4 × 28.6 mmNew rele, the printed circuit board in 3D

    New rele

    zmaker/arduino_cookbook

    gli sketch del nuovo progetto Arduino Cookbook e dei video di YouTube

    19 parts269