Epomaker TH40 - custom QMK firmware
A 40% keyboard whose three indicator lamps show what Claude Code is doing, plus a general-purpose
status bus anything on the machine can use.
git clone https://github.com/broisnischal/keyboard.git && cd keyboard
./setup.sh # clones QMK, links the keymap, builds
./flash-th40.sh # then: unplug, hold top-left key, plug back in
| Doc | For |
|---|
docs.md | Using the keyboard - every feature and how to trigger it |
keyboard.md | Maintaining the firmware - build, flash, recover, and every gotcha |
CLAUDE.md | Continuing the work - orientation for a coding agent or future you |
The keymap at a glance
All eight layers, drawn from the real keymap.c by
keymap-drawer. Pink cells mark the key I'm holding
to be on that layer. On the layer-reach keys, while held means it dies when I let go and
stay means it latches until I press it again.
The small grey letter in the top-left corner of a cell is the base keycap that cell sits on - so
[ on the Symbols layer is cornered H, and I press the H key. Cells showing ▽ fall straight
through to Base, which is why they have no corner letter.

What you're looking at (the full tour is FEATURES.md):
- Claude Code integration - the three lamps mirror Claude's state live;
◆ ✓ ✕ focus,
approve and interrupt it from anywhere
- Tmux + Windows on one layer - left hand sends tmux's own
⌃b sequences (splits, panes,
windows, sessions), right hand sends the Super chords omarchy binds; H J K L walks tmux panes
and N M , . directly below walks desktop windows
- Layer travel - hold
Fn for System, or both space bars together (tri layer); Fn+◆
latches Tmux+Windows so both hands come free, and Fn+Gui drops every latched layer
- Layer lock - the
' key on any hold layer makes it stick; auto-releases after a minute
- Combos -
Q+W/J+K→Esc, Z+X→undo, C+V→Caps Word, N+M→Del, ,+.→_, .+'→:,
Q+P→lock the keyboard; most of them step aside mid-word so those letters never wait
Tab holds for Nav and Alt+Tab is instant - a pre_process_record_kb hook short-circuits
the tap-hold decision whenever a modifier is already down, which is normally impossible on an
LT() key
- Dynamic macros - record any key sequence on the System layer (
⏺ ▶ ⏹), replay all day
- Caps Word, Repeat/AltRep, key lock, one-shot mods, one-handed mirror,
pattern lock
- 5,300+ scans/sec - eager debounce, 1000 Hz USB, LTO; ~0.7 ms average input latency
Regenerate after a keymap change. postprocess.py adds what qmk c2json cannot see (combos, the
tri-layer chord, the pink held cells); anchors.py prints the base keycap in each
cell's corner. The layer is named Tmux Windows without the + because keymap-drawer wraps a
legend on whitespace, and three lines collided with the hold legend underneath.
qmk c2json --no-cpp -kb epomaker/th40 -km tapdance -o /tmp/th40.json
keymap -c drawings/config.yaml parse -q /tmp/th40.json \
-l Base "Spare 1" Nav Symbols System "Tmux Windows" Digits "Spare 7" \
| python3 drawings/postprocess.py > drawings/keymap.yaml
keymap -c drawings/config.yaml draw drawings/keymap.yaml \
-j qmk/keyboards/epomaker/th40/keyboard.json \
| python3 drawings/anchors.py drawings/keymap.yaml > drawings/keymap.svg
The QMK situation, and why it's not the normal one
Upstream QMK does not support this board
The TH40 uses an es32fs026 (Essemi ES32 / FS026, Cortex-M0). That port does not exist in
qmk/qmk_firmware and there is no PR pending for it. Cloning upstream and looking for
keyboards/epomaker/th40 will find nothing.
The port lives in one community fork:
https://github.com/carlosedp/qmk_firmware
which carries the ES32 platform files, a proprietary wireless blob (lib/rdmctmzt_common), and
about a dozen other Epomaker/Akko boards. The TH40 is on its tested list.
Do not use carlosedp/qmk_firmware_th40 - that is the older, abandoned repo, and its own README
points at the one above.
Cloning it without pulling 4 GB
git clone --depth 1 https://github.com/carlosedp/qmk_firmware.git qmk
cd qmk
git submodule update --init --recursive --depth 1 lib/chibios lib/chibios-contrib
A plain make git-submodule initialises every submodule - pico-sdk, lvgl, lufa, vusb, googletest -
none of which an ARM ChibiOS board touches. The two above are the only ones needed, and the shallow
flags take the clone from roughly 4 GB to 1.4 GB.
setup.sh does exactly this for you.
Where keymaps live, and why this repo doesn't put one there
QMK expects: