This repository contains custom firmware for the ZSA Moonlander keyboard.
There once was a more elaborate setup in place, including a custom QMK abstraction as well as custom implemented features and a test infrastructure. This was removed for the sake of simplicity. You can still find the source code under the git tag unicode.
To run:
- WinCompose to enter Unicode code-points. Set
the compose key to
F13
(in%appdata%\WinCompose\settings.ini
->[composing]compose_key=VK.F13
)
To compile & flash:
-
The Make build tool
-
The Wally flashing tool
-
The QMK MSYS development environment (set environment variable
QMK_HOME
to path of installation) -
ZSA's fork of the QMK firmware (check current release branch)
git clone --recurse-submodules --branch firmware23 https://github.com/zsa/qmk_firmware zsa_qmk_firmware
There is a Makefile
setup which automates many of the building steps. It
automatically redirects all commands to the MSYS environment for Windows.
Following make targets have been setup:
make build
: Builds the keymapmake flash
: Builds and flashes the firmware on the keyboard. In order for this command to work, you must first set your keyboard in reset-mode (RESET
inkeymap.c
)make setup
: Configure QMK to use this repositorymake clean
: Remove keymap binarymake console
: Start the QMK debug consolemake all
: Compile keymap
There also is a msys.cmd
file available, which allows you to either
execute commands directly in the MSYS environment or start an interactive
shell if executed without additional process arguments.
-
Install and configure the prerequisites
-
Clone your keymap code into
keyboards/moonlander/keymaps/<layout>
git clone [email protected]:fl3pp/moonlander_firmware.git /c/dev/qmk/zsa_qmk_firmware/keyboards/moonlander/keymaps/fl3pp
- Setup the QMK Environment using
make
make setup
- Compile your firmware
make build
To enable debugging, activate the console in the compilation rules in
rules.mk
:
CONSOLE_ENABLE = yes
Inside your keymap, you can then use the uprintf
function as replacement
for printf
.
To view the printed messages, start the QMK debug console:
make console
Note: The console functionality is about 5KB in size, and depending on your
messages, can take up quite a few CPU cycles. So if you aren't actively
debugging your keymap, exclude the code from linking into your binary using
the CONSOLE_ENABLE
compilation symbol.
-
List supported keyboards
.\msys.cmd qmk list-keyboards
-
Print a layout of a keyboard using:
.\msys.cmd qmk info --keyboard <keyboard> --layouts