Skip to content
thnikkPublic

About

Controller and Keypad Firmware

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Logo

Fork Badge

Web Config

Firmware for RP2040-based keypads. This is a replacement for the old Unified 2022 firmware, utilizing the advantages of GP2040-th like the RNDIS web server and removing unnecessary features. The intention is to have a more stripped down and stable base to work with and focus on usability over runtime board configuration.

Supported Boards

All boards use an RP2040 or RP2350 microcontroller. Existing boards using the SAMD21 are NOT compatible.

Supported boards

Flashing

Download the latest .uf2 for your board from the releases page.

To flash:

  1. Hold the BOOTSEL button on the keypad (or double-tap reset) and plug it in.
  2. The keypad appears as a USB drive named RPI-RP2.
  3. Drag the .uf2 file onto the drive. The keypad reboots with the new firmware.

Web Config

Hold the first key while powering on to open the web config; hold the second key to enter the bootloader. The device appears as a network adapter and serves the configurator at http://192.168.7.1, where you can remap keys, set up macros, and adjust LED colors. Boards with a display show CFG at 192.168.7.1 on the bottom row while the config is active.

No keypad handy? Try the configurator at demo.thnikk.moe — it runs the same web UI against example board data.

Input Modes

MP2040 currently supports the following input modes:

  • Keyboard: Full NKRO HID report (default)
  • MIDI: Send MIDI notes on a configured channel with global and per-key velocities
  • XInput: Presents as an Xbox 360 controller (PC)
  • XBOne: Presents as an Xbox One controller (PC, supports USB CDC and capture button)
  • Switch Pro: Emulates a Pro Controller (Nintendo hardware)
  • PS3: Presents as a PS3 controller
  • PS4: Presents as a PS4 controller (supports auth-dongle passthrough over the USB host port where available; otherwise unauthenticated with no timeout on PC and ~8-minute timeout on console)
  • PS5: Presents as a PS4 arcade stick for PS5 backward compatibility (same auth note as PS4)

Key Scanning

How the board reads the keys:

  • Direct GPIO: Each key is wired directly to a GPIO pin
  • Matrix: Keys are wired to grids of rows and columns
  • Capacitive Touch: Each key is a capacitive touch pad
  • Touch Ring: 4 pad touch ring

Fonts and Icons

The ScreenPad on-screen labels use Nunito (SIL Open Font License). Its icon picker uses Font Awesome Free solid icons (icons CC BY 4.0, font SIL OFL). License texts are in assets/licenses/.

Development

Build the firmware:

python3 docker-build.py -b 2k

Output: build/MP2040_<version>_<sha>_<Board>.uf2. docker-build.py flags: -b <Board>, -c clean, -v verbose, -f flash to board, -n nuke first, -p <path> flash mount, -w auto-boot to web config after flashing.

Run the web config mock server:

./web-config.py

web-config.py runs npm install if needed, then serves the configurator at http://localhost:3000. Flags: -b <Board>, -u <version> (fake update), -p <port>, --dev-board (proxy to a real board).

About

Controller and Keypad Firmware

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages