Cherry-picks upstream QMK speculative-hold core feature (#25572, #25797) into the local tree
Enables speculative hold for the caps_mod mod-tap key so mods register instantly while the key is still settling, reducing latency on fast typists
Test plan
Compile: qmk compile -kb keychron/q5_max/ansi_encoder -km via
Flash and confirm caps_mod fires its hold action without needing to wait out the tapping term when followed by another key
Confirm normal tap behaviour (Caps Lock) still works when caps_mod is pressed and released alone
## Summary
- Cherry-picks upstream QMK speculative-hold core feature (#25572, #25797) into the local tree
- Enables speculative hold for the `caps_mod` mod-tap key so mods register instantly while the key is still settling, reducing latency on fast typists
## Test plan
- [x] Compile: `qmk compile -kb keychron/q5_max/ansi_encoder -km via`
- [x] Flash and confirm `caps_mod` fires its hold action without needing to wait out the tapping term when followed by another key
- [x] Confirm normal tap behaviour (Caps Lock) still works when `caps_mod` is pressed and released alone
Adds a new HID_CMD_BATTERY (0x44) command to the shared qmk-host protocol.
When the keyboard is in wireless transport mode (BT or 2.4G) the firmware
now pushes the current battery percentage to the host:
- Periodic push every 5 minutes via timer_read32()/timer_elapsed32(); fires
immediately on the first matrix_scan_user() call after boot so qmk-host
gets a reading as soon as the keyboard connects over USB in wireless mode.
- Redundant sends are suppressed: g_last_sent_bat tracks the last value
transmitted and the packet is skipped when the level has not changed.
- Query-response path: qmk-host can send CMD_BATTERY with HID_FLAG_QUERY at
any time; the keyboard replies with the current percentage or
HID_BATT_UNAVAILABLE (0xFF) when in USB transport mode.
- All battery and transport code is guarded by #ifdef LK_WIRELESS_ENABLE so
the keymap compiles cleanly on any wired-only build.
Firmware size delta: +160 bytes (well within flash budget).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
caps_modmod-tap key so mods register instantly while the key is still settling, reducing latency on fast typistsTest plan
qmk compile -kb keychron/q5_max/ansi_encoder -km viacaps_modfires its hold action without needing to wait out the tapping term when followed by another keycaps_modis pressed and released alone