Control Function is a visual editor for physical keyboard layouts — lay out keys and knobs on a grid, size and label them, group and rotate clusters, and export the result as a JSON layout file. This project was largely built by AI.
The tabs at the top pick which layer of the keyboard you're working on. Keycaps is the full editor — everything below. Circuit places the boards under the caps; the caps themselves freeze and dim there, though they can still be selected so a board can be drawn around them. Switches and Firmware are named but not built yet — picking one bounces straight back to whichever mode you were on, with a toast saying so.
Select multiple keys, then press Make rotation group in the sidebar to bundle them into one piece. A group moves and rotates together — drag it to move, use the rotate handle to spin it around its pivot, drag the pivot to change the rotation centre, or hit ungroup to split it apart again.
In Circuit mode, Add circuit board (or P) draws a board around the selected keys, or drops a default-sized one if nothing's selected — a fixed rectangle marking out the keys on one physical board, for a split keyboard's two halves or the like. Keys inside get a faint tint. Hover a board to move, resize, or delete it; boards never overlap each other.
Drag a board's outline to move it, or click without dragging to select it — ⇧‑click or marquee-drag to select several — opening its own panel above the key panel. ⌫ deletes every selected board. Click the panel's title to rename a board; a name already used by another board gets a numbered suffix. A board's shape is either rectangular — the whole placed rectangle — or cutout, which keeps that rectangle as the maximum size and takes back out of it everything no key sits on, following the grid. A cutout's offset steps the outline away from the keys, a quarter unit at a time, never past the placed rectangle.
Picks how scroll and drag gestures map to pan and zoom. Trackpad: scroll pans, pinch or middle‑drag zooms. Mouse: scroll zooms, middle‑drag pans.
The first swatch (Auto) follows your system's light/dark setting. The other four (Light, Retro, Nord, Dark) pick a palette by hand, which turns Auto off.
Export board saves the layout to a JSON file. Import board loads one back in. Reset clears the board back to its starting state.