Skip to the content
PCBKitNew board
2 layers106 × 121.5 mmKeySync, the printed circuit board in 3D

A custom MIDI keypad PCB that combines hardware design and music technology. Featuring mechanical switches, sliders, rotary encoders, NeoPixels, and capacitive touch to create a personalized MIDI controller for interactive music production.

Size
106 × 121.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
7
Nets
16
Pads
40
Tracks, vias
58, 0
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
19 Oct 2026
Updated
27 Oct 2026

Overview

KeySync is an open-source printed circuit board by ZaraeQurashi, from the ZaraeQurashi/KeySync repository on GitHub. It is a 2-layer board of 106 × 121.5 mm with 7 parts on 16 nets, routed with 58 tracks and 0 vias.

Its parts include 3 switches, 1 IC and 1 connector. It belongs with the audio and music boards and the ESP32 boards of this library.

README

README.md

KeySync — Custom MIDI Controller

A custom-built MIDI controller inspired by Undertale, featuring seven heart-shaped capacitive touch keys, two mechanical pushbuttons, and a rotary encoder.

KeySync combines custom PCB design, programming, and game inspired aesthetics to create a unique musical device. The heart-shaped touch pads are inspired by the 7 SOULS from the game UNDERTALE, giving the controller a recognizable design while serving as its main musical input.

image

Table of Contents


Project Overview

KeySync started as an idea for a custom MIDI controller that would combine my interests in electronics, programming, and video games. Instead of using a standard keyboard layout, I wanted to design something with a distinct appearance that reflected the games that inspired it.

The project involved designing the circuit in KiCad, arranging components on a custom PCB, creating heart-shaped copper electrodes for the touch keys, routing the board, developing the firmware, and documenting the parts required to build it.

One of the main goals was to make the controller visually interesting while still keeping the controls practical. The seven touch keys provide the main musical input, the mechanical pushbuttons add two extra notes, and the rotary encoder provides a convenient way to control system volume.

Project Details

CategoryDetails
Project nameKeySync
Project typeCustom MIDI controller
MicrocontrollerSeeed Studio XIAO ESP32-S3
PCB design softwareKiCad
Firmware languagePython
Firmware environmentCircuitPython
Keyboard frameworkKMK
Main inputs7 capacitive touch pads
Additional inputs2 mechanical pushbuttons
Encoder1 rotary encoder
Design inspirationUNDERTALE

Hardware

KeySync is built around the Seeed Studio XIAO ESP32-S3 microcontroller. The board acts as the controller for the inputs and runs the firmware that determines how the device responds to them.

The hardware consists of three main input groups.

1. Capacitive Touch Keys

The seven heart-shaped electrodes are the main controls on KeySync. They are designed to detect touch and correspond to individual notes in a C-major scale.

Unlike a mechanical switch, a capacitive touch key doesn't require a physical contact to close a circuit. Instead, the sensing system detects a change in capacitance when a finger approaches or touches the electrode.

image

2. Mechanical Pushbuttons

KeySync also includes two low-profile mechanical pushbuttons. These provide additional physical inputs that can be used alongside the touch keys.

The firmware assigns each button a separate drum note, allowing them to trigger additional sounds or percussion samples in compatible MIDI software. The buttons use GPIO inputs configured with pull-ups, with the inputs changing state when the buttons connect their respective pins to ground.

image

3. Rotary Encoder

The rotary encoder provides a control that can be turned in either direction. In the current firmware configuration, it is intended to adjust the computer's system volume.

image

PCB Design

The PCB was designed in KiCad. After completing the schematic, I moved on to arranging the components, creating the board outline, designing the custom heart-shaped electrodes, and routing the electrical connections.

Schematic and Component Placement

The schematic defined the electrical connections between the microcontroller and the various inputs. Once the schematic was ready, I transferred the components into the PCB layout and began arranging them to fit the board.

During this stage, I encountered footprint sizing issues and had to adjust an oversized footprint to fit the available space. I also revised some schematic connections and custom footprint pad numbers to make sure the PCB layout matched the intended electrical connections.

This reinforced the importance of checking the physical dimensions of components and the electrical mapping of their pads.

image

Routing

After settling on the component placement, I routed the PCB using both copper layers.

  • F.Cu — Front copper: Used for routing the capacitive touch key connections.
  • B.Cu — Back copper: Used for routing the mechanical switch connections.

Using both layers helped organize the traces and make better use of the available board space.

Controls and Key Mapping

The firmware is configured to map the seven touch keys to a C-major scale, the two mechanical buttons to drum notes, and the rotary encoder to system volume control.

Capacitive Touch Keys

Touch keyMIDI note numberIntended note
Heart 160C4
Heart 262D4
Heart 364E4
Heart 465F4
Heart 567G4
Heart 669A4
Heart 771B4

Mechanical Pushbuttons

ButtonMIDI note numberIntended use
Button 136Drum/percussion trigger
Button 238Drum/percussion trigger

Rotary Encoder

ControlFunction
Rotary encoderIncrease or decrease computer system volume
Communication methodMedia-key commands in the current firmware design
image

Firmware

The firmware is written in Python using CircuitPython and KMK. It handles input scanning, maps the controls to their intended functions, and provides the logic needed for the controller to respond to touches, button presses, and encoder movements.

Firmware Structure

The code is organized around several main responsibilities:

Touch sensing: Reads the state of the seven capacitive touch inputs and detects changes between touched and untouched states.

Button scanning: Reads the two mechanical pushbuttons and determines when they are pressed or released.

Key mapping: Associates each touch key and pushbutton with its assigned MIDI note.

Encoder controls: Reads the rotary encoder and triggers the appropriate system volume command.

image

GPIO Pin Mapping

The following GPIO assignments are from the current firmware configuration.

ControlGPIO pin
Capacitive touch key 1GPIO3
Capacitive touch key 2GPIO4
Capacitive touch key 3GPIO5
Capacitive touch key 4GPIO6
Capacitive touch key 5GPIO7
Capacitive touch key 6GPIO8
Capacitive touch key 7GPIO9
Mechanical pushbutton 1GPIO43
Mechanical pushbutton 2GPIO44
Rotary encoder signal AGPIO1
Rotary encoder signal BGPIO2

MIDI Behaviour

The seven touch keys are intended to send MIDI note events corresponding to the C-major scale. Touching a key triggers a Note On event, while releasing it triggers a matching Note Off event.

The two mechanical pushbuttons are assigned to notes 36 and 38 for percussion.


Challenges and Lessons Learned

Developing KeySync involved more than creating a circuit board. Some of the most important work happened while adapting the firmware and making sure the software matched the hardware.

PCB Design Challenges

Creating the PCB required me to design custom heart-shaped electrodes, fit the components within the board outline, fix an oversized footprint, and revise pad numbers and connections. Routing the switches and touch keys across two copper layers also required careful planning.

These challenges taught me to check both the physical and electrical sides of a design. A footprint can look correct on screen but still be unsuitable for the actual component, and an attractive layout is not useful if the pads do not connect to the intended signals.

image

Firmware Compatibility

I initially explored an Arduino-based firmware approach and encountered compatibility problems involving USB MIDI classes, MIDI event types, and capacitive touch functions. I eventually moved to CircuitPython and KMK, which meant adapting the implementation instead of simply transferring the earlier code.

This taught me that code written for one development environment does not automatically work in another. Microcontroller features, library APIs, and USB support can differ significantly between boards and programming environments.


Final Summary

KeySync brought together my interests in electronics, programming and gaming into one custom MIDI controller inspired by UNDERTALE. From designing the PCB and seven heart-shaped capacitive touch keys in KiCad to developing the CircuitPython/KMK firmware, creating the BOM, and documenting everything on GitHub, I gained hands-on experience with both hardware and software. Although troubleshooting firmware compatibility was challenging, it taught me to approach problems systematically and consider how every part of a project works together. Overall, KeySync helped me better understand the process of turning an idea into a custom electronic device.

image

Parts

7
QtyValueFootprintReferences
2LOGOLOGOG***, G***
2SW_PushHackclub Footprints:Kailh Choc Low-Profile SwitchesSW1, SW2
1Conn_01x07Zarae's Library:Capacitative Keys HeartJ1
1RotaryEncoder_Switch_MPRotary_Encoder:RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mmSW3
1XIAO-ESP32-S3Hackclub Footprints:XIAO ESP32-S3U1

Questions

How big is the KeySync PCB?

It measures 106 × 121.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the KeySync use?

7 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 KeySync KiCad files?

From the ZaraeQurashi/KeySync repository on GitHub, at the commit this page was made from: the board is PCB/Keysync.kicad_pcb and its schematic PCB/Keysync.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the KeySync design in my own project?

Its repository states no licence, so its author keeps all rights: ask ZaraeQurashi before reusing the design.

Similar boards

  • 2 layersEncoder, the printed circuit board in 3D

    Encoder

    byrantech/laptop

    anyon_e, a highly integrated, high end, open source laptop. Attempt the impossible.

    7 parts4.3kMIT
  • 2 layers40 × 20 mmSensor smd, the printed circuit board in 3D

    Sensor smd

    scottbez1/splitflap

    DIY split-flap display

    7 parts4.2k
  • 2 layers19.8 × 30 mmZ limit, the printed circuit board in 3D

    Z limit

    opulo-inc/lumenpnp

    The LumenPnP is an open source pick and place machine.

    7 parts3.7k
  • 2 layers35.6 × 58.2 mmDisplay Carrier, the printed circuit board in 3D

    Display Carrier

    AxxAxx/AxxSolder

    STM32 Based soldering station for JBC cartridges, 9-24 VDC and USB-PD power

    7 parts1.7kGPL-3.0
  • 2 layers20.3 × 16.3 mmMap MPX, the printed circuit board in 3D

    Map MPX

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    7 parts1.2k
  • 2 layers26 × 44 mmCompact carrier board, the printed circuit board in 3D

    Compact carrier board

    jamro/tiny-engineer

    A small desktop robot that brings an AI coding assistant to life, physically acting out when it reads files, thinks, writes code, and finishes work.

    7 parts1.1k
  • 2 layers26.4 × 53.8 mmAtari pickup, the printed circuit board in 3D

    Atari pickup

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    7 parts1kGPL-3.0
  • 2 layersRj45 breakout, the printed circuit board in 3D

    Rj45 breakout

    rene-dev/stmbl

    AC Servo Driver for STM32F4

    7 parts990GPL-3.0