summary refs log tree commit diff
path: root/QMK firmware keychron c1/index.md
blob: ca5de7d470a552e01a59d29321d2b5c30408f969 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
description: "Flashing Sonix QMK on Keychron C1 plain mechanical keyboard"
created: 2023-10-21
---

![QMK firmware](main.jpg)

Base instructions: [Sonix QMK sn32_master Keychron C1 plain](https://github.com/SonixQMK/qmk_firmware/tree/sn32_master/keyboards/keychron/c1/plain)

## Keyboard hardware model variants
- [Keychron C1 plain (No LEDs)](https://www.keychron.com/products/keychron-c1-wired-mechanical-keyboard?variant=39767302078553)
and 
- [Keychron C1 white (White LEDs)](https://www.keychron.com/products/keychron-c1-wired-mechanical-keyboard?variant=32321246953561)
use the same board.
- [Keychron C1 RGB (RGB LEDs)](https://www.keychron.com/products/keychron-c1-wired-mechanical-keyboard?variant=32321247051865)
uses a different board

This tutorial / collection of info applies to Keychron C1 plain

## Building QMK firmware

The correct [Sonix QMK](https://sonixqmk.github.io/SonixDocs/) 
branch to use for this is 
[sn32_master_stable](https://github.com/SonixQMK/qmk_firmware/tree/sn32_master) 
source: Found a comment on the discord server, generally digging through the 
[discord server](https://discord.gg/8XqzfBknfC) reveals the correct way of 
doing something
```bash
qmk clone SonixQMK/qmk_firmware -b sn32_master_stable
```


When making the firmware with the QMK command,
specify `via` as the layout
```bash
qmk compile --keyboard keychron/c1/plain --keymap via
```

## Build Sonix flasher

It's important to use the 
[Flashing tool](https://github.com/SonixQMK/sonix-flasher) to flash the 
jumploader, which is needed on this chip, because it's possible to brick it, 
by overwriting the bootloader, the jumploader allows a button combination (ESC)
to be held when plugging in the keyboard to boot into bootloader mode. 
Bootloader mode is the mode that allows flashing new software to the chip.

To build on modern systems, update requirements.txt QT version as per the 
instructions [here](https://github.com/cederlys/svive-qmk#flashing) 
(I do this with sed in the following code snippet)

This was tested on Arch 2023-09-21 with the following package versions:

  - [python36](https://aur.archlinux.org/packages/python36) 3.6.15-5
  - [qt5-base](https://archlinux.org/packages/extra/x86_64/qt5-base/) 5.15.10+kde+r155-1
  - [python-pyqt5](https://archlinux.org/packages/extra/x86_64/python-pyqt5) 5.15.9-2

```bash
# Install python 3.6
yay -Sy python36

# Don't save the software when rebooting the computer
cd /tmp/

# Download release 0.2.5
wget https://github.com/SonixQMK/sonix-flasher/archive/refs/tags/v0.2.5.zip

# Extract release
unzip v0.2.5.zip
cd sonix-flasher-0.2.5/

# Install these python package versions for this project only
python3.6 -m venv venv
source venv/bin/activate

# This was needed, else it threw an error
pip3 install --upgrade pip
pip install wheel

# Use a more modern version of the QT package, 
# that's compatible with the version of QT in the repos
sed -i 's/hidapi==0.9.0.post2/hidapi==0.14.0/' requirements.txt
pip install -r requirements.txt

# Run the program
python src/main/python/main.py
```

## VIA
To use via it needs the json keyboard definition loaded

## Resources
- [C1 White PCB info](https://github.com/IsaacDynamo/keychron_c1_white_info)

---

## Expanding functionality

What have i used this newfound customizability for?

Mainly repurposing the os switcher has been into a layout switcher,
to allow switching between Qwerty and Colemak in hardware, which comes in handy when using it on someone elses computer.

![Firmware colemak switch](Firmware colemak switch.png)

Also i changed the right alt to the menu button (acts like a right click)

You can find the firmware source code here: [sonix-qmk - git.node5.net](https://git.node5.net/node5/sonix-qmk/src/branch/sn32_master_stable/keyboards/keychron/c1/plain/keymaps/default/keymap.c)