Welcome to the high-performance QMK firmware optimization fork for the NuPhy Air96 V2 wireless mechanical keyboard. This repository is dedicated to pushing the performance, latency, and power-efficiency boundaries of the Air96 V2 hardware.
Only the air96_v2/ansi keyboard is maintained. All other keyboards have been removed to keep this repository focused, lightweight, and streamlined.
qmk compile -kb air96_v2/ansi -km defaultBinary output: air96_v2_ansi_default.bin
📥 Download Pre-compiled Release Firmware (air96-v2-c-v3.2.3.bin)
Hold the Escape key while plugging in the USB cable to enter DFU mode, then follow the instructions for your operating system:
Install dfu-util via your package manager (e.g. sudo apt install dfu-util or sudo pacman -S dfu-util), then run:
dfu-util -d 0483:DF11 -a 0 -s 0x08000000:leave -D air96-v2-c-v3.2.3.binNote: You may need sudo or to configure QMK udev rules to flash without root privileges.
Install dfu-util via Homebrew:
brew install dfu-util
dfu-util -d 0483:DF11 -a 0 -s 0x08000000:leave -D air96-v2-c-v3.2.3.binAlternatively, you can download and use the graphical QMK Toolbox.
- Download and run the graphical QMK Toolbox.
- Select
air96_v2_ansi_default.binas the Local File. - Set the Microcontroller to
STM32F072. - Check the Auto-Flash checkbox.
- Hold the Escape key and plug in the USB cable. The flashing process will start automatically.
This firmware has undergone extensive audit, bug-fixing, and performance hardening compared to the original base port. Below are the notable achievements across the v3.x branch:
- 🔄 Stability Overhaul (v3.2.0): Multi-pass audit fixing sleep/wake lockup, mode-switching state leaks, LED flicker, and UART protocol edge cases. NRF sleep requests are now rejected when USB is active, all sync counters reset on mode switch, battery indicator auto-dismisses after 10s, and key debounce raised from 1ms to 5ms to eliminate double keypresses.
- ⚡ Zero-Latency Wake & Command Hardening:
Solved a critical wait-for-ACK loop blocking issue in
rf.c, restoring immediate, non-blocking serial parsing. Wireless startup dead-time has been slashed 5.4× (1250ms → 230ms), and inline wakeup logic ensures that the first keystroke after deep sleep is preserved and registered within2.7ms(previously lost + 75ms). - 🔋 Power Consumption & USB Compliance: Prescaled state synchronization checks in wired mode to save 2-3mA on battery. The sleep handler has been hardened to force LED and NRF power-downs during USB suspend even when auto-sleep is disabled, fully satisfying the USB suspend current draw limits (0.5mA / 2.5mA max).
- 🧠 Layout & UX Refinements: Added deferred NumLock auto-on signaling synchronized with USB enumeration to match high-end custom firmware. Reduced Spotlight and screenshot key chord blocks from 50ms to 5ms for rapid, lag-free OS registration.
- 🧹 Code Quality & Footprint Optimization: Eliminated all brace omissions, implicit boolean conversions, and scoped local variables to their narrowest blocks. Transitioned the battery LED indicator to a dynamic loop with lookup arrays, optimizing compiler generation and limiting the final binary footprint to 56,862 bytes (including all custom features).
- 📜 Full Revision History: See CHANGELOG.md for the complete record of all engineering optimizations, bug fixes, and releases.
| Metric / Feature | Upstream (v3.0.0 Base) | Optimized Latest (v3.2.1) | Impact & Improvement |
|---|---|---|---|
| Startup Dead-Time | 1250ms (worst-case) |
~230ms |
5.4× faster boot-up & instant availability |
| Active Periodic UART Utilization | 11.3% |
0.9% |
12.5× reduced wireless bus congestion |
| Per-Report UART Payload Time | 2.35ms (brute 3× repeats) |
0.72ms (reliable 1× transmit) |
3.26× faster keystroke packet dispatch |
| Keystroke Transmission Latency | ~4.0ms |
~1ms |
Ultra-low latency key-press registration |
| Deep-Sleep First-Key Wakeup | Keystroke lost + 75ms delay |
Keystroke preserved + 2.7ms wakeup |
No missed keystrokes after idle/sleep |
| Mac Spotlight/Screenshot Lag | 50ms key-chord delay |
5ms optimized chord delay |
Eliminated sluggish OS-shortcut latency |
| USB Suspend Power Draw | Exceeded limits (up to 20mA) |
Compliant < 2.5mA limit | 100% Standard USB Compliance (stops battery drain) |
| UART Loop Transmit | Blocked 5–10ms per wireless cmd | Non-blocking (0ms) concurrent polling | Zero boot/wakeup locks, flawless channel switching |
| Key Debounce | 1ms (double keypresses) |
5ms sym_eager_pk |
Zero phantom repeats, matches mechanical switch bounce |
| Binary Footprint | 56,490 bytes |
56,862 bytes |
Feature-rich layout optimized for performance and completeness |
- Bluetooth LE + 2.4 GHz wireless (NRF52832 module)
- Wired USB HID (keyboard + consumer + system control)
- 5-layer keymap (Mac/Win base + Fn layers)
- Side LED animations (wave/mix/static/breath/off)
- Dual IS31FL3733 RGB matrix (110 LEDs)
- EEPROM config persistence
- DFU bootloader entry (Escape key at boot)
GPL-2.0-or-later — derived from QMK firmware and NuPhy's keyboard code.