QMK Caps Lock does not properly toggle IME

With QMK keyboards there seems to be a problem with the CAPS LOCK key not able to switch the IME on macOS even with the option enabled

Apparently it is a problem with NKRO, QMK either has NKRO enabled by default or set to disabled entirely; it also sends keystrokes through NKRO even without 6 or more keys pressed. All as described in the following issue:
Use Capslock toggle Chinese and English on macOS · Issue #15178 · qmk/qmk_firmware
Hi, I found that qmk firmware use capslock change input between chinese and english on macOS has a issue In a normal case, press capslock will toggle chinese and english, and english input will be ...
The behavior looks something like this:

A workaround for this is to recompile the QMK firmware as described.
For the Keychron Q1, this was done as follows.
Install MSYS and QMK Toolbox
QMK MSYS
A Windows one-click installer for the QMK CLI

GitHub - qmk/qmk_toolbox: A Toolbox companion for QMK Firmware
A Toolbox companion for QMK Firmware. Contribute to qmk/qmk_toolbox development by creating an account on GitHub.
- Install both QMK MSYS and QMK Toolbox
- run
qmk setup
through QMK MSYS to download all the keyboard and dependencies
Compiling firmware

- Edit
rules.mk
and change NKRO_ENABLE tono
(it waskeychron/q1/rev_0100
in my case, which is for the non-nob ANSI version)


- Compile firmware with the desired keymap under
keychron/q1/rev_0100/keymaps/
.

The end result should look something like this, a .hex
file will be created under qmk_firmware/
Flashing
- Open QMK Toolbox

- Select the right chip (MCU) for the board, in this case
ATMega32U4
- Connect the keyboard through DFU mode, (This can be done differently on different keyboards. For Keychron Q1, hold the reset key (located under the space bar) while unplugged and keep holding until plugged in.) QMK Toolbox will say connected
- Click flash, the process should finish within a few seconds.

Now the caps lock key should change the IME normally with no problems!
Member discussion