Skip to content

Steps to build and flash SonixQMK for Keychron K4 V2

Notifications You must be signed in to change notification settings

ephb/QMK-on-K4V2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

First a Warning. The K4 has been merged to the sn32_develop branch of SonixQMK but there are some issues.

Until it has been merged you should use the branch from my open pull request. The ANSI version does not currently build in sn32_develop and I made a few mistakes with the iso version.

Some steps in this guide might be outdated. If you encounter issue please open an issue here on GitHub so I can help you and fix it for others.

Installing QMK on Keychron K4 V2 RGB

This guide will walk you through the steps necessary to flashing SonixQMK on a Keychron K4 V2 RGB keyboard. I have been using SonixQMK for more than 1.5 years now. Everything works but bluetooth.

Made possible by the efforts of dexter93 and based on the documentation of CanUnesi/QMK-on-K6 and aathma2071/QMK-on-K2V2.

These steps are mostly the same as for other keyboards supported by SonixQMK and are documented to help others with the same keyboard to get started more easily. Fortunately the K4 V2 is one of the easiest to flash because the version and boot pins are located right under the space bar.

Even though repos exist for other models, this guide will only cover the K4 V2 RGB model.

If you just want to use VIA or get started quickly with a default keymap, you can actually skip to 5. Instructions for VIA

There is a small chance that you may brick your keyboard in the flashing process, continue at your own risk. Use an appropriate cable, make sure you won’t lose power during flashing and follow the steps carefully.

I have not tried reverting to the original firmware so proceed at your own risk. This guide assumes that you have the stock bootloader and not Sonix Jumploader.

Contents

1. Get Sonix Flasher

2. Setting Up the Environment - QMK MSYS

3. Checking Your MCU and Entering Boot Mode

4. Flash the Keyboard

5. Instructions for VIA

 

1. Get Sonix Flasher

1.1. Go to https://github.com/SonixQMK/sonix-flasher/releases/latest

1.2. Download "flasher-win.zip"

1.3. Unzip the archive to a convenient place such as your desktop

1.4. Open "Sonix Keyboard Flasher.exe" and check whether the keyboard is identified as Keychron.

2. Setting Up the Environment - QMK MSYS

2.1. Download the latest release (QMK_MSYS.exe) from this repo.

2.2. Run the .exe and follow instructions.

2.3. Run QMK MSYS

You can hit the windows key and type “QMK MSYS” to find the program

2.4. Clone the SonixQMK repository

git clone https://github.com/SonixQMK/qmk_firmware.git
git checkout sn32_master

or use this if you want to build the current version for an iso K4

git clone https://github.com/ephb/qmk_firmware.git
git checkout k4v2_update

or use this if you want to build the current version for an ansi K4

git clone https://github.com/PythonDeployer/qmk_firmware_k4.git

2.5. Change directory to qmk_firmware

cd qmk_firmware

2.6. Pull the submodules

make git-submodule

2.7. Install utilities

util/qmk_install.sh

Note: You might need to run this twice if the QMK MSYS terminal is closed in the process.

2.8. Make default firmware

Depending on your keyboard layout: The last paramater is the keymap. Use either default or via here if you did not make your own. We will use via for this example.

qmk compile -kb keychron/k4/rgb/v2/ansi -km via
or
qmk compile -kb keychron/k4/rgb/v2/iso -km via

2.9. Navigate to the qmk directory

2.10. Locate and copy the .bin file

Depending on your layout, copy "keychron_k4_rgb_v2_iso_via.bin” or “keychron_k4_rgb_v2_iso_via.bin” to a folder for easily locating it later

3. Checking Your MCU and Entering Boot Mode

3.1. Remove the space bar key to view the version and boot pins

3.2. Check whether the version is FK52332UB-G Ver10. This is the version I have confirmed working.

3.3. Disconnect the keyboard and use something to short the boot pins

3.4. Plug in the keyboard with boot pins shorted

3.5. Open Sonix Flasher and check if the Keyboard is identified as SN32F248B (bootloader)

If the SN32 bootloader is correctly identified, proceed to next section else stop at this point and troubleshoot

3.6. Remove the tweezers shorting the boot pins

4. Flash the Keyboard

4.1. Make sure you have picked SN32F24x for the device and 0x00 for qmk offset.

4.2. This is the point of no return, click “Flash QMK…” and choose the .bin file you created. It will flash as soon as you choose the file.

Congratulations, you have flashed QMK into your K4!

5. Quick-Start Instructions for VIA

5.1 Download VIA from https://caniusevia.com/

5.2 PythonDeployer has a prebuilt binary for ansi here. https://github.com/PythonDeployer/Keychron-k4-qmk/releases/tag/10.0

For iso version you have to build it yourself for now.

5.3 Download via_ansi.json or via_iso.json from the corresponding sub-folder from Sonix QMK keymaps

5.3 Follow steps 3 and 4 using the .bin file you extracted.

5.3 Open VIA and navigate to settings.

5.4 Enable show design tab.

5.5 Navigate to Design tab and load the via_ansi.json to load the K4 design into VIA. This step has to be repeated every time you open VIA for a board that has not been approved.

6. Recomended Reading

QMK Keycodes

About

Steps to build and flash SonixQMK for Keychron K4 V2

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published