# 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:

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

1. Install both QMK MSYS and QMK Toolbox
2. run qmk setup through QMK MSYS to download all the keyboard and dependencies

### Compiling firmware

1. Edit rules.mk and change NKRO_ENABLE to no (it was keychron/q1/rev_0100 in my case, which is for the non-nob ANSI version)
1. 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

1. Open QMK Toolbox
1. Select the right chip (MCU) for the board, in this case ATMega32U4
2. 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
3. Click flash, the process should finish within a few seconds.

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