forked from mirror/qmk_firmware
Compare commits
450 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e68ddc826 | ||
|
|
c1fedab457 | ||
|
|
2929448605 | ||
|
|
b39661de96 | ||
|
|
ff75bce86a | ||
|
|
0881e0867b | ||
|
|
e6e66a9f2e | ||
|
|
e2d19eda57 | ||
|
|
73a6496516 | ||
|
|
c8f6e6a936 | ||
|
|
a86322e4a7 | ||
|
|
505e5c7033 | ||
|
|
107812ceef | ||
|
|
de8f05b4c3 | ||
|
|
08e5fcfdf4 | ||
|
|
1322922c42 | ||
|
|
16dde871d7 | ||
|
|
d39015a401 | ||
|
|
bf0b88c423 | ||
|
|
d4f04fe850 | ||
|
|
b315b707e6 | ||
|
|
e10429baae | ||
|
|
0e6b73c9ff | ||
|
|
d45b967cf2 | ||
|
|
e2bf515df4 | ||
|
|
2cac8b587f | ||
|
|
d383e93526 | ||
|
|
83b42ea9dc | ||
|
|
43bbb5e99a | ||
|
|
ee60542bd6 | ||
|
|
6ed61c65dd | ||
|
|
b5dfb2bd1e | ||
|
|
ee44cbdedb | ||
|
|
330a8597f8 | ||
|
|
9acd127cc1 | ||
|
|
9c2ca00074 | ||
|
|
9ab8e4cd5a | ||
|
|
594558ec7b | ||
|
|
5e1b1f5023 | ||
|
|
bbccd8f9cc | ||
|
|
cc567c917b | ||
|
|
1a954e8da5 | ||
|
|
c7e17538ee | ||
|
|
b321789d7b | ||
|
|
4015c40ba4 | ||
|
|
53de903fb8 | ||
|
|
fd65390496 | ||
|
|
28a11ff6f7 | ||
|
|
1a7f544e0d | ||
|
|
3e0b22af68 | ||
|
|
7edb4d2ed8 | ||
|
|
81cc69c2dd | ||
|
|
93274019a9 | ||
|
|
0fde9c9cac | ||
|
|
b708a43730 | ||
|
|
5bb7476400 | ||
|
|
8eebc613cf | ||
|
|
a2adc92066 | ||
|
|
6242c09f7d | ||
|
|
224ea2eb18 | ||
|
|
eb5703d12e | ||
|
|
921c0039f4 | ||
|
|
bb2ca21647 | ||
|
|
1a4af3adf9 | ||
|
|
99b1dc84da | ||
|
|
98504424b1 | ||
|
|
8ec3de0f92 | ||
|
|
c68e4dec10 | ||
|
|
1ddcf57382 | ||
|
|
e06d79e9c6 | ||
|
|
ed343ddad4 | ||
|
|
019cba746d | ||
|
|
e7ad19bb95 | ||
|
|
28eeb92f8e | ||
|
|
efc5d63383 | ||
|
|
2af9aac61c | ||
|
|
024c4ef853 | ||
|
|
fb6d7762b9 | ||
|
|
00eebfb575 | ||
|
|
6e35013bc2 | ||
|
|
cf05c7d1e4 | ||
|
|
22b213e191 | ||
|
|
4b393a1ff5 | ||
|
|
8522449ccf | ||
|
|
cbeab2ac4f | ||
|
|
01952bf39a | ||
|
|
1a991ffd24 | ||
|
|
01d81b9550 | ||
|
|
a00177d172 | ||
|
|
aa5a6d38de | ||
|
|
b905c246b5 | ||
|
|
a1096e1dec | ||
|
|
547d75145b | ||
|
|
f1ec600fac | ||
|
|
a9739f7868 | ||
|
|
c67e4c2cae | ||
|
|
5ba424ca17 | ||
|
|
e7012f4d9e | ||
|
|
a5fb7cfbc9 | ||
|
|
8c93a33cd3 | ||
|
|
6aade0ecdc | ||
|
|
62d87fa446 | ||
|
|
ce43c98b65 | ||
|
|
8e5550dbb2 | ||
|
|
acd7ad37e6 | ||
|
|
cbd55b7890 | ||
|
|
dadbec4d46 | ||
|
|
f4123acc72 | ||
|
|
cb3149b7f2 | ||
|
|
64c84e64c7 | ||
|
|
98e65cf3e1 | ||
|
|
a05306d153 | ||
|
|
7d0fc5d486 | ||
|
|
946d651f57 | ||
|
|
1c1e8d7f7a | ||
|
|
7ea7930b8c | ||
|
|
d0db38cbdc | ||
|
|
e91938088a | ||
|
|
1a32aa12e0 | ||
|
|
81df543086 | ||
|
|
4f21beb715 | ||
|
|
18051f1723 | ||
|
|
969f324de4 | ||
|
|
3eb8d3bea3 | ||
|
|
608bcf08fe | ||
|
|
f4068dbfb0 | ||
|
|
08405df150 | ||
|
|
3c751f217a | ||
|
|
97d622651a | ||
|
|
9f1a7380ab | ||
|
|
7dca4e8bda | ||
|
|
0aae222ab6 | ||
|
|
475cbd24cf | ||
|
|
a8711b2b0a | ||
|
|
81a3249e2c | ||
|
|
338a7ed6d5 | ||
|
|
0550830909 | ||
|
|
8f86f9794e | ||
|
|
911232abfc | ||
|
|
4eee8c1023 | ||
|
|
e7d861aea7 | ||
|
|
7e8690eae1 | ||
|
|
02cf2b56fd | ||
|
|
5d26dcefa0 | ||
|
|
b9078609b6 | ||
|
|
c7ed9038d7 | ||
|
|
7a69c714b4 | ||
|
|
fd61083710 | ||
|
|
074c49ee1c | ||
|
|
082b69db91 | ||
|
|
466e0856f5 | ||
|
|
60cf3c22f7 | ||
|
|
92ead44cf6 | ||
|
|
05355bc49d | ||
|
|
74ac4120db | ||
|
|
61ecee1585 | ||
|
|
9a77ad69e6 | ||
|
|
85fa06c3db | ||
|
|
187119ed7f | ||
|
|
eae39d37c6 | ||
|
|
fecfc0f7da | ||
|
|
36fd2437b0 | ||
|
|
bbd6e8ab34 | ||
|
|
24bc4aef03 | ||
|
|
7aed244aae | ||
|
|
532fb2f960 | ||
|
|
880c0c8ee0 | ||
|
|
6f93a86e6e | ||
|
|
0a4c1caf20 | ||
|
|
883465d9fb | ||
|
|
115bf771a8 | ||
|
|
a4b112b1ef | ||
|
|
d1b0397d2f | ||
|
|
f31004ebec | ||
|
|
46231df62d | ||
|
|
b6310b5a15 | ||
|
|
d34cade5ab | ||
|
|
cf58a8733d | ||
|
|
3320e98ccf | ||
|
|
319da7bfdb | ||
|
|
4a4e4aa083 | ||
|
|
74b0f054c1 | ||
|
|
6eee1940e8 | ||
|
|
8f728aa731 | ||
|
|
626cf94653 | ||
|
|
45a5a94b96 | ||
|
|
494a691f4c | ||
|
|
bef5c95675 | ||
|
|
f8d677af88 | ||
|
|
461a1afe57 | ||
|
|
e5f47fa269 | ||
|
|
d4fb67fd5b | ||
|
|
05ea735e86 | ||
|
|
3cd8dd6b25 | ||
|
|
35e62d236b | ||
|
|
a4d10e9f64 | ||
|
|
286947b6fa | ||
|
|
f12902eb16 | ||
|
|
0351b598f9 | ||
|
|
fc55fcff3d | ||
|
|
c113250c4e | ||
|
|
b4bdf3f1d5 | ||
|
|
633479ced5 | ||
|
|
a91de72246 | ||
|
|
50edd425f7 | ||
|
|
c4ccbf06e1 | ||
|
|
514175848e | ||
|
|
24c05ff1c7 | ||
|
|
7caef16edd | ||
|
|
65e1afe0af | ||
|
|
ff8db0449e | ||
|
|
09ab67c044 | ||
|
|
7772f47f04 | ||
|
|
7be4540b46 | ||
|
|
ab61d9cb51 | ||
|
|
f6f627d07f | ||
|
|
649bbdeaba | ||
|
|
eda39f4356 | ||
|
|
4fc14c2712 | ||
|
|
c3ba5de928 | ||
|
|
ec515f2164 | ||
|
|
592ee1b57f | ||
|
|
1e067bd4dd | ||
|
|
db9b295aa7 | ||
|
|
3934a7f3c8 | ||
|
|
ed2de21603 | ||
|
|
04978d490a | ||
|
|
7186a63172 | ||
|
|
ff1900190c | ||
|
|
2818085d3f | ||
|
|
d17671cd23 | ||
|
|
8f22831f01 | ||
|
|
6c96bb5a5a | ||
|
|
177ff71d0c | ||
|
|
c1b428bb4e | ||
|
|
0828fc4b6f | ||
|
|
1e8de37aa0 | ||
|
|
9cd3080e22 | ||
|
|
ceefde5ec8 | ||
|
|
3a29cdbd7d | ||
|
|
2d5cb23503 | ||
|
|
6aa85699a5 | ||
|
|
330d195f9a | ||
|
|
4b1b83f42f | ||
|
|
f749dedb0d | ||
|
|
fa37d958b4 | ||
|
|
e01313e7d0 | ||
|
|
20e7906c80 | ||
|
|
4bd5c033c3 | ||
|
|
5830b1b5e3 | ||
|
|
e42877d007 | ||
|
|
bcc546aa3f | ||
|
|
19527e8399 | ||
|
|
d8ce8cd204 | ||
|
|
248d7c1d6d | ||
|
|
9455c6adec | ||
|
|
6619ea4441 | ||
|
|
0188038bc0 | ||
|
|
2a4b9f79fd | ||
|
|
b43ec9d65a | ||
|
|
df8bb7ce24 | ||
|
|
7110708d0f | ||
|
|
b834819a35 | ||
|
|
cc696a2ae8 | ||
|
|
f29d8117bf | ||
|
|
d2ec940da5 | ||
|
|
da2c6a41d8 | ||
|
|
a3ecbc53f6 | ||
|
|
2695344241 | ||
|
|
00ca362826 | ||
|
|
9dcf2a11b2 | ||
|
|
12dc6d1ac8 | ||
|
|
6c2e58eb4d | ||
|
|
1a58fce043 | ||
|
|
96ee4c21a3 | ||
|
|
ae07dee941 | ||
|
|
efce9bc9b5 | ||
|
|
d575bf7ddc | ||
|
|
7a939ec218 | ||
|
|
542440eac5 | ||
|
|
717b6b8f13 | ||
|
|
36c3f4deba | ||
|
|
a954b568ea | ||
|
|
74d64c7f43 | ||
|
|
65cce9105d | ||
|
|
43853b337b | ||
|
|
8474aee2fe | ||
|
|
7098252252 | ||
|
|
16ffaa6482 | ||
|
|
865c29f4de | ||
|
|
507c948ed8 | ||
|
|
f0b04b2a3a | ||
|
|
20555f9a33 | ||
|
|
56ad3a5f43 | ||
|
|
5ef94415aa | ||
|
|
d67e94fb1b | ||
|
|
f797d4f49d | ||
|
|
ad4233d078 | ||
|
|
2c34b480fc | ||
|
|
86badb394e | ||
|
|
e295937e54 | ||
|
|
c7a24a441f | ||
|
|
a08ee4a737 | ||
|
|
9e757bc2ec | ||
|
|
5ef7919022 | ||
|
|
6b38dc17cd | ||
|
|
71b88b333d | ||
|
|
108a2fceca | ||
|
|
c3773d9c35 | ||
|
|
e1b42d5252 | ||
|
|
558fee16e4 | ||
|
|
87e5df1b9e | ||
|
|
4b295009ae | ||
|
|
3d61139567 | ||
|
|
15e7c8f37a | ||
|
|
8d29bd07c2 | ||
|
|
75b899d87d | ||
|
|
c3b3f09702 | ||
|
|
56650d7a2b | ||
|
|
8a47896263 | ||
|
|
0f182ef674 | ||
|
|
f1b2449ce5 | ||
|
|
a26dbbfe96 | ||
|
|
bf28a303c6 | ||
|
|
e814bb9453 | ||
|
|
2916c3f098 | ||
|
|
8644965c81 | ||
|
|
0524a6d848 | ||
|
|
e19991ec46 | ||
|
|
e4e5bca6bc | ||
|
|
8ff7b1de11 | ||
|
|
7827f9fbe3 | ||
|
|
d9f2d8d241 | ||
|
|
058919923a | ||
|
|
d151b1bef5 | ||
|
|
baf0060761 | ||
|
|
036745e853 | ||
|
|
b99e2f7230 | ||
|
|
9c965bb62e | ||
|
|
e68389a11e | ||
|
|
ba63bac661 | ||
|
|
0842f54a27 | ||
|
|
584ad807cc | ||
|
|
e92f1fb220 | ||
|
|
67c97da654 | ||
|
|
90b5c17034 | ||
|
|
0b33318a24 | ||
|
|
a9a2b699cd | ||
|
|
da7811f82a | ||
|
|
49a4ec538d | ||
|
|
9e103614f8 | ||
|
|
711b109246 | ||
|
|
6347d18a2d | ||
|
|
d7b09ad560 | ||
|
|
52e2af7753 | ||
|
|
177e461d90 | ||
|
|
fef7932e55 | ||
|
|
b42191a2dd | ||
|
|
48a421bb10 | ||
|
|
f09f3643ad | ||
|
|
36636205dd | ||
|
|
5b0039aae6 | ||
|
|
18f5a04eaa | ||
|
|
89e39b9858 | ||
|
|
3db5ffcfb7 | ||
|
|
4ae2b4f371 | ||
|
|
0dee127b29 | ||
|
|
6e55870a82 | ||
|
|
21ca1eb7ae | ||
|
|
a1a5869ef8 | ||
|
|
bc5c5e3251 | ||
|
|
f39e08e2ba | ||
|
|
e15d9ca4b3 | ||
|
|
eeac23464b | ||
|
|
5354ec5791 | ||
|
|
35785a6c49 | ||
|
|
235d18f360 | ||
|
|
ea5ef746e2 | ||
|
|
de5fd5d4e2 | ||
|
|
8c8f4b3c06 | ||
|
|
f5b02fbc11 | ||
|
|
55e1acec07 | ||
|
|
611460c9db | ||
|
|
584e390703 | ||
|
|
1ac255fd1c | ||
|
|
2c152c3425 | ||
|
|
664c0bc4c3 | ||
|
|
8a06238054 | ||
|
|
6626084cb8 | ||
|
|
bb27c69675 | ||
|
|
25d7ac9ecc | ||
|
|
03a53e29af | ||
|
|
681d6a29e6 | ||
|
|
096696d86d | ||
|
|
d044a6bcc2 | ||
|
|
091eac1fce | ||
|
|
02bed7e5a5 | ||
|
|
7f9ceef3dd | ||
|
|
7919848324 | ||
|
|
a4436b32df | ||
|
|
7ecdb57414 | ||
|
|
0f9c1c57b4 | ||
|
|
dcdd037276 | ||
|
|
e725cdbc4b | ||
|
|
8ae01715d6 | ||
|
|
9ef5dcd113 | ||
|
|
f4aa8ae845 | ||
|
|
ef6e9a5312 | ||
|
|
0516cf5ed8 | ||
|
|
5bdeb7dad1 | ||
|
|
8347a6688f | ||
|
|
3ce196ff52 | ||
|
|
802a199bbd | ||
|
|
0326355edc | ||
|
|
94f1aade5c | ||
|
|
1a54ecf246 | ||
|
|
fe54121cfa | ||
|
|
319844407c | ||
|
|
77b2742863 | ||
|
|
e57226d9a2 | ||
|
|
021c3cc125 | ||
|
|
0b3a54f9f2 | ||
|
|
7808f8f56b | ||
|
|
e3c8c23d91 | ||
|
|
1646000c9b | ||
|
|
b4cabc3cf7 | ||
|
|
e8e3c7addb | ||
|
|
608ce78778 | ||
|
|
824ad46e5d | ||
|
|
977433443a | ||
|
|
0d477bf570 | ||
|
|
5bf8248dd3 | ||
|
|
2e3664d2c0 | ||
|
|
fad44ae10c | ||
|
|
7b36727ed1 | ||
|
|
f096e5a3f3 | ||
|
|
53c6fa5de7 | ||
|
|
8525ab03de | ||
|
|
97168180cf | ||
|
|
57374489da | ||
|
|
1d145c7511 | ||
|
|
820202cd53 | ||
|
|
faf77f1651 | ||
|
|
4c773971a7 | ||
|
|
2b8aeed02b | ||
|
|
9e8e9af485 | ||
|
|
9e2d8999bf | ||
|
|
4f60946513 | ||
|
|
ac9318c78f | ||
|
|
76cf8dff93 |
35
.clangd
35
.clangd
@@ -1,4 +1,33 @@
|
||||
CompileFlags:
|
||||
Add: [-Wno-unknown-attributes, -Wno-maybe-uninitialized, -Wno-unknown-warning-option]
|
||||
Remove: [-W*, -mmcu=*, -mcpu=*, -mfpu=*, -mfloat-abi=*, -mno-unaligned-access, -mno-thumb-interwork, -mcall-prologues, -D__has_include*]
|
||||
Compiler: clang
|
||||
Add:
|
||||
[
|
||||
-Wno-unknown-attributes,
|
||||
-Wno-maybe-uninitialized,
|
||||
-Wno-unknown-warning-option,
|
||||
-Wno-pointer-to-int-cast,
|
||||
-Wno-int-to-void-pointer-cast,
|
||||
-DPROGMEM=,
|
||||
]
|
||||
Remove:
|
||||
[
|
||||
-W*,
|
||||
-mmcu=*,
|
||||
-mcpu=*,
|
||||
-mfpu=*,
|
||||
-mfloat-abi=*,
|
||||
-mno-unaligned-access,
|
||||
-mno-thumb-interwork,
|
||||
-mcall-prologues,
|
||||
-D__has_include*,
|
||||
-mlra,
|
||||
]
|
||||
Compiler: clang
|
||||
Diagnostics:
|
||||
UnusedIncludes: None
|
||||
Suppress:
|
||||
[
|
||||
asm_invalid_output_constraint,
|
||||
asm_invalid_input_constraint,
|
||||
invalid_asm_value_for_constraint,
|
||||
anyx86_interrupt_attribute,
|
||||
]
|
||||
|
||||
2
.github/workflows/api.yml
vendored
2
.github/workflows/api.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 1
|
||||
persist-credentials: false
|
||||
|
||||
2
.github/workflows/auto_tag.yml
vendored
2
.github/workflows/auto_tag.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
247
.github/workflows/bootstrap_testing.yml
vendored
Normal file
247
.github/workflows/bootstrap_testing.yml
vendored
Normal file
@@ -0,0 +1,247 @@
|
||||
name: Bootstrap Script Testing
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, develop, xap]
|
||||
paths:
|
||||
- "util/env-bootstrap.sh"
|
||||
- ".github/workflows/bootstrap_testing.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "util/env-bootstrap.sh"
|
||||
- ".github/workflows/bootstrap_testing.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
bootstrap-test-linux:
|
||||
name: Bootstrap (Linux)
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
distribution:
|
||||
# Ubuntu/Debian based
|
||||
- debian:11
|
||||
- debian:12
|
||||
- debian:13
|
||||
- ubuntu:20.04
|
||||
- ubuntu:22.04
|
||||
- ubuntu:24.04
|
||||
|
||||
# RHEL/CentOS/Fedora based
|
||||
- fedora:41
|
||||
- fedora:42
|
||||
- fedora:43
|
||||
- rockylinux:8
|
||||
- rockylinux:9
|
||||
- rockylinux/rockylinux:10
|
||||
- almalinux:8
|
||||
- almalinux:9
|
||||
- almalinux:10
|
||||
|
||||
# OpenSUSE based (we skip Tumbleweed as it has issues with package versions between pattern installs and other dependencies preinstalled into the base container)
|
||||
- opensuse/leap:latest
|
||||
|
||||
# Gentoo-based
|
||||
- gentoo/stage3:latest
|
||||
|
||||
# Arch based
|
||||
- archlinux:latest
|
||||
- cachyos/cachyos:latest
|
||||
- manjarolinux/base:latest
|
||||
|
||||
container:
|
||||
image: ${{ matrix.distribution }}
|
||||
options: --privileged
|
||||
|
||||
steps:
|
||||
- name: Install base dependencies
|
||||
run: |
|
||||
# Attempt to run the package installation up to 10 times to mitigate transient network issues
|
||||
for n in $(seq 1 10); do
|
||||
{
|
||||
echo "Attempt #$n of 10 to install base dependencies:"
|
||||
case "${{ matrix.distribution }}" in
|
||||
*ubuntu*|*debian*)
|
||||
apt-get update
|
||||
apt-get install -y sudo git passwd
|
||||
;;
|
||||
*fedora*|*rockylinux*|*almalinux*)
|
||||
dnf install -y sudo git passwd findutils # findutils=xargs
|
||||
;;
|
||||
*suse*)
|
||||
zypper --non-interactive refresh
|
||||
zypper --non-interactive install sudo git shadow findutils # findutils=xargs
|
||||
;;
|
||||
*gentoo*)
|
||||
emerge-webrsync
|
||||
emerge --noreplace --ask=n sudo dev-vcs/git shadow findutils # findutils=xargs
|
||||
;;
|
||||
*archlinux*|*cachyos*|*manjaro*)
|
||||
pacman -Syu --noconfirm
|
||||
pacman -S --noconfirm sudo git
|
||||
;;
|
||||
esac
|
||||
} && break || sleep 10
|
||||
done
|
||||
|
||||
# Fix PAM configuration for sudo in containers
|
||||
# Fix /etc/shadow permissions - common issue in container environments
|
||||
chmod 640 /etc/shadow || chmod 400 /etc/shadow || true
|
||||
|
||||
# Disable problematic PAM modules that commonly fail in RHEL-like containers
|
||||
sed -i 's/^session.*pam_systemd.so/#&/' /etc/pam.d/sudo || true
|
||||
sed -i 's/^session.*pam_loginuid.so/#&/' /etc/pam.d/sudo || true
|
||||
|
||||
# Ensure proper sudoers configuration
|
||||
echo 'Defaults !requiretty' >> /etc/sudoers
|
||||
echo 'Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' >> /etc/sudoers
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 1
|
||||
submodules: recursive
|
||||
path: qmk_firmware
|
||||
|
||||
- name: Create test user
|
||||
run: |
|
||||
# Create a test user for the bootstrap script
|
||||
useradd -m -s /bin/bash -U testuser
|
||||
echo 'testuser:testpassword' | chpasswd || true
|
||||
|
||||
# Configure passwordless sudo
|
||||
echo "root ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers # some distros complain about root not being in sudoers
|
||||
echo "testuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||
|
||||
# Test sudo functionality
|
||||
sudo -u testuser whoami || echo "Sudo test failed, but continuing..."
|
||||
|
||||
- name: Move QMK repository to test user home
|
||||
run: |
|
||||
# Add upstream remote to the cloned repository so `qmk doctor` doesn't flag a warning
|
||||
git -C qmk_firmware remote add upstream https://github.com/qmk/qmk_firmware.git
|
||||
# Move the QMK repository to the test user's home directory
|
||||
mv qmk_firmware /home/testuser/qmk_firmware
|
||||
chown -R testuser:testuser /home/testuser/qmk_firmware
|
||||
|
||||
- name: Run bootstrap script
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
# Ensure the bootstrap script can access sudo
|
||||
sudo -u testuser --preserve-env=GITHUB_TOKEN bash -c "
|
||||
export CONFIRM=1
|
||||
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
cd /home/testuser
|
||||
bash /home/testuser/qmk_firmware/util/env-bootstrap.sh
|
||||
"
|
||||
|
||||
- name: Test QMK CLI
|
||||
run: |
|
||||
sudo -u testuser bash -c "
|
||||
export PATH=/home/testuser/.local/bin:\$PATH
|
||||
cd /home/testuser
|
||||
qmk setup -y -H /home/testuser/qmk_firmware # setup implies doctor, no need to run it separately
|
||||
cd /home/testuser/qmk_firmware
|
||||
qmk mass-compile -j $(nproc) -e DUMP_CI_METADATA=yes -f 'keyboard_name==*onekey*' -km reset -p || touch .failed # Compile a bunch of different platforms
|
||||
"
|
||||
|
||||
cd /home/testuser/qmk_firmware
|
||||
./util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY || true
|
||||
[ ! -e .failed ] || exit 1
|
||||
|
||||
bootstrap-test-macos:
|
||||
name: Bootstrap (macOS)
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- macos-14 # Apple Silicon ARM64
|
||||
- macos-15 # Apple Silicon ARM64
|
||||
- macos-15-intel # Intel x64
|
||||
- macos-26 # Apple Silicon ARM64
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 1
|
||||
submodules: recursive
|
||||
|
||||
- name: Run bootstrap script
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
# Add upstream remote to the cloned repository so `qmk doctor` doesn't flag a warning
|
||||
git remote add upstream https://github.com/qmk/qmk_firmware.git
|
||||
# Run the bootstrap script
|
||||
export CONFIRM=1
|
||||
sh ./util/env-bootstrap.sh
|
||||
|
||||
- name: Test QMK CLI
|
||||
run: |
|
||||
# Add QMK CLI to PATH (bootstrap script installs it to ~/.local/bin on macOS)
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
qmk setup -y -H . # setup implies doctor, no need to run it separately
|
||||
qmk mass-compile -j $(sysctl -n hw.ncpu) -e DUMP_CI_METADATA=yes -f 'keyboard_name==*onekey*' -km reset || touch .failed # Compile a bunch of different platforms
|
||||
|
||||
./util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY || true
|
||||
[ ! -e .failed ] || exit 1
|
||||
|
||||
bootstrap-test-windows:
|
||||
name: Bootstrap (Windows)
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
msys-variant:
|
||||
- mingw64
|
||||
- clang64
|
||||
- ucrt64
|
||||
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
|
||||
steps:
|
||||
- name: Install MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.msys-variant }}
|
||||
pacboy: >-
|
||||
git:
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 1
|
||||
submodules: recursive
|
||||
|
||||
- name: Run bootstrap script
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
# Add upstream remote to the cloned repository so `qmk doctor` doesn't flag a warning
|
||||
git remote add upstream https://github.com/qmk/qmk_firmware.git
|
||||
# Run the bootstrap script
|
||||
export CONFIRM=1
|
||||
sh ./util/env-bootstrap.sh
|
||||
|
||||
- name: Test QMK CLI
|
||||
run: |
|
||||
# Add QMK CLI to PATH (bootstrap script installs it to /opt/uv/tools/bin on Windows MSYS2)
|
||||
export PATH="/opt/uv/tools/bin:$PATH"
|
||||
qmk setup -y -H . # setup implies doctor, no need to run it separately
|
||||
qmk mass-compile -j $(nproc) -e DUMP_CI_METADATA=yes -f 'keyboard_name==*onekey*' -km reset || touch .failed # Compile a bunch of different platforms
|
||||
|
||||
./util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY || true
|
||||
[ ! -e .failed ] || exit 1
|
||||
|
||||
15
.github/workflows/ci_build_major_branch.yml
vendored
15
.github/workflows/ci_build_major_branch.yml
vendored
@@ -6,13 +6,13 @@ permissions:
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, develop]
|
||||
branches: [master, develop, xap]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
type: choice
|
||||
description: "Branch to build"
|
||||
options: [master, develop]
|
||||
options: [master, develop, xap]
|
||||
|
||||
env:
|
||||
# https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#usage-limits
|
||||
@@ -45,14 +45,14 @@ jobs:
|
||||
git config --global --add safe.directory '*'
|
||||
|
||||
- name: Checkout QMK Firmware
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Determine concurrency
|
||||
id: generate_slice_length
|
||||
run: |
|
||||
target_count=$( {
|
||||
qmk find -km default 2>/dev/null
|
||||
# qmk find -km xap 2>/dev/null
|
||||
qmk find -km xap 2>/dev/null
|
||||
} | sort | uniq | wc -l)
|
||||
slice_length=$((target_count / ($CONCURRENT_JOBS - 1))) # Err on the side of caution
|
||||
echo "slice_length=$slice_length" >> $GITHUB_OUTPUT
|
||||
@@ -63,8 +63,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
keymap: [default]
|
||||
# keymap: [default, xap]
|
||||
keymap: [default, xap]
|
||||
uses: ./.github/workflows/ci_build_major_branch_keymap.yml
|
||||
with:
|
||||
branch: ${{ inputs.branch || github.ref_name }}
|
||||
@@ -83,12 +82,12 @@ jobs:
|
||||
git config --global --add safe.directory '*'
|
||||
|
||||
- name: Checkout QMK Firmware
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download firmwares
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
pattern: firmware-*
|
||||
path: .
|
||||
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
git config --global --add safe.directory '*'
|
||||
|
||||
- name: Checkout QMK Firmware
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Generate build targets
|
||||
id: generate_targets
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
echo "targets=$(jq -c 'keys' targets.json)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload targets json
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: targets-${{ inputs.keymap }}
|
||||
path: targets.json
|
||||
@@ -89,10 +89,10 @@ jobs:
|
||||
git config --global --add safe.directory '*'
|
||||
|
||||
- name: Checkout QMK Firmware
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Get target definitions
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: targets-${{ inputs.keymap }}
|
||||
path: .
|
||||
@@ -112,7 +112,7 @@ jobs:
|
||||
qmk mass-compile -t -j $NCPUS -e DUMP_CI_METADATA=yes $(jq -r '.["${{ matrix.target }}"].targets' targets.json) || touch .failed
|
||||
|
||||
- name: Upload binaries
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: firmware-${{ inputs.keymap }}-${{ matrix.target }}
|
||||
if-no-files-found: ignore
|
||||
@@ -136,17 +136,17 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout QMK Firmware
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Download firmwares
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
pattern: firmware-${{ inputs.keymap }}-*
|
||||
path: .
|
||||
merge-multiple: true
|
||||
|
||||
- name: Upload all firmwares
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: firmware-${{ inputs.keymap }}
|
||||
if-no-files-found: ignore
|
||||
|
||||
2
.github/workflows/cli.yml
vendored
2
.github/workflows/cli.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
- name: Disable safe.directory check
|
||||
run : git config --global --add safe.directory '*'
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
|
||||
34
.github/workflows/develop_docs.yml
vendored
Normal file
34
.github/workflows/develop_docs.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Generate Develop Docs
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
paths:
|
||||
- 'builddefs/docsgen/**'
|
||||
- 'tmk_core/**'
|
||||
- 'quantum/**'
|
||||
- 'platforms/**'
|
||||
- 'docs/**'
|
||||
- '.github/workflows/docs.yml'
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Deploy Develop
|
||||
if: ${{ github.repository == 'qmk/qmk_firmware' }}
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
github-token: ${{ secrets.QMK_BOT_TOKEN }}
|
||||
script: |
|
||||
const result = await github.rest.actions.createWorkflowDispatch({
|
||||
owner: 'qmk',
|
||||
repo: 'qmk_docs_devel',
|
||||
workflow_id: 'develop.yml',
|
||||
ref: 'main',
|
||||
})
|
||||
2
.github/workflows/develop_update.yml
vendored
2
.github/workflows/develop_update.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
token: ${{ secrets.QMK_BOT_TOKEN }}
|
||||
fetch-depth: 0
|
||||
|
||||
4
.github/workflows/docs.yml
vendored
4
.github/workflows/docs.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
||||
container: ghcr.io/qmk/qmk_cli
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
|
||||
- name: Deploy
|
||||
if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }}
|
||||
uses: JamesIves/github-pages-deploy-action@v4.7.3
|
||||
uses: JamesIves/github-pages-deploy-action@v4.7.6
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: gh-pages
|
||||
|
||||
2
.github/workflows/feature_branch_update.yml
vendored
2
.github/workflows/feature_branch_update.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
- riot
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
token: ${{ secrets.QMK_BOT_TOKEN }}
|
||||
fetch-depth: 0
|
||||
|
||||
4
.github/workflows/format.yml
vendored
4
.github/workflows/format.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
- name: Disable safe.directory check
|
||||
run : git config --global --add safe.directory '*'
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
id: file_changes
|
||||
uses: tj-actions/changed-files@v46
|
||||
uses: tj-actions/changed-files@v47
|
||||
with:
|
||||
use_rest_api: true
|
||||
|
||||
|
||||
4
.github/workflows/format_push.yml
vendored
4
.github/workflows/format_push.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
- name: Disable safe.directory check
|
||||
run : git config --global --add safe.directory '*'
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
git config user.email 'hello@qmk.fm'
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
uses: peter-evans/create-pull-request@v8
|
||||
if: ${{ github.repository == 'qmk/qmk_firmware'}}
|
||||
with:
|
||||
token: ${{ secrets.QMK_BOT_TOKEN }}
|
||||
|
||||
2
.github/workflows/labeler.yml
vendored
2
.github/workflows/labeler.yml
vendored
@@ -10,4 +10,4 @@ jobs:
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@v5
|
||||
- uses: actions/labeler@v6
|
||||
|
||||
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
- name: Disable safe.directory check
|
||||
run : git config --global --add safe.directory '*'
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
id: file_changes
|
||||
uses: tj-actions/changed-files@v46
|
||||
uses: tj-actions/changed-files@v47
|
||||
with:
|
||||
use_rest_api: true
|
||||
|
||||
|
||||
2
.github/workflows/regen.yml
vendored
2
.github/workflows/regen.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
- name: Disable safe.directory check
|
||||
run : git config --global --add safe.directory '*'
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Run qmk generators
|
||||
run: |
|
||||
|
||||
4
.github/workflows/regen_push.yml
vendored
4
.github/workflows/regen_push.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
- name: Disable safe.directory check
|
||||
run : git config --global --add safe.directory '*'
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Run qmk generators
|
||||
run: |
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
git config user.email 'hello@qmk.fm'
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
uses: peter-evans/create-pull-request@v8
|
||||
if: ${{ github.repository == 'qmk/qmk_firmware'}}
|
||||
with:
|
||||
token: ${{ secrets.QMK_BOT_TOKEN }}
|
||||
|
||||
2
.github/workflows/unit_test.yml
vendored
2
.github/workflows/unit_test.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
container: ghcr.io/qmk/qmk_cli
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install dependencies
|
||||
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -64,6 +64,7 @@ build/
|
||||
cmake-build-debug
|
||||
CMakeLists.txt
|
||||
*.pdf
|
||||
*.zip
|
||||
|
||||
# Let these ones be user specific, since we have so many different configurations
|
||||
*.code-workspace
|
||||
@@ -94,6 +95,11 @@ tags
|
||||
*.mpeg
|
||||
*.ttf
|
||||
*.otf
|
||||
# Un-ignore limited image file formats in docs
|
||||
!docs/public/**.gif
|
||||
!docs/public/**.jpg
|
||||
!docs/public/**.jpeg
|
||||
!docs/public/**.png
|
||||
|
||||
# Things Travis sees
|
||||
/.vs
|
||||
|
||||
8
Makefile
8
Makefile
@@ -115,7 +115,7 @@ endef
|
||||
TRY_TO_MATCH_RULE_FROM_LIST = $(eval $(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER,$1))$(RULE_FOUND)
|
||||
|
||||
# As TRY_TO_MATCH_RULE_FROM_LIST_HELPER, but with additional
|
||||
# resolution of DEFAULT_FOLDER and keyboard_aliases.hjson for provided rule
|
||||
# resolution of keyboard_aliases.hjson for provided rule
|
||||
define TRY_TO_MATCH_RULE_FROM_LIST_HELPER_KB
|
||||
# Split on ":", padding with empty strings to avoid indexing issues
|
||||
TOKEN1:=$$(shell python3 -c "import sys; print((sys.argv[1].split(':',1)+[''])[0])" $$(RULE))
|
||||
@@ -255,7 +255,7 @@ endef
|
||||
# if we are going to compile all keyboards, match the rest of the rule
|
||||
# for each of them
|
||||
define PARSE_ALL_KEYBOARDS
|
||||
$$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYBOARD,$(shell $(QMK_BIN) list-keyboards --no-resolve-defaults)))
|
||||
$$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYBOARD,$(shell $(QMK_BIN) list-keyboards)))
|
||||
endef
|
||||
|
||||
# Prints a list of all known keymaps for the given keyboard
|
||||
@@ -447,7 +447,7 @@ git-submodules: git-submodule
|
||||
|
||||
.PHONY: list-keyboards
|
||||
list-keyboards:
|
||||
$(QMK_BIN) list-keyboards --no-resolve-defaults | tr '\n' ' '
|
||||
$(QMK_BIN) list-keyboards | tr '\n' ' '
|
||||
|
||||
.PHONY: list-tests
|
||||
list-tests:
|
||||
@@ -455,7 +455,7 @@ list-tests:
|
||||
|
||||
.PHONY: generate-keyboards-file
|
||||
generate-keyboards-file:
|
||||
$(QMK_BIN) list-keyboards --no-resolve-defaults
|
||||
$(QMK_BIN) list-keyboards
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
||||
@@ -19,18 +19,18 @@ endif
|
||||
ifneq ($(QMK_USERSPACE),)
|
||||
ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)/keymap.json)","")
|
||||
KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)/keymap.json
|
||||
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)
|
||||
KEYMAP_JSON_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)
|
||||
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)/keymap.json)","")
|
||||
KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)/keymap.json
|
||||
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)
|
||||
KEYMAP_JSON_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)
|
||||
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)/keymap.json)","")
|
||||
KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)/keymap.json
|
||||
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)
|
||||
KEYMAP_JSON_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)
|
||||
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)/keymap.json)","")
|
||||
KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)/keymap.json
|
||||
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)
|
||||
KEYMAP_JSON_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)
|
||||
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)/keymap.json)","")
|
||||
KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)/keymap.json
|
||||
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)
|
||||
KEYMAP_JSON_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -255,6 +255,8 @@ endif
|
||||
COMMUNITY_RULES_MK = $(shell $(QMK_BIN) generate-community-modules-rules-mk -kb $(KEYBOARD) --quiet --escape --output $(INTERMEDIATE_OUTPUT)/src/community_rules.mk $(KEYMAP_JSON))
|
||||
include $(COMMUNITY_RULES_MK)
|
||||
|
||||
ifneq ($(COMMUNITY_MODULES),)
|
||||
|
||||
$(INTERMEDIATE_OUTPUT)/src/community_modules.h: $(KEYMAP_JSON) $(DD_CONFIG_FILES)
|
||||
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
|
||||
$(eval CMD=$(QMK_BIN) generate-community-modules-h -kb $(KEYBOARD) --quiet --output $(INTERMEDIATE_OUTPUT)/src/community_modules.h $(KEYMAP_JSON))
|
||||
@@ -289,6 +291,8 @@ SRC += $(INTERMEDIATE_OUTPUT)/src/community_modules.c
|
||||
|
||||
generated-files: $(INTERMEDIATE_OUTPUT)/src/community_modules.h $(INTERMEDIATE_OUTPUT)/src/community_modules.c $(INTERMEDIATE_OUTPUT)/src/community_modules_introspection.c $(INTERMEDIATE_OUTPUT)/src/community_modules_introspection.h $(INTERMEDIATE_OUTPUT)/src/led_matrix_community_modules.inc $(INTERMEDIATE_OUTPUT)/src/rgb_matrix_community_modules.inc
|
||||
|
||||
endif
|
||||
|
||||
include $(BUILDDEFS_PATH)/converters.mk
|
||||
|
||||
# Generate the board's version.h file.
|
||||
@@ -470,8 +474,10 @@ ifneq ($(wildcard $(QMK_USERSPACE)),)
|
||||
endif
|
||||
|
||||
# If the equivalent users directory exists in userspace, use that in preference to anything currently in the main repo
|
||||
ifneq ($(wildcard $(QMK_USERSPACE)/$(USER_PATH)),)
|
||||
USER_PATH := $(QMK_USERSPACE)/$(USER_PATH)
|
||||
ifneq ($(QMK_USERSPACE),)
|
||||
ifneq ($(wildcard $(QMK_USERSPACE)/$(USER_PATH)),)
|
||||
USER_PATH := $(QMK_USERSPACE)/$(USER_PATH)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Pull in user level rules.mk
|
||||
|
||||
@@ -10,10 +10,10 @@ define SEARCH_LAYOUTS_REPO
|
||||
LAYOUT_KEYMAP_JSON := $$(LAYOUT_KEYMAP_PATH)/keymap.json
|
||||
LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c
|
||||
ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_JSON))","")
|
||||
-include $$(LAYOUT_KEYMAP_PATH)/rules.mk
|
||||
KEYMAP_JSON := $$(LAYOUT_KEYMAP_JSON)
|
||||
KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH)
|
||||
else ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","")
|
||||
KEYMAP_JSON_PATH := $$(LAYOUT_KEYMAP_PATH)
|
||||
endif
|
||||
ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","")
|
||||
-include $$(LAYOUT_KEYMAP_PATH)/rules.mk
|
||||
KEYMAP_C := $$(LAYOUT_KEYMAP_C)
|
||||
KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH)
|
||||
|
||||
@@ -62,6 +62,7 @@ include $(BUILDDEFS_PATH)/common_features.mk
|
||||
include $(BUILDDEFS_PATH)/generic_features.mk
|
||||
include $(PLATFORM_PATH)/common.mk
|
||||
include $(TMK_PATH)/protocol.mk
|
||||
include $(QUANTUM_PATH)/battery/tests/rules.mk
|
||||
include $(QUANTUM_PATH)/debounce/tests/rules.mk
|
||||
include $(QUANTUM_PATH)/encoder/tests/rules.mk
|
||||
include $(QUANTUM_PATH)/os_detection/tests/rules.mk
|
||||
|
||||
@@ -29,6 +29,8 @@ QUANTUM_SRC += \
|
||||
$(QUANTUM_DIR)/logging/debug.c \
|
||||
$(QUANTUM_DIR)/logging/sendchar.c \
|
||||
$(QUANTUM_DIR)/process_keycode/process_default_layer.c \
|
||||
$(QUANTUM_DIR)/process_keycode/process_oneshot.c \
|
||||
$(QUANTUM_DIR)/process_keycode/process_quantum.c \
|
||||
|
||||
include $(QUANTUM_DIR)/nvm/rules.mk
|
||||
|
||||
@@ -123,7 +125,7 @@ ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
|
||||
MOUSE_ENABLE := yes
|
||||
endif
|
||||
|
||||
VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick azoteq_iqs5xx cirque_pinnacle_i2c cirque_pinnacle_spi paw3204 pmw3320 pmw3360 pmw3389 pimoroni_trackball custom
|
||||
VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick azoteq_iqs5xx cirque_pinnacle_i2c cirque_pinnacle_spi paw3204 paw3222 pmw3320 pmw3360 pmw3389 pimoroni_trackball custom
|
||||
ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
|
||||
ifeq ($(filter $(POINTING_DEVICE_DRIVER),$(VALID_POINTING_DEVICE_DRIVER_TYPES)),)
|
||||
$(call CATASTROPHIC_ERROR,Invalid POINTING_DEVICE_DRIVER,POINTING_DEVICE_DRIVER="$(POINTING_DEVICE_DRIVER)" is not a valid pointing device type)
|
||||
@@ -155,6 +157,8 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
|
||||
SRC += drivers/sensors/cirque_pinnacle.c
|
||||
SRC += drivers/sensors/cirque_pinnacle_gestures.c
|
||||
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_gestures.c
|
||||
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), paw3222)
|
||||
SPI_DRIVER_REQUIRED = yes
|
||||
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pimoroni_trackball)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
else ifneq ($(filter $(strip $(POINTING_DEVICE_DRIVER)),pmw3360 pmw3389),)
|
||||
@@ -633,6 +637,9 @@ ifeq ($(strip $(VIA_ENABLE)), yes)
|
||||
RAW_ENABLE := yes
|
||||
BOOTMAGIC_ENABLE := yes
|
||||
TRI_LAYER_ENABLE := yes
|
||||
ifeq ($(strip $(VIA_INSECURE)), yes)
|
||||
OPT_DEFS += -DVIA_INSECURE
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RAW_ENABLE)), yes)
|
||||
@@ -940,21 +947,25 @@ ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(BATTERY_ENABLE)), yes)
|
||||
BATTERY_DRIVER_REQUIRED := yes
|
||||
endif
|
||||
|
||||
VALID_BATTERY_DRIVER_TYPES := adc custom vendor
|
||||
|
||||
BATTERY_DRIVER ?= adc
|
||||
BATTERY_DRIVER ?= none
|
||||
ifeq ($(strip $(BATTERY_DRIVER_REQUIRED)), yes)
|
||||
ifeq ($(filter $(BATTERY_DRIVER),$(VALID_BATTERY_DRIVER_TYPES)),)
|
||||
$(call CATASTROPHIC_ERROR,Invalid BATTERY_DRIVER,BATTERY_DRIVER="$(BATTERY_DRIVER)" is not a valid battery driver)
|
||||
endif
|
||||
|
||||
OPT_DEFS += -DBATTERY_DRIVER
|
||||
OPT_DEFS += -DBATTERY_$(strip $(shell echo $(BATTERY_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
OPT_DEFS += -DBATTERY_DRIVER_$(strip $(shell echo $(BATTERY_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
|
||||
COMMON_VPATH += $(DRIVER_PATH)/battery
|
||||
|
||||
SRC += battery.c
|
||||
SRC += battery_$(strip $(BATTERY_DRIVER)).c
|
||||
ifneq ($(strip $(BATTERY_DRIVER)), custom)
|
||||
SRC += battery_$(strip $(BATTERY_DRIVER)).c
|
||||
endif
|
||||
|
||||
# add extra deps
|
||||
ifeq ($(strip $(BATTERY_DRIVER)), adc)
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
ifneq (,$(filter $(MCU),atmega32u4))
|
||||
# TODO: opt in rather than assume everything uses a pro micro
|
||||
PIN_COMPATIBLE ?= promicro
|
||||
endif
|
||||
|
||||
# Remove whitespace from any rule.mk provided vars
|
||||
# - env cannot be overwritten but cannot have whitespace anyway
|
||||
CONVERT_TO:=$(strip $(CONVERT_TO))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"license": "GPL-2.0-or-later",
|
||||
"devDependencies": {
|
||||
"vite": "^5.4.19",
|
||||
"vite": "^5.4.21",
|
||||
"vitepress": "^1.1.0",
|
||||
"vitepress-plugin-tabs": "^0.5.0",
|
||||
"vue": "^3.4.24"
|
||||
|
||||
@@ -766,10 +766,10 @@ tabbable@^6.2.0:
|
||||
resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-6.2.0.tgz#732fb62bc0175cfcec257330be187dcfba1f3b97"
|
||||
integrity sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==
|
||||
|
||||
vite@^5.2.9, vite@^5.4.19:
|
||||
version "5.4.19"
|
||||
resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.19.tgz#20efd060410044b3ed555049418a5e7d1998f959"
|
||||
integrity sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==
|
||||
vite@^5.2.9, vite@^5.4.21:
|
||||
version "5.4.21"
|
||||
resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.21.tgz#84a4f7c5d860b071676d39ba513c0d598fdc7027"
|
||||
integrity sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==
|
||||
dependencies:
|
||||
esbuild "^0.21.3"
|
||||
postcss "^8.4.43"
|
||||
|
||||
@@ -21,6 +21,7 @@ SPACE_CADET_ENABLE ?= yes
|
||||
GENERIC_FEATURES = \
|
||||
AUTO_SHIFT \
|
||||
AUTOCORRECT \
|
||||
BATTERY \
|
||||
BOOTMAGIC \
|
||||
CAPS_WORD \
|
||||
COMBO \
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
TEST_LIST = $(sort $(patsubst %/test.mk,%, $(shell find $(ROOT_DIR)tests -type f -name test.mk)))
|
||||
FULL_TESTS := $(notdir $(TEST_LIST))
|
||||
|
||||
include $(QUANTUM_PATH)/battery/tests/testlist.mk
|
||||
include $(QUANTUM_PATH)/debounce/tests/testlist.mk
|
||||
include $(QUANTUM_PATH)/encoder/tests/testlist.mk
|
||||
include $(QUANTUM_PATH)/os_detection/tests/testlist.mk
|
||||
|
||||
0
data/constants/keycodes/keycodes_0.0.8.hjson
Normal file
0
data/constants/keycodes/keycodes_0.0.8.hjson
Normal file
37
data/constants/keycodes/keycodes_0.0.8_lighting.hjson
Normal file
37
data/constants/keycodes/keycodes_0.0.8_lighting.hjson
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"keycodes": {
|
||||
"0x7819": {
|
||||
"group": "led_matrix",
|
||||
"key": "QK_LED_MATRIX_FLAG_NEXT",
|
||||
"label": "LED Matrix Flag Next",
|
||||
"aliases": [
|
||||
"LM_FLGN"
|
||||
]
|
||||
},
|
||||
"0x781A": {
|
||||
"group": "led_matrix",
|
||||
"key": "QK_LED_MATRIX_FLAG_PREVIOUS",
|
||||
"label": "LED Matrix Flag Previous",
|
||||
"aliases": [
|
||||
"LM_FLGP"
|
||||
]
|
||||
},
|
||||
|
||||
"0x784D": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_FLAG_NEXT",
|
||||
"label": "RGB Matrix Flag Next",
|
||||
"aliases": [
|
||||
"RM_FLGN"
|
||||
]
|
||||
},
|
||||
"0x784E": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_FLAG_PREVIOUS",
|
||||
"label": "RGB Matrix Flag Previous",
|
||||
"aliases": [
|
||||
"RM_FLGP"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,14 @@
|
||||
"BOOTMAGIC_ROW": {"info_key": "bootmagic.matrix.0", "value_type": "int"},
|
||||
"BOOTMAGIC_ROW_RIGHT": {"info_key": "split.bootmagic.matrix.0", "value_type": "int"},
|
||||
|
||||
// Battery
|
||||
"BATTERY_SAMPLE_INTERVAL": {"info_key": "battery.sample_interval", "value_type": "int"},
|
||||
"BATTERY_ADC_PIN": {"info_key": "battery.adc.pin"},
|
||||
"BATTERY_ADC_REF_VOLTAGE_MV": {"info_key": "battery.adc.reference_voltage", "value_type": "int"},
|
||||
"BATTERY_ADC_VOLTAGE_DIVIDER_R1": {"info_key": "battery.adc.divider_r1", "value_type": "int"},
|
||||
"BATTERY_ADC_VOLTAGE_DIVIDER_R2": {"info_key": "battery.adc.divider_r2", "value_type": "int"},
|
||||
"BATTERY_ADC_RESOLUTION": {"info_key": "battery.adc.resolution", "value_type": "int"},
|
||||
|
||||
// Caps Word
|
||||
"BOTH_SHIFTS_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.both_shifts_turns_on", "value_type": "flag"},
|
||||
"CAPS_WORD_IDLE_TIMEOUT": {"info_key": "caps_word.idle_timeout", "value_type": "int"},
|
||||
@@ -90,6 +98,7 @@
|
||||
|
||||
// LED Matrix
|
||||
"LED_MATRIX_CENTER": {"info_key": "led_matrix.center_point", "value_type": "array.int"},
|
||||
"LED_MATRIX_FLAG_STEPS": {"info_key": "led_matrix.flag_steps", "value_type": "array.int"},
|
||||
"LED_MATRIX_KEYRELEASES": {"info_key": "led_matrix.react_on_keyup", "value_type": "flag"},
|
||||
"LED_MATRIX_LED_FLUSH_LIMIT": {"info_key": "led_matrix.led_flush_limit", "value_type": "int"},
|
||||
"LED_MATRIX_LED_PROCESS_LIMIT": {"info_key": "led_matrix.led_process_limit", "value_type": "int", "to_json": false},
|
||||
@@ -103,6 +112,7 @@
|
||||
"LED_MATRIX_DEFAULT_ON": {"info_key": "led_matrix.default.on", "value_type": "bool"},
|
||||
"LED_MATRIX_DEFAULT_VAL": {"info_key": "led_matrix.default.val", "value_type": "int"},
|
||||
"LED_MATRIX_DEFAULT_SPD": {"info_key": "led_matrix.default.speed", "value_type": "int"},
|
||||
"LED_MATRIX_DEFAULT_FLAGS": {"info_key": "led_matrix.default.flags", "value_type": "int"},
|
||||
|
||||
// Locking Switch
|
||||
"LOCKING_SUPPORT_ENABLE": {"info_key": "qmk.locking.enabled", "value_type": "flag"},
|
||||
@@ -120,6 +130,7 @@
|
||||
"MATRIX_HAS_GHOST": {"info_key": "matrix_pins.ghost", "value_type": "flag"},
|
||||
"MATRIX_INPUT_PRESSED_STATE": {"info_key": "matrix_pins.input_pressed_state", "value_type": "int"},
|
||||
"MATRIX_IO_DELAY": {"info_key": "matrix_pins.io_delay", "value_type": "int"},
|
||||
"MATRIX_MASKED": {"info_key": "matrix_pins.masked", "value_type": "flag"},
|
||||
|
||||
// Mouse Keys
|
||||
"MOUSEKEY_DELAY": {"info_key": "mousekey.delay", "value_type": "int"},
|
||||
@@ -138,6 +149,7 @@
|
||||
|
||||
// RGB Matrix
|
||||
"RGB_MATRIX_CENTER": {"info_key": "rgb_matrix.center_point", "value_type": "array.int"},
|
||||
"RGB_MATRIX_FLAG_STEPS": {"info_key": "rgb_matrix.flag_steps", "value_type": "array.int"},
|
||||
"RGB_MATRIX_HUE_STEP": {"info_key": "rgb_matrix.hue_steps", "value_type": "int"},
|
||||
"RGB_MATRIX_KEYRELEASES": {"info_key": "rgb_matrix.react_on_keyup", "value_type": "flag"},
|
||||
"RGB_MATRIX_LED_FLUSH_LIMIT": {"info_key": "rgb_matrix.led_flush_limit", "value_type": "int"},
|
||||
@@ -155,6 +167,7 @@
|
||||
"RGB_MATRIX_DEFAULT_SAT": {"info_key": "rgb_matrix.default.sat", "value_type": "int"},
|
||||
"RGB_MATRIX_DEFAULT_VAL": {"info_key": "rgb_matrix.default.val", "value_type": "int"},
|
||||
"RGB_MATRIX_DEFAULT_SPD": {"info_key": "rgb_matrix.default.speed", "value_type": "int"},
|
||||
"RGB_MATRIX_DEFAULT_FLAGS": {"info_key": "rgb_matrix.default.flags", "value_type": "int"},
|
||||
|
||||
// RGBLight
|
||||
"RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"},
|
||||
@@ -183,7 +196,7 @@
|
||||
|
||||
// Split Keyboard
|
||||
"SOFT_SERIAL_PIN": {"info_key": "split.serial.pin"},
|
||||
"SOFT_SERIAL_SPEED": {"info_key": "split.soft_serial_speed"},
|
||||
"SELECT_SOFT_SERIAL_SPEED": {"info_key": "split.serial.speed"},
|
||||
"SPLIT_HAND_MATRIX_GRID": {"info_key": "split.handedness.matrix_grid", "value_type": "array", "to_c": false},
|
||||
"SPLIT_HAND_PIN": {"info_key": "split.handedness.pin"},
|
||||
"SPLIT_USB_DETECT": {"info_key": "split.usb_detect.enabled", "value_type": "flag"},
|
||||
@@ -211,6 +224,7 @@
|
||||
"PERMISSIVE_HOLD_PER_KEY": {"info_key": "tapping.permissive_hold_per_key", "value_type": "flag"},
|
||||
"RETRO_TAPPING": {"info_key": "tapping.retro", "value_type": "flag"},
|
||||
"RETRO_TAPPING_PER_KEY": {"info_key": "tapping.retro_per_key", "value_type": "flag"},
|
||||
"SPECULATIVE_HOLD": {"info_key": "tapping.speculative_hold", "value_type": "flag"},
|
||||
"TAP_CODE_DELAY": {"info_key": "qmk.tap_keycode_delay", "value_type": "int"},
|
||||
"TAP_HOLD_CAPS_DELAY": {"info_key": "qmk.tap_capslock_delay", "value_type": "int"},
|
||||
"TAPPING_TERM": {"info_key": "tapping.term", "value_type": "int"},
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
"animation": "solid",
|
||||
"on": true,
|
||||
"val": 255,
|
||||
"speed": 128
|
||||
"speed": 128,
|
||||
"flags": 255
|
||||
},
|
||||
"led_flush_limit": 16,
|
||||
"max_brightness": 255,
|
||||
@@ -53,7 +54,8 @@
|
||||
"hue": 0,
|
||||
"sat": 255,
|
||||
"val": 255,
|
||||
"speed": 128
|
||||
"speed": 128,
|
||||
"flags": 255
|
||||
},
|
||||
"hue_steps": 8,
|
||||
"led_flush_limit": 16,
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
"AUDIO_DRIVER": {"info_key": "audio.driver"},
|
||||
"BACKLIGHT_DRIVER": {"info_key": "backlight.driver"},
|
||||
"BATTERY_DRIVER": {"info_key": "battery.driver"},
|
||||
"BLUETOOTH_DRIVER": {"info_key": "bluetooth.driver"},
|
||||
"BOARD": {"info_key": "board"},
|
||||
"BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false},
|
||||
@@ -53,8 +54,8 @@
|
||||
"WS2812_DRIVER": {"info_key": "ws2812.driver"},
|
||||
|
||||
// Items we want flagged in lint
|
||||
"DEFAULT_FOLDER": {"info_key": "_deprecated.default_folder", "deprecated": true},
|
||||
"CTPC": {"info_key": "_invalid.ctpc", "invalid": true, "replace_with": "CONVERT_TO=proton_c"},
|
||||
"CONVERT_TO_PROTON_C": {"info_key": "_invalid.ctpc", "invalid": true, "replace_with": "CONVERT_TO=proton_c"},
|
||||
"DEFAULT_FOLDER": {"info_key": "_invalid.default_folder", "invalid": true},
|
||||
"VIAL_ENABLE": {"info_key": "_invalid.vial", "invalid": true}
|
||||
}
|
||||
|
||||
@@ -68,6 +68,81 @@
|
||||
"bakeneko80": {
|
||||
"target": "kkatano/bakeneko80"
|
||||
},
|
||||
"bastardkb/charybdis/3x5/v2/elitec": {
|
||||
"target": "bastardkb/charybdis/3x5/elitec"
|
||||
},
|
||||
"bastardkb/charybdis/3x5/v2/splinky_2": {
|
||||
"target": "bastardkb/charybdis/3x5/elitec"
|
||||
},
|
||||
"bastardkb/charybdis/3x5/v2/splinky_3": {
|
||||
"target": "bastardkb/charybdis/3x5/elitec"
|
||||
},
|
||||
"bastardkb/charybdis/3x5/v2/stemcell": {
|
||||
"target": "bastardkb/charybdis/3x5/elitec"
|
||||
},
|
||||
"bastardkb/charybdis/3x6/v2/elitec": {
|
||||
"target": "bastardkb/charybdis/3x6/elitec"
|
||||
},
|
||||
"bastardkb/charybdis/3x6/v2/splinky_2": {
|
||||
"target": "bastardkb/charybdis/3x6/elitec"
|
||||
},
|
||||
"bastardkb/charybdis/3x6/v2/splinky_3": {
|
||||
"target": "bastardkb/charybdis/3x6/elitec"
|
||||
},
|
||||
"bastardkb/charybdis/3x6/v2/stemcell": {
|
||||
"target": "bastardkb/charybdis/3x6/elitec"
|
||||
},
|
||||
"bastardkb/charybdis/4x6/v2/elitec": {
|
||||
"target": "bastardkb/charybdis/4x6/elitec"
|
||||
},
|
||||
"bastardkb/charybdis/4x6/v2/splinky_2": {
|
||||
"target": "bastardkb/charybdis/4x6/elitec"
|
||||
},
|
||||
"bastardkb/charybdis/4x6/v2/splinky_3": {
|
||||
"target": "bastardkb/charybdis/4x6/elitec"
|
||||
},
|
||||
"bastardkb/charybdis/4x6/v2/stemcell": {
|
||||
"target": "bastardkb/charybdis/4x6/elitec"
|
||||
},
|
||||
"bastardkb/dilemma/3x5_2/splinky": {
|
||||
"target": "bastardkb/dilemma/3x5_2/promicro"
|
||||
},
|
||||
"bastardkb/scylla/v2/elitec": {
|
||||
"target": "bastardkb/scylla/promicro"
|
||||
},
|
||||
"bastardkb/scylla/v2/splinky_2": {
|
||||
"target": "bastardkb/scylla/promicro"
|
||||
},
|
||||
"bastardkb/scylla/v2/splinky_3": {
|
||||
"target": "bastardkb/scylla/promicro"
|
||||
},
|
||||
"bastardkb/scylla/v2/stemcell": {
|
||||
"target": "bastardkb/scylla/promicro"
|
||||
},
|
||||
"bastardkb/skeletyl/v2/elitec": {
|
||||
"target": "bastardkb/skeletyl/promicro"
|
||||
},
|
||||
"bastardkb/skeletyl/v2/splinky_2": {
|
||||
"target": "bastardkb/skeletyl/promicro"
|
||||
},
|
||||
"bastardkb/skeletyl/v2/splinky_3": {
|
||||
"target": "bastardkb/skeletyl/promicro"
|
||||
},
|
||||
"bastardkb/skeletyl/v2/stemcell": {
|
||||
"target": "bastardkb/skeletyl/promicro"
|
||||
},
|
||||
"bastardkb/tbkmini/v2/elitec": {
|
||||
"target": "bastardkb/tbkmini/promicro"
|
||||
},
|
||||
"bastardkb/tbkmini/v2/splinky_2": {
|
||||
"target": "bastardkb/tbkmini/promicro"
|
||||
},
|
||||
"bastardkb/tbkmini/v2/splinky_3": {
|
||||
"target": "bastardkb/tbkmini/promicro"
|
||||
},
|
||||
"bastardkb/tbkmini/v2/stemcell": {
|
||||
"target": "bastardkb/tbkmini/promicro"
|
||||
},
|
||||
"bear_face": {
|
||||
"target": "bear_face/v1"
|
||||
},
|
||||
@@ -257,44 +332,11 @@
|
||||
"handwired/jscotto/scottostarter": {
|
||||
"target": "handwired/scottokeebs/scottostarter"
|
||||
},
|
||||
"helix/pico/sc/back": {
|
||||
"target": "helix/pico/sc"
|
||||
"helix": {
|
||||
"target": "helix/beta"
|
||||
},
|
||||
"helix/pico/sc/under": {
|
||||
"target": "helix/pico/sc"
|
||||
},
|
||||
"helix/rev2/back/oled": {
|
||||
"target": "helix/rev2/back"
|
||||
},
|
||||
"helix/rev2/oled": {
|
||||
"target": "helix/rev2"
|
||||
},
|
||||
"helix/rev2/oled/back": {
|
||||
"target": "helix/rev2/back"
|
||||
},
|
||||
"helix/rev2/oled/under": {
|
||||
"target": "helix/rev2/under"
|
||||
},
|
||||
"helix/rev2/sc/back": {
|
||||
"target": "helix/rev2/sc"
|
||||
},
|
||||
"helix/rev2/sc/oled": {
|
||||
"target": "helix/rev2/sc"
|
||||
},
|
||||
"helix/rev2/sc/oledback": {
|
||||
"target": "helix/rev2/sc"
|
||||
},
|
||||
"helix/rev2/sc/oledunder": {
|
||||
"target": "helix/rev2/sc"
|
||||
},
|
||||
"helix/rev2/sc/under": {
|
||||
"target": "helix/rev2/sc"
|
||||
},
|
||||
"helix/rev2/under": {
|
||||
"target": "helix/rev2/sc"
|
||||
},
|
||||
"helix/rev2/under/oled": {
|
||||
"target": "helix/rev2/under"
|
||||
"helix/rev2": {
|
||||
"target": "helix/beta"
|
||||
},
|
||||
"honeycomb": {
|
||||
"target": "keyhive/honeycomb"
|
||||
@@ -407,6 +449,9 @@
|
||||
"lfkeyboards/smk65": {
|
||||
"target": "lfkeyboards/smk65/revb"
|
||||
},
|
||||
"ll3macorn/bongopad": {
|
||||
"target": "ll3ma/bongopad"
|
||||
},
|
||||
"m3v3van": {
|
||||
"target": "matthewdias/m3n3van"
|
||||
},
|
||||
@@ -1575,8 +1620,11 @@
|
||||
"0_sixty": {
|
||||
"target": "0_sixty/base"
|
||||
},
|
||||
"0xcb/splaytoraid": {
|
||||
"target": "0xcb/splaytoraid/rp2040_ce"
|
||||
"0xcb/splaytoraid/32u4": {
|
||||
"target": "0xcb/splaytoraid"
|
||||
},
|
||||
"0xcb/splaytoraid/rp2040_ce": {
|
||||
"target": "0xcb/splaytoraid"
|
||||
},
|
||||
"1upkeyboards/pi40": {
|
||||
"target": "1upkeyboards/pi40/mit_v1_0"
|
||||
@@ -1587,12 +1635,24 @@
|
||||
"1upkeyboards/sweet16": {
|
||||
"target": "1upkeyboards/sweet16/v1"
|
||||
},
|
||||
"1upkeyboards/sweet16v2/kb2040": {
|
||||
"target": "1upkeyboards/sweet16v2"
|
||||
},
|
||||
"1upkeyboards/sweet16v2/pro_micro": {
|
||||
"target": "1upkeyboards/sweet16v2"
|
||||
},
|
||||
"25keys/aleth42": {
|
||||
"target": "25keys/aleth42/rev1"
|
||||
},
|
||||
"25keys/zinc": {
|
||||
"target": "25keys/zinc/rev1"
|
||||
},
|
||||
"40percentclub/gherkin/kb2040": {
|
||||
"target": "40percentclub/gherkin"
|
||||
},
|
||||
"40percentclub/gherkin/pro_micro": {
|
||||
"target": "40percentclub/gherkin"
|
||||
},
|
||||
"40percentclub/i75": {
|
||||
"target": "40percentclub/i75/promicro"
|
||||
},
|
||||
@@ -1690,7 +1750,7 @@
|
||||
"target": "durgod/dgk6x/galaxy"
|
||||
},
|
||||
"durgod/venus": {
|
||||
"target": "durgod/dgk6x/venus"
|
||||
"target": "durgod/dgk6x/venus_ansi"
|
||||
},
|
||||
"dztech/tofu/ii": {
|
||||
"target": "dztech/tofu/ii/v1"
|
||||
@@ -1881,6 +1941,12 @@
|
||||
"kin80": {
|
||||
"target": "kin80/blackpill401"
|
||||
},
|
||||
"kprepublic/cstc40/daughterboard": {
|
||||
"target": "kprepublic/cstc40/rev1"
|
||||
},
|
||||
"kprepublic/cstc40/single_pcb": {
|
||||
"target": "kprepublic/cstc40/rev2"
|
||||
},
|
||||
"kumaokobo/kudox_full": {
|
||||
"target": "kumaokobo/kudox_full/rev1"
|
||||
},
|
||||
@@ -2214,8 +2280,17 @@
|
||||
"trnthsn/s6xty5neor2": {
|
||||
"target": "trnthsn/s6xty5neor2/stm32f103"
|
||||
},
|
||||
"tweetydabird/lotus58": {
|
||||
"target": "tweetydabird/lotus58/promicro"
|
||||
"tweetydabird/lotus58/elite_c": {
|
||||
"target": "tweetydabird/lotus58"
|
||||
},
|
||||
"tweetydabird/lotus58/nanoboot": {
|
||||
"target": "tweetydabird/lotus58"
|
||||
},
|
||||
"tweetydabird/lotus58/promicro": {
|
||||
"target": "tweetydabird/lotus58"
|
||||
},
|
||||
"tweetydabird/lotus58/rp2040_ce": {
|
||||
"target": "tweetydabird/lotus58"
|
||||
},
|
||||
"unison": {
|
||||
"target": "unison/v04"
|
||||
@@ -2258,5 +2333,54 @@
|
||||
},
|
||||
"zsa/planck_ez": {
|
||||
"target": "zsa/planck_ez/base"
|
||||
},
|
||||
// DEFAULT_FOLDER removed during 2025 Q3 cycle
|
||||
"cannonkeys/satisfaction75": {
|
||||
"target": "cannonkeys/satisfaction75/rev1"
|
||||
},
|
||||
"converter/adb_usb": {
|
||||
"target": "converter/adb_usb/rev1"
|
||||
},
|
||||
"converter/sun_usb": {
|
||||
"target": "converter/sun_usb/type5"
|
||||
},
|
||||
"converter/usb_usb": {
|
||||
"target": "converter/usb_usb/hasu"
|
||||
},
|
||||
"durgod/dgk6x": {
|
||||
"target": "durgod/dgk6x/hades_ansi"
|
||||
},
|
||||
"ergodox_ez": {
|
||||
"target": "ergodox_ez/base"
|
||||
},
|
||||
"ferris/0_2": {
|
||||
"target": "ferris/0_2/base"
|
||||
},
|
||||
"handwired/dygma/raise": {
|
||||
"target": "handwired/dygma/raise/ansi"
|
||||
},
|
||||
"helix/rev3_4rows": {
|
||||
"target": "helix/rev3"
|
||||
},
|
||||
"helix/rev3_5rows": {
|
||||
"target": "helix/rev3"
|
||||
},
|
||||
"ibm/model_m/mschwingen": {
|
||||
"target": "ibm/model_m/mschwingen/led_wired"
|
||||
},
|
||||
"mechwild/sugarglider": {
|
||||
"target": "mechwild/sugarglider/wide_oled/f401"
|
||||
},
|
||||
"mechwild/sugarglider/wide_oled": {
|
||||
"target": "mechwild/sugarglider/wide_oled/f401"
|
||||
},
|
||||
"novelkeys/nk65": {
|
||||
"target": "novelkeys/nk65/v1"
|
||||
},
|
||||
"novelkeys/nk65/base": {
|
||||
"target": "novelkeys/nk65/v1"
|
||||
},
|
||||
"sirius/uni660/rev2": {
|
||||
"target": "sirius/uni660/rev2/ansi"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,6 +188,28 @@
|
||||
"as_caps_lock": {"type": "boolean"}
|
||||
}
|
||||
},
|
||||
"battery": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"driver": {
|
||||
"type": "string",
|
||||
"enum": ["adc", "custom", "vendor"]
|
||||
},
|
||||
"adc": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"pin": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"reference_voltage": {"type": "integer"},
|
||||
"divider_r1": {"type": "integer"},
|
||||
"divider_r2": {"type": "integer"},
|
||||
"resolution": {"type": "integer"}
|
||||
}
|
||||
},
|
||||
"sample_interval": {"type": "integer"}
|
||||
}
|
||||
},
|
||||
"bluetooth": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
@@ -473,6 +495,7 @@
|
||||
"ghost": {"type": "boolean"},
|
||||
"input_pressed_state": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"io_delay": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"masked": {"type": "boolean"},
|
||||
"direct": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "./definitions.jsonschema#/mcu_pin_array"}
|
||||
@@ -520,7 +543,8 @@
|
||||
"on": {"type": "boolean"},
|
||||
"animation": {"type": "string"},
|
||||
"val": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
"speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"flags": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
}
|
||||
},
|
||||
"driver": {
|
||||
@@ -548,6 +572,11 @@
|
||||
"maxItems": 2,
|
||||
"items": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
},
|
||||
"flag_steps": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
},
|
||||
"max_brightness": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"val_steps": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
@@ -603,7 +632,8 @@
|
||||
"hue": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"sat": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"val": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
"speed": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"flags": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
}
|
||||
},
|
||||
"driver": {
|
||||
@@ -633,6 +663,11 @@
|
||||
"maxItems": 2,
|
||||
"items": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
},
|
||||
"flag_steps": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"$ref": "./definitions.jsonschema#/unsigned_int_8"}
|
||||
},
|
||||
"max_brightness": {"$ref": "./definitions.jsonschema#/unsigned_int_8"},
|
||||
"timeout": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"hue_steps": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
@@ -863,8 +898,7 @@
|
||||
},
|
||||
"soft_serial_speed": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 5
|
||||
"$comment": "Deprecated: use split.serial.speed instead"
|
||||
},
|
||||
"serial": {
|
||||
"type": "object",
|
||||
@@ -874,7 +908,12 @@
|
||||
"type": "string",
|
||||
"enum": ["bitbang", "usart", "vendor"]
|
||||
},
|
||||
"pin": {"$ref": "./definitions.jsonschema#/mcu_pin"}
|
||||
"pin": {"$ref": "./definitions.jsonschema#/mcu_pin"},
|
||||
"speed": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 5
|
||||
}
|
||||
}
|
||||
},
|
||||
"transport": {
|
||||
|
||||
@@ -35,6 +35,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dip_switches": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["on", "off"],
|
||||
"properties": {
|
||||
"on": {"type": "string"},
|
||||
"off": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"macros": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
||||
@@ -36,7 +36,7 @@ Four times a year QMK runs a process for merging Breaking Changes. A Breaking Ch
|
||||
## Encoder flip
|
||||
|
||||
* Flips the encoder direction so that `clockwise == true` is for actually turning the knob clockwise
|
||||
* Adds `ENCODER_DIRECTION_FLIP` define, so that reversing the expected dirction is simple for users.
|
||||
* Adds `ENCODER_DIRECTION_FLIP` define, so that reversing the expected direction is simple for users.
|
||||
* Cleans up documentation page for encoders
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ These PRs move the V-USB driver code out of the qmk_firmware repository and into
|
||||
|
||||
Updates all of the per key tap-hold functions to pass the `keyrecord_t` structure, and include documentation changes.
|
||||
|
||||
Any remaining versions or code outside of the main repo will need to be converted:
|
||||
Any remaining versions or code outside of the main repo will need to be converted:
|
||||
| Old function | New Function |
|
||||
|------------------------------------------------------|---------------------------------------------------------------------------|
|
||||
|`uint16_t get_tapping_term(uint16_t keycode)` |`uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record)` |
|
||||
@@ -38,7 +38,7 @@ After the next breaking change you will not be able to build if `bin/qmk hello`
|
||||
[#8269](https://github.com/qmk/qmk_firmware/pull/8269)
|
||||
|
||||
- Provides debug functionality on ChibiOS/ARM that is more compliant than previous integrations.
|
||||
- Less maintenence, fewer QMK customisations, and allows QMK to sidestep previous compile and runtime issues.
|
||||
- Less maintenance, fewer QMK customisations, and allows QMK to sidestep previous compile and runtime issues.
|
||||
- A `make git-submodule` may be required after pulling the latest QMK Firmware code to update to the new dependency.
|
||||
|
||||
### Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup
|
||||
@@ -51,8 +51,10 @@ After the next breaking change you will not be able to build if `bin/qmk hello`
|
||||
|
||||
The `RGB_DISABLE_AFTER_TIMEOUT` definition is now deprecated, and has been superseded by `RGB_DISABLE_TIMEOUT`. To use the new definition, rename `RGB_DISABLE_AFTER_TIMEOUT` to `RGB_DISABLE_TIMEOUT` in your `config.h` file, and multiply the value set by 1200.
|
||||
|
||||
Before: `#define RGB_DISABLE_AFTER_TIMEOUT 100`
|
||||
After: `#define RGB_DISABLE_TIMEOUT 120000`
|
||||
```diff
|
||||
-#define RGB_DISABLE_AFTER_TIMEOUT 100
|
||||
+#define RGB_DISABLE_TIMEOUT 120000
|
||||
```
|
||||
|
||||
### Switch to qmk forks for everything
|
||||
|
||||
@@ -103,8 +105,8 @@ This allows current lily58 firmware to advance with updates to the `split_common
|
||||
- Alternatively, if you did not change the OLED code from that in `default`, you may find it easier to simply copy the [relevant section](https://github.com/qmk/qmk_firmware/blob/4ac310668501ae6786c711ecc8f01f62ddaa1c0b/keyboards/lily58/keymaps/default/keymap.c#L138-L172). Otherwise, the changes you need to make are as follows (sample change [here](https://github.com/qmk/qmk_firmware/pull/6260/files#diff-20943ea59856e9bdf3d99ecb2eee40b7R138-R173))
|
||||
- [Remove](https://github.com/qmk/qmk_firmware/pull/6260/files#diff-20943ea59856e9bdf3d99ecb2eee40b7L138-L141) the block
|
||||
```c
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
```
|
||||
- Within the block bounded by `#ifdef OLED_DRIVER_ENABLE` and `#endif // OLED_DRIVER_ENABLE`, add the following block to ensure that your two OLEDs are rotated correctly across the left and right sides:
|
||||
@@ -127,7 +129,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
|
||||
* Refactor to use split_common and remove split codes under the zinc/revx/
|
||||
* Add - backlight RGB LED and/or underglow RGB LED option
|
||||
* Add - continuous RGB animations feature (between L and R halves)
|
||||
* Add - continuous RGB animations feature (between L and R halves)
|
||||
* Fix - keymap files to adapt to changes
|
||||
* all authors of keymaps confirmed this PR
|
||||
* Update - documents and rules.mk
|
||||
@@ -164,8 +166,8 @@ void keyboard_pre_init_kb(void) {
|
||||
- The following changes are for compatibility with the OLED driver. If you don't use the OLED driver you may safely delete [this section](https://github.com/qmk/qmk_firmware/blob/e6b9980bd45c186f7360df68c24b6e05a80c10dc/keyboards/lily58/keymaps/default/keymap.c#L144-L190)
|
||||
- [Remove](https://github.com/qmk/qmk_firmware/pull/6260/files#diff-20943ea59856e9bdf3d99ecb2eee40b7L91-L158) the block
|
||||
```c
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
```
|
||||
- Within the block bounded by `#ifdef OLED_DRIVER_ENABLE` and `#endif // OLED_DRIVER_ENABLE`, add the following block to ensure that your two OLEDs are rotated correctly across the left and right sides:
|
||||
|
||||
@@ -12,7 +12,7 @@ Added support for MK66F18 (Teensy 3.6) microcontroller.
|
||||
|
||||
### New command: qmk console ([#12828](https://github.com/qmk/qmk_firmware/pull/12828)) {#new-command-qmk-console}
|
||||
|
||||
A new `qmk console` command has been added for attaching to your keyboard's console. It operates similiarly to QMK Toolbox by allowing you to connect to one or more keyboard consoles to display debugging messages.
|
||||
A new `qmk console` command has been added for attaching to your keyboard's console. It operates similarly to QMK Toolbox by allowing you to connect to one or more keyboard consoles to display debugging messages.
|
||||
|
||||
### Improved command: qmk config {#improve-command-qmk-config}
|
||||
|
||||
@@ -121,8 +121,8 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
tap_code(KC_UP);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
// If you return true, this will allow the keyboard level code to run, as well.
|
||||
return true;
|
||||
// If you return true, this will allow the keyboard level code to run, as well.
|
||||
//Returning false will override the keyboard level code. Depending on how the keyboard level function is set up.
|
||||
}
|
||||
```
|
||||
|
||||
@@ -104,7 +104,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
|
||||
}
|
||||
}
|
||||
|
||||
void dip_switch_update_mask_kb(uint32_t state) {
|
||||
void dip_switch_update_mask_kb(uint32_t state) {
|
||||
dip_switch_update_mask_user(state);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ Bootloader configuration is no longer assumed. Keyboards must now set either:
|
||||
|
||||
### Rename `AdafruitBLE` to `BluefruitLE` ([#16127](https://github.com/qmk/qmk_firmware/pull/16127))
|
||||
|
||||
In preparation of future bluetooth work, the `AdafruitBLE` integration has been renamed to allow potential for any other Adafruit BLE products.
|
||||
In preparation of future bluetooth work, the `AdafruitBLE` integration has been renamed to allow potential for any other Adafruit BLE products.
|
||||
|
||||
### Updated Keyboard Codebases {#updated-keyboard-codebases}
|
||||
|
||||
|
||||
181
docs/ChangeLog/20250831.md
Normal file
181
docs/ChangeLog/20250831.md
Normal file
@@ -0,0 +1,181 @@
|
||||
# QMK Breaking Changes - 2025 Aug 31 Changelog
|
||||
|
||||
## Changes Requiring User Action
|
||||
|
||||
### Updated Keyboard Codebases
|
||||
|
||||
| Old Keyboard Name | New Keyboard Name |
|
||||
|--------------------------------------|----------------------------------|
|
||||
| bastardkb/charybdis/3x5/v2/elitec | bastardkb/charybdis/3x5/elitec |
|
||||
| bastardkb/charybdis/3x5/v2/splinky_2 | bastardkb/charybdis/3x5/elitec |
|
||||
| bastardkb/charybdis/3x5/v2/splinky_3 | bastardkb/charybdis/3x5/elitec |
|
||||
| bastardkb/charybdis/3x5/v2/stemcell | bastardkb/charybdis/3x5/elitec |
|
||||
| bastardkb/charybdis/3x6/v2/elitec | bastardkb/charybdis/3x6/elitec |
|
||||
| bastardkb/charybdis/3x6/v2/splinky_2 | bastardkb/charybdis/3x6/elitec |
|
||||
| bastardkb/charybdis/3x6/v2/splinky_3 | bastardkb/charybdis/3x6/elitec |
|
||||
| bastardkb/charybdis/3x6/v2/stemcell | bastardkb/charybdis/3x6/elitec |
|
||||
| bastardkb/charybdis/4x6/v2/elitec | bastardkb/charybdis/4x6/elitec |
|
||||
| bastardkb/charybdis/4x6/v2/splinky_2 | bastardkb/charybdis/4x6/elitec |
|
||||
| bastardkb/charybdis/4x6/v2/splinky_3 | bastardkb/charybdis/4x6/elitec |
|
||||
| bastardkb/charybdis/4x6/v2/stemcell | bastardkb/charybdis/4x6/elitec |
|
||||
| bastardkb/dilemma/3x5_2/splinky | bastardkb/dilemma/3x5_2/promicro |
|
||||
| bastardkb/scylla/v2/elitec | bastardkb/scylla/promicro |
|
||||
| bastardkb/scylla/v2/splinky_2 | bastardkb/scylla/promicro |
|
||||
| bastardkb/scylla/v2/splinky_3 | bastardkb/scylla/promicro |
|
||||
| bastardkb/scylla/v2/stemcell | bastardkb/scylla/promicro |
|
||||
| bastardkb/skeletyl/v2/elitec | bastardkb/skeletyl/promicro |
|
||||
| bastardkb/skeletyl/v2/splinky_2 | bastardkb/skeletyl/promicro |
|
||||
| bastardkb/skeletyl/v2/splinky_3 | bastardkb/skeletyl/promicro |
|
||||
| bastardkb/skeletyl/v2/stemcell | bastardkb/skeletyl/promicro |
|
||||
| bastardkb/tbkmini/v2/elitec | bastardkb/tbkmini/promicro |
|
||||
| bastardkb/tbkmini/v2/splinky_2 | bastardkb/tbkmini/promicro |
|
||||
| bastardkb/tbkmini/v2/splinky_3 | bastardkb/tbkmini/promicro |
|
||||
| bastardkb/tbkmini/v2/stemcell | bastardkb/tbkmini/promicro |
|
||||
| helix/rev2 | helix/beta |
|
||||
| helix/rev3_4rows | helix/rev3 |
|
||||
| helix/rev3_5rows | helix/rev3 |
|
||||
| kprepublic/cstc40/daughterboard | kprepublic/cstc40/rev1 |
|
||||
| kprepublic/cstc40/single_pcb | kprepublic/cstc40/rev2 |
|
||||
| ll3macorn/bongopad | ll3ma/bongopad |
|
||||
| novelkeys/nk65/base | novelkeys/nk65/v1 |
|
||||
| tweetydabird/lotus58/elite_c | tweetydabird/lotus58 |
|
||||
| tweetydabird/lotus58/nanoboot | tweetydabird/lotus58 |
|
||||
| tweetydabird/lotus58/promicro | tweetydabird/lotus58 |
|
||||
| tweetydabird/lotus58/rp2040_ce | tweetydabird/lotus58 |
|
||||
|
||||
### Mitigate VIA keylogger security issues [#25414](https://github.com/qmk/qmk_firmware/pull/25414)
|
||||
|
||||
VIA's keyboard matrix testing functionality, which allows users to identify active key presses, has been identified as a potential security concern by community members and security researchers. This feature has been demonstrated to enable unauthorized keystroke capture, with documented examples showing how malicious scripts could exploit this capability to create keyloggers. A recent security assessment revealed that user credentials could be compromised by exploiting the matrix testing function combined with VIA's keycode assignment queries. In this attack scenario, a script could remain active during a locked session and capture password input when users authenticate upon return.
|
||||
|
||||
The QMK team notified the VIA team of this security vulnerability on May 17, 2022, and made multiple subsequent attempts to coordinate a mitigation strategy. Despite repeated outreach, the VIA team has provided no acknowledgment or response to these security concerns. Given the severity of the potential security implications and the lack of engagement from the VIA team, the QMK team has unilaterally implemented a security enhancement that modifies the keyboard matrix testing functionality to prevent the reporting of key press events. This change prioritizes user security and data protection over potential feature compatibility concerns within VIA.
|
||||
|
||||
## Deprecation Notices
|
||||
|
||||
In line with the [notice period](../support_deprecation_policy#how-much-advance-notice-will-be-given), deprecation notices for larger items are listed here.
|
||||
|
||||
### `DEFAULT_FOLDER` removal ([#23281](https://github.com/qmk/qmk_firmware/pull/23281))
|
||||
|
||||
`DEFAULT_FOLDER` was originally introduced to work around limitations within the build system.
|
||||
Parent folders containing common configuration would create invalid build targets.
|
||||
|
||||
With the introduction of [`keyboard.json`](./20240526#keyboard-json) as a configuration file, the build system now has a consistent method to detect build targets.
|
||||
The `DEFAULT_FOLDER` functionality is now removed with the intent that `rules.mk` is now pure configuration.
|
||||
|
||||
Backwards compatibility of build targets has been maintained where possible.
|
||||
|
||||
### Converter `Pin Compatible` updates ([#20330](https://github.com/qmk/qmk_firmware/pull/20330))
|
||||
|
||||
Converter support has been further limited to only function if a keyboard declares that it is compatible.
|
||||
|
||||
This can be configured in the following ways:
|
||||
|
||||
:::::tabs
|
||||
|
||||
==== keyboard.json
|
||||
|
||||
```json [keyboard.json]
|
||||
{
|
||||
"development_board": "promicro", // [!code focus]
|
||||
}
|
||||
```
|
||||
|
||||
==== rules.mk
|
||||
|
||||
```make [rules.mk]
|
||||
PIN_COMPATIBLE = promicro
|
||||
```
|
||||
|
||||
:::::
|
||||
|
||||
see the [Converters Feature](../feature_converters) documentation for more information.
|
||||
|
||||
### Removal of deprecated RGB and Mouse keycodes ([#25444](https://github.com/qmk/qmk_firmware/pull/25444))
|
||||
|
||||
Backwards compatibility of deprecated RGB and Mouse keycodes has been removed.
|
||||
|
||||
See the following documentation for the list of currently supported keycodes:
|
||||
|
||||
* [RGB Lighting](../features/rgblight#keycodes)
|
||||
* [RGB Matrix](../features/rgb_matrix#keycodes)
|
||||
* [Mouse keys](../features/mouse_keys#mapping-mouse-actions)
|
||||
|
||||
## Full changelist
|
||||
|
||||
Core:
|
||||
* Remove converter assumption that everything is a promicro ([#20330](https://github.com/qmk/qmk_firmware/pull/20330))
|
||||
* Remove `DEFAULT_FOLDER` handling ([#23281](https://github.com/qmk/qmk_firmware/pull/23281))
|
||||
* Add core handling for pointing device failures. ([#25315](https://github.com/qmk/qmk_firmware/pull/25315))
|
||||
* Relocate remaining `process_record_quantum` keycodes ([#25328](https://github.com/qmk/qmk_firmware/pull/25328))
|
||||
* Remove `process_action_kb` callback ([#25331](https://github.com/qmk/qmk_firmware/pull/25331))
|
||||
* Add `{rgb|led}_matrix_get_mode_name()`. ([#25344](https://github.com/qmk/qmk_firmware/pull/25344))
|
||||
* Align sleep_led logic ([#25395](https://github.com/qmk/qmk_firmware/pull/25395))
|
||||
* Mitigate VIA keylogger security issues ([#25414](https://github.com/qmk/qmk_firmware/pull/25414))
|
||||
* Deprecate some nonstandard mod & mod-tap keycode aliases ([#25437](https://github.com/qmk/qmk_firmware/pull/25437))
|
||||
* Refactor Starlight Smooth matrix effect ([#25442](https://github.com/qmk/qmk_firmware/pull/25442))
|
||||
* Remove deprecated `RGB_` and Mouse keycodes ([#25444](https://github.com/qmk/qmk_firmware/pull/25444))
|
||||
* Configure SPI for `QMK_PM2040` board ([#25481](https://github.com/qmk/qmk_firmware/pull/25481))
|
||||
* Configure SPI for `STEMCELL` board ([#25486](https://github.com/qmk/qmk_firmware/pull/25486))
|
||||
* Configure SPI for `QMK_BLOK` board ([#25487](https://github.com/qmk/qmk_firmware/pull/25487))
|
||||
* Clamp reactive offset value ([#25489](https://github.com/qmk/qmk_firmware/pull/25489))
|
||||
* Relocate `AUDIO_INIT_DELAY` implementation ([#25491](https://github.com/qmk/qmk_firmware/pull/25491))
|
||||
* Add MATRIX_ROWS_PER_HAND definition ([#25513](https://github.com/qmk/qmk_firmware/pull/25513))
|
||||
* Refactor battery driver ([#25550](https://github.com/qmk/qmk_firmware/pull/25550))
|
||||
* Add cachyos as pattern when installing dependencies ([#25580](https://github.com/qmk/qmk_firmware/pull/25580))
|
||||
|
||||
CLI:
|
||||
* Add MATRIX_MASKED DD config ([#25383](https://github.com/qmk/qmk_firmware/pull/25383))
|
||||
* Ensure keyboard aliases do not point to themselves ([#25500](https://github.com/qmk/qmk_firmware/pull/25500))
|
||||
|
||||
Keyboards:
|
||||
* [Update] E8ghtyNeo caps indicator ([#25009](https://github.com/qmk/qmk_firmware/pull/25009))
|
||||
* Keychron C3 Pro `c3_pro.c` corrections ([#25049](https://github.com/qmk/qmk_firmware/pull/25049))
|
||||
* Update franky36 pid and vid ([#25160](https://github.com/qmk/qmk_firmware/pull/25160))
|
||||
* Added Encoder support for Soyuz ([#25279](https://github.com/qmk/qmk_firmware/pull/25279))
|
||||
* CSTC40 rev3 (FXTWINK) ([#25285](https://github.com/qmk/qmk_firmware/pull/25285))
|
||||
* Migrate remaining `DEFAULT_FOLDER` to keyboard aliases ([#25291](https://github.com/qmk/qmk_firmware/pull/25291))
|
||||
* Configure boards to use development_board - R ([#25316](https://github.com/qmk/qmk_firmware/pull/25316))
|
||||
* Configure boards to use development_board - P ([#25317](https://github.com/qmk/qmk_firmware/pull/25317))
|
||||
* Configure boards to use development_board - NO ([#25338](https://github.com/qmk/qmk_firmware/pull/25338))
|
||||
* Configure boards to use development_board - LM ([#25341](https://github.com/qmk/qmk_firmware/pull/25341))
|
||||
* maple_computing/launchpad - Remove broken `default_rgb` keymap ([#25342](https://github.com/qmk/qmk_firmware/pull/25342))
|
||||
* update winry25 VID and PID ([#25351](https://github.com/qmk/qmk_firmware/pull/25351))
|
||||
* Configure boards to use development_board - DE ([#25369](https://github.com/qmk/qmk_firmware/pull/25369))
|
||||
* Configure boards to use development_board - FGHIJ ([#25370](https://github.com/qmk/qmk_firmware/pull/25370))
|
||||
* refactor(mercutio): layouts & reformatting ([#25408](https://github.com/qmk/qmk_firmware/pull/25408))
|
||||
* Configure boards to use development_board - ABC ([#25417](https://github.com/qmk/qmk_firmware/pull/25417))
|
||||
* Configure boards to use development_board - K ([#25421](https://github.com/qmk/qmk_firmware/pull/25421))
|
||||
* Refactor `helix/pico` ([#25428](https://github.com/qmk/qmk_firmware/pull/25428))
|
||||
* Refactor `helix/rev2` ([#25429](https://github.com/qmk/qmk_firmware/pull/25429))
|
||||
* Refactor `helix/rev3_{4,5}rows` ([#25430](https://github.com/qmk/qmk_firmware/pull/25430))
|
||||
* Migrate `helix` common configuration ([#25433](https://github.com/qmk/qmk_firmware/pull/25433))
|
||||
* Refactor `bastardkb/tbkmini` ([#25438](https://github.com/qmk/qmk_firmware/pull/25438))
|
||||
* Convert `novelkeys/nk65` to use RGB Matrix ([#25450](https://github.com/qmk/qmk_firmware/pull/25450))
|
||||
* Convert moon to lite custom matrix ([#25452](https://github.com/qmk/qmk_firmware/pull/25452))
|
||||
* Refactor `bastardkb/skeletyl` ([#25456](https://github.com/qmk/qmk_firmware/pull/25456))
|
||||
* Refactor `bastardkb/scylla` ([#25459](https://github.com/qmk/qmk_firmware/pull/25459))
|
||||
* Refactor `bastardkb/dilemma/3x5_2` ([#25462](https://github.com/qmk/qmk_firmware/pull/25462))
|
||||
* Migrate `usb.force_nkro` to `host.default.nkro` ([#25468](https://github.com/qmk/qmk_firmware/pull/25468))
|
||||
* Give mouse report to pointing_device_task_user first in ploopyco devices ([#25475](https://github.com/qmk/qmk_firmware/pull/25475))
|
||||
* Refactor `bastardkb/charybdis/3x5` ([#25488](https://github.com/qmk/qmk_firmware/pull/25488))
|
||||
* Refactor `bastardkb/charybdis/3x6` ([#25493](https://github.com/qmk/qmk_firmware/pull/25493))
|
||||
* Refactor `bastardkb/charybdis/4x6` ([#25494](https://github.com/qmk/qmk_firmware/pull/25494))
|
||||
* Rebrand For Ll3ma Keyboards ([#25498](https://github.com/qmk/qmk_firmware/pull/25498))
|
||||
* Remove some encoder resolution that duplicate defaults ([#25517](https://github.com/qmk/qmk_firmware/pull/25517))
|
||||
* Remove overriding of `DF()` within keyboards ([#25541](https://github.com/qmk/qmk_firmware/pull/25541))
|
||||
* Refactor inland/kb83 ([#25542](https://github.com/qmk/qmk_firmware/pull/25542))
|
||||
* Refactor `tweetydabird/lotus58` ([#25547](https://github.com/qmk/qmk_firmware/pull/25547))
|
||||
* Swap spleeb to default GENERIC_PROMICRO_RP2040 board files ([#25564](https://github.com/qmk/qmk_firmware/pull/25564))
|
||||
|
||||
Keyboard fixes:
|
||||
* Fix `keebio/quefrency/rev1:default60` ([#25423](https://github.com/qmk/qmk_firmware/pull/25423))
|
||||
* Fixup `bastardkb/tbkmini` keymap's build target ([#25458](https://github.com/qmk/qmk_firmware/pull/25458))
|
||||
* Miscellaneous fixes for lint warnings ([#25469](https://github.com/qmk/qmk_firmware/pull/25469))
|
||||
* Fix pytest/has_community default keymap location ([#25471](https://github.com/qmk/qmk_firmware/pull/25471))
|
||||
* Fix serial speed DD configuration & migrate keyboards ([#25546](https://github.com/qmk/qmk_firmware/pull/25546))
|
||||
* Update rgb x coordinate of rightmost column ([#25556](https://github.com/qmk/qmk_firmware/pull/25556))
|
||||
|
||||
Bugs:
|
||||
* Fix buggy switch statement in quantum.c ([#25322](https://github.com/qmk/qmk_firmware/pull/25322))
|
||||
* Compilation fixes for `-fno-common` ([#25436](https://github.com/qmk/qmk_firmware/pull/25436))
|
||||
* Only userspace should be searched for keyboard aliases when locating keymaps ([#25477](https://github.com/qmk/qmk_firmware/pull/25477))
|
||||
* Allow `qmk flash <filename>` to flash AT32 boards ([#25497](https://github.com/qmk/qmk_firmware/pull/25497))
|
||||
190
docs/ChangeLog/20251130.md
Normal file
190
docs/ChangeLog/20251130.md
Normal file
@@ -0,0 +1,190 @@
|
||||
# QMK Breaking Changes - 2025 Nov 30 Changelog
|
||||
|
||||
## Notable Features {#notable-features}
|
||||
|
||||
### Speculative Hold option for mod-taps: hold mods instantly while unsettled [#25572](https://github.com/qmk/qmk_firmware/pull/25572)
|
||||
|
||||
Speculative Hold makes mod-tap keys more responsive by applying the modifier instantly on keydown, before the tap-hold decision is made. This is especially useful for actions like Shift+click and Ctrl+scroll wheel with an external mouse, which can feel laggy with standard mod-taps.
|
||||
|
||||
The firmware holds the modifier speculatively. Once the key's behavior is settled:
|
||||
|
||||
* If held, the modifier remains active as expected until the key is released.
|
||||
* If tapped, the speculative modifier is canceled just before the tapping keycode is sent.
|
||||
|
||||
Speculative Hold applies the modifier early but does not change the underlying tap-hold decision logic. Speculative Hold is compatible to use in combination with any other tap-hold options.
|
||||
|
||||
see the [Speculative Hold](../tap_hold#speculative-hold) documentation for more information.
|
||||
|
||||
## Changes Requiring User Action
|
||||
|
||||
### Updated Keyboard Codebases
|
||||
|
||||
| Old Keyboard Name | New Keyboard Name |
|
||||
|----------------------------------|-------------------------|
|
||||
| 0xcb/splaytoraid/32u4 | 0xcb/splaytoraid |
|
||||
| 0xcb/splaytoraid/rp2040_ce | 0xcb/splaytoraid |
|
||||
| 1upkeyboards/sweet16v2/kb2040 | 1upkeyboards/sweet16v2 |
|
||||
| 1upkeyboards/sweet16v2/pro_micro | 1upkeyboards/sweet16v2 |
|
||||
| 40percentclub/gherkin/kb2040 | 40percentclub/gherkin |
|
||||
| 40percentclub/gherkin/pro_micro | 40percentclub/gherkin |
|
||||
| durgod/dgk6x/venus | durgod/dgk6x/venus_ansi |
|
||||
|
||||
### Reduce tap dance memory usage, move state out of data [#25415](https://github.com/qmk/qmk_firmware/pull/25415)
|
||||
|
||||
The tap dance state has been separated from the action structure. Custom tap dance functions now receive the state as a separate parameter instead of accessing it through `action->state`.
|
||||
|
||||
If your keymap uses custom tap dance functions that access the tap dance state, you need to update your code.
|
||||
|
||||
* You can't use `action->state`. Instead you need to call `tap_dance_state_t *tap_dance_get_state(uint8_t tap_dance_idx)` to get the state.
|
||||
* You now get a pointer to the state, so use `->` notation rather than `.` notation to get fields from it.
|
||||
|
||||
### Before:
|
||||
```c
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
tap_dance_action_t *action;
|
||||
|
||||
switch (keycode) {
|
||||
case TD(CT_CLN):
|
||||
action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(keycode));
|
||||
if (!record->event.pressed && action->state.count && !action->state.finished) {
|
||||
tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data;
|
||||
tap_code16(tap_hold->tap);
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
```
|
||||
### After:
|
||||
```c
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
tap_dance_action_t *action;
|
||||
tap_dance_state_t* state;
|
||||
switch (keycode) {
|
||||
case TD(CT_CLN):
|
||||
action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(keycode));
|
||||
state = tap_dance_get_state(QK_TAP_DANCE_GET_INDEX(keycode));
|
||||
if (!record->event.pressed && state != NULL && state->count && !state->finished) {
|
||||
tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data;
|
||||
tap_code16(tap_hold->tap);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
```
|
||||
|
||||
## Deprecation Notices
|
||||
|
||||
In line with the [notice period](../support_deprecation_policy#how-much-advance-notice-will-be-given), deprecation notices for larger items are listed here.
|
||||
|
||||
### Remove override of QK_{LED,RGB}_MATRIX_TOGGLE keycode [#25672](https://github.com/qmk/qmk_firmware/pull/25672)
|
||||
|
||||
[#24649](https://github.com/qmk/qmk_firmware/pull/24649) implemented genetic behavior, including keycodes, to cycle flags.
|
||||
|
||||
Any overriding of existing keycodes that duplicate this behavior will be removed to ensure consistency with core functionality.
|
||||
|
||||
## Full changelist
|
||||
|
||||
Core:
|
||||
* suspend: suppress wake up keypress ([#23389](https://github.com/qmk/qmk_firmware/pull/23389))
|
||||
* [Feature Improvement]add option to keep layer state when recording dynamic macros ([#24418](https://github.com/qmk/qmk_firmware/pull/24418))
|
||||
* Add generic handling to cycle LED/RGB Matrix flags ([#24649](https://github.com/qmk/qmk_firmware/pull/24649))
|
||||
* Implement `mod_t` packed struct ([#25168](https://github.com/qmk/qmk_firmware/pull/25168))
|
||||
* Implement minimal connection update logic ([#25334](https://github.com/qmk/qmk_firmware/pull/25334))
|
||||
* Reduce tap dance memory usage, move state out of data ([#25415](https://github.com/qmk/qmk_firmware/pull/25415))
|
||||
* Refactor debounce algorithm with static allocation ([#25515](https://github.com/qmk/qmk_firmware/pull/25515))
|
||||
* Restructure Pixel Rain interval code ([#25516](https://github.com/qmk/qmk_firmware/pull/25516))
|
||||
* Guard remapping logic with MAGIC_ENABLE ([#25537](https://github.com/qmk/qmk_firmware/pull/25537))
|
||||
* Update default OLED font ([#25565](https://github.com/qmk/qmk_firmware/pull/25565))
|
||||
* Speculative Hold option for mod-taps: hold mods instantly while unsettled. ([#25572](https://github.com/qmk/qmk_firmware/pull/25572))
|
||||
* Simplify hue calculation in raindrops animation ([#25587](https://github.com/qmk/qmk_firmware/pull/25587))
|
||||
* Simplify tap_code16_delay ([#25595](https://github.com/qmk/qmk_firmware/pull/25595))
|
||||
* Debounce: Deprecate num_rows parameter ([#25632](https://github.com/qmk/qmk_firmware/pull/25632))
|
||||
* Add I2C Transmit and Receive function ([#25637](https://github.com/qmk/qmk_firmware/pull/25637))
|
||||
* [QP] Minor cleanup and support for RGB888 surface ([#25706](https://github.com/qmk/qmk_firmware/pull/25706))
|
||||
* Restrict mouse timer activation to movement keycodes ([#25716](https://github.com/qmk/qmk_firmware/pull/25716))
|
||||
* Update STM32F446 default HSE to 8MHz ([#25717](https://github.com/qmk/qmk_firmware/pull/25717))
|
||||
* making flowtap timer public so it can be used easily with combos ([#25731](https://github.com/qmk/qmk_firmware/pull/25731))
|
||||
* Add PixArt PAW-3222 mouse sensor driver ([#25763](https://github.com/qmk/qmk_firmware/pull/25763))
|
||||
* Merge upstream uf2conv changes ([#25786](https://github.com/qmk/qmk_firmware/pull/25786))
|
||||
* Partially skip generating community modules when none enabled ([#25819](https://github.com/qmk/qmk_firmware/pull/25819))
|
||||
|
||||
CLI:
|
||||
* Generate default encoder resolution for sparse config ([#25247](https://github.com/qmk/qmk_firmware/pull/25247))
|
||||
* Add DIP Switch map support to keymap.json ([#25431](https://github.com/qmk/qmk_firmware/pull/25431))
|
||||
* Add return code to `qmk userspace-doctor` ([#25775](https://github.com/qmk/qmk_firmware/pull/25775))
|
||||
* Better defaulting of `{RGB,LED}_MATRIX_DEFAULT_FLAGS` ([#25785](https://github.com/qmk/qmk_firmware/pull/25785))
|
||||
* add BCD versions of QMK Version ([#25804](https://github.com/qmk/qmk_firmware/pull/25804))
|
||||
* Lint error on missing keyboard readme ([#25814](https://github.com/qmk/qmk_firmware/pull/25814))
|
||||
|
||||
Submodule updates:
|
||||
* Update ChibiOS-Contrib. ([#25751](https://github.com/qmk/qmk_firmware/pull/25751))
|
||||
|
||||
Keyboards:
|
||||
* `atreus`: restore intended matrix implementations ([#24082](https://github.com/qmk/qmk_firmware/pull/24082))
|
||||
* add SteelSeries prime, a stripped down prime+ ([#24719](https://github.com/qmk/qmk_firmware/pull/24719))
|
||||
* Add new macropad Sharkropad ([#24961](https://github.com/qmk/qmk_firmware/pull/24961))
|
||||
* Addition of the D60B tsangan pcb ([#25245](https://github.com/qmk/qmk_firmware/pull/25245))
|
||||
* Migrate `eeconfig_init_kb` implementations to config ([#25422](https://github.com/qmk/qmk_firmware/pull/25422))
|
||||
* Generate `CUSTOM_MATRIX = lite` without `matrix_pins.custom` ([#25453](https://github.com/qmk/qmk_firmware/pull/25453))
|
||||
* Add classic48 keyboard ([#25492](https://github.com/qmk/qmk_firmware/pull/25492))
|
||||
* add durgod venus iso support ([#25526](https://github.com/qmk/qmk_firmware/pull/25526))
|
||||
* Migrate `g_led_config` to DD (0-9, A) ([#25558](https://github.com/qmk/qmk_firmware/pull/25558))
|
||||
* Migrate `g_led_config` to DD (B, C) ([#25559](https://github.com/qmk/qmk_firmware/pull/25559))
|
||||
* Migrate `g_led_config` to DD (D) ([#25560](https://github.com/qmk/qmk_firmware/pull/25560))
|
||||
* Migrate `g_led_config` to DD (E, F) ([#25561](https://github.com/qmk/qmk_firmware/pull/25561))
|
||||
* Remove duplication of RP2040 config defaults ([#25563](https://github.com/qmk/qmk_firmware/pull/25563))
|
||||
* Refactor 40percentclub/ut47 ([#25571](https://github.com/qmk/qmk_firmware/pull/25571))
|
||||
* E7-V2 Implementation ([#25594](https://github.com/qmk/qmk_firmware/pull/25594))
|
||||
* Migrate `g_led_config` to DD (G) ([#25598](https://github.com/qmk/qmk_firmware/pull/25598))
|
||||
* Migrate `g_led_config` to DD (H) ([#25599](https://github.com/qmk/qmk_firmware/pull/25599))
|
||||
* Migrate `g_led_config` to DD (I) ([#25600](https://github.com/qmk/qmk_firmware/pull/25600))
|
||||
* Migrate `g_led_config` to DD (JK1) ([#25601](https://github.com/qmk/qmk_firmware/pull/25601))
|
||||
* Migrate `g_led_config` to DD (K2) ([#25602](https://github.com/qmk/qmk_firmware/pull/25602))
|
||||
* Migrate `g_led_config` to DD (K3) ([#25603](https://github.com/qmk/qmk_firmware/pull/25603))
|
||||
* Migrate `g_led_config` to DD (K4) ([#25605](https://github.com/qmk/qmk_firmware/pull/25605))
|
||||
* Migrate `g_led_config` to DD (K5) ([#25606](https://github.com/qmk/qmk_firmware/pull/25606))
|
||||
* Migrate `g_led_config` to DD (K6) ([#25607](https://github.com/qmk/qmk_firmware/pull/25607))
|
||||
* Refactor `40percentclub/gherkin` ([#25608](https://github.com/qmk/qmk_firmware/pull/25608))
|
||||
* Refactor `0xcb/splaytoraid` ([#25609](https://github.com/qmk/qmk_firmware/pull/25609))
|
||||
* Refactor `1upkeyboards/sweet16v2` ([#25610](https://github.com/qmk/qmk_firmware/pull/25610))
|
||||
* Migrate `g_led_config` to DD (K7) ([#25616](https://github.com/qmk/qmk_firmware/pull/25616))
|
||||
* Migrate `g_led_config` to DD (L) ([#25617](https://github.com/qmk/qmk_firmware/pull/25617))
|
||||
* Migrate `g_led_config` to DD (M1) ([#25618](https://github.com/qmk/qmk_firmware/pull/25618))
|
||||
* Migrate `g_led_config` to DD (M2) ([#25619](https://github.com/qmk/qmk_firmware/pull/25619))
|
||||
* Migrate `g_led_config` to DD (M3) ([#25620](https://github.com/qmk/qmk_firmware/pull/25620))
|
||||
* Migrate `g_led_config` to DD (NO) ([#25621](https://github.com/qmk/qmk_firmware/pull/25621))
|
||||
* Migrate `g_led_config` to DD (P) ([#25622](https://github.com/qmk/qmk_firmware/pull/25622))
|
||||
* Migrate `g_led_config` to DD (QR) ([#25623](https://github.com/qmk/qmk_firmware/pull/25623))
|
||||
* Migrate `g_led_config` to DD (S) ([#25624](https://github.com/qmk/qmk_firmware/pull/25624))
|
||||
* Migrate `g_led_config` to DD (TUW) ([#25625](https://github.com/qmk/qmk_firmware/pull/25625))
|
||||
* Remove idobao *_DISABLE_UNDERGLOW behaviour ([#25638](https://github.com/qmk/qmk_firmware/pull/25638))
|
||||
* Migrate `g_led_config` to DD (YZ) ([#25650](https://github.com/qmk/qmk_firmware/pull/25650))
|
||||
* Tidy Keebio keyboards ([#25653](https://github.com/qmk/qmk_firmware/pull/25653))
|
||||
* Remove encoder resolution where duplicating defaults ([#25654](https://github.com/qmk/qmk_firmware/pull/25654))
|
||||
* Custom oled fonts cleanup ([#25665](https://github.com/qmk/qmk_firmware/pull/25665))
|
||||
* Binepad KnobX1 - refactor `x1_layer_led` function as weak ([#25668](https://github.com/qmk/qmk_firmware/pull/25668))
|
||||
* Add DD {LED,RGB}_MATRIX_DEFAULT_FLAGS support ([#25671](https://github.com/qmk/qmk_firmware/pull/25671))
|
||||
* keyboards: Add Royal Kludge RK61 ([#25694](https://github.com/qmk/qmk_firmware/pull/25694))
|
||||
* Add TRKeyboard TRK2 keyboard ([#25754](https://github.com/qmk/qmk_firmware/pull/25754))
|
||||
|
||||
Keyboard fixes:
|
||||
* Fixup `kprepublic/bm60hsrgb/rev2` ([#25644](https://github.com/qmk/qmk_firmware/pull/25644))
|
||||
* Fixup `kprepublic/bm60hsrgb_iso/rev2` ([#25648](https://github.com/qmk/qmk_firmware/pull/25648))
|
||||
* Fixup `kprepublic/bm60hsrgb_poker/rev2` ([#25649](https://github.com/qmk/qmk_firmware/pull/25649))
|
||||
* Fixup `rgbkb/pan` ([#25678](https://github.com/qmk/qmk_firmware/pull/25678))
|
||||
* Align use of keymap level `_kb` callbacks ([#25774](https://github.com/qmk/qmk_firmware/pull/25774))
|
||||
|
||||
Others:
|
||||
* Rework converter docs ([#18314](https://github.com/qmk/qmk_firmware/pull/18314))
|
||||
* Update USBaspLoader ISP instructions ([#25590](https://github.com/qmk/qmk_firmware/pull/25590))
|
||||
* Add LED/RGB Matrix flags API docs ([#25673](https://github.com/qmk/qmk_firmware/pull/25673))
|
||||
|
||||
Bugs:
|
||||
* Fix single key combos activating only once ([#25198](https://github.com/qmk/qmk_firmware/pull/25198))
|
||||
* Fix RGB matrix not syncing and turning off properly on timeout ([#25467](https://github.com/qmk/qmk_firmware/pull/25467))
|
||||
* Fix drv haptics docs by using the correct function name ([#25733](https://github.com/qmk/qmk_firmware/pull/25733))
|
||||
* Fix Magic GUI masking logic ([#25780](https://github.com/qmk/qmk_firmware/pull/25780))
|
||||
* Fix Speculative Hold to enable also right-handed RSFT, RCTL by default. ([#25797](https://github.com/qmk/qmk_firmware/pull/25797))
|
||||
* Fix community layout keymap discovery ([#25802](https://github.com/qmk/qmk_firmware/pull/25802))
|
||||
* Fix preference of output file for 'qmk generate-autocorrect-data' ([#25818](https://github.com/qmk/qmk_firmware/pull/25818))
|
||||
@@ -21,8 +21,14 @@
|
||||
{ "text": "Debugging QMK", "link": "/faq_debug" },
|
||||
{ "text": "Keymap FAQ", "link": "/faq_keymap" },
|
||||
{ "text": "Squeezing Space from AVR", "link": "/squeezing_avr" },
|
||||
{ "text": "Glossary", "link": "/reference_glossary" },
|
||||
{ "text": "License Violations", "link": "/license_violations" }
|
||||
{ "text": "Glossary", "link": "/reference_glossary" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "Licensing",
|
||||
"items": [
|
||||
{ "text": "License Violations", "link": "/license_violations" },
|
||||
{ "text": "Proprietary Libraries", "link": "/proprietary_libs" }
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -169,6 +175,7 @@
|
||||
]
|
||||
},
|
||||
{ "text": "Audio", "link": "/features/audio" },
|
||||
{ "text": "Battery", "link": "/features/battery" },
|
||||
{ "text": "Bootmagic", "link": "/features/bootmagic" },
|
||||
{ "text": "Converters", "link": "/feature_converters" },
|
||||
{ "text": "Custom Matrix", "link": "/custom_matrix" },
|
||||
@@ -207,7 +214,7 @@
|
||||
{ "text": "My Pull Request Was Flagged", "link": "/breaking_changes_instructions" },
|
||||
{
|
||||
"text": "Most Recent ChangeLog",
|
||||
"link": "/ChangeLog/20250525"
|
||||
"link": "/ChangeLog/20251130"
|
||||
},
|
||||
{ "text": "Past Breaking Changes", "link": "/breaking_changes_history" },
|
||||
{ "text": "Deprecation Policy", "link": "/support_deprecation_policy" }
|
||||
|
||||
@@ -10,25 +10,25 @@ Practically, this means QMK merges the `develop` branch into the `master` branch
|
||||
|
||||
## What has been included in past Breaking Changes?
|
||||
|
||||
* [2025 Nov 30](ChangeLog/20251130)
|
||||
* [2025 Aug 31](ChangeLog/20250831)
|
||||
* [2025 May 25](ChangeLog/20250525)
|
||||
* [2025 Feb 23](ChangeLog/20250223)
|
||||
* [2024 Nov 24](ChangeLog/20241124)
|
||||
* [Older Breaking Changes](breaking_changes_history)
|
||||
|
||||
## When is the next Breaking Change?
|
||||
|
||||
The next Breaking Change is scheduled for Aug 31, 2025.
|
||||
The next Breaking Change is scheduled for February 22, 2026.
|
||||
|
||||
### Important Dates
|
||||
|
||||
* 2025 May 25 - `develop` is tagged with a new release version. Each push to `master` is subsequently merged to `develop` by GitHub actions.
|
||||
* 2025 Aug 3 - `develop` closed to new PRs.
|
||||
* 2025 Aug 3 - Call for testers.
|
||||
* 2025 Aug 17 - Last day for merges -- after this point `develop` is locked for testing and accepts only bugfixes
|
||||
* 2025 Aug 24 - `develop` is locked, only critical bugfix PRs merged.
|
||||
* 2025 Aug 29 - `master` is locked, no PRs merged.
|
||||
* 2025 Aug 31 - Merge `develop` to `master`.
|
||||
* 2025 Aug 31 - `master` is unlocked. PRs can be merged again.
|
||||
* 2025 Nov 30 - `develop` is tagged with a new release version. Each push to `master` is subsequently merged to `develop` by GitHub actions.
|
||||
* 2026 Jan 25 - `develop` closed to new PRs.
|
||||
* 2026 Jan 25 - Call for testers.
|
||||
* 2026 Feb 8 - Last day for merges -- after this point `develop` is locked for testing and accepts only bugfixes
|
||||
* 2026 Feb 15 - `develop` is locked, only critical bugfix PRs merged.
|
||||
* 2026 Feb 20 - `master` is locked, no PRs merged.
|
||||
* 2026 Feb 22 - Merge `develop` to `master`.
|
||||
* 2026 Feb 22 - `master` is unlocked. PRs can be merged again.
|
||||
|
||||
## What changes will be included?
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
This page links to all previous changelogs from the QMK Breaking Changes process.
|
||||
|
||||
* [2025 Nov 30](ChangeLog/20251130) - version 0.31.0
|
||||
* [2025 Aug 31](ChangeLog/20250831) - version 0.30.0
|
||||
* [2025 May 25](ChangeLog/20250525) - version 0.29.0
|
||||
* [2025 Feb 23](ChangeLog/20250223) - version 0.28.0
|
||||
* [2024 Nov 24](ChangeLog/20241124) - version 0.27.0
|
||||
|
||||
@@ -17,12 +17,12 @@ qmk compile [-c] <configuratorExport.json>
|
||||
**Usage for Keymaps**:
|
||||
|
||||
```
|
||||
qmk compile [-c] [-e <var>=<value>] [-j <num_jobs>] [--compiledb] -kb <keyboard_name> -km <keymap_name>
|
||||
qmk compile [-c] [-e <var>=<value>] [-j <num_jobs>] [--compiledb] -kb <keyboard> -km <keymap>
|
||||
```
|
||||
|
||||
**Usage in Keyboard Directory**:
|
||||
|
||||
Must be in keyboard directory with a default keymap, or in keymap directory for keyboard, or supply one with `--keymap <keymap_name>`
|
||||
Must be in keyboard directory with a default keymap, or in keymap directory for keyboard, or supply one with `--keymap <keymap>`
|
||||
```
|
||||
qmk compile
|
||||
```
|
||||
@@ -30,7 +30,7 @@ qmk compile
|
||||
**Usage for building all keyboards that support a specific keymap**:
|
||||
|
||||
```
|
||||
qmk compile -kb all -km <keymap_name>
|
||||
qmk compile -kb all -km <keymap>
|
||||
```
|
||||
|
||||
**Example**:
|
||||
@@ -62,7 +62,7 @@ $ qmk compile
|
||||
|
||||
Must be under `qmk_firmware/layouts/`, and in a keymap folder.
|
||||
```
|
||||
qmk compile -kb <keyboard_name>
|
||||
qmk compile -kb <keyboard>
|
||||
```
|
||||
|
||||
**Example**:
|
||||
@@ -77,11 +77,11 @@ $ qmk compile -kb dz60
|
||||
|
||||
It is possible to speed up compilation by adding the `-j`/`--parallel` flag.
|
||||
```
|
||||
qmk compile -j <num_jobs> -kb <keyboard_name>
|
||||
qmk compile -j <num_jobs> -kb <keyboard>
|
||||
```
|
||||
The `num_jobs` argument determines the maximum number of jobs that can be used. Setting it to zero will enable parallel compilation without limiting the maximum number of jobs.
|
||||
```
|
||||
qmk compile -j 0 -kb <keyboard_name>
|
||||
qmk compile -j 0 -kb <keyboard>
|
||||
```
|
||||
|
||||
**Compilation Database**:
|
||||
@@ -120,7 +120,7 @@ qmk flash [-bl <bootloader>] [-c] [-e <var>=<value>] [-j <num_jobs>] <configurat
|
||||
**Usage for Keymaps**:
|
||||
|
||||
```
|
||||
qmk flash -kb <keyboard_name> -km <keymap_name> [-bl <bootloader>] [-c] [-e <var>=<value>] [-j <num_jobs>]
|
||||
qmk flash -kb <keyboard> -km <keymap_name> [-bl <bootloader>] [-c] [-e <var>=<value>] [-j <num_jobs>]
|
||||
```
|
||||
|
||||
**Usage for pre-compiled firmwares**:
|
||||
@@ -631,14 +631,15 @@ This command compiles all the External Userspace build targets.
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk userspace-compile [-h] [-e ENV] [-n] [-c] [-j PARALLEL] [-t]
|
||||
qmk userspace-compile [-h] [-e ENV] [-p] [-n] [-c] [-j PARALLEL] [-t]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-e ENV, --env ENV Set a variable to be passed to make. May be passed multiple times.
|
||||
-e, --env ENV Set a variable to be passed to make. May be passed multiple times.
|
||||
-p, --print-failures Print failed builds.
|
||||
-n, --dry-run Don't actually build, just show the commands to be run.
|
||||
-c, --clean Remove object files before compiling.
|
||||
-j PARALLEL, --parallel PARALLEL
|
||||
-j, --parallel PARALLEL
|
||||
Set the number of parallel make jobs; 0 means unlimited.
|
||||
-t, --no-temp Remove temporary files during build.
|
||||
```
|
||||
|
||||
@@ -364,8 +364,6 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i
|
||||
|
||||
## Build Options
|
||||
|
||||
* `DEFAULT_FOLDER`
|
||||
* Used to specify a default folder when a keyboard has more than one sub-folder.
|
||||
* `FIRMWARE_FORMAT`
|
||||
* Defines which format (bin, hex) is copied to the root `qmk_firmware` folder after building.
|
||||
* `SRC`
|
||||
|
||||
@@ -74,7 +74,7 @@ void matrix_init(void) {
|
||||
// TODO: initialize hardware and global matrix state here
|
||||
|
||||
// Unless hardware debouncing - Init the configured debounce routine
|
||||
debounce_init(MATRIX_ROWS);
|
||||
debounce_init();
|
||||
|
||||
// This *must* be called for correct keyboard behavior
|
||||
matrix_init_kb();
|
||||
@@ -86,7 +86,7 @@ uint8_t matrix_scan(void) {
|
||||
// TODO: add matrix scanning routine here
|
||||
|
||||
// Unless hardware debouncing - use the configured debounce routine
|
||||
changed = debounce(raw_matrix, matrix, MATRIX_ROWS, changed);
|
||||
changed = debounce(raw_matrix, matrix, changed);
|
||||
|
||||
// This *must* be called for correct keyboard behavior
|
||||
matrix_scan_kb();
|
||||
|
||||
@@ -145,7 +145,7 @@ void keyboard_pre_init_user(void) {
|
||||
|
||||
This is called when the matrix is initialized, and after some of the hardware has been set up, but before many of the features have been initialized.
|
||||
|
||||
This is useful for setting up stuff that you may need elsewhere, but isn't hardware related nor is dependant on where it's started.
|
||||
This is useful for setting up stuff that you may need elsewhere, but isn't hardware related nor is dependent on where it's started.
|
||||
|
||||
|
||||
### `matrix_init_*` Function Documentation
|
||||
@@ -209,7 +209,7 @@ You should use this function if you need custom matrix scanning code. It can als
|
||||
|
||||
This function gets called at the end of all QMK processing, before starting the next iteration. You can safely assume that QMK has dealt with the last matrix scan at the time that these functions are invoked -- layer states have been updated, USB reports have been sent, LEDs have been updated, and displays have been drawn.
|
||||
|
||||
Similar to `matrix_scan_*`, these are called as often as the MCU can handle. To keep your board responsive, it's suggested to do as little as possible during these function calls, potentially throtting their behaviour if you do indeed require implementing something special.
|
||||
Similar to `matrix_scan_*`, these are called as often as the MCU can handle. To keep your board responsive, it's suggested to do as little as possible during these function calls, potentially throttling their behaviour if you do indeed require implementing something special.
|
||||
|
||||
### Example `void housekeeping_task_user(void)` implementation
|
||||
|
||||
@@ -246,7 +246,7 @@ void check_rgb_timeout(void) {
|
||||
}
|
||||
}
|
||||
/* Then, call the above functions from QMK's built in post processing functions like so */
|
||||
/* Runs at the end of each scan loop, check if RGB timeout has occured or not */
|
||||
/* Runs at the end of each scan loop, check if RGB timeout has occurred or not */
|
||||
void housekeeping_task_user(void) {
|
||||
#ifdef RGBLIGHT_TIMEOUT
|
||||
check_rgb_timeout();
|
||||
@@ -316,7 +316,7 @@ bool shutdown_kb(bool jump_to_bootloader) {
|
||||
if (!shutdown_user(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (jump_to_bootloader) {
|
||||
// red for bootloader
|
||||
rgb_matrix_set_color_all(RGB_OFF);
|
||||
|
||||
@@ -6,7 +6,7 @@ This page describes how QMK's data driven JSON configuration system works. It is
|
||||
|
||||
Historically QMK has been configured through a combination of two mechanisms- `rules.mk` and `config.h`. While this worked well when QMK was only a handful of keyboards we've grown to encompass nearly 4000 supported keyboards. That extrapolates out to 6000 configuration files under `keyboards/` alone! The freeform nature of these files and the unique patterns people have used to avoid duplication have made ongoing maintenance a challenge, and a large number of our keyboards follow patterns that are outdated and sometimes harder to understand.
|
||||
|
||||
We have also been working on bringing the power of QMK to people who aren't comformable with a CLI, and other projects such as VIA are working to make using QMK as easy as installing a program. These tools need information about how a keyboard is laid out or what pins and features are available so that users can take full advantage of QMK. We introduced `info.json` as a first step towards this. The QMK API is an effort to combine these 3 sources of information- `config.h`, `rules.mk`, and `info.json`- into a single source of truth that end-user tools can use.
|
||||
We have also been working on bringing the power of QMK to people who aren't comfortable with a CLI, and other projects such as VIA are working to make using QMK as easy as installing a program. These tools need information about how a keyboard is laid out or what pins and features are available so that users can take full advantage of QMK. We introduced `info.json` as a first step towards this. The QMK API is an effort to combine these 3 sources of information- `config.h`, `rules.mk`, and `info.json`- into a single source of truth that end-user tools can use.
|
||||
|
||||
Now we have support for generating `rules.mk` and `config.h` values from `info.json`, allowing us to have a single source of truth. This will allow us to use automated tooling to maintain keyboards saving a lot of time and maintenance work.
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ QMK presents itself to the host as a regular HID keyboard device, and as such re
|
||||
|
||||
There are two notable exceptions: the Caterina bootloader, usually seen on Pro Micros, and the HalfKay bootloader shipped with PJRC Teensys, appear as a serial port and a generic HID device respectively, and so do not require a driver.
|
||||
|
||||
We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with MSYS2, the `qmk_install.sh` script will have already installed the drivers for you.
|
||||
We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with MSYS2, the QMK CLI installation script will have already installed the drivers for you.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -22,7 +22,7 @@ If Zadig lists one or more devices with the `HidUsb` driver, your keyboard is pr
|
||||
|
||||
If the arrow appears green, select the driver, and click **Install Driver**. See the [list of known bootloaders](#list-of-known-bootloaders) for the correct driver to install.
|
||||
|
||||

|
||||

|
||||
|
||||
Finally, unplug and replug the keyboard to make sure the new driver has been loaded. If you are using the QMK Toolbox to flash, exit and restart it too, as it can sometimes fail to recognize the driver change.
|
||||
|
||||
@@ -30,15 +30,15 @@ Finally, unplug and replug the keyboard to make sure the new driver has been loa
|
||||
|
||||
If you find that you can no longer type with the keyboard, you may have accidentally replaced the driver for the keyboard itself instead of for the bootloader. This can happen when the keyboard is not in the bootloader mode. You can easily confirm this in Zadig - a healthy keyboard has the `HidUsb` driver installed on all of its interfaces:
|
||||
|
||||

|
||||

|
||||
|
||||
Open the Device Manager, select **View → Devices by container**, and look for an entry with your keyboard's name.
|
||||
|
||||

|
||||

|
||||
|
||||
Right-click each entry and hit **Uninstall device**. Make sure to tick **Delete the driver software for this device** first if it appears.
|
||||
|
||||

|
||||

|
||||
|
||||
Click **Action → Scan for hardware changes**. At this point, you should be able to type again. Double check in Zadig that the keyboard device(s) are using the `HidUsb` driver. If so, you're all done, and your board should be functional again! Otherwise, repeat this process until Zadig reports the correct driver.
|
||||
|
||||
@@ -54,11 +54,11 @@ Open the Device Manager, select **View → Devices by container**, and look for
|
||||
|
||||
Find the `Inf name` value in the Details tab of the device properties. This should generally be something like `oemXX.inf`:
|
||||
|
||||

|
||||

|
||||
|
||||
Then, open a new Command Prompt window as an Administrator (type in `cmd` into the Start menu and press Ctrl+Shift+Enter). Run `pnputil /enum-drivers` to verify the `Inf name` matches the `Published Name` field of one of the entries:
|
||||
|
||||

|
||||

|
||||
|
||||
Run `pnputil /delete-driver oemXX.inf /uninstall`. This will delete the driver and remove it from any devices using it. Note that this will not uninstall the device itself.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
SPI 18x12 LED matrix driver by Awinic. Supports a maximum of four drivers, each controlling up to 216 single-color LEDs, or 72 RGB LEDs.
|
||||
|
||||
[AW20216S Datasheet](https://doc.awinic.com/doc/20230609wm/b6a9c70b-e1bd-495b-925f-bcbed3fc2620.pdf)
|
||||
[AW20216S Datasheet](https://doc.awinic.com/doc/202412/a055779b-49c0-4d09-8f04-73029f44b72b.pdf)
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
@@ -44,7 +44,7 @@ Depending on the ChibiOS board configuration, you may need to [enable and config
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Battery Driver
|
||||
|
||||
This driver provides support for sampling battery level.
|
||||
This driver provides support for directly sampling battery level.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -10,21 +10,17 @@ To use this driver, add the following to your `rules.mk`:
|
||||
BATTERY_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|--------------------------|--------|--------------------------------------------------|
|
||||
|`BATTERY_SAMPLE_INTERVAL` |`30000` |The time between battery samples in milliseconds. |
|
||||
::::info Note
|
||||
This is already configured for you if you are using the [Battery](../features/battery) feature.
|
||||
::::
|
||||
|
||||
## Driver Configuration {#driver-configuration}
|
||||
|
||||
Driver selection can be configured in `rules.mk` as `BATTERY_DRIVER`. Valid values are `adc` (default), `vendor`, or `custom`. See below for information on individual drivers.
|
||||
Driver selection can be configured in `rules.mk` as `BATTERY_DRIVER`. Valid values are `adc`, `vendor`, or `custom`. See below for information on individual drivers.
|
||||
|
||||
### ADC Driver {#adc-driver}
|
||||
|
||||
This is the default battery driver. The default configuration assumes the battery is connected to a ADC capable pin through a voltage divider.
|
||||
The default configuration assumes the battery is connected to a ADC capable pin through a voltage divider.
|
||||
|
||||
```make
|
||||
BATTERY_DRIVER = adc
|
||||
@@ -32,42 +28,25 @@ BATTERY_DRIVER = adc
|
||||
|
||||
The following `#define`s apply only to the `adc` driver:
|
||||
|
||||
|Define |Default |Description |
|
||||
|-----------------------------|--------------|--------------------------------------------------------------|
|
||||
|`BATTERY_PIN` |*Not defined* |The GPIO pin connected to the voltage divider. |
|
||||
|`BATTERY_REF_VOLTAGE_MV` |`3300` |The ADC reverence voltage, in millivolts. |
|
||||
|`BATTERY_VOLTAGE_DIVIDER_R1` |`100000` |The voltage divider resistance, in kOhm. Set to 0 to disable. |
|
||||
|`BATTERY_VOLTAGE_DIVIDER_R1` |`100000` |The voltage divider resistance, in kOhm. Set to 0 to disable. |
|
||||
|`BATTERY_ADC_RESOLUTION` |`10` |The ADC resolution configured for the ADC Driver. |
|
||||
|Define |Default |Description |
|
||||
|---------------------------------|--------------|--------------------------------------------------------------|
|
||||
|`BATTERY_ADC_PIN` |*Not defined* |The GPIO pin connected to the voltage divider. |
|
||||
|`BATTERY_ADC_REF_VOLTAGE_MV` |`3300` |The ADC reverence voltage, in millivolts. |
|
||||
|`BATTERY_ADC_VOLTAGE_DIVIDER_R1` |`100` |The voltage divider resistance, in kOhm. Set to 0 to disable. |
|
||||
|`BATTERY_ADC_VOLTAGE_DIVIDER_R2` |`100` |The voltage divider resistance, in kOhm. Set to 0 to disable. |
|
||||
|`BATTERY_ADC_RESOLUTION` |`10` |The ADC resolution configured for the ADC Driver. |
|
||||
|
||||
## Functions
|
||||
### Custom Driver {#custom-driver}
|
||||
|
||||
### `uint8_t battery_get_percent(void)` {#api-battery-get-percent}
|
||||
A custom driver is expected to implement the following interface:
|
||||
|
||||
Sample battery level.
|
||||
```c
|
||||
void battery_driver_init(void) {
|
||||
// Perform any initialisation here
|
||||
}
|
||||
|
||||
#### Return Value {#api-battery-get-percent-return}
|
||||
|
||||
The battery percentage, in the range 0-100.
|
||||
|
||||
## Callbacks
|
||||
|
||||
### `void battery_percent_changed_user(uint8_t level)` {#api-battery-percent-changed-user}
|
||||
|
||||
User hook called when battery level changed.
|
||||
|
||||
### Arguments {#api-battery-percent-changed-user-arguments}
|
||||
|
||||
- `uint8_t level`
|
||||
The battery percentage, in the range 0-100.
|
||||
|
||||
---
|
||||
|
||||
### `void battery_percent_changed_kb(uint8_t level)` {#api-battery-percent-changed-kb}
|
||||
|
||||
Keyboard hook called when battery level changed.
|
||||
|
||||
### Arguments {#api-battery-percent-changed-kb-arguments}
|
||||
|
||||
- `uint8_t level`
|
||||
The battery percentage, in the range 0-100.
|
||||
uint8_t battery_driver_sample_percent(void) {
|
||||
// Read and return current state here
|
||||
return value;
|
||||
}
|
||||
```
|
||||
|
||||
@@ -221,6 +221,31 @@ Receive multiple bytes from the selected I2C device.
|
||||
|
||||
---
|
||||
|
||||
### `i2c_status_t i2c_transmit_and_receive(uint8_t address, const uint8_t* tx_data, uint16_t tx_length, uint8_t* rx_data, uint16_t rx_length, uint16_t timeout)` {#api-i2c-transmit-and-receive}
|
||||
|
||||
Send and receive multiple bytes from the selected I2C device.
|
||||
|
||||
#### Arguments {#api-i2c-transmit-and-receive-arguments}
|
||||
|
||||
- `uint8_t address`
|
||||
The 7-bit I2C address of the device.
|
||||
- `const uint8_t* tx_data`
|
||||
A pointer to the data to transmit.
|
||||
- `uint16_t tx_length`
|
||||
The number of bytes to write. Take care not to overrun the length of `tx_data`.
|
||||
- `uint8_t* rx_data`
|
||||
A pointer to a buffer to read into.
|
||||
- `uint16_t rx_length`
|
||||
The number of bytes to read. Take care not to overrun the length of `data`.
|
||||
- `uint16_t timeout`
|
||||
The time in milliseconds to wait for a response from the target device.
|
||||
|
||||
#### Return Value {#api-i2c-transmit-and-receive-return}
|
||||
|
||||
`I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
|
||||
|
||||
---
|
||||
|
||||
### `i2c_status_t i2c_write_register(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout)` {#api-i2c-write-register}
|
||||
|
||||
Write to a register with an 8-bit address on the I2C device.
|
||||
|
||||
@@ -37,7 +37,7 @@ Depending on the ChibiOS board configuration, you may need to [enable and config
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3218_led_t PROGMEM g_is31fl3218_leds[IS31FL3218_LED_COUNT] = {
|
||||
|
||||
@@ -50,7 +50,7 @@ Depending on the ChibiOS board configuration, you may need to [enable and config
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3236_led_t PROGMEM g_is31fl3236_leds[IS31FL3236_LED_COUNT] = {
|
||||
|
||||
@@ -120,7 +120,7 @@ Depending on the ChibiOS board configuration, you may need to [enable and config
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3729_led_t PROGMEM g_is31fl3729_leds[IS31FL3729_LED_COUNT] = {
|
||||
|
||||
@@ -61,7 +61,7 @@ Depending on the ChibiOS board configuration, you may need to [enable and config
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
|
||||
|
||||
@@ -145,7 +145,7 @@ Depending on the ChibiOS board configuration, you may need to [enable and config
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
|
||||
|
||||
@@ -129,7 +129,7 @@ Depending on the ChibiOS board configuration, you may need to [enable and config
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3736_led_t PROGMEM g_is31fl3736_leds[IS31FL3736_LED_COUNT] = {
|
||||
|
||||
@@ -117,7 +117,7 @@ Depending on the ChibiOS board configuration, you may need to [enable and config
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT] = {
|
||||
|
||||
@@ -117,7 +117,7 @@ Depending on the ChibiOS board configuration, you may need to [enable and config
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = {
|
||||
|
||||
@@ -117,7 +117,7 @@ Depending on the ChibiOS board configuration, you may need to [enable and config
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3742a_led_t PROGMEM g_is31fl3742a_leds[IS31FL3742A_LED_COUNT] = {
|
||||
|
||||
@@ -127,7 +127,7 @@ Depending on the ChibiOS board configuration, you may need to [enable and config
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3743a_led_t PROGMEM g_is31fl3743a_leds[IS31FL3743A_LED_COUNT] = {
|
||||
|
||||
@@ -127,7 +127,7 @@ Depending on the ChibiOS board configuration, you may need to [enable and config
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3745_led_t PROGMEM g_is31fl3745_leds[IS31FL3745_LED_COUNT] = {
|
||||
|
||||
@@ -132,7 +132,7 @@ Depending on the ChibiOS board configuration, you may need to [enable and config
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3746a_led_t PROGMEM g_is31fl3746a_leds[IS31FL3746A_LED_COUNT] = {
|
||||
|
||||
@@ -33,7 +33,7 @@ On ARM platforms the bitbang driver causes connection issues when using it toget
|
||||
+-------+ +-------+
|
||||
```
|
||||
|
||||
One GPIO pin is needed for the bitbang driver, as only one wire is used for receiving and transmitting data. This pin is referred to as the `SOFT_SERIAL_PIN` (SSP) in the configuration. A TRS or USB cable provides enough conductors for this driver to function.
|
||||
One GPIO pin is needed for the bitbang driver, as only one wire is used for receiving and transmitting data. This pin is referred to as the `SOFT_SERIAL_PIN` (SSP) in the configuration. A TRS or USB cable provides enough conductors for this driver to function.
|
||||
|
||||
### Setup
|
||||
|
||||
@@ -63,12 +63,12 @@ SERIAL_DRIVER = bitbang
|
||||
|
||||
## USART Half-duplex
|
||||
|
||||
Targeting ARM boards based on ChibiOS, where communication is offloaded to a USART hardware device that supports Half-duplex operation. The advantages over bitbanging are fast, accurate timings and reduced CPU usage. Therefore it is advised to choose Half-duplex over Bitbang if MCU is capable of utilising Half-duplex, and Full-duplex can't be used instead (e.g. lack of available GPIO pins, or imcompatible PCB design).
|
||||
Targeting ARM boards based on ChibiOS, where communication is offloaded to a USART hardware device that supports Half-duplex operation. The advantages over bitbanging are fast, accurate timings and reduced CPU usage. Therefore it is advised to choose Half-duplex over Bitbang if MCU is capable of utilising Half-duplex, and Full-duplex can't be used instead (e.g. lack of available GPIO pins, or incompatible PCB design).
|
||||
|
||||
### Pin configuration
|
||||
|
||||
```
|
||||
LEFT RIGHT
|
||||
LEFT RIGHT
|
||||
+-------+ | | +-------+
|
||||
| | R R | |
|
||||
| | | SERIAL | | |
|
||||
@@ -80,7 +80,7 @@ Targeting ARM boards based on ChibiOS, where communication is offloaded to a USA
|
||||
+-------+ +-------+
|
||||
```
|
||||
|
||||
Only one GPIO pin is needed for the Half-duplex driver, as only one wire is used for receiving and transmitting data. This pin is referred to as the `SERIAL_USART_TX_PIN` in the configuration. Ensure that the pin chosen for split communication can operate as the TX pin of the contoller's USART peripheral. A TRS or USB cable provides enough conductors for this driver to function. As the split connection is configured to operate in open-drain mode, an **external pull-up resistor is needed to keep the line high**. Resistor values of 1.5kΩ to 8.2kΩ are known to work.
|
||||
Only one GPIO pin is needed for the Half-duplex driver, as only one wire is used for receiving and transmitting data. This pin is referred to as the `SERIAL_USART_TX_PIN` in the configuration. Ensure that the pin chosen for split communication can operate as the TX pin of the contoller's USART peripheral. A TRS or USB cable provides enough conductors for this driver to function. As the split connection is configured to operate in open-drain mode, an **external pull-up resistor is needed to keep the line high**. Resistor values of 1.5kΩ to 8.2kΩ are known to work.
|
||||
|
||||
::: warning
|
||||
***Note:*** A pull-up resistor isn't required for RP2040 controllers configured with PIO subsystem.
|
||||
@@ -278,7 +278,7 @@ There are several advanced configuration options that can be defined in your key
|
||||
|
||||
### Baudrate
|
||||
|
||||
If you're having issues or need a higher baudrate with serial communication, you can change the baudrate which in turn controls the communication speed for serial. You want to lower the baudrate if you experience failed transactions.
|
||||
If you're having issues or need a higher baudrate with serial communication, you can change the baudrate which in turn controls the communication speed for serial. You want to lower the baudrate if you experience failed transactions.
|
||||
|
||||
```c
|
||||
#define SELECT_SOFT_SERIAL_SPEED n
|
||||
@@ -307,19 +307,19 @@ This is the default time window in milliseconds in which a successful communicat
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you're having issues withe serial communication, you can enable debug messages that will give you insights which part of the communication failed. The enable these messages add to your keyboards `config.h` file:
|
||||
If you're having issues with serial communication, you can enable debug messages that will give you insights which part of the communication failed. The enable these messages add to your keyboards `config.h` file:
|
||||
|
||||
```c
|
||||
#define SERIAL_DEBUG
|
||||
```
|
||||
|
||||
|
||||
::: tip
|
||||
The messages will be printed out to the `CONSOLE` output. For additional information, refer to [Debugging/Troubleshooting QMK](../faq_debug).
|
||||
:::
|
||||
|
||||
## Alternate Functions for selected STM32 MCUs
|
||||
|
||||
Pins for USART Peripherals with
|
||||
Pins for USART Peripherals with
|
||||
|
||||
### STM32F303 / Proton-C [Datasheet](https://www.st.com/resource/en/datasheet/stm32f303cc.pdf)
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ Depending on the ChibiOS board configuration, you may need to [enable and config
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
|
||||
|
||||
@@ -144,18 +144,30 @@ The following defines apply only to ARM devices:
|
||||
|`WS2812_T1L`|`(WS2812_TIMING - WS2812_T1H)`|The length of a "1" bit's low phase in nanoseconds (bitbang and PIO drivers only)|
|
||||
|`WS2812_T0L`|`(WS2812_TIMING - WS2812_T0H)`|The length of a "0" bit's low phase in nanoseconds (bitbang and PIO drivers only)|
|
||||
|
||||
### Push-Pull and Open Drain {#push-pull-open-drain}
|
||||
### Logic Levels {#logic-levels}
|
||||
|
||||
By default, the GPIO used for data transmission is configured as a *push-pull* output, meaning the pin is effectively always driven either to VCC or to ground.
|
||||
WS2812 LEDs usually operate at 5V, but some microcontrollers, particularly ARM-based ones, run on 3.3V. This can pose an issue when driving the LED chain as the logic level voltage is lower than the power supply voltage, leading to unreliable data transmission. There are two main workarounds:
|
||||
|
||||
For situations where the logic level voltage is lower than the power supply voltage, however, this can pose an issue. The solution is to configure the pin for *open drain* mode instead, and use a pullup resistor between the DI pin and VCC. In this mode, the MCU can only pull the GPIO *low*, or leave it floating. The pullup resistor is then responsible for pulling the line high, when the MCU is not driving the GPIO.
|
||||
#### 1. Open Drain Circuit {#open-drain-circuit}
|
||||
|
||||
To configure the DI pin for open drain configuration, add the following to your `config.h`:
|
||||
By default, `WS2812_DI_PIN` is configured as a *push-pull* output, meaning the pin is effectively always driven either to VCC or to ground; however, it can be configured in *open drain* mode instead.
|
||||
|
||||
In this mode, the MCU will only pull the GPIO *low*, and leaves it floating otherwise. A pullup resistor (typically around 10kΩ) between DI and 5V is then responsible for pulling the line high when the MCU is not driving the GPIO.
|
||||
|
||||
To use the DI pin in open drain configuration, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define WS2812_EXTERNAL_PULLUP
|
||||
```
|
||||
|
||||
::: warning
|
||||
Because the GPIO is being pulled to 5V in this situation rather than VCC (3.3V), **it must be a 5V tolerant pin**. Consult your MCU's datasheet first – if there are no eligible pins, you must use a level shifter instead.
|
||||
:::
|
||||
|
||||
#### 2. Level Shifter {#level-shifter}
|
||||
|
||||
A level shifter IC, such as the SN74LV1T34, can be placed between the GPIO and the first LED's DI pin to convert the 3.3V logic to 5V. This requires no additional configuration in the firmware, nor a 5V tolerant GPIO, but may be more expensive and is generally less handwire-friendly.
|
||||
|
||||
### SPI Driver {#arm-spi-driver}
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to enable SPI at the keyboard level. For STM32, this would look like:
|
||||
|
||||
@@ -24,7 +24,7 @@ As its name implies Direct Pin works by connecting one switch per pin. The other
|
||||
|
||||
Here is a schematic showing how we connect a single button to pin A3 on a ProMicro:
|
||||
|
||||

|
||||

|
||||
|
||||
Once you have wired your switches you can assign keycodes to each pin and build a firmware by selecting the MCU you are using from the Keyboard dropdown. Use this link to show only Easy Maker Direct Pin:
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices m
|
||||
|
||||
Issues encountered when flashing keyboards on Windows are most often due to having the wrong drivers installed for the bootloader, or none at all.
|
||||
|
||||
Re-running the QMK installation script (`./util/qmk_install.sh` from the `qmk_firmware` directory in MSYS2 or WSL) or reinstalling the QMK Toolbox may fix the issue. Alternatively, you can download and run the [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer) package manually.
|
||||
Re-running the QMK installation script (`curl -fsSL https://install.qmk.fm | sh`) or reinstalling the QMK Toolbox may fix the issue. Alternatively, you can download and run the [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer) package manually.
|
||||
|
||||
If that doesn't work, then you may need to download and run Zadig. See [Bootloader Driver Installation with Zadig](driver_installation_zadig) for more detailed information.
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ Awesome! Open up a Pull Request for it. We'll review the code, and merge it!
|
||||
|
||||
That's amazing! We would love to assist you with that!
|
||||
|
||||
In fact, we have a [whole page](https://qmk.fm/powered/) dedicated to adding QMK Branding to your page and keyboard. This covers pretty much everything you need (knowledge and images) to officially support QMK.
|
||||
In fact, we have a [whole page](https://qmk.fm/trademark) dedicated to adding QMK Branding to your page and keyboard. This covers pretty much everything you need (knowledge and images) to officially support QMK.
|
||||
|
||||
If you have any questions about this, open an issue or head to [Discord](https://discord.gg/qmk).
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Keycodes are actually defined in [quantum/keycode.h](https://github.com/qmk/qmk_
|
||||
There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JIS. North America primarily uses ANSI, Europe and Africa primarily use ISO, and Japan uses JIS. Regions not mentioned typically use either ANSI or ISO. The keycodes corresponding to these layouts are shown here:
|
||||
|
||||
<!-- Source for this image: https://www.keyboard-layout-editor.com/#/gists/bf431647d1001cff5eff20ae55621e9a -->
|
||||

|
||||

|
||||
|
||||
## How Can I Make Custom Names For Complex Keycodes?
|
||||
|
||||
|
||||
@@ -2,29 +2,40 @@
|
||||
|
||||
These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent.
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------|----------------------------------|------------------------------------------------------|
|
||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|
||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)` |Hold Left GUI and press `kc` |
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||
|`RGUI(kc)`|`RCMD(kc)`, `RWIN(kc)` |Hold Right GUI and press `kc` |
|
||||
|`LSG(kc)` |`SGUI(kc)`, `SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|
||||
|`LAG(kc)` | |Hold Left Alt and Left GUI and press `kc` |
|
||||
|`RSG(kc)` | |Hold Right Shift and Right GUI and press `kc` |
|
||||
|`RAG(kc)` | |Hold Right Alt and Right GUI and press `kc` |
|
||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|
||||
|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` |
|
||||
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|
||||
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` |
|
||||
|Key |Aliases |Description |
|
||||
|----------|-------------------------------|-------------------------------------------------------------------------------|
|
||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|
||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||
|`LCS(kc)` | |Hold Left Control and Left Shift and press `kc` |
|
||||
|`LCA(kc)` | |Hold Left Control and Left Alt and press `kc` |
|
||||
|`LCG(kc)` | |Hold Left Control and Left GUI and press `kc` |
|
||||
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|
||||
|`LSG(kc)` | |Hold Left Shift and Left GUI and press `kc` |
|
||||
|`LAG(kc)` | |Hold Left Alt and Left GUI and press `kc` |
|
||||
|`LCSG(kc)`| |Hold Left Control, Left Shift and Left GUI and press `kc` |
|
||||
|`LCAG(kc)`| |Hold Left Control, Left Alt and Left GUI and press `kc` |
|
||||
|`LSAG(kc)`| |Hold Left Shift, Left Alt and Left GUI and press `kc` |
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||
|`RGUI(kc)`|`RCMD(kc)`, `RWIN(kc)` |Hold Right GUI and press `kc` |
|
||||
|`RCA(kc)` | |Hold Right Control and Right Alt and press `kc` |
|
||||
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|
||||
|`RCG(kc)` | |Hold Right Control and Right GUI and press `kc` |
|
||||
|`RSA(kc)` | |Hold Right Shift and Right Alt and press `kc` |
|
||||
|`RSG(kc)` | |Hold Right Shift and Right GUI and press `kc` |
|
||||
|`RAG(kc)` | |Hold Right Alt and Right GUI and press `kc` |
|
||||
|`RCSG(kc)`| |Hold Right Control, Right Shift and Right GUI and press `kc` |
|
||||
|`RCAG(kc)`| |Hold Right Control, Right Alt and Right GUI and press `kc` |
|
||||
|`RSAG(kc)`| |Hold Right Shift, Right Alt and Right GUI and press `kc` |
|
||||
|`MEH(kc)` | |Hold Left Control, Left Shift and Left Alt and press `kc` |
|
||||
|`HYPR(kc)`| |Hold Left Control, Left Shift, Left Alt and Left GUI and press `kc`<sup>1</sup>|
|
||||
|
||||
You can also chain them, for example `LCTL(LALT(KC_DEL))` or `C(A(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.
|
||||
<sup>1. More information on the Hyper key can be found on [this blog post by Brett Terpstra](https://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/).</sup>
|
||||
|
||||
You can also chain them, for example `LCTL(LALT(KC_DEL))`, `C(A(KC_DEL))`, or `LCA(KC_DEL)` all make a key that sends Control+Alt+Delete with a single keypress.
|
||||
|
||||
# Checking Modifier State {#checking-modifier-state}
|
||||
|
||||
|
||||
@@ -2,8 +2,22 @@
|
||||
|
||||
This page documents the automated process for converting keyboards to use drop-in replacement controllers. This process is designed to be easy to use and can be completed in a few simple steps.
|
||||
|
||||
You can generate the firmware by appending `-e CONVERT_TO=<target>` to your compile/flash command. For example:
|
||||
|
||||
```sh
|
||||
qmk flash -c -kb keebio/bdn9/rev1 -km default -e CONVERT_TO=proton_c
|
||||
```
|
||||
|
||||
You can also configure this within your [keymap](#keymap) to accomplish the same thing.
|
||||
|
||||
::: tip
|
||||
If you get build errors, you will need to convert the keyboard's code to be [compatible](#keyboard-req) with the converter feature, or provide additional [keymap](#keymap-add) configuration.
|
||||
:::
|
||||
|
||||
## Supported Converters
|
||||
|
||||
Each converter category is broken down by its declared `pin compatibility`. This ensures that only valid combinations are attempted.
|
||||
|
||||
The following converters are available at this time:
|
||||
|
||||
| From | To |
|
||||
@@ -28,86 +42,56 @@ The following converters are available at this time:
|
||||
| `elite_c` | `helios` |
|
||||
| `elite_c` | `liatris` |
|
||||
|
||||
## Configuration
|
||||
|
||||
## Overview
|
||||
Configuring a converter to use can be done by adding one of the following lines to your keymaps's configuration:
|
||||
|
||||
Each converter category is broken down by its declared `pin compatibility`. This ensures that only valid combinations are attempted. You can generate the firmware by appending `-e CONVERT_TO=<target>` to your compile/flash command. For example:
|
||||
:::::tabs
|
||||
|
||||
```sh
|
||||
qmk flash -c -kb keebio/bdn9/rev1 -km default -e CONVERT_TO=proton_c
|
||||
==== keymap.json
|
||||
|
||||
```json [keymap.json]
|
||||
{
|
||||
"version": 1,
|
||||
"keyboard": "keebio/bdn9/rev1",
|
||||
"keymap": "keebio_bdn9_rev1_layout_2025-05-20",
|
||||
"converter": "proton_c", // [!code focus]
|
||||
"layout": "LAYOUT",
|
||||
}
|
||||
```
|
||||
|
||||
You can also add the same `CONVERT_TO=<target>` to your keymap's `rules.mk`, which will accomplish the same thing.
|
||||
|
||||
::: tip
|
||||
If you get errors about `PORTB/DDRB`, etc not being defined, you'll need to convert the keyboard's code to use the [GPIO Controls](drivers/gpio) that will work for both ARM and AVR. This shouldn't affect the AVR builds at all.
|
||||
:::
|
||||
|
||||
### Conditional Configuration
|
||||
|
||||
Once a converter is enabled, it exposes the `CONVERT_TO_<target_uppercase>` flag that you can use in your code with `#ifdef`s, For example:
|
||||
|
||||
```c
|
||||
#ifdef CONVERT_TO_PROTON_C
|
||||
// Proton C code
|
||||
#else
|
||||
// Pro Micro code
|
||||
#endif
|
||||
```
|
||||
|
||||
### Pin Compatibility
|
||||
|
||||
To ensure compatibility, provide validation, and enable future workflows, a keyboard should declare its `pin compatibility`. For legacy reasons, this is currently assumed to be `promicro`. The following pin compatibility interfaces are currently defined:
|
||||
|
||||
| Pin Compatibility | Notes |
|
||||
|-------------------|-----------------------------------|
|
||||
| `promicro` | Includes RX/TX LEDs |
|
||||
| `elite_c` | Includes bottom row pins, no LEDs |
|
||||
|
||||
To declare the base for conversions, add this line to your keyboard's `rules.mk`:
|
||||
==== rules.mk
|
||||
|
||||
```makefile
|
||||
PIN_COMPATIBLE = elite_c
|
||||
CONVERT_TO = proton_c
|
||||
```
|
||||
|
||||
## Pro Micro
|
||||
:::::
|
||||
|
||||
If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.com/products/12640) (or compatible board), the supported alternative controllers are:
|
||||
::: tip
|
||||
If you get build errors, you will need to convert the keyboard's code to be [compatible](#keyboard-req) with the converter feature, or provide additional [keymap](#keymap-add) configuration.
|
||||
:::
|
||||
|
||||
| Device | Target |
|
||||
|------------------------------------------------------------------------------------------|-------------------|
|
||||
| [Proton C](https://qmk.fm/proton-c/) | `proton_c` |
|
||||
| [Adafruit KB2040](https://learn.adafruit.com/adafruit-kb2040) | `kb2040` |
|
||||
| [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288) | `sparkfun_pm2040` |
|
||||
| [Blok](https://boardsource.xyz/store/628b95b494dfa308a6581622) | `blok` |
|
||||
| [Bit-C PRO](https://nullbits.co/bit-c-pro) | `bit_c_pro` |
|
||||
| [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` |
|
||||
| [customMK Bonsai C4](https://shop.custommk.com/products/bonsai-c4-microcontroller-board) | `bonsai_c4` |
|
||||
| [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) | `elite_pi` |
|
||||
| [0xCB Helios](https://keeb.supply/products/0xcb-helios) | `helios` |
|
||||
| [Liatris](https://splitkb.com/products/liatris) | `liatris` |
|
||||
| [Imera](https://splitkb.com/products/imera) | `imera` |
|
||||
| [Michi](https://github.com/ci-bus/michi-promicro-rp2040) | `michi` |
|
||||
| [Svlinky](https://github.com/sadekbaroudi/svlinky) | `svlinky` |
|
||||
## Pro Micro Converters
|
||||
|
||||
Converter summary:
|
||||
If a board currently supported by QMK uses a [Pro Micro](https://www.sparkfun.com/products/12640) (or compatible board), the supported alternative controllers are:
|
||||
|
||||
| Target | Argument | `rules.mk` | Condition |
|
||||
|-------------------|---------------------------------|------------------------------|-------------------------------------|
|
||||
| `proton_c` | `-e CONVERT_TO=proton_c` | `CONVERT_TO=proton_c` | `#ifdef CONVERT_TO_PROTON_C` |
|
||||
| `kb2040` | `-e CONVERT_TO=kb2040` | `CONVERT_TO=kb2040` | `#ifdef CONVERT_TO_KB2040` |
|
||||
| `sparkfun_pm2040` | `-e CONVERT_TO=sparkfun_pm2040` | `CONVERT_TO=sparkfun_pm2040` | `#ifdef CONVERT_TO_SPARKFUN_PM2040` |
|
||||
| `blok` | `-e CONVERT_TO=blok` | `CONVERT_TO=blok` | `#ifdef CONVERT_TO_BLOK` |
|
||||
| `bit_c_pro` | `-e CONVERT_TO=bit_c_pro` | `CONVERT_TO=bit_c_pro` | `#ifdef CONVERT_TO_BIT_C_PRO` |
|
||||
| `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` |
|
||||
| `bonsai_c4` | `-e CONVERT_TO=bonsai_c4` | `CONVERT_TO=bonsai_c4` | `#ifdef CONVERT_TO_BONSAI_C4` |
|
||||
| `rp2040_ce` | `-e CONVERT_TO=rp2040_ce` | `CONVERT_TO=rp2040_ce` | `#ifdef CONVERT_TO_RP2040_CE` |
|
||||
| `elite_pi` | `-e CONVERT_TO=elite_pi` | `CONVERT_TO=elite_pi` | `#ifdef CONVERT_TO_ELITE_PI` |
|
||||
| `helios` | `-e CONVERT_TO=helios` | `CONVERT_TO=helios` | `#ifdef CONVERT_TO_HELIOS` |
|
||||
| `liatris` | `-e CONVERT_TO=liatris` | `CONVERT_TO=liatris` | `#ifdef CONVERT_TO_LIATRIS` |
|
||||
| `imera` | `-e CONVERT_TO=imera` | `CONVERT_TO=imera` | `#ifdef CONVERT_TO_IMERA` |
|
||||
| `michi` | `-e CONVERT_TO=michi` | `CONVERT_TO=michi` | `#ifdef CONVERT_TO_MICHI` |
|
||||
| `svlinky` | `-e CONVERT_TO=svlinky` | `CONVERT_TO=svlinky` | `#ifdef CONVERT_TO_SVLINKY` |
|
||||
| Device | Target | CLI Argument | `rules.mk` | Condition |
|
||||
|------------------------------------------------------------------------------------------|-------------------|---------------------------------|------------------------------|-------------------------------------|
|
||||
| [Proton C](https://qmk.fm/proton-c/) | `proton_c` | `-e CONVERT_TO=proton_c` | `CONVERT_TO=proton_c` | `#ifdef CONVERT_TO_PROTON_C` |
|
||||
| [Adafruit KB2040](https://learn.adafruit.com/adafruit-kb2040) | `kb2040` | `-e CONVERT_TO=kb2040` | `CONVERT_TO=kb2040` | `#ifdef CONVERT_TO_KB2040` |
|
||||
| [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288) | `sparkfun_pm2040` | `-e CONVERT_TO=sparkfun_pm2040` | `CONVERT_TO=sparkfun_pm2040` | `#ifdef CONVERT_TO_SPARKFUN_PM2040` |
|
||||
| [Blok](https://boardsource.xyz/store/628b95b494dfa308a6581622) | `blok` | `-e CONVERT_TO=blok` | `CONVERT_TO=blok` | `#ifdef CONVERT_TO_BLOK` |
|
||||
| [Bit-C PRO](https://nullbits.co/bit-c-pro) | `bit_c_pro` | `-e CONVERT_TO=bit_c_pro` | `CONVERT_TO=bit_c_pro` | `#ifdef CONVERT_TO_BIT_C_PRO` |
|
||||
| [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` |
|
||||
| [customMK Bonsai C4](https://shop.custommk.com/products/bonsai-c4-microcontroller-board) | `bonsai_c4` | `-e CONVERT_TO=bonsai_c4` | `CONVERT_TO=bonsai_c4` | `#ifdef CONVERT_TO_BONSAI_C4` |
|
||||
| [RP2040 Community Edition](#rp2040_ce) | `rp2040_ce` | `-e CONVERT_TO=rp2040_ce` | `CONVERT_TO=rp2040_ce` | `#ifdef CONVERT_TO_RP2040_CE` |
|
||||
| [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) | `elite_pi` | `-e CONVERT_TO=elite_pi` | `CONVERT_TO=elite_pi` | `#ifdef CONVERT_TO_ELITE_PI` |
|
||||
| [0xCB Helios](https://keeb.supply/products/0xcb-helios) | `helios` | `-e CONVERT_TO=helios` | `CONVERT_TO=helios` | `#ifdef CONVERT_TO_HELIOS` |
|
||||
| [Liatris](https://splitkb.com/products/liatris) | `liatris` | `-e CONVERT_TO=liatris` | `CONVERT_TO=liatris` | `#ifdef CONVERT_TO_LIATRIS` |
|
||||
| [Imera](https://splitkb.com/products/imera) | `imera` | `-e CONVERT_TO=imera` | `CONVERT_TO=imera` | `#ifdef CONVERT_TO_IMERA` |
|
||||
| [Michi](https://github.com/ci-bus/michi-promicro-rp2040) | `michi` | `-e CONVERT_TO=michi` | `CONVERT_TO=michi` | `#ifdef CONVERT_TO_MICHI` |
|
||||
| [Svlinky](https://github.com/sadekbaroudi/svlinky) | `svlinky` | `-e CONVERT_TO=svlinky` | `CONVERT_TO=svlinky` | `#ifdef CONVERT_TO_SVLINKY` |
|
||||
|
||||
### Proton C {#proton_c}
|
||||
|
||||
@@ -119,26 +103,26 @@ The Proton C only has one on-board LED (C13), and by default, the TXLED (D5) is
|
||||
|
||||
The following defaults are based on what has been implemented for STM32 boards.
|
||||
|
||||
| Feature | Notes |
|
||||
|----------------------------------------------|------------------------------------------------------------------------------------------------------------------|
|
||||
| [Audio](features/audio) | Enabled |
|
||||
| [RGB Lighting](features/rgblight) | Disabled |
|
||||
| Feature | Notes |
|
||||
|--------------------------------------------|----------------------------------------------------------------------------------------------------------------|
|
||||
| [Audio](features/audio) | Enabled |
|
||||
| [RGB Lighting](features/rgblight) | Disabled |
|
||||
| [Backlight](features/backlight) | Forces [task driven PWM](features/backlight#software-pwm-driver) until ARM can provide automatic configuration |
|
||||
| USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) |
|
||||
| [Split keyboards](features/split_keyboard) | Partial - heavily dependent on enabled features |
|
||||
| USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) |
|
||||
| [Split keyboards](features/split_keyboard) | Partial - heavily dependent on enabled features |
|
||||
|
||||
### Adafruit KB2040 {#kb2040}
|
||||
|
||||
The following defaults are based on what has been implemented for [RP2040](platformdev_rp2040) boards.
|
||||
|
||||
| Feature | Notes |
|
||||
|----------------------------------------------|------------------------------------------------------------------------------------------------------------------|
|
||||
| [RGB Lighting](features/rgblight) | Enabled via `PIO` vendor driver |
|
||||
| Feature | Notes |
|
||||
|--------------------------------------------|----------------------------------------------------------------------------------------------------------------|
|
||||
| [RGB Lighting](features/rgblight) | Enabled via `PIO` vendor driver |
|
||||
| [Backlight](features/backlight) | Forces [task driven PWM](features/backlight#software-pwm-driver) until ARM can provide automatic configuration |
|
||||
| USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) |
|
||||
| [Split keyboards](features/split_keyboard) | Partial via `PIO` vendor driver - heavily dependent on enabled features |
|
||||
| USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) |
|
||||
| [Split keyboards](features/split_keyboard) | Partial via `PIO` vendor driver - heavily dependent on enabled features |
|
||||
|
||||
### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO and Michi {#sparkfun_pm2040 }
|
||||
### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO and Michi {#sparkfun_pm2040}
|
||||
|
||||
Feature set is identical to [Adafruit KB2040](#kb2040).
|
||||
|
||||
@@ -177,31 +161,193 @@ Feature set is identical to [Adafruit KB2040](#kb2040). VBUS detection is enable
|
||||
|
||||
Feature set is a pro micro equivalent of the [RP2040 Community Edition](#rp2040_ce), except that two of the analog GPIO have been replaced with digital only GPIO. These two were moved to the FPC connector to support the [VIK specification](https://github.com/sadekbaroudi/vik). This means that if you are expecting analog support on all 4 pins as provided on a RP2040 Community Edition pinout, you will not have that. Please see the [Svlinky github page](https://github.com/sadekbaroudi/svlinky) for more details.
|
||||
|
||||
## Elite-C
|
||||
## Elite-C Converters
|
||||
|
||||
If a board currently supported in QMK uses an [Elite-C](https://keeb.io/products/elite-c-low-profile-version-usb-c-pro-micro-replacement-atmega32u4), the supported alternative controllers are:
|
||||
If a board currently supported by QMK uses an [Elite-C](https://keeb.io/products/elite-c-low-profile-version-usb-c-pro-micro-replacement-atmega32u4), the supported alternative controllers are:
|
||||
|
||||
| Device | Target |
|
||||
|----------------------------------------------------------------------------------|-------------------|
|
||||
| [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` |
|
||||
| [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) | `elite_pi` |
|
||||
| [0xCB Helios](https://keeb.supply/products/0xcb-helios) | `helios` |
|
||||
| [Liatris](https://splitkb.com/products/liatris) | `liatris` |
|
||||
| Device | Target | CLI Argument | `rules.mk` | Condition |
|
||||
|----------------------------------------------------------------------------------|-------------|---------------------------|------------------------|-------------------------------|
|
||||
| [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` |
|
||||
| [RP2040 Community Edition](#rp2040_ce_elite) | `rp2040_ce` | `-e CONVERT_TO=rp2040_ce` | `CONVERT_TO=rp2040_ce` | `#ifdef CONVERT_TO_RP2040_CE` |
|
||||
| [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) | `elite_pi` | `-e CONVERT_TO=elite_pi` | `CONVERT_TO=elite_pi` | `#ifdef CONVERT_TO_ELITE_PI` |
|
||||
| [0xCB Helios](https://keeb.supply/products/0xcb-helios) | `helios` | `-e CONVERT_TO=helios` | `CONVERT_TO=helios` | `#ifdef CONVERT_TO_HELIOS` |
|
||||
| [Liatris](https://splitkb.com/products/liatris) | `liatris` | `-e CONVERT_TO=liatris` | `CONVERT_TO=liatris` | `#ifdef CONVERT_TO_LIATRIS` |
|
||||
|
||||
Converter summary:
|
||||
|
||||
| Target | Argument | `rules.mk` | Condition |
|
||||
|-------------------|---------------------------------|------------------------------|-------------------------------------|
|
||||
| `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` |
|
||||
| `rp2040_ce` | `-e CONVERT_TO=rp2040_ce` | `CONVERT_TO=rp2040_ce` | `#ifdef CONVERT_TO_RP2040_CE` |
|
||||
| `elite_pi` | `-e CONVERT_TO=elite_pi` | `CONVERT_TO=elite_pi` | `#ifdef CONVERT_TO_ELITE_PI` |
|
||||
| `helios` | `-e CONVERT_TO=helios` | `CONVERT_TO=helios` | `#ifdef CONVERT_TO_HELIOS` |
|
||||
| `liatris` | `-e CONVERT_TO=liatris` | `CONVERT_TO=liatris` | `#ifdef CONVERT_TO_LIATRIS` |
|
||||
|
||||
### STeMCell {#stemcell}_elite
|
||||
### STeMCell {#stemcell_elite}
|
||||
|
||||
Identical to [Pro Micro - STeMCell](#stemcell) with support for the additional bottom row of pins.
|
||||
|
||||
### RP2040 Community Edition {#rp2040_ce_elite}
|
||||
|
||||
Identical to [Pro Micro - RP2040 Community Edition](#rp2040_ce) with support for the additional bottom row of pins.
|
||||
|
||||
## Advanced Topics
|
||||
|
||||
### Keyboard Configuration
|
||||
|
||||
To configure a keyboard to allow the converter feature, add the following line to your keyboard's `.json` configuration:
|
||||
|
||||
```json [keyboard.json]
|
||||
{
|
||||
"maintainer": "QMK",
|
||||
"development_board": "promicro", // [!code focus]
|
||||
"diode_direction": "COL2ROW",
|
||||
}
|
||||
```
|
||||
|
||||
See the [pin compatibility](#pin_compatible) for more information.
|
||||
|
||||
#### Additional Requirements {#keyboard-req}
|
||||
|
||||
Keyboards must use the platform agnostic abstractions provided by QMK. This includes:
|
||||
|
||||
* Use of [GPIO Controls](drivers/gpio).
|
||||
|
||||
### Additional Keymap Configuration {#keymap-add}
|
||||
|
||||
While effort has been made to make converters as compatible as possible, sometimes additional platform specific configuration is required.
|
||||
|
||||
For example, enabling hardware peripherals by adding a keymap level `mcuconf.h` with something like the following:
|
||||
```c
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_SIO_USE_UART0
|
||||
#define RP_SIO_USE_UART0 TRUE
|
||||
```
|
||||
|
||||
You can find details on how to configure drivers on their respective pages.
|
||||
|
||||
Alternatively, you may have to disable incompatible features. For example:
|
||||
|
||||
:::::tabs
|
||||
|
||||
==== keymap.json
|
||||
|
||||
```json [keymap.json]
|
||||
{
|
||||
"version": 1,
|
||||
"keyboard": "keebio/bdn9/rev1",
|
||||
"keymap": "keebio_bdn9_rev1_layout_2025-05-20",
|
||||
"converter": "proton_c",
|
||||
"config": { // [!code focus]
|
||||
"features": { // [!code focus]
|
||||
"audio": false // [!code focus]
|
||||
}
|
||||
}
|
||||
"layout": "LAYOUT",
|
||||
}
|
||||
```
|
||||
|
||||
==== rules.mk
|
||||
|
||||
```makefile
|
||||
AUDIO_ENABLE = no
|
||||
```
|
||||
|
||||
:::::
|
||||
|
||||
### Conditional Configuration
|
||||
|
||||
Once a converter is enabled, it exposes the `CONVERT_TO_<target_uppercase>` flag that you can use in your code with `#ifdef`s, For example:
|
||||
|
||||
```c
|
||||
#ifdef CONVERT_TO_PROTON_C
|
||||
// Proton C code
|
||||
#else
|
||||
// Pro Micro code
|
||||
#endif
|
||||
```
|
||||
|
||||
### Pin Compatibility {#pin_compatible}
|
||||
|
||||
To ensure compatibility, provide validation, and power future workflows, a keyboard should declare its `pin compatibility`. This ensures that only valid combinations are attempted.
|
||||
|
||||
::: tip Note
|
||||
This will already be configured for you if are using the `promicro` development board preset.
|
||||
:::
|
||||
|
||||
To declare the base interface for conversions, add the following line to your keyboard's configuration:
|
||||
|
||||
```json [keyboard.json]
|
||||
{
|
||||
"maintainer": "QMK",
|
||||
"development_board": "elite_c", // [!code focus]
|
||||
"pin_compatible": "elite_c", // [!code focus]
|
||||
"diode_direction": "COL2ROW",
|
||||
}
|
||||
```
|
||||
|
||||
The above example, configures a keyboard for a default of `elite_c` while allowing any of the `elite_c` converter targets.
|
||||
|
||||
The framework then allows mapping of pins from `<PIN_COMPATIBLE>` to converter `<target>`.
|
||||
|
||||
::: warning
|
||||
Mapped pins should adhere strictly to the defined interface, any extras present on the hardware should be ignored.
|
||||
:::
|
||||
|
||||
#### Available Pin Compatibility
|
||||
|
||||
:::::tabs
|
||||
|
||||
==== promicro
|
||||
|
||||

|
||||
|
||||
<!-- ```svgbob
|
||||
pins
|
||||
.-------------. LEDs
|
||||
| | _|_ _|_
|
||||
D3 -+-O | \ /B0 \ /D5
|
||||
D2 -+-O | -+- -+-
|
||||
| | | |
|
||||
| |
|
||||
D1 -+-O O-+- F4
|
||||
D0 -+-O O-+- F5
|
||||
D4 -+-O O-+- F6
|
||||
C6 -+-O O-+- F7
|
||||
D7 -+-O O-+- B1
|
||||
E6 -+-O O-+- B3
|
||||
B4 -+-O O-+- B2
|
||||
B5 -+-O O-+- B6
|
||||
| |
|
||||
'---+-+-+-+-+---'
|
||||
``` -->
|
||||
|
||||
::: info Notes:
|
||||
Includes LEDs - these may be mapped to unused/unavailable pins when not present.
|
||||
:::
|
||||
|
||||
==== elite_c
|
||||
|
||||

|
||||
|
||||
<!-- ```svgbob
|
||||
pins
|
||||
.-------------.
|
||||
| |
|
||||
D3 -+-O |
|
||||
D2 -+-O |
|
||||
| |
|
||||
| |
|
||||
D1 -+-O O-+- F4
|
||||
D0 -+-O O-+- F5
|
||||
D4 -+-O O-+- F6
|
||||
C6 -+-O O-+- F7
|
||||
D7 -+-O O-+- B1
|
||||
E6 -+-O O-+- B3
|
||||
B4 -+-O O-+- B2
|
||||
B5 -+-O O O O O O O-+- B6
|
||||
| | | | | | |
|
||||
'---+-+-+-+-+---'
|
||||
+ + + + +
|
||||
B D C F F
|
||||
7 5 7 1 0
|
||||
``` -->
|
||||
|
||||
::: info Notes:
|
||||
Includes bottom row pins, no LEDs.
|
||||
:::
|
||||
|
||||
:::::
|
||||
|
||||
@@ -47,7 +47,7 @@ susceptible to noise, you must choose a debounce method that will also mitigate
|
||||
* Debounce algorithms often have a 'debounce time' parameter, that specifies the maximum settling time of the switch contacts.
|
||||
This time might be measured in various units:
|
||||
* Cycles-based debouncing waits n cycles (scans), decreasing count by one each matrix_scan
|
||||
* Timestamp-based debouncing stores the millisecond timestamp a change occurred, and does substraction to figure out time elapsed.
|
||||
* Timestamp-based debouncing stores the millisecond timestamp a change occurred, and does subtraction to figure out time elapsed.
|
||||
* Timestamp-based debouncing is usually superior, especially in the case of noise-resistant devices because settling times of physical
|
||||
switches is specified in units of time, and should not depend on the matrix scan-rate of the keyboard.
|
||||
* Cycles-based debouncing is sometimes considered inferior, because the settling time that it is able to compensate for depends on the
|
||||
|
||||
@@ -100,7 +100,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) { //This disables layer indication, as it's assumed that if you're changing this ... you want that disabled
|
||||
if (user_config.rgb_layer_change) { // only if this is enabled
|
||||
user_config.rgb_layer_change = false; // disable it, and
|
||||
eeconfig_update_user(user_config.raw); // write the setings to EEPROM
|
||||
eeconfig_update_user(user_config.raw); // write the settings to EEPROM
|
||||
}
|
||||
}
|
||||
return true; break;
|
||||
@@ -109,7 +109,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
```
|
||||
And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EE_CLR` keycode or [Bootmagic](features/bootmagic) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued.
|
||||
And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EE_CLR` keycode or [Bootmagic](features/bootmagic) functionality. For example, if you want to set rgb layer indication by default, and save the default valued.
|
||||
|
||||
```c
|
||||
void eeconfig_init_user(void) { // EEPROM is getting reset!
|
||||
|
||||
@@ -25,7 +25,7 @@ active layer until pressed again.
|
||||
|
||||
Currently, the `layer` argument of `LT()` is limited to layers 0-15, and the `kc` argument to the [Basic Keycode set](keycodes_basic), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. This is because QMK uses 16-bit keycodes, of which 4 bits are used for the function identifier and 4 bits for the layer, leaving only 8 bits for the keycode.
|
||||
|
||||
For a similar reason, the `layer` argument of `LM()` is also limited to layers 0-15 and the `mod` argument must fit within 5 bits. As a consequence, although left and right modifiers are supported by `LM()`, it is impossible to mix and match left and right modifiers. Specifying at least one right-hand modifier in a combination such as `MOD_RALT|MOD_LSFT` will convert *all* the listed modifiers to their right-hand counterpart. So, using the aforementionned mod-mask will actually send <kbd>Right Alt</kbd>+<kbd>Right Shift</kbd>. Make sure to use the `MOD_xxx` constants over alternative ways of specifying modifiers when defining your layer-mod key.
|
||||
For a similar reason, the `layer` argument of `LM()` is also limited to layers 0-15 and the `mod` argument must fit within 5 bits. As a consequence, although left and right modifiers are supported by `LM()`, it is impossible to mix and match left and right modifiers. Specifying at least one right-hand modifier in a combination such as `MOD_RALT|MOD_LSFT` will convert *all* the listed modifiers to their right-hand counterpart. So, using the aforementioned mod-mask will actually send <kbd>Right Alt</kbd>+<kbd>Right Shift</kbd>. Make sure to use the `MOD_xxx` constants over alternative ways of specifying modifiers when defining your layer-mod key.
|
||||
|
||||
| `LM(1,KC_LSFT)` | `LM(1,MOD_MASK_SHIFT)` | `LM(1,MOD_BIT(KC_LSFT))` | `LM(1,MOD_LSFT)` |
|
||||
|:---------------:|:----------------------:|:------------------------:|:----------------:|
|
||||
@@ -61,27 +61,27 @@ Sometimes, you might want to switch between layers in a macro or as part of a ta
|
||||
|
||||
There are a number of functions (and variables) related to how you can use or manipulate the layers.
|
||||
|
||||
|Function |Description |
|
||||
|----------------------------------------------|---------------------------------------------------------------------------------------------------------|
|
||||
| `layer_state_set(layer_mask)` | Directly sets the layer state (avoid unless you know what you are doing). |
|
||||
| `layer_clear()` | Clears all layers (turns them all off). |
|
||||
| `layer_move(layer)` | Turns specified layer on, and all other layers off. |
|
||||
| `layer_on(layer)` | Turns specified layer on, leaves all other layers in existing state. |
|
||||
| `layer_off(layer)` | Turns specified layer off, leaves all other layers in existing state. |
|
||||
| `layer_invert(layer)` | Inverts/toggles the state of the specified layer |
|
||||
| `layer_or(layer_mask)` | Turns on layers based on matching bits between specifed layer and existing layer state. |
|
||||
| `layer_and(layer_mask)` | Turns on layers based on matching enabled bits between specifed layer and existing layer state. |
|
||||
| `layer_xor(layer_mask)` | Turns on layers based on non-matching bits between specifed layer and existing layer state. |
|
||||
| `layer_debug(layer_mask)` | Prints out the current bit mask and highest active layer to debugger console. |
|
||||
| `default_layer_set(layer_mask)` | Directly sets the default layer state (avoid unless you know what you are doing). |
|
||||
| `default_layer_or(layer_mask)` | Turns on layers based on matching bits between specifed layer and existing default layer state. |
|
||||
| `default_layer_and(layer_mask)` | Turns on layers based on matching enabled bits between specifed layer and existing default layer state. |
|
||||
| `default_layer_xor(layer_mask)` | Turns on layers based on non-matching bits between specifed layer and existing default layer state. |
|
||||
| `default_layer_debug(layer_mask)` | Prints out the current bit mask and highest active default layer to debugger console. |
|
||||
| [`set_single_default_layer(layer)`](ref_functions.md#setting-the-persistent-default-layer) | Sets the default layer, but does _not_ write it to persistent memory (EEPROM). |
|
||||
| [`set_single_persistent_default_layer(layer)`](ref_functions.md#setting-the-persistent-default-layer) | Sets the default layer and writes it to persistent memory (EEPROM). |
|
||||
| [`update_tri_layer(x, y, z)`](ref_functions.md#update_tri_layerx-y-z) | Checks if layers `x` and `y` are both on, and sets `z` based on that (on if both on, otherwise off). |
|
||||
| [`update_tri_layer_state(state, x, y, z)`](ref_functions.md#update_tri_layer_statestate-x-y-z) | Does the same as `update_tri_layer(x, y, z)`, but from `layer_state_set_*` functions. |
|
||||
|Function |Description |
|
||||
|---------------------------------------------|--------------------------------------------------------------------------------------------------------|
|
||||
|`layer_state_set(layer_mask)` |Directly sets the layer state (avoid unless you know what you are doing). |
|
||||
|`layer_clear()` |Clears all layers (turns them all off). |
|
||||
|`layer_move(layer)` |Turns specified layer on, and all other layers off. |
|
||||
|`layer_on(layer)` |Turns specified layer on, leaves all other layers in existing state. |
|
||||
|`layer_off(layer)` |Turns specified layer off, leaves all other layers in existing state. |
|
||||
|`layer_invert(layer)` |Inverts/toggles the state of the specified layer |
|
||||
|`layer_or(layer_mask)` |Turns on layers based on matching bits between specified layer and existing layer state. |
|
||||
|`layer_and(layer_mask)` |Turns on layers based on matching enabled bits between specified layer and existing layer state. |
|
||||
|`layer_xor(layer_mask)` |Turns on layers based on non-matching bits between specified layer and existing layer state. |
|
||||
|`layer_debug(layer_mask)` |Prints out the current bit mask and highest active layer to debugger console. |
|
||||
|`default_layer_set(layer_mask)` |Directly sets the default layer state (avoid unless you know what you are doing). |
|
||||
|`default_layer_or(layer_mask)` |Turns on layers based on matching bits between specified layer and existing default layer state. |
|
||||
|`default_layer_and(layer_mask)` |Turns on layers based on matching enabled bits between specified layer and existing default layer state.|
|
||||
|`default_layer_xor(layer_mask)` |Turns on layers based on non-matching bits between specified layer and existing default layer state. |
|
||||
|`default_layer_debug(layer_mask)` |Prints out the current bit mask and highest active default layer to debugger console. |
|
||||
|[`set_single_default_layer(layer)`](ref_functions.md#setting-the-persistent-default-layer) |Sets the default layer, but does _not_ write it to persistent memory (EEPROM). |
|
||||
|[`set_single_persistent_default_layer(layer)`](ref_functions.md#setting-the-persistent-default-layer)|Sets the default layer and writes it to persistent memory (EEPROM). |
|
||||
|[`update_tri_layer(x, y, z)`](ref_functions.md#update_tri_layerx-y-z) |Checks if layers `x` and `y` are both on, and sets `z` based on that (on if both on, otherwise off).|
|
||||
|[`update_tri_layer_state(state, x, y, z)`](ref_functions.md#update_tri_layer_statestate-x-y-z) |Does the same as `update_tri_layer(x, y, z)`, but from `layer_state_set_*` functions. |
|
||||
|
||||
In addition to the functions that you can call, there are a number of callback functions that get called every time the layer changes. This passes the layer state to the function, where it can be read or modified.
|
||||
|
||||
@@ -154,7 +154,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_CYCLE_LAYERS:
|
||||
// Our logic will happen on presses, nothing is done on releases
|
||||
if (!record->event.pressed) {
|
||||
if (!record->event.pressed) {
|
||||
// We've already handled the keycode (doing nothing), let QMK know so no further code is run unnecessarily
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ For example,
|
||||
|
||||
make planck:jack
|
||||
|
||||
Will include the `/users/jack/` folder in the path, along with `/users/jack/rules.mk`.
|
||||
Will include the `/users/jack/` folder in the path, along with `/users/jack/rules.mk`.
|
||||
|
||||
::: warning
|
||||
This `name` can be [overridden](#override-default-userspace), if needed.
|
||||
This `name` can be [overridden](#override-default-userspace), if needed.
|
||||
:::
|
||||
|
||||
## `Rules.mk`
|
||||
@@ -38,9 +38,9 @@ It's highly recommended that you use `<name>.c` as the default source file to be
|
||||
|
||||
SRC += <name>.c
|
||||
|
||||
Additional files may be added in the same way - it's recommended you have one named `<name>`.c/.h to start off with, though.
|
||||
Additional files may be added in the same way - it's recommended you have one named `<name>`.c/.h to start off with, though.
|
||||
|
||||
The `/users/<name>/rules.mk` file will be included in the build _after_ the `rules.mk` from your keymap. This allows you to have features in your userspace `rules.mk` that depend on individual QMK features that may or may not be available on a specific keyboard.
|
||||
The `/users/<name>/rules.mk` file will be included in the build _after_ the `rules.mk` from your keymap. This allows you to have features in your userspace `rules.mk` that depend on individual QMK features that may or may not be available on a specific keyboard.
|
||||
|
||||
For example, if you have RGB control features shared between all your keyboards that support RGB lighting, you can add support for that if the RGBLIGHT feature is enabled:
|
||||
```make
|
||||
@@ -82,7 +82,7 @@ You should use the `config.h` for [configuration options](config_options), and t
|
||||
|
||||
Please include authorship (your name, GitHub username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses).
|
||||
|
||||
You can use this as a template:
|
||||
You can use this as a template:
|
||||
```
|
||||
Copyright <year> <name> <email> @<github_username>
|
||||
|
||||
@@ -100,9 +100,9 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
```
|
||||
|
||||
You'd want to replace the year, name, email and GitHub username with your info.
|
||||
You'd want to replace the year, name, email and GitHub username with your info.
|
||||
|
||||
Additionally, this is a good place to document your code, if you wish to share it with others.
|
||||
Additionally, this is a good place to document your code, if you wish to share it with others.
|
||||
|
||||
## Build All Keyboards That Support a Specific Keymap
|
||||
|
||||
@@ -118,20 +118,21 @@ This is ideal for when you want ensure everything compiles successfully when pre
|
||||
|
||||
## Examples
|
||||
|
||||
For a brief example, checkout [`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/_example).
|
||||
For a more complicated example, checkout [`/users/drashna/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna)'s userspace.
|
||||
For a brief example, checkout [`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/_example).
|
||||
|
||||
For more complicated examples, checkout the [`awesome-qmk` collection](https://github.com/qmk/awesome-qmk).
|
||||
|
||||
|
||||
### Customized Functions
|
||||
|
||||
QMK has a bunch of [functions](custom_quantum_functions) that have [`_quantum`, `_kb`, and `_user` versions](custom_quantum_functions#a-word-on-core-vs-keyboards-vs-keymap) that you can use. You will pretty much always want to use the user version of these functions. But the problem is that if you use them in your userspace, then you don't have a version that you can use in your keymap.
|
||||
QMK has a bunch of [functions](custom_quantum_functions) that have [`_quantum`, `_kb`, and `_user` versions](custom_quantum_functions#a-word-on-core-vs-keyboards-vs-keymap) that you can use. You will pretty much always want to use the user version of these functions. But the problem is that if you use them in your userspace, then you don't have a version that you can use in your keymap.
|
||||
|
||||
However, you can actually add support for keymap version, so that you can use it in both your userspace and your keymap!
|
||||
However, you can actually add support for keymap version, so that you can use it in both your userspace and your keymap!
|
||||
|
||||
|
||||
For instance, let's look at the `layer_state_set_user()` function. You can enable the [Tri Layer State](ref_functions#olkb-tri-layers) functionality on all of your boards, while also retaining the Tri Layer functionality in your `keymap.c` files.
|
||||
For instance, let's look at the `layer_state_set_user()` function. You can enable the [Tri Layer State](ref_functions#olkb-tri-layers) functionality on all of your boards, while also retaining the Tri Layer functionality in your `keymap.c` files.
|
||||
|
||||
In your `<name.c>` file, you'd want to add this:
|
||||
In your `<name.c>` file, you'd want to add this:
|
||||
```c
|
||||
__attribute__ ((weak))
|
||||
layer_state_t layer_state_set_keymap (layer_state_t state) {
|
||||
@@ -143,7 +144,7 @@ layer_state_t layer_state_set_user (layer_state_t state) {
|
||||
return layer_state_set_keymap (state);
|
||||
}
|
||||
```
|
||||
The `__attribute__ ((weak))` part tells the compiler that this is a placeholder function that can then be replaced by a version in your `keymap.c`. That way, you don't need to add it to your `keymap.c`, but if you do, you won't get any conflicts because the function is the same name.
|
||||
The `__attribute__ ((weak))` part tells the compiler that this is a placeholder function that can then be replaced by a version in your `keymap.c`. That way, you don't need to add it to your `keymap.c`, but if you do, you won't get any conflicts because the function is the same name.
|
||||
|
||||
The `_keymap` part here doesn't matter, it just needs to be something other than `_quantum`, `_kb`, or `_user`, since those are already in use. So you could use `layer_state_set_mine`, `layer_state_set_fn`, or anything else.
|
||||
|
||||
@@ -151,7 +152,7 @@ You can see a list of this and other common functions in [`template.c`](https://
|
||||
|
||||
### Custom Features
|
||||
|
||||
Since the Userspace feature can support a staggering number of boards, you may have boards that you want to enable certain functionality for, but not for others. And you can actually create "features" that you can enable or disable in your own userspace.
|
||||
Since the Userspace feature can support a staggering number of boards, you may have boards that you want to enable certain functionality for, but not for others. And you can actually create "features" that you can enable or disable in your own userspace.
|
||||
|
||||
For instance, if you wanted to have a bunch of macros available, but only on certain boards (to save space), you could "hide" them being a `#ifdef MACROS_ENABLED`, and then enable it per board. To do this, add this to your rules.mk
|
||||
```make
|
||||
@@ -159,11 +160,11 @@ ifeq ($(strip $(MACROS_ENABLED)), yes)
|
||||
OPT_DEFS += -DMACROS_ENABLED
|
||||
endif
|
||||
```
|
||||
The `OPT_DEFS` setting causes `MACROS_ENABLED` to be defined for your keyboards (note the `-D` in front of the name), and you could use `#ifdef MACROS_ENABLED` to check the status in your c/h files, and handle that code based on that.
|
||||
The `OPT_DEFS` setting causes `MACROS_ENABLED` to be defined for your keyboards (note the `-D` in front of the name), and you could use `#ifdef MACROS_ENABLED` to check the status in your c/h files, and handle that code based on that.
|
||||
|
||||
Then you add `MACROS_ENABLED = yes` to the `rules.mk` for you keymap to enable this feature and the code in your userspace.
|
||||
|
||||
And in your `process_record_user` function, you'd do something like this:
|
||||
And in your `process_record_user` function, you'd do something like this:
|
||||
```c
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
@@ -187,9 +188,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
### Consolidated Macros
|
||||
|
||||
If you wanted to consolidate macros and other functions into your userspace for all of your keymaps, you can do that. This builds upon the [Customized Functions](#customized-functions) example above. This lets you maintain a bunch of macros that are shared between the different keyboards, and allow for keyboard specific macros, too.
|
||||
If you wanted to consolidate macros and other functions into your userspace for all of your keymaps, you can do that. This builds upon the [Customized Functions](#customized-functions) example above. This lets you maintain a bunch of macros that are shared between the different keyboards, and allow for keyboard specific macros, too.
|
||||
|
||||
First, you'd want to go through all of your `keymap.c` files and replace `process_record_user` with `process_record_keymap` instead. This way, you can still use keyboard specific codes on those boards, and use your custom "global" keycodes as well. You'll also want to replace `SAFE_RANGE` with `NEW_SAFE_RANGE` so that you wont have any overlapping keycodes
|
||||
First, you'd want to go through all of your `keymap.c` files and replace `process_record_user` with `process_record_keymap` instead. This way, you can still use keyboard specific codes on those boards, and use your custom "global" keycodes as well. You'll also want to replace `SAFE_RANGE` with `NEW_SAFE_RANGE` so that you won't have any overlapping keycodes
|
||||
|
||||
Then add `#include "<name>.h"` to all of your keymap.c files. This allows you to use these new keycodes without having to redefine them in each keymap.
|
||||
|
||||
@@ -245,7 +246,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
```
|
||||
|
||||
For boards that may not have a shift button (such as on a macro pad), we need a way to always include the bootloader option. To do that, add the following to the `rules.mk` in your userspace folder:
|
||||
For boards that may not have a shift button (such as on a macro pad), we need a way to always include the bootloader option. To do that, add the following to the `rules.mk` in your userspace folder:
|
||||
|
||||
```make
|
||||
ifeq ($(strip $(FLASH_BOOTLOADER)), yes)
|
||||
@@ -255,7 +256,7 @@ endif
|
||||
|
||||
This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make <keyboard>:<keymap>`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time.
|
||||
|
||||
Also, holding Shift will add the flash target (`:flash`) to the command. Holding Control will add some commands that will speed up compiling time by processing multiple files at once.
|
||||
Also, holding Shift will add the flash target (`:flash`) to the command. Holding Control will add some commands that will speed up compiling time by processing multiple files at once.
|
||||
|
||||
And for the boards that lack a shift key, or that you want to always attempt the flashing part, you can add `FLASH_BOOTLOADER = yes` to the `rules.mk` of that keymap.
|
||||
|
||||
|
||||
@@ -73,16 +73,13 @@ Should you rather choose to generate and use your own sample-table with the DAC
|
||||
|
||||
|
||||
### PWM (software)
|
||||
if the DAC pins are unavailable (or the MCU has no usable DAC at all, like STM32F1xx); PWM can be an alternative.
|
||||
If the DAC pins are unavailable (or the MCU has no usable DAC at all, like STM32F1xx); PWM can be an alternative.
|
||||
Note that there is currently only one speaker/pin supported.
|
||||
|
||||
set in `rules.mk`:
|
||||
|
||||
`AUDIO_DRIVER = pwm_software` and in `config.h`:
|
||||
`#define AUDIO_PIN C13` (can be any pin) to have the selected pin output a pwm signal, generated from a timer callback which toggles the pin in software.
|
||||
To use this feature, set `AUDIO_DRIVER = pwm_software` in `rules.mk` and set `#define AUDIO_PIN C13` (can be any pin) in `config.h` to have the selected pin output a pwm signal, generated from a timer callback which toggles the pin in software.
|
||||
|
||||
#### Wiring
|
||||
the usual piezo wiring: red goes to the selected AUDIO_PIN, black goes to ground.
|
||||
The usual piezo wiring: red goes to the selected AUDIO_PIN, black goes to ground.
|
||||
|
||||
OR if you can chose to drive one piezo with two pins, for example `#define AUDIO_PIN B1`, `#define AUDIO_PIN_ALT B2` in `config.h`, with `#define AUDIO_PIN_ALT_AS_NEGATIVE` - then the red lead could go to B1, the black to B2.
|
||||
|
||||
@@ -159,7 +156,7 @@ PLAY_LOOP(my_song);
|
||||
|
||||
It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif` to avoid causing problems when audio isn't built into the keyboard.
|
||||
|
||||
The available keycodes for audio are:
|
||||
The available keycodes for audio are:
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-------------------------|---------|-------------------------------------------|
|
||||
@@ -178,8 +175,8 @@ These keycodes turn all of the audio functionality on and off. Turning it off m
|
||||
|`AUDIO_PIN` | *Not defined* |Configures the pin that the speaker is connected to. |
|
||||
|`AUDIO_PIN_ALT` | *Not defined* |Configures the pin for a second speaker or second pin connected to one speaker. |
|
||||
|`AUDIO_PIN_ALT_AS_NEGATIVE` | *Not defined* |Enables support for one speaker connected to two pins. |
|
||||
|`AUDIO_INIT_DELAY` | *Not defined* |Enables delay during startup song to accomidate for USB startup issues. |
|
||||
|`AUDIO_ENABLE_TONE_MULTIPLEXING` | *Not defined* |Enables time splicing/multiplexing to create multiple tones simutaneously. |
|
||||
|`AUDIO_INIT_DELAY` | *Not defined* |Enables delay during startup song to accommodate for USB startup issues. |
|
||||
|`AUDIO_ENABLE_TONE_MULTIPLEXING` | *Not defined* |Enables time splicing/multiplexing to create multiple tones simultaneously. |
|
||||
|`AUDIO_POWER_CONTROL_PIN` | *Not defined* |Enables power control code to enable or cut off power to speaker (such as with PAM8302 amp). |
|
||||
|`AUDIO_POWER_CONTROL_PIN_ON_STATE`| `1` |The state of the audio power control pin when audio is "on" - `1` for high, `0` for low. |
|
||||
|`STARTUP_SONG` | `STARTUP_SOUND` |Plays when the keyboard starts up (audio.c) |
|
||||
@@ -301,9 +298,9 @@ Things that return false are not part of the mask, and are always processed.
|
||||
|
||||
### Music Map
|
||||
|
||||
By default, the Music Mode uses the columns and row to determine the scale for the keys. For a board that uses a rectangular matrix that matches the keyboard layout, this is just fine. However, for boards that use a more complicated matrix (such as the Planck Rev6, or many split keyboards) this would result in a very skewed experience.
|
||||
By default, the Music Mode uses the columns and row to determine the scale for the keys. For a board that uses a rectangular matrix that matches the keyboard layout, this is just fine. However, for boards that use a more complicated matrix (such as the Planck Rev6, or many split keyboards) this would result in a very skewed experience.
|
||||
|
||||
However, the Music Map option allows you to remap the scaling for the music mode, so it fits the layout, and is more natural.
|
||||
However, the Music Map option allows you to remap the scaling for the music mode, so it fits the layout, and is more natural.
|
||||
|
||||
To enable this feature, add `#define MUSIC_MAP` to your `config.h` file, and then you will want to add a `uint8_t music_map` to your keyboard's `c` file, or your `keymap.c`.
|
||||
|
||||
@@ -316,13 +313,13 @@ const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_ortho_4x12(
|
||||
);
|
||||
```
|
||||
|
||||
You will want to use whichever `LAYOUT` macro that your keyboard uses here. This maps it to the correct key location. Start in the bottom left of the keyboard layout, and move to the right, and then upwards. Fill in all the entries until you have a complete matrix.
|
||||
You will want to use whichever `LAYOUT` macro that your keyboard uses here. This maps it to the correct key location. Start in the bottom left of the keyboard layout, and move to the right, and then upwards. Fill in all the entries until you have a complete matrix.
|
||||
|
||||
You can look at the [Planck Keyboard](https://github.com/qmk/qmk_firmware/blob/e9ace1487887c1f8b4a7e8e6d87c322988bec9ce/keyboards/planck/planck.c#L24-L29) as an example of how to implement this.
|
||||
You can look at the [Planck Keyboard](https://github.com/qmk/qmk_firmware/blob/e9ace1487887c1f8b4a7e8e6d87c322988bec9ce/keyboards/planck/planck.c#L24-L29) as an example of how to implement this.
|
||||
|
||||
## Audio Click
|
||||
|
||||
This adds a click sound each time you hit a button, to simulate click sounds from the keyboard. And the sounds are slightly different for each keypress, so it doesn't sound like a single long note, if you type rapidly.
|
||||
This adds a click sound each time you hit a button, to simulate click sounds from the keyboard. And the sounds are slightly different for each keypress, so it doesn't sound like a single long note, if you type rapidly.
|
||||
|
||||
Keycodes available:
|
||||
|
||||
@@ -341,7 +338,7 @@ The feature is disabled by default, to save space. To enable it, add this to yo
|
||||
#define AUDIO_CLICKY
|
||||
```
|
||||
|
||||
You can configure the default, min and max frequencies, the stepping and built in randomness by defining these values:
|
||||
You can configure the default, min and max frequencies, the stepping and built in randomness by defining these values:
|
||||
|
||||
| Option | Default Value | Description |
|
||||
|--------|---------------|-------------|
|
||||
@@ -349,7 +346,7 @@ You can configure the default, min and max frequencies, the stepping and built i
|
||||
| `AUDIO_CLICKY_FREQ_MIN` | 65.0f | Sets the lowest frequency (under 60f are a bit buggy). |
|
||||
| `AUDIO_CLICKY_FREQ_MAX` | 1500.0f | Sets the highest frequency. Too high may result in coworkers attacking you. |
|
||||
| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f| Sets the stepping of UP/DOWN key codes. This is a multiplicative factor. The default steps the frequency up/down by a musical minor third. |
|
||||
| `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | Sets a factor of randomness for the clicks, Setting this to `0f` will make each click identical, and `1.0f` will make this sound much like the 90's computer screen scrolling/typing effect. |
|
||||
| `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | Sets a factor of randomness for the clicks, Setting this to `0f` will make each click identical, and `1.0f` will make this sound much like the 90's computer screen scrolling/typing effect. |
|
||||
| `AUDIO_CLICKY_DELAY_DURATION` | 1 | An integer note duration where 1 is 1/16th of the tempo, or a sixty-fourth note (see `quantum/audio/musical_notes.h` for implementation details). The main clicky effect will be delayed by this duration. Adjusting this to values around 6-12 will help compensate for loud switches. |
|
||||
|
||||
## MIDI Functionality
|
||||
|
||||
@@ -8,7 +8,7 @@ The feature maintains a small buffer of recent key presses. On each key press, i
|
||||
|
||||
The tricky part is how to efficiently check the buffer for typos. We don’t want to spend too much memory or time on storing or searching the typos. A good solution is to represent the typos with a trie data structure. A trie is a tree data structure where each node is a letter, and words are formed by following a path to one of the leaves.
|
||||
|
||||

|
||||

|
||||
|
||||
Since we search whether the buffer ends in a typo, we store the trie writing in reverse. The trie is queried starting from the last letter, then second to last letter, and so on, until either a letter doesn’t match or we reach a leaf, meaning a typo was found.
|
||||
|
||||
@@ -279,7 +279,7 @@ All autocorrection data is stored in a single flat array autocorrect_data. Each
|
||||
* 01 ⇒ branching node: a trie node with multiple children.
|
||||
* 10 ⇒ leaf node: a leaf, corresponding to a typo and storing its correction.
|
||||
|
||||

|
||||

|
||||
|
||||
**Branching node**. Each branch is encoded with one byte for the keycode (KC_A–KC_Z) followed by a link to the child node. Links between nodes are 16-bit byte offsets relative to the beginning of the array, serialized in little endian order.
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ In this typical example, the backlight LEDs are all connected in parallel toward
|
||||
A pulldown resistor is also placed between the gate pin and ground to keep it at a defined state when it is not otherwise being driven by the MCU.
|
||||
The values of these resistors are not critical - see [this Electronics StackExchange question](https://electronics.stackexchange.com/q/68748) for more information.
|
||||
|
||||

|
||||

|
||||
|
||||
## API {#api}
|
||||
|
||||
|
||||
55
docs/features/battery.md
Normal file
55
docs/features/battery.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Battery
|
||||
|
||||
This feature provides the high level abstraction for sampling battery level.
|
||||
|
||||
## Usage
|
||||
|
||||
To use this driver, add the following to your `rules.mk`:
|
||||
|
||||
```make
|
||||
BATTERY_ENABLE = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|--------------------------|--------|--------------------------------------------------|
|
||||
|`BATTERY_SAMPLE_INTERVAL` |`30000` |The time between battery samples in milliseconds. |
|
||||
|
||||
## Driver Configuration {#driver-configuration}
|
||||
|
||||
See the [Battery Driver](../drivers/battery) documentation for more information.
|
||||
|
||||
## Functions
|
||||
|
||||
### `uint8_t battery_get_percent(void)` {#api-battery-get-percent}
|
||||
|
||||
Sample battery level.
|
||||
|
||||
#### Return Value {#api-battery-get-percent-return}
|
||||
|
||||
The battery percentage, in the range 0-100.
|
||||
|
||||
## Callbacks
|
||||
|
||||
### `void battery_percent_changed_user(uint8_t level)` {#api-battery-percent-changed-user}
|
||||
|
||||
User hook called when battery level changed.
|
||||
|
||||
### Arguments {#api-battery-percent-changed-user-arguments}
|
||||
|
||||
- `uint8_t level`
|
||||
The battery percentage, in the range 0-100.
|
||||
|
||||
---
|
||||
|
||||
### `void battery_percent_changed_kb(uint8_t level)` {#api-battery-percent-changed-kb}
|
||||
|
||||
Keyboard hook called when battery level changed.
|
||||
|
||||
### Arguments {#api-battery-percent-changed-kb-arguments}
|
||||
|
||||
- `uint8_t level`
|
||||
The battery percentage, in the range 0-100.
|
||||
@@ -46,7 +46,7 @@ When [handedness](split_keyboard#setting-handedness) is predetermined via option
|
||||
}
|
||||
```
|
||||
|
||||
If you pick the top right key for the right half, it is `R05` on the top layout. Within the key matrix below, `R05` is located on row 4 columnn 4. To use that key as the right half's Bootmagic trigger, add these entries to your `config.h` file:
|
||||
If you pick the top right key for the right half, it is `R05` on the top layout. Within the key matrix below, `R05` is located on row 4 column 4. To use that key as the right half's Bootmagic trigger, add these entries to your `config.h` file:
|
||||
|
||||
```c
|
||||
#define BOOTMAGIC_ROW_RIGHT 4
|
||||
|
||||
@@ -32,12 +32,13 @@ For the details about the internals of the dynamic macros, please read the comme
|
||||
|
||||
There are a number of options added that should allow some additional degree of customization
|
||||
|
||||
|Define |Default |Description |
|
||||
|----------------------------|----------------|-----------------------------------------------------------------------------------------------------------------|
|
||||
|`DYNAMIC_MACRO_SIZE` |128 |Sets the amount of memory that Dynamic Macros can use. This is a limited resource, dependent on the controller. |
|
||||
|`DYNAMIC_MACRO_USER_CALL` |*Not defined* |Defining this falls back to using the user `keymap.c` file to trigger the macro behavior. |
|
||||
|`DYNAMIC_MACRO_NO_NESTING` |*Not Defined* |Defining this disables the ability to call a macro from another macro (nested macros). |
|
||||
|`DYNAMIC_MACRO_DELAY` |*Not Defined* |Sets the waiting time (ms unit) when sending each key. |
|
||||
|Define |Default |Description |
|
||||
|------------------------------------------|----------------|-----------------------------------------------------------------------------------------------------------------|
|
||||
|`DYNAMIC_MACRO_SIZE` |128 |Sets the amount of memory that Dynamic Macros can use. This is a limited resource, dependent on the controller. |
|
||||
|`DYNAMIC_MACRO_USER_CALL` |*Not defined* |Defining this falls back to using the user `keymap.c` file to trigger the macro behavior. |
|
||||
|`DYNAMIC_MACRO_NO_NESTING` |*Not Defined* |Defining this disables the ability to call a macro from another macro (nested macros). |
|
||||
|`DYNAMIC_MACRO_DELAY` |*Not Defined* |Sets the waiting time (ms unit) when sending each key. |
|
||||
|`DYNAMIC_MACRO_KEEP_ORIGINAL_LAYER_STATE` |*Not Defined* |Defining this keeps the layer state when starting to record a macro |
|
||||
|
||||
|
||||
If the LEDs start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by adding the `DYNAMIC_MACRO_SIZE` define in your `config.h` (default value: 128; please read the comments for it in the header).
|
||||
|
||||
@@ -68,7 +68,7 @@ Additionally, if one side does not have an encoder, you can specify `{}` for the
|
||||
```
|
||||
|
||||
::: warning
|
||||
Keep in mind that whenver you change the encoder resolution, you will need to reflash the half that has the encoder affected by the change.
|
||||
Keep in mind that whenever you change the encoder resolution, you will need to reflash the half that has the encoder affected by the change.
|
||||
:::
|
||||
|
||||
## Encoder map {#encoder-map}
|
||||
|
||||
@@ -44,14 +44,14 @@ Not all keycodes below will work depending on which haptic mechanism you have ch
|
||||
|`QK_HAPTIC_MODE_NEXT` |`HF_NEXT`| Go to next DRV2605L waveform |
|
||||
|`QK_HAPTIC_MODE_PREVIOUS` |`HF_PREV`| Go to previous DRV2605L waveform |
|
||||
|`QK_HAPTIC_CONTINUOUS_TOGGLE`|`HF_CONT`| Toggle continuous haptic mode on/off |
|
||||
|`QK_HAPTIC_CONTINUOUS_UP` |`HF_CONU`| Increase DRV2605L continous haptic strength |
|
||||
|`QK_HAPTIC_CONTINUOUS_DOWN` |`HF_COND`| Decrease DRV2605L continous haptic strength |
|
||||
|`QK_HAPTIC_CONTINUOUS_UP` |`HF_CONU`| Increase DRV2605L continuous haptic strength |
|
||||
|`QK_HAPTIC_CONTINUOUS_DOWN` |`HF_COND`| Decrease DRV2605L continuous haptic strength |
|
||||
|`QK_HAPTIC_DWELL_UP` |`HF_DWLU`| Increase Solenoid dwell time |
|
||||
|`QK_HAPTIC_DWELL_DOWN` |`HF_DWLD`| Decrease Solenoid dwell time |
|
||||
|
||||
### Solenoids
|
||||
|
||||
The solenoid code supports relay switches, and similar hardware, as well as solenoids.
|
||||
The solenoid code supports relay switches, and similar hardware, as well as solenoids.
|
||||
|
||||
For a regular solenoid, you will need a build a circuit to drive the solenoid through a mosfet as most MCU will not be able to provide the current needed to drive the coil in the solenoid.
|
||||
|
||||
@@ -75,7 +75,7 @@ For relay switches, the hardware may already contain all of that ciruitry, and j
|
||||
|`SOLENOID_BUZZ_NONACTUATED` | `SOLENOID_MIN_DWELL` |Non-Actuated-time when the switch is in buzz mode. |
|
||||
|
||||
* If solenoid buzz is off, then dwell time is how long the "plunger" stays activated. The dwell time changes how the solenoid sounds.
|
||||
* If solenoid buzz is on, then dwell time sets the length of the buzz, while `SOLENOID_BUZZ_ACTUATED` and `SOLENOID_BUZZ_NONACTUATED` set the (non-)actuation times withing the buzz period.
|
||||
* If solenoid buzz is on, then dwell time sets the length of the buzz, while `SOLENOID_BUZZ_ACTUATED` and `SOLENOID_BUZZ_NONACTUATED` set the (non-)actuation times within the buzz period.
|
||||
* With the current implementation, for any of the above time settings, the precision of these settings may be affected by how fast the keyboard is able to scan the matrix.
|
||||
Therefore, if the keyboards scanning routine is slow, it may be preferable to set `SOLENOID_DWELL_STEP_SIZE` to a value slightly smaller than the time it takes to scan the keyboard.
|
||||
|
||||
@@ -104,7 +104,7 @@ Eccentric Rotating Mass vibration motors (ERM) is motor with a off-set weight at
|
||||
```
|
||||
##### LRA
|
||||
|
||||
Linear resonant actuators (LRA, also know as a linear vibrator) works different from a ERM. A LRA has a weight and magnet suspended by springs and a voice coil. When the drive signal is applied, the weight would be vibrate on a single axis (side to side or up and down). Since the weight is attached to a spring, there is a resonance effect at a specific frequency. This frequency is where the LRA will operate the most efficiently. Refer to the motor's datasheet for the recommanded range for this frequency.
|
||||
Linear resonant actuators (LRA, also know as a linear vibrator) works different from a ERM. A LRA has a weight and magnet suspended by springs and a voice coil. When the drive signal is applied, the weight would be vibrate on a single axis (side to side or up and down). Since the weight is attached to a spring, there is a resonance effect at a specific frequency. This frequency is where the LRA will operate the most efficiently. Refer to the motor's datasheet for the recommended range for this frequency.
|
||||
|
||||
```c
|
||||
#define DRV2605L_FB_ERM_LRA 1
|
||||
@@ -114,18 +114,18 @@ Linear resonant actuators (LRA, also know as a linear vibrator) works different
|
||||
/* Please refer to your datasheet for the optimal setting for your specific motor. */
|
||||
#define DRV2605L_RATED_VOLTAGE 2
|
||||
#define DRV2605L_V_PEAK 2.8
|
||||
#define DRV2605L_V_RMS 2.0
|
||||
#define DRV2605L_V_RMS 2.0
|
||||
#define DRV2605L_V_PEAK 2.1
|
||||
#define DRV2605L_F_LRA 205 /* resonance freq */
|
||||
```
|
||||
|
||||
#### DRV2605L waveform library
|
||||
|
||||
DRV2605L comes with preloaded library of various waveform sequences that can be called and played. If writing a macro, these waveforms can be played using `DRV_pulse(*sequence name or number*)`
|
||||
DRV2605L comes with preloaded library of various waveform sequences that can be called and played. If writing a macro, these waveforms can be played using `drv2605l_pulse(*sequence name or number*)` after adding `#include "drv2605l.h"`.
|
||||
|
||||
List of waveform sequences from the datasheet:
|
||||
|
||||
|seq# | Sequence name |seq# | Sequence name |seq# |Sequence name |
|
||||
|seq# | Sequence name |seq# | Sequence name |seq# |Sequence name |
|
||||
|-----|---------------------|-----|-----------------------------------|-----|--------------------------------------|
|
||||
| 1 | strong_click | 43 | lg_dblclick_med_60 | 85 | transition_rampup_med_smooth2 |
|
||||
| 2 | strong_click_60 | 44 | lg_dblsharp_tick | 86 | transition_rampup_short_smooth1 |
|
||||
|
||||
@@ -14,7 +14,7 @@ You can use key overrides in a similar way to momentary layer/fn keys to activat
|
||||
|
||||
To enable this feature, you need to add `KEY_OVERRIDE_ENABLE = yes` to your `rules.mk`.
|
||||
|
||||
Then, in your `keymap.c` file, you'll need to define the array `key_overrides`, which defines all key overrides to be used. Each override is a value of type `key_override_t`. The array `key_overrides`contains pointers to `key_override_t` values (`const key_override_t **`).
|
||||
Then, in your `keymap.c` file, you'll need to define the `key_overrides` config. See below for more details.
|
||||
|
||||
## Creating Key Overrides {#creating-key-overrides}
|
||||
|
||||
@@ -135,11 +135,11 @@ bool momentary_layer(bool key_down, void *layer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const key_override_t fn_override = {.trigger_mods = MOD_BIT(KC_RGUI) | MOD_BIT(KC_RCTL), //
|
||||
const key_override_t fn_override = {.trigger_mods = MOD_BIT(KC_RGUI) | MOD_BIT(KC_RALT), //
|
||||
.layers = ~(1 << LAYER_FN), //
|
||||
.suppressed_mods = MOD_BIT(KC_RGUI) | MOD_BIT(KC_RCTL), //
|
||||
.suppressed_mods = MOD_BIT(KC_RGUI) | MOD_BIT(KC_RALT), //
|
||||
.options = ko_option_no_unregister_on_other_key_down, //
|
||||
.negative_mod_mask = (uint8_t) ~(MOD_BIT(KC_RGUI) | MOD_BIT(KC_RCTL)), //
|
||||
.negative_mod_mask = (uint8_t) ~(MOD_BIT(KC_RGUI) | MOD_BIT(KC_RALT)), //
|
||||
.custom_action = momentary_layer, //
|
||||
.context = (void *)LAYER_FN, //
|
||||
.trigger = KC_NO, //
|
||||
|
||||
@@ -35,12 +35,12 @@ layer.
|
||||
|
||||
Consider a keymap with the following base layer.
|
||||
|
||||

|
||||

|
||||
|
||||
The highlighted key is a momentary layer switch `MO(NAV)`. Holding it accesses a
|
||||
navigation layer.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
Holding the NAV key is fine for brief use, but awkward to continue holding when
|
||||
|
||||
@@ -88,6 +88,8 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{
|
||||
|`QK_LED_MATRIX_BRIGHTNESS_DOWN`|`LM_BRID`|Decrease the brightness level |
|
||||
|`QK_LED_MATRIX_SPEED_UP` |`LM_SPDU`|Increase the animation speed |
|
||||
|`QK_LED_MATRIX_SPEED_DOWN` |`LM_SPDD`|Decrease the animation speed |
|
||||
|`QK_LED_MATRIX_FLAG_NEXT` |`LM_FLGN`|Cycle through flags |
|
||||
|`QK_LED_MATRIX_FLAG_PREVIOUS` |`LM_FLGP`|Cycle through flags in reverse |
|
||||
|
||||
## LED Matrix Effects {#led-matrix-effects}
|
||||
|
||||
@@ -214,9 +216,30 @@ led_matrix_mode(LED_MATRIX_CUSTOM_my_cool_effect);
|
||||
For inspiration and examples, check out the built-in effects under `quantum/led_matrix/animations/`.
|
||||
|
||||
|
||||
## Naming
|
||||
|
||||
If you wish to be able to use the name of an effect in your code -- say for a display indicator -- then you can enable the function `led_matrix_get_mode_name` in the following manner:
|
||||
|
||||
In your keymap's `config.h`:
|
||||
```c
|
||||
#define LED_MATRIX_MODE_NAME_ENABLE
|
||||
```
|
||||
|
||||
In your `keymap.c`
|
||||
```c
|
||||
const char* effect_name = led_matrix_get_mode_name(led_matrix_get_mode());
|
||||
// do something with `effect_name`, like `oled_write_ln(effect_name, false);`
|
||||
```
|
||||
|
||||
::: info
|
||||
`led_matrix_get_mode_name()` is not enabled by default as it increases the amount of flash memory used by the firmware based on the number of effects enabled.
|
||||
:::
|
||||
|
||||
|
||||
## Additional `config.h` Options {#additional-configh-options}
|
||||
|
||||
```c
|
||||
#define LED_MATRIX_MODE_NAME_ENABLE // enables led_matrix_get_mode_name()
|
||||
#define LED_MATRIX_KEYRELEASES // reactive effects respond to keyreleases (instead of keypresses)
|
||||
#define LED_MATRIX_TIMEOUT 0 // number of milliseconds to wait until led automatically turns off
|
||||
#define LED_MATRIX_SLEEP // turn off effects when suspended
|
||||
@@ -232,6 +255,7 @@ For inspiration and examples, check out the built-in effects under `quantum/led_
|
||||
#define LED_MATRIX_DEFAULT_FLAGS LED_FLAG_ALL // Sets the default LED flags, if none has been set
|
||||
#define LED_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
|
||||
// If reactive effects are enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
|
||||
#define LED_MATRIX_FLAG_STEPS { LED_FLAG_ALL, LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER, LED_FLAG_NONE } // Sets the flags which can be cycled through.
|
||||
```
|
||||
|
||||
## EEPROM storage {#eeprom-storage}
|
||||
@@ -484,6 +508,62 @@ The current effect speed, from 0 to 255.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_set_flags(led_flags_t flags)` {#api-led-matrix-set-flags}
|
||||
|
||||
Set the global effect flags.
|
||||
|
||||
#### Arguments {#api-led-matrix-set-flags-arguments}
|
||||
|
||||
- `led_flags_t flags`
|
||||
The [flags](#flags) value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_set_flags_noeeprom(led_flags_t flags)` {#api-led-matrix-set-flags-noeeprom}
|
||||
|
||||
Set the global effect flags. New state is not written to EEPROM.
|
||||
|
||||
#### Arguments {#api-led-matrix-set-flags-noeeprom-arguments}
|
||||
|
||||
- `led_flags_t flags`
|
||||
The [flags](#flags) value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_flags_step(void)` {#api-led-matrix-flags-step}
|
||||
|
||||
Move to the next flag combination.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_flags_step_noeeprom(void)` {#api-led-matrix-flags-step-noeeprom}
|
||||
|
||||
Move to the next flag combination. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_flags_step_reverse(void)` {#api-led-matrix-flags-step-reverse}
|
||||
|
||||
Move to the previous flag combination.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_flags_step_reverse_noeeprom(void)` {#api-led-matrix-flags-step-reverse-noeeprom}
|
||||
|
||||
Move to the previous flag combination. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `uint8_t led_matrix_get_flags(void)` {#api-led-matrix-get-flags}
|
||||
|
||||
Get the current global effect flags.
|
||||
|
||||
#### Return Value {#api-led-matrix-get-flags-return}
|
||||
|
||||
The current effect [flags](#flags).
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_reload_from_eeprom(void)` {#api-led-matrix-reload-from-eeprom}
|
||||
|
||||
Reload the effect configuration (enabled, mode and brightness) from EEPROM.
|
||||
|
||||
@@ -51,7 +51,7 @@ The ADNS 9800 is an SPI driven optical sensor, that uses laser output for surfac
|
||||
| `ADNS9800_CS_PIN` | (Required) Sets the Chip Select pin connected to the sensor. | `POINTING_DEVICE_CS_PIN` |
|
||||
|
||||
|
||||
The CPI range is 800-8200, in increments of 200. Defaults to 1800 CPI.
|
||||
The CPI range is 800-8200, in increments of 200. Defaults to 1800 CPI.
|
||||
|
||||
### Analog Joystick
|
||||
|
||||
@@ -258,7 +258,7 @@ To use the paw 3204 sensor, add this to your `rules.mk`
|
||||
POINTING_DEVICE_DRIVER = paw3204
|
||||
```
|
||||
|
||||
The paw 3204 sensor uses a serial type protocol for communication, and requires an additional light source.
|
||||
The paw 3204 sensor uses a serial type protocol for communication, and requires an additional light source.
|
||||
|
||||
| Setting (`config.h`) | Description | Default |
|
||||
| -------------------- |--------------------------------------------------------------- | -------------------------- |
|
||||
@@ -267,6 +267,23 @@ The paw 3204 sensor uses a serial type protocol for communication, and requires
|
||||
|
||||
The CPI range is 400-1600, with supported values of (400, 500, 600, 800, 1000, 1200 and 1600). Defaults to 1000 CPI.
|
||||
|
||||
### PAW-3222 Sensor
|
||||
|
||||
To use the PAW-3222 sensor, add this to your `rules.mk`:
|
||||
|
||||
```make
|
||||
POINTING_DEVICE_DRIVER = paw3222
|
||||
```
|
||||
|
||||
The following pins must be defined in `config.h`:
|
||||
|
||||
| Setting (`config.h`) | Description | Default |
|
||||
| --------------------- | ------------------------------------------------------------------ | ---------------------------- |
|
||||
| `PAW3222_CS_PIN` | (Required) The pin connected to the chip select pin of the sensor. | `POINTING_DEVICE_CS_PIN` |
|
||||
| `PAW3222_SPI_DIVISOR` | (Required) The SPI clock divisor. This is dependent on your MCU. | _not defined_ |
|
||||
|
||||
The CPI range is up to 4,000. Defaults to 1,000 CPI.
|
||||
|
||||
### Pimoroni Trackball
|
||||
|
||||
To use the Pimoroni Trackball module, add this to your `rules.mk`:
|
||||
@@ -275,7 +292,7 @@ To use the Pimoroni Trackball module, add this to your `rules.mk`:
|
||||
POINTING_DEVICE_DRIVER = pimoroni_trackball
|
||||
```
|
||||
|
||||
The Pimoroni Trackball module is a I2C based breakout board with an RGB enable trackball.
|
||||
The Pimoroni Trackball module is a I2C based breakout board with an RGB enable trackball.
|
||||
|
||||
| Setting (`config.h`) | Description | Default |
|
||||
| ------------------------------------ | ---------------------------------------------------------------------------------- | ------- |
|
||||
@@ -379,14 +396,14 @@ POINTING_DEVICE_DRIVER = custom
|
||||
Using the custom driver will require implementing the following functions:
|
||||
|
||||
```c
|
||||
void pointing_device_driver_init(void) {}
|
||||
bool pointing_device_driver_init(void) { return true; }
|
||||
report_mouse_t pointing_device_driver_get_report(report_mouse_t mouse_report) { return mouse_report; }
|
||||
uint16_t pointing_device_driver_get_cpi(void) { return 0; }
|
||||
void pointing_device_driver_set_cpi(uint16_t cpi) {}
|
||||
```
|
||||
|
||||
::: warning
|
||||
Ideally, new sensor hardware should be added to `drivers/sensors/` and `quantum/pointing_device_drivers.c`, but there may be cases where it's very specific to the hardware. So these functions are provided, just in case.
|
||||
Ideally, new sensor hardware should be added to `drivers/sensors/` and `quantum/pointing_device_drivers.c`, but there may be cases where it's very specific to the hardware. So these functions are provided, just in case.
|
||||
:::
|
||||
|
||||
## Common Configuration
|
||||
@@ -413,7 +430,7 @@ Ideally, new sensor hardware should be added to `drivers/sensors/` and `quantum/
|
||||
When using `SPLIT_POINTING_ENABLE` the `POINTING_DEVICE_MOTION_PIN` functionality is not supported and `POINTING_DEVICE_TASK_THROTTLE_MS` will default to `1`. Increasing this value will increase transport performance at the cost of possible mouse responsiveness.
|
||||
:::
|
||||
|
||||
The `POINTING_DEVICE_CS_PIN`, `POINTING_DEVICE_SDIO_PIN`, and `POINTING_DEVICE_SCLK_PIN` provide a convenient way to define a single pin that can be used for an interchangeable sensor config. This allows you to have a single config, without defining each device. Each sensor allows for this to be overridden with their own defines.
|
||||
The `POINTING_DEVICE_CS_PIN`, `POINTING_DEVICE_SDIO_PIN`, and `POINTING_DEVICE_SCLK_PIN` provide a convenient way to define a single pin that can be used for an interchangeable sensor config. This allows you to have a single config, without defining each device. Each sensor allows for this to be overridden with their own defines.
|
||||
|
||||
::: warning
|
||||
Any pointing device with a lift/contact status can integrate inertial cursor feature into its driver, controlled by `POINTING_DEVICE_GESTURES_CURSOR_GLIDE_ENABLE`. e.g. PMW3360 can use Lift_Stat from Motion register. Note that `POINTING_DEVICE_MOTION_PIN` cannot be used with this feature; continuous polling of `get_report()` is needed to generate glide reports.
|
||||
@@ -424,7 +441,7 @@ Any pointing device with a lift/contact status can integrate inertial cursor fea
|
||||
| Setting | Description | Default |
|
||||
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------- |
|
||||
| `POINTING_DEVICE_HIRES_SCROLL_ENABLE` | (Optional) Enables high resolution scrolling. | _not defined_ |
|
||||
| `POINTING_DEVICE_HIRES_SCROLL_MULTIPLIER`| (Optional) Resolution mutiplier value used by high resolution scrolling. Must be between 1 and 127, inclusive. | `120` |
|
||||
| `POINTING_DEVICE_HIRES_SCROLL_MULTIPLIER`| (Optional) Resolution multiplier value used by high resolution scrolling. Must be between 1 and 127, inclusive. | `120` |
|
||||
| `POINTING_DEVICE_HIRES_SCROLL_EXPONENT` | (Optional) Resolution exponent value used by high resolution scrolling. Must be between 0 and 127, inclusive. | `0` |
|
||||
|
||||
The `POINTING_DEVICE_HIRES_SCROLL_ENABLE` setting enables smooth and continuous scrolling when using trackballs or high-end encoders as mouse wheels (as opposed to the typical stepped behavior of most mouse wheels).
|
||||
@@ -435,7 +452,7 @@ If even smoother scrolling than provided by this default value is desired, first
|
||||
The function `pointing_device_get_hires_scroll_resolution()` can be called to get the pre-computed resolution multiplier value as a `uint16_t`.
|
||||
|
||||
::: warning
|
||||
High resolution scrolling usually results in larger and/or more frequent mouse reports. This can result in overflow errors and overloading of the host computer's input buffer.
|
||||
High resolution scrolling usually results in larger and/or more frequent mouse reports. This can result in overflow errors and overloading of the host computer's input buffer.
|
||||
To deal with these issues, define `WHEEL_EXTENDED_REPORT` and throttle the rate at which mouse reports are sent.
|
||||
:::
|
||||
|
||||
@@ -465,22 +482,24 @@ If there is a `_RIGHT` configuration option or callback, the [common configurati
|
||||
:::
|
||||
|
||||
|
||||
## Callbacks and Functions
|
||||
## Callbacks and Functions
|
||||
|
||||
| Function | Description |
|
||||
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `pointing_device_init_kb(void)` | Callback to allow for keyboard level initialization. Useful for additional hardware sensors. |
|
||||
| `pointing_device_init_user(void)` | Callback to allow for user level initialization. Useful for additional hardware sensors. |
|
||||
| `pointing_device_task_kb(mouse_report)` | Callback that sends sensor data, so keyboard code can intercept and modify the data. Returns a mouse report. |
|
||||
| `pointing_device_task_user(mouse_report)` | Callback that sends sensor data, so user code can intercept and modify the data. Returns a mouse report. |
|
||||
| `pointing_device_handle_buttons(buttons, pressed, button)` | Callback to handle hardware button presses. Returns a `uint8_t`. |
|
||||
| `pointing_device_get_cpi(void)` | Gets the current CPI/DPI setting from the sensor, if supported. |
|
||||
| `pointing_device_set_cpi(uint16_t)` | Sets the CPI/DPI, if supported. |
|
||||
| `pointing_device_get_report(void)` | Returns the current mouse report (as a `report_mouse_t` data structure). |
|
||||
| `pointing_device_set_report(mouse_report)` | Sets the mouse report to the assigned `report_mouse_t` data structured passed to the function. |
|
||||
| `pointing_device_send(void)` | Sends the current mouse report to the host system. Function can be replaced. |
|
||||
| `has_mouse_report_changed(new_report, old_report)` | Compares the old and new `report_mouse_t` data and returns true only if it has changed. |
|
||||
| `pointing_device_adjust_by_defines(mouse_report)` | Applies rotations and invert configurations to a raw mouse report. |
|
||||
| Function | Description |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `pointing_device_init_kb(void)` | Callback to allow for keyboard level initialization. Useful for additional hardware sensors. |
|
||||
| `pointing_device_init_user(void)` | Callback to allow for user level initialization. Useful for additional hardware sensors. |
|
||||
| `pointing_device_task_kb(mouse_report)` | Callback that sends sensor data, so keyboard code can intercept and modify the data. Returns a mouse report. |
|
||||
| `pointing_device_task_user(mouse_report)` | Callback that sends sensor data, so user code can intercept and modify the data. Returns a mouse report. |
|
||||
| `pointing_device_handle_buttons(buttons, pressed, button)` | Callback to handle hardware button presses. Returns a `uint8_t`. |
|
||||
| `pointing_device_get_cpi(void)` | Gets the current CPI/DPI setting from the sensor, if supported. |
|
||||
| `pointing_device_set_cpi(uint16_t)` | Sets the CPI/DPI, if supported. |
|
||||
| `pointing_device_get_report(void)` | Returns the current mouse report (as a `report_mouse_t` data structure). |
|
||||
| `pointing_device_set_report(mouse_report)` | Sets the mouse report to the assigned `report_mouse_t` data structured passed to the function. |
|
||||
| `pointing_device_send(void)` | Sends the current mouse report to the host system. Function can be replaced. |
|
||||
| `has_mouse_report_changed(new_report, old_report)` | Compares the old and new `report_mouse_t` data and returns true only if it has changed. |
|
||||
| `pointing_device_adjust_by_defines(mouse_report)` | Applies rotations and invert configurations to a raw mouse report. |
|
||||
| `pointing_device_get_status(void)` | Returns device status as `pointing_device_status_t` a good return is `POINTING_DEVICE_STATUS_SUCCESS`. |
|
||||
| `pointing_device_set_status(pointing_device_status_t status)` | Sets device status, anything other than `POINTING_DEVICE_STATUS_SUCCESS` will disable reports from the device.|
|
||||
|
||||
|
||||
## Split Keyboard Callbacks and Functions
|
||||
@@ -511,7 +530,7 @@ To manually manipulate the mouse reports outside of the `pointing_device_task_*`
|
||||
|
||||
* `pointing_device_get_report()` - Returns the current report_mouse_t that represents the information sent to the host computer
|
||||
* `pointing_device_set_report(report_mouse_t mouse_report)` - Overrides and saves the report_mouse_t to be sent to the host computer
|
||||
* `pointing_device_send()` - Sends the mouse report to the host and zeroes out the report.
|
||||
* `pointing_device_send()` - Sends the mouse report to the host and zeroes out the report.
|
||||
|
||||
When the mouse report is sent, the x, y, v, and h values are set to 0 (this is done in `pointing_device_send()`, which can be overridden to avoid this behavior). This way, button states persist, but movement will only occur once. For further customization, both `pointing_device_init` and `pointing_device_task` can be overridden.
|
||||
|
||||
@@ -546,7 +565,7 @@ Recall that the mouse report is set to zero (except the buttons) whenever it is
|
||||
|
||||
### Drag Scroll or Mouse Scroll
|
||||
|
||||
A very common implementation is to use the mouse movement to scroll instead of moving the cursor on the system. This uses the `pointing_device_task_user` callback to intercept and modify the mouse report before it's sent to the host system.
|
||||
A very common implementation is to use the mouse movement to scroll instead of moving the cursor on the system. This uses the `pointing_device_task_user` callback to intercept and modify the mouse report before it's sent to the host system.
|
||||
|
||||
```c
|
||||
enum custom_keycodes {
|
||||
@@ -573,7 +592,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
```
|
||||
|
||||
This allows you to toggle between scrolling and cursor movement by pressing the DRAG_SCROLL key.
|
||||
This allows you to toggle between scrolling and cursor movement by pressing the DRAG_SCROLL key.
|
||||
|
||||
### Advanced Drag Scroll
|
||||
|
||||
@@ -709,7 +728,7 @@ If you are having issues with pointing device drivers debug messages can be enab
|
||||
```c
|
||||
#define POINTING_DEVICE_DEBUG
|
||||
```
|
||||
|
||||
|
||||
::: tip
|
||||
The messages will be printed out to the `CONSOLE` output. For additional information, refer to [Debugging/Troubleshooting QMK](../faq_debug).
|
||||
:::
|
||||
@@ -718,7 +737,7 @@ The messages will be printed out to the `CONSOLE` output. For additional informa
|
||||
---
|
||||
# Automatic Mouse Layer {#pointing-device-auto-mouse}
|
||||
|
||||
When using a pointing device combined with a keyboard the mouse buttons are often kept on a separate layer from the default keyboard layer, which requires pressing or holding a key to change layers before using the mouse. To make this easier and more efficient an additional pointing device feature may be enabled that will automatically activate a target layer as soon as the pointing device is active _(in motion, mouse button pressed etc.)_ and deactivate the target layer after a set time.
|
||||
When using a pointing device combined with a keyboard the mouse buttons are often kept on a separate layer from the default keyboard layer, which requires pressing or holding a key to change layers before using the mouse. To make this easier and more efficient an additional pointing device feature may be enabled that will automatically activate a target layer as soon as the pointing device is active _(in motion, mouse button pressed etc.)_ and deactivate the target layer after a set time.
|
||||
|
||||
Additionally if any key that is defined as a mouse key is pressed then the layer will be held as long as the key is pressed and the timer will be reset on key release. When a non-mouse key is pressed then the layer is deactivated early _(with some exceptions see below)_. Mod, mod tap, and one shot mod keys are ignored _(i.e. don't hold or activate layer but do not deactivate the layer either)_ when sending a modifier keycode _(e.g. hold for mod tap)_ allowing for mod keys to be used with the mouse without activating the target layer when typing.
|
||||
|
||||
@@ -752,8 +771,9 @@ void pointing_device_init_user(void) {
|
||||
}
|
||||
```
|
||||
|
||||
Because the auto mouse feature can be disabled/enabled during runtime and starts as disabled by default it must be enabled by calling `set_auto_mouse_enable(true);` somewhere in firmware before the feature will work.
|
||||
_Note: for setting the target layer during initialization either setting `AUTO_MOUSE_DEFAULT_LAYER` in `config.h` or calling `set_auto_mouse_layer(<mouse_layer>)` can be used._
|
||||
Because the auto mouse feature can be disabled/enabled during runtime and starts as disabled by default it must be enabled by calling `set_auto_mouse_enable(true);` somewhere in firmware before the feature will work.
|
||||
|
||||
_Note: for setting the target layer during initialization either setting `AUTO_MOUSE_DEFAULT_LAYER` in `config.h` or calling `set_auto_mouse_layer(<mouse_layer>)` can be used._
|
||||
|
||||
|
||||
## How to Customize:
|
||||
@@ -772,7 +792,7 @@ There are a few ways to control the auto mouse feature with both `config.h` opti
|
||||
|
||||
### Adding mouse keys
|
||||
|
||||
While all default mouse keys and layer keys(for current mouse layer) are treated as mouse keys, additional Keyrecords can be added to mouse keys by adding them to the is_mouse_record_* stack.
|
||||
While all default mouse keys and layer keys(for current mouse layer) are treated as mouse keys, additional Keyrecords can be added to mouse keys by adding them to the is_mouse_record_* stack.
|
||||
|
||||
#### Callbacks for setting up additional key codes as mouse keys:
|
||||
| Callback | Description |
|
||||
@@ -780,7 +800,7 @@ While all default mouse keys and layer keys(for current mouse layer) are treated
|
||||
| `bool is_mouse_record_kb(uint16_t keycode, keyrecord_t* record)` | keyboard level callback for adding mouse keys |
|
||||
| `bool is_mouse_record_user(uint16_t keycode, keyrecord_t* record)` | user/keymap level callback for adding mouse keys |
|
||||
|
||||
##### To use the callback function to add mouse keys:
|
||||
##### To use the callback function to add mouse keys:
|
||||
|
||||
The following code will cause the enter key and all of the arrow keys to be treated as mouse keys (hold target layer while they are pressed and reset active layer timer).
|
||||
```c
|
||||
@@ -804,7 +824,7 @@ bool is_mouse_record_kb(uint16_t keycode, keyrecord_t* record) {
|
||||
|
||||
There are several functions that allow for more advanced interaction with the auto mouse feature allowing for greater control.
|
||||
|
||||
### Functions to control auto mouse enable and target layer:
|
||||
### Functions to control auto mouse enable and target layer:
|
||||
| Function | Description | Aliases | Return type |
|
||||
| :--------------------------------------------------------- | ------------------------------------------------------------------------------------ | ------------------------- | --------------: |
|
||||
| `set_auto_mouse_enable(bool enable)` | Enable or disable auto mouse (true:enable, false:disable) | | `void`(None) |
|
||||
@@ -823,25 +843,27 @@ There are several functions that allow for more advanced interaction with the au
|
||||
| `get_auto_mouse_key_tracker(void)` | Gets the current count for the auto mouse key tracker. | | `int8_t` |
|
||||
| `set_auto_mouse_key_tracker(int8_t key_tracker)` | Sets/Overrides the current count for the auto mouse key tracker. | | `void`(None) |
|
||||
|
||||
_NOTES:_
|
||||
- _Due to the nature of how some functions work, the `auto_mouse_trigger_reset`, and `auto_mouse_layer_off` functions should never be called in the `layer_state_set_*` stack as this can cause indefinite loops._
|
||||
- _It is recommended that `remove_auto_mouse_layer` is used in the `layer_state_set_*` stack of functions and `auto_mouse_layer_off` is used everywhere else_
|
||||
- _`remove_auto_mouse_layer(state, false)` or `auto_mouse_layer_off()` should be called before any instance of `set_auto_mouse_enabled(false)` or `set_auto_mouse_layer(layer)` to ensure that the target layer will be removed appropriately before disabling auto mouse or changing target to avoid a stuck layer_
|
||||
|
||||
### Functions for handling custom key events:
|
||||
_NOTES:_
|
||||
|
||||
- _Due to the nature of how some functions work, the `auto_mouse_trigger_reset`, and `auto_mouse_layer_off` functions should never be called in the `layer_state_set_*` stack as this can cause indefinite loops._
|
||||
- _It is recommended that `remove_auto_mouse_layer` is used in the `layer_state_set_*` stack of functions and `auto_mouse_layer_off` is used everywhere else_
|
||||
- _`remove_auto_mouse_layer(state, false)` or `auto_mouse_layer_off()` should be called before any instance of `set_auto_mouse_enabled(false)` or `set_auto_mouse_layer(layer)` to ensure that the target layer will be removed appropriately before disabling auto mouse or changing target to avoid a stuck layer_
|
||||
|
||||
### Functions for handling custom key events:
|
||||
| Function | Description | Return type |
|
||||
| :--------------------------------------------------------- | -------------------------------------------------------------------------------- | --------------: |
|
||||
| `auto_mouse_keyevent(bool pressed)` | Auto mouse mouse key event (true: key down, false: key up) | `void`(None) |
|
||||
| `auto_mouse_trigger_reset(bool pressed)` | Reset auto mouse status on key down and start delay timer (non-mouse key event) | `void`(None) |
|
||||
| `auto_mouse_toggle(void)` | Toggle on/off target toggle state (disables layer deactivation when true) | `void`(None) |
|
||||
| `get_auto_mouse_toggle(void)` | Return value of toggling state variable | `bool` |
|
||||
| `get_auto_mouse_toggle(void)` | Return value of toggling state variable | `bool` |
|
||||
|
||||
_NOTE: Generally it would be preferable to use the `is_mouse_record_*` functions to add any additional keys that should act as mouse keys rather than adding `auto_mouse_keyevent(record.event->pressed)` to `process_records_*`_
|
||||
|
||||
### Advanced control examples
|
||||
### Advanced control examples
|
||||
|
||||
#### Disable auto mouse on certain layers:
|
||||
#### Disable auto mouse on certain layers:
|
||||
|
||||
The auto mouse feature can be disabled any time and this can be helpful if you want to disable the auto mouse feature under certain circumstances such as when particular layers are active. One issue however is the handling of the target layer, it needs to be removed appropriately **before** disabling auto mouse _(see notes under control functions above)_. The following function would disable the auto_mouse feature whenever the layers `_LAYER5` through `_LAYER7` are active as the top most layer _(ignoring target layer)_.
|
||||
The auto mouse feature can be disabled any time and this can be helpful if you want to disable the auto mouse feature under certain circumstances such as when particular layers are active. One issue however is the handling of the target layer, it needs to be removed appropriately **before** disabling auto mouse _(see notes under control functions above)_. The following function would disable the auto_mouse feature whenever the layers `_LAYER5` through `_LAYER7` are active as the top most layer _(ignoring target layer)_.
|
||||
|
||||
```c
|
||||
// in keymap.c:
|
||||
@@ -880,7 +902,7 @@ layer_state_t default_layer_state_set_user(layer_state_t state) {
|
||||
auto_mouse_layer_off();
|
||||
set_auto_mouse_layer(_MOUSE_LAYER_2);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
if((AUTO_MOUSE_TARGET_LAYER) == _MOUSE_LAYER_1) break;
|
||||
auto_mouse_layer_off();
|
||||
@@ -890,9 +912,11 @@ layer_state_t default_layer_state_set_user(layer_state_t state) {
|
||||
}
|
||||
```
|
||||
|
||||
### Use custom keys to control auto mouse:
|
||||
Custom key records could also be created that control the auto mouse feature.
|
||||
The code example below would create a custom key that would toggle the auto mouse feature on and off when pressed while also setting a bool that could be used to disable other code that may turn it on such as the layer code above.
|
||||
### Use custom keys to control auto mouse:
|
||||
|
||||
Custom key records could also be created that control the auto mouse feature.
|
||||
|
||||
The code example below would create a custom key that would toggle the auto mouse feature on and off when pressed while also setting a bool that could be used to disable other code that may turn it on such as the layer code above.
|
||||
|
||||
```c
|
||||
// in config.h:
|
||||
@@ -921,11 +945,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t* record) {
|
||||
|
||||
## Customize Target Layer Activation
|
||||
|
||||
Layer activation can be customized by overwriting the `auto_mouse_activation` function. This function is checked every time `pointing_device_task` is called when inactive and every `AUTO_MOUSE_DEBOUNCE` ms when active, and will evaluate pointing device level conditions that trigger target layer activation. When it returns true, the target layer will be activated barring the usual exceptions _(e.g. delay time has not expired)_.
|
||||
Layer activation can be customized by overwriting the `auto_mouse_activation` function. This function is checked every time `pointing_device_task` is called when inactive and every `AUTO_MOUSE_DEBOUNCE` ms when active, and will evaluate pointing device level conditions that trigger target layer activation. When it returns true, the target layer will be activated barring the usual exceptions _(e.g. delay time has not expired)_.
|
||||
|
||||
By default it will return true if any of the `mouse_report` axes `x`,`y`,`h`,`v` are non zero, or if there is any mouse buttons active in `mouse_report`.
|
||||
_Note: The Cirque pinnacle track pad already implements a custom activation function that will activate on touchdown as well as movement all of the default conditions, currently this only works for the master side of split keyboards._
|
||||
|
||||
|
||||
| Function | Description | Return type |
|
||||
| :--------------------------------------------------------- | -------------------------------------------------------------------------------- | --------------: |
|
||||
| `auto_mouse_activation(report_mouse_t mouse_report)` | Overwritable function that controls target layer activation (when true) | `bool` |
|
||||
@@ -937,12 +961,12 @@ When using a custom pointing device (overwriting `pointing_device_task`) the fol
|
||||
```c
|
||||
bool pointing_device_task(void) {
|
||||
//...Custom pointing device task code
|
||||
|
||||
|
||||
// handle automatic mouse layer (needs report_mouse_t as input)
|
||||
pointing_device_task_auto_mouse(local_mouse_report);
|
||||
|
||||
|
||||
//...More custom pointing device task code
|
||||
|
||||
|
||||
return pointing_device_send();
|
||||
}
|
||||
```
|
||||
|
||||
@@ -23,8 +23,11 @@ MODULE 5+ --------+--+--------- PWR CONTROLLER
|
||||
CLK ------+------------ PIN
|
||||
```
|
||||
|
||||
## Driver Configuration {#driver-configuration}
|
||||
|
||||
## Busywait Version {#busywait-version}
|
||||
Driver selection can be configured in `rules.mk` as `PS2_DRIVER`, or in `info.json` as `ps2.driver`. Valid values are `busywait` (default), `interrupt`, `usart`, or `vendor`. See below for information on individual drivers.
|
||||
|
||||
### Busywait Driver {#busywait-driver}
|
||||
|
||||
Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.
|
||||
|
||||
@@ -45,7 +48,7 @@ In your keyboard config.h:
|
||||
#endif
|
||||
```
|
||||
|
||||
### Interrupt Version (AVR/ATMega32u4) {#interrupt-version-avr}
|
||||
### Interrupt Driver (AVR/ATMega32u4) {#interrupt-driver-avr}
|
||||
|
||||
The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data.
|
||||
|
||||
@@ -78,7 +81,7 @@ In your keyboard config.h:
|
||||
#endif
|
||||
```
|
||||
|
||||
### Interrupt Version (ARM chibios) {#interrupt-version-chibios}
|
||||
### Interrupt Driver (ARM chibios) {#interrupt-driver-chibios}
|
||||
|
||||
Pretty much any two pins can be used for the (software) interrupt variant on ARM cores. The example below uses A8 for clock, and A9 for data.
|
||||
|
||||
@@ -107,7 +110,7 @@ And in the ChibiOS specific `halconf.h`:
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
|
||||
### USART Version {#usart-version}
|
||||
### USART Driver {#usart-driver}
|
||||
|
||||
To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. If one of those are unavailable, you need to use interrupt version.
|
||||
|
||||
@@ -159,7 +162,7 @@ In your keyboard config.h:
|
||||
#endif
|
||||
```
|
||||
|
||||
### RP2040 PIO Version {#rp2040-pio-version}
|
||||
### RP2040 PIO Driver {#rp2040-pio-driver}
|
||||
|
||||
The `PIO` subsystem is a Raspberry Pi RP2040 specific implementation, using the integrated PIO peripheral and is therefore only available on this MCU.
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Key after tapping the <kbd>Z</kbd> key types another "`z`." This is useful for
|
||||
typing doubled letters, like the `z` in "`dazzle`": a double tap on <kbd>Z</kbd>
|
||||
can instead be a roll from <kbd>Z</kbd> to <kbd>Repeat</kbd>, which is
|
||||
potentially faster and more comfortable. The Repeat Key is also useful for
|
||||
hotkeys, like repeating Ctrl + Shift + Right Arrow to select by word.
|
||||
hotkeys, like repeating Ctrl + Shift + Right Arrow to select by word.
|
||||
|
||||
Repeat Key remembers mods that were active with the last key press. These mods
|
||||
are combined with any additional mods while pressing the Repeat Key. If the last
|
||||
@@ -49,10 +49,10 @@ reduce firmware size, Alternate Repeat may be disabled by adding in config.h:
|
||||
|
||||
The following alternate keys are defined by default. See
|
||||
`get_alt_repeat_key_keycode_user()` below for how to change or add to these
|
||||
definitions. Where it makes sense, these definitions also include combinations
|
||||
definitions. Where it makes sense, these definitions also include combinations
|
||||
with mods, like Ctrl + Left ↔ Ctrl + Right Arrow.
|
||||
|
||||
**Navigation**
|
||||
**Navigation**
|
||||
|
||||
|Keycodes |Description |
|
||||
|-----------------------------------|-----------------------------------|
|
||||
@@ -65,7 +65,7 @@ with mods, like Ctrl + Left ↔ Ctrl + Right Arrow.
|
||||
|`MS_WHLL` ↔ `MS_WHLR` | Mouse Wheel Left ↔ Right |
|
||||
|`MS_WHLU` ↔ `MS_WHLD` | Mouse Wheel Up ↔ Down |
|
||||
|
||||
**Misc**
|
||||
**Misc**
|
||||
|
||||
|Keycodes |Description |
|
||||
|-----------------------------------|-----------------------------------|
|
||||
@@ -73,7 +73,7 @@ with mods, like Ctrl + Left ↔ Ctrl + Right Arrow.
|
||||
|`KC_LBRC` ↔ `KC_RBRC` | `[` ↔ `]` |
|
||||
|`KC_LCBR` ↔ `KC_RCBR` | `{` ↔ `}` |
|
||||
|
||||
**Media**
|
||||
**Media**
|
||||
|
||||
|Keycodes |Description |
|
||||
|-----------------------------------|-----------------------------------|
|
||||
@@ -176,9 +176,9 @@ macro](../feature_macros). This way macros can be used without having to
|
||||
dedicate keys to them. The following defines a couple shortcuts.
|
||||
|
||||
* Typing <kbd>K</kbd>, <kbd>Alt Repeat</kbd> produces "`keyboard`," with the
|
||||
initial "`k`" typed as usual and the "`eybord`" produced by the macro.
|
||||
initial "`k`" typed as usual and the "`eybord`" produced by the macro.
|
||||
* Typing <kbd>.</kbd>, <kbd>Alt Repeat</kbd> produces "`../`," handy for "up
|
||||
directory" on the shell. Similary, <kbd>.</kbd> types the initial "`.`" and
|
||||
directory" on the shell. Similarly, <kbd>.</kbd> types the initial "`.`" and
|
||||
"`./`" is produced by the macro.
|
||||
|
||||
```c
|
||||
@@ -290,7 +290,7 @@ By default, pressing the Repeat Key will simply behave as if the last key
|
||||
were pressed again. This also works with macro keys with custom handlers,
|
||||
invoking the macro again. In case fine-tuning is needed for sensible repetition,
|
||||
you can handle how a key is repeated with `get_repeat_key_count()` within
|
||||
`process_record_user()`.
|
||||
`process_record_user()`.
|
||||
|
||||
The `get_repeat_key_count()` function returns a signed count of times the key
|
||||
has been repeated or alternate repeated. When a key is pressed as usual,
|
||||
@@ -306,16 +306,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t* record) {
|
||||
if (get_repeat_key_count() > 0) {
|
||||
// MY_MACRO is being repeated!
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("repeat!");
|
||||
SEND_STRING("repeat!");
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
// MY_MACRO is being used normally.
|
||||
if (record->event.pressed) {
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("macro");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
|
||||
// Other macros...
|
||||
}
|
||||
return true;
|
||||
@@ -347,19 +347,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t* record) {
|
||||
case MY_MACRO:
|
||||
if (get_repeat_key_count() > 0) { // Repeating.
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("repeat!");
|
||||
SEND_STRING("repeat!");
|
||||
}
|
||||
} else if (get_repeat_key_count() < 0) { // Alternate repeating.
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("alt repeat!");
|
||||
}
|
||||
} else { // Used normally.
|
||||
if (record->event.pressed) {
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("macro");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
|
||||
// Other macros...
|
||||
}
|
||||
return true;
|
||||
@@ -377,7 +377,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t* record) {
|
||||
| `set_last_mods(mods)` | Set the mods to apply when repeating. |
|
||||
| `get_repeat_key_count()` | Signed count of times the key has been repeated or alternate repeated. |
|
||||
| `get_alt_repeat_key_keycode()` | Keycode to be used for alternate repeating. |
|
||||
|
||||
|
||||
|
||||
## Additional "Alternate" keys
|
||||
|
||||
@@ -437,7 +437,7 @@ static void process_altrep3(uint16_t keycode, uint8_t mods) {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t* record) {
|
||||
switch (keycode) {
|
||||
case ALTREP2:
|
||||
case ALTREP2:
|
||||
if (record->event.pressed) {
|
||||
process_altrep2(get_last_keycode(), get_last_mods());
|
||||
}
|
||||
|
||||
@@ -96,6 +96,8 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{
|
||||
|`QK_RGB_MATRIX_VALUE_DOWN` |`RM_VALD`|Decrease the brightness level |
|
||||
|`QK_RGB_MATRIX_SPEED_UP` |`RM_SPDU`|Increase the animation speed |
|
||||
|`QK_RGB_MATRIX_SPEED_DOWN` |`RM_SPDD`|Decrease the animation speed |
|
||||
|`QK_RGB_MATRIX_FLAG_NEXT` |`RM_FLGN`|Cycle through flags |
|
||||
|`QK_RGB_MATRIX_FLAG_PREVIOUS` |`RM_FLGP`|Cycle through flags in reverse |
|
||||
|
||||
## RGB Matrix Effects {#rgb-matrix-effects}
|
||||
|
||||
@@ -125,13 +127,13 @@ enum rgb_matrix_effects {
|
||||
RGB_MATRIX_CYCLE_SPIRAL, // Full gradient spinning spiral around center of keyboard
|
||||
RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
|
||||
RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard
|
||||
RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard
|
||||
RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halves of keyboard
|
||||
RGB_MATRIX_FLOWER_BLOOMING, // Full tighter gradient of first half scrolling left to right and second half scrolling right to left
|
||||
RGB_MATRIX_RAINDROPS, // Randomly changes a single key's hue
|
||||
RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation
|
||||
RGB_MATRIX_HUE_BREATHING, // Hue shifts up a slight ammount at the same time, then shifts back
|
||||
RGB_MATRIX_HUE_PENDULUM, // Hue shifts up a slight ammount in a wave to the right, then back to the left
|
||||
RGB_MATRIX_HUE_WAVE, // Hue shifts up a slight ammount and then back down in a wave to the right
|
||||
RGB_MATRIX_HUE_BREATHING, // Hue shifts up a slight amount at the same time, then shifts back
|
||||
RGB_MATRIX_HUE_PENDULUM, // Hue shifts up a slight amount in a wave to the right, then back to the left
|
||||
RGB_MATRIX_HUE_WAVE, // Hue shifts up a slight amount and then back down in a wave to the right
|
||||
RGB_MATRIX_PIXEL_FRACTAL, // Single hue fractal filled keys pulsing horizontally out to edges
|
||||
RGB_MATRIX_PIXEL_FLOW, // Pulsing RGB flow along LED wiring with random hues
|
||||
RGB_MATRIX_PIXEL_RAIN, // Randomly light keys with random hues
|
||||
@@ -240,7 +242,7 @@ In order to change the delay of temperature decrease define `RGB_MATRIX_TYPING_H
|
||||
|
||||
As heatmap uses the physical position of the leds set in the g_led_config, you may need to tweak the following options to get the best effect for your keyboard. Note the size of this grid is `224x64`.
|
||||
|
||||
Limit the distance the effect spreads to surrounding keys.
|
||||
Limit the distance the effect spreads to surrounding keys.
|
||||
|
||||
```c
|
||||
#define RGB_MATRIX_TYPING_HEATMAP_SPREAD 40
|
||||
@@ -365,9 +367,30 @@ These are shorthands to popular colors. The `RGB` ones can be passed to the `set
|
||||
These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/color.h). Feel free to add to this list!
|
||||
|
||||
|
||||
## Naming
|
||||
|
||||
If you wish to be able to use the name of an effect in your code -- say for a display indicator -- then you can enable the function `rgb_matrix_get_mode_name` in the following manner:
|
||||
|
||||
In your keymap's `config.h`:
|
||||
```c
|
||||
#define RGB_MATRIX_MODE_NAME_ENABLE
|
||||
```
|
||||
|
||||
In your `keymap.c`
|
||||
```c
|
||||
const char* effect_name = rgb_matrix_get_mode_name(rgb_matrix_get_mode());
|
||||
// do something with `effect_name`, like `oled_write_ln(effect_name, false);`
|
||||
```
|
||||
|
||||
::: info
|
||||
`rgb_matrix_get_mode_name()` is not enabled by default as it increases the amount of flash memory used by the firmware based on the number of effects enabled.
|
||||
:::
|
||||
|
||||
|
||||
## Additional `config.h` Options {#additional-configh-options}
|
||||
|
||||
```c
|
||||
#define RGB_MATRIX_MODE_NAME_ENABLE // enables rgb_matrix_get_mode_name()
|
||||
#define RGB_MATRIX_KEYRELEASES // reactive effects respond to keyreleases (instead of keypresses)
|
||||
#define RGB_MATRIX_TIMEOUT 0 // number of milliseconds to wait until rgb automatically turns off
|
||||
#define RGB_MATRIX_SLEEP // turn off effects when suspended
|
||||
@@ -385,9 +408,10 @@ These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master
|
||||
#define RGB_MATRIX_VAL_STEP 16 // The value by which to increment the brightness per adjustment action
|
||||
#define RGB_MATRIX_SPD_STEP 16 // The value by which to increment the animation speed per adjustment action
|
||||
#define RGB_MATRIX_DEFAULT_FLAGS LED_FLAG_ALL // Sets the default LED flags, if none has been set
|
||||
#define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
|
||||
// If reactive effects are enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
|
||||
#define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
|
||||
// If reactive effects are enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
|
||||
#define RGB_TRIGGER_ON_KEYDOWN // Triggers RGB keypress events on key down. This makes RGB control feel more responsive. This may cause RGB to not function properly on some boards
|
||||
#define RGB_MATRIX_FLAG_STEPS { LED_FLAG_ALL, LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER, LED_FLAG_UNDERGLOW, LED_FLAG_NONE } // Sets the flags which can be cycled through.
|
||||
```
|
||||
|
||||
## EEPROM storage {#eeprom-storage}
|
||||
@@ -486,7 +510,7 @@ This example sets the modifiers to be a specific color based on the layer state.
|
||||
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
||||
hsv_t hsv = {0, 255, 255};
|
||||
|
||||
if (layer_state_is(layer_state, 2)) {
|
||||
if (get_highest_layer(layer_state|default_layer_state) == 2) {
|
||||
hsv = (hsv_t){130, 255, 255};
|
||||
} else {
|
||||
hsv = (hsv_t){30, 255, 255};
|
||||
@@ -831,6 +855,62 @@ The current effect speed, from 0 to 255.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_set_flags(led_flags_t flags)` {#api-rgb-matrix-set-flags}
|
||||
|
||||
Set the global effect flags.
|
||||
|
||||
#### Arguments {#api-rgb-matrix-set-flags-arguments}
|
||||
|
||||
- `led_flags_t flags`
|
||||
The [flags](#flags) value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_set_flags_noeeprom(led_flags_t flags)` {#api-rgb-matrix-set-flags-noeeprom}
|
||||
|
||||
Set the global effect flags. New state is not written to EEPROM.
|
||||
|
||||
#### Arguments {#api-rgb-matrix-set-flags-noeeprom-arguments}
|
||||
|
||||
- `led_flags_t flags`
|
||||
The [flags](#flags) value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_flags_step(void)` {#api-rgb-matrix-flags-step}
|
||||
|
||||
Move to the next flag combination.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_flags_step_noeeprom(void)` {#api-rgb-matrix-flags-step-noeeprom}
|
||||
|
||||
Move to the next flag combination. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_flags_step_reverse(void)` {#api-rgb-matrix-flags-step-reverse}
|
||||
|
||||
Move to the previous flag combination.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_flags_step_reverse_noeeprom(void)` {#api-rgb-matrix-flags-step-reverse-noeeprom}
|
||||
|
||||
Move to the previous flag combination. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `uint8_t rgb_matrix_get_flags(void)` {#api-rgb-matrix-get-flags}
|
||||
|
||||
Get the current global effect flags.
|
||||
|
||||
#### Return Value {#api-rgb-matrix-get-flags-return}
|
||||
|
||||
The current effect [flags](#flags).
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_sethsv(uint8_t h, uint8_t s, uint8_t v)` {#api-rgb-matrix-sethsv}
|
||||
|
||||
Set the global effect hue, saturation, and value (brightness).
|
||||
|
||||
@@ -55,7 +55,7 @@ Changing the **Hue** cycles around the circle.<br>
|
||||
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.<br>
|
||||
Changing the **Value** sets the overall brightness.<br>
|
||||
|
||||

|
||||

|
||||
|
||||
## Keycodes
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ COMMAND_ENABLE = no
|
||||
|
||||
## Configuration
|
||||
|
||||
By default Space Cadet assumes a US ANSI layout, but if your layout uses different keys for parentheses, you can redefine them in your `config.h`. In addition, you can redefine the modifier to send on tap, or even send no modifier at all. The new configuration defines bundle all options up into a single define of 3 key codes in this order: the `Modifier` when held or when used with other keys, the `Tap Modifer` sent when tapped (no modifier if `KC_TRNS`), finally the `Keycode` sent when tapped. Now keep in mind, mods from other keys will still apply to the `Keycode` if say `KC_RSFT` is held while tapping `SC_LSPO` key with `KC_TRNS` as the `Tap Modifer`.
|
||||
By default Space Cadet assumes a US ANSI layout, but if your layout uses different keys for parentheses, you can redefine them in your `config.h`. In addition, you can redefine the modifier to send on tap, or even send no modifier at all. The new configuration defines bundle all options up into a single define of 3 key codes in this order: the `Modifier` when held or when used with other keys, the `Tap Modifier` sent when tapped (no modifier if `KC_TRNS`), finally the `Keycode` sent when tapped. Now keep in mind, mods from other keys will still apply to the `Keycode` if say `KC_RSFT` is held while tapping `SC_LSPO` key with `KC_TRNS` as the `Tap Modifier`.
|
||||
|
||||
|Define |Default |Description |
|
||||
|----------------|-------------------------------|---------------------------------------------------------------------------------|
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# Split Keyboard
|
||||
# Split Keyboard
|
||||
|
||||
Many keyboards in the QMK Firmware repo are "split" keyboards. They use two controllers—one plugging into USB, and the second connected by a serial or an I<sup>2</sup>C connection over a TRRS or similar cable.
|
||||
Many keyboards in the QMK Firmware repo are "split" keyboards. They use two controllers—one plugging into USB, and the second connected by a serial or an I<sup>2</sup>C connection over a TRRS or similar cable.
|
||||
|
||||
Split keyboards can have a lot of benefits, but there is some additional work needed to get them enabled.
|
||||
Split keyboards can have a lot of benefits, but there is some additional work needed to get them enabled.
|
||||
|
||||
QMK Firmware has a generic implementation that is usable by any board, as well as numerous board specific implementations.
|
||||
QMK Firmware has a generic implementation that is usable by any board, as well as numerous board specific implementations.
|
||||
|
||||
For this, we will mostly be talking about the generic implementation used by the Let's Split and other keyboards.
|
||||
For this, we will mostly be talking about the generic implementation used by the Let's Split and other keyboards.
|
||||
|
||||
::: warning
|
||||
ARM split supports most QMK subsystems when using the 'serial' and 'serial_usart' drivers. I2C slave is currently unsupported.
|
||||
@@ -29,33 +29,33 @@ Notes:
|
||||
|
||||
## Hardware Configuration
|
||||
|
||||
This assumes that you're using two Pro Micro-compatible controllers, and are using TRRS jacks to connect to two halves.
|
||||
This assumes that you're using two Pro Micro-compatible controllers, and are using TRRS jacks to connect to two halves.
|
||||
|
||||
### Required Hardware
|
||||
|
||||
Apart from diodes and key switches for the keyboard matrix in each half, you will need 2x TRRS sockets and 1x TRRS cable.
|
||||
|
||||
Alternatively, you can use any sort of cable and socket that has at least 3 wires.
|
||||
Alternatively, you can use any sort of cable and socket that has at least 3 wires.
|
||||
|
||||
If you want to use I<sup>2</sup>C to communicate between halves, you will need a cable with at least 4 wires and 2x 4.7kΩ pull-up resistors.
|
||||
|
||||
#### Considerations
|
||||
#### Considerations
|
||||
|
||||
The most commonly used connection is a TRRS cable and jacks. These provide 4 wires, making them very useful for split keyboards, and are easy to find.
|
||||
The most commonly used connection is a TRRS cable and jacks. These provide 4 wires, making them very useful for split keyboards, and are easy to find.
|
||||
|
||||
However, since one of the wires carries VCC, this means that the boards are not hot pluggable. You should always disconnect the board from USB before unplugging and plugging in TRRS cables, or you can short the controller, or worse.
|
||||
However, since one of the wires carries VCC, this means that the boards are not hot pluggable. You should always disconnect the board from USB before unplugging and plugging in TRRS cables, or you can short the controller, or worse.
|
||||
|
||||
Another option is to use phone cables (as in, old school RJ-11/RJ-14 cables). Make sure that you use one that actually supports 4 wires/lanes.
|
||||
Another option is to use phone cables (as in, old school RJ-11/RJ-14 cables). Make sure that you use one that actually supports 4 wires/lanes.
|
||||
|
||||
However, USB cables, SATA cables, and even just 4 wires have been known to be used for communication between the controllers.
|
||||
However, USB cables, SATA cables, and even just 4 wires have been known to be used for communication between the controllers.
|
||||
|
||||
::: warning
|
||||
Using USB cables for communication between the controllers works just fine, but the connector could be mistaken for a normal USB connection and potentially short out the keyboard, depending on how it's wired. For this reason, they are not recommended for connecting split keyboards.
|
||||
Using USB cables for communication between the controllers works just fine, but the connector could be mistaken for a normal USB connection and potentially short out the keyboard, depending on how it's wired. For this reason, they are not recommended for connecting split keyboards.
|
||||
:::
|
||||
|
||||
### Serial Wiring
|
||||
|
||||
The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and D0/D1/D2/D3 (aka PD0/PD1/PD2/PD3) between the two Pro Micros.
|
||||
The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and D0/D1/D2/D3 (aka PD0/PD1/PD2/PD3) between the two Pro Micros.
|
||||
|
||||
::: tip
|
||||
Note that the pin used here is actually set by `SOFT_SERIAL_PIN` below.
|
||||
@@ -66,7 +66,7 @@ Note that the pin used here is actually set by `SOFT_SERIAL_PIN` below.
|
||||
|
||||
### I<sup>2</sup>C Wiring
|
||||
|
||||
The 4 wires of the TRRS cable need to connect GND, VCC, and SCL and SDA (aka PD0/pin 3 and PD1/pin 2, respectively) between the two Pro Micros.
|
||||
The 4 wires of the TRRS cable need to connect GND, VCC, and SCL and SDA (aka PD0/pin 3 and PD1/pin 2, respectively) between the two Pro Micros.
|
||||
|
||||
The pull-up resistors may be placed on either half. If you wish to use the halves independently, it is also possible to use 4 resistors and have the pull-ups in both halves.
|
||||
Note that the total resistance for the connected system should be within spec at 2.2k-10kOhm, with an 'ideal' at 4.7kOhm, regardless of the placement and number.
|
||||
@@ -75,13 +75,13 @@ Note that the total resistance for the connected system should be within spec at
|
||||
|
||||
## Firmware Configuration
|
||||
|
||||
To enable the split keyboard feature, add the following to your `rules.mk`:
|
||||
To enable the split keyboard feature, add the following to your `rules.mk`:
|
||||
|
||||
```make
|
||||
SPLIT_KEYBOARD = yes
|
||||
```
|
||||
|
||||
If you're using a custom transport (communication method), then you will also need to add:
|
||||
If you're using a custom transport (communication method), then you will also need to add:
|
||||
|
||||
```make
|
||||
SPLIT_TRANSPORT = custom
|
||||
@@ -91,11 +91,11 @@ SPLIT_TRANSPORT = custom
|
||||
|
||||
Configuring your layout in a split keyboard works slightly differently to a non-split keyboard. Take for example the following layout. The top left numbers refer to the matrix row and column, and the bottom right are the order of the keys in the layout:
|
||||
|
||||

|
||||

|
||||
|
||||
Since the matrix scanning procedure operates on entire rows, it first populates the left half's rows, then the right half's. Thus, the matrix as QMK views it has double the rows instead of double the columns:
|
||||
|
||||

|
||||

|
||||
|
||||
### Setting Handedness
|
||||
|
||||
@@ -109,7 +109,7 @@ You can configure the firmware to read a pin on the controller to determine hand
|
||||
#define SPLIT_HAND_PIN B7
|
||||
```
|
||||
|
||||
This will read the specified pin. By default, if it's high, then the controller assumes it is the left hand, and if it's low, it's assumed to be the right side.
|
||||
This will read the specified pin. By default, if it's high, then the controller assumes it is the left hand, and if it's low, it's assumed to be the right side.
|
||||
|
||||
This behaviour can be flipped by adding this to you `config.h` file:
|
||||
|
||||
@@ -141,10 +141,10 @@ While `MATRIX_MASKED` isn't necessary to use `SPLIT_HAND_MATRIX_GRID` successful
|
||||
|
||||
#### Handedness by EEPROM
|
||||
|
||||
This method sets the keyboard's handedness by setting a flag in the persistent storage (`EEPROM`). This is checked when the controller first starts up, and determines what half the keyboard is, and how to orient the keyboard layout.
|
||||
This method sets the keyboard's handedness by setting a flag in the persistent storage (`EEPROM`). This is checked when the controller first starts up, and determines what half the keyboard is, and how to orient the keyboard layout.
|
||||
|
||||
|
||||
To enable this method, add the following to your `config.h` file:
|
||||
To enable this method, add the following to your `config.h` file:
|
||||
|
||||
```c
|
||||
#define EE_HANDS
|
||||
@@ -176,7 +176,7 @@ Some controllers (e.g. Blackpill with DFU compatible bootloader) will need to be
|
||||
[QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases/) can also be used to flash EEPROM handedness files. Place the controller in bootloader mode and select menu option Tools -> EEPROM -> Set Left/Right Hand
|
||||
:::
|
||||
|
||||
This setting is not changed when re-initializing the EEPROM using the `EE_CLR` key, or using the `eeconfig_init()` function. However, if you reset the EEPROM outside of the firmware's built in options (such as flashing a file that overwrites the `EEPROM`, like how the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases/)'s "Reset EEPROM" button works), you'll need to re-flash the controller with the `EEPROM` files.
|
||||
This setting is not changed when re-initializing the EEPROM using the `EE_CLR` key, or using the `eeconfig_init()` function. However, if you reset the EEPROM outside of the firmware's built in options (such as flashing a file that overwrites the `EEPROM`, like how the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases/)'s "Reset EEPROM" button works), you'll need to re-flash the controller with the `EEPROM` files.
|
||||
|
||||
You can find the `EEPROM` files in the QMK firmware repo, [here](https://github.com/qmk/qmk_firmware/tree/master/quantum/split_common).
|
||||
|
||||
@@ -208,13 +208,13 @@ Because not every split keyboard is identical, there are a number of additional
|
||||
#define USE_I2C
|
||||
```
|
||||
|
||||
This configures the use of I<sup>2</sup>C support for split keyboard transport (AVR only).
|
||||
This configures the use of I<sup>2</sup>C support for split keyboard transport (AVR only).
|
||||
|
||||
```c
|
||||
#define SOFT_SERIAL_PIN D0
|
||||
```
|
||||
|
||||
This sets the pin to be used for serial communication. If you're not using serial, you shouldn't need to define this.
|
||||
This sets the pin to be used for serial communication. If you're not using serial, you shouldn't need to define this.
|
||||
|
||||
However, if you are using serial and I<sup>2</sup>C on the board, you will need to set this, and to something other than D0 and D1 (as these are used for I<sup>2</sup>C communication).
|
||||
|
||||
@@ -235,7 +235,7 @@ If you're having issues with serial communication, you can change this value, as
|
||||
#define FORCED_SYNC_THROTTLE_MS 100
|
||||
```
|
||||
|
||||
This sets the maximum number of milliseconds before forcing a synchronization of data from master to slave. Under normal circumstances this sync occurs whenever the data _changes_, for safety a data transfer occurs after this number of milliseconds if no change has been detected since the last sync.
|
||||
This sets the maximum number of milliseconds before forcing a synchronization of data from master to slave. Under normal circumstances this sync occurs whenever the data _changes_, for safety a data transfer occurs after this number of milliseconds if no change has been detected since the last sync.
|
||||
|
||||
```c
|
||||
#define SPLIT_MAX_CONNECTION_ERRORS 10
|
||||
@@ -249,7 +249,7 @@ Set to 0 to disable the disconnection check altogether.
|
||||
```
|
||||
How long (in milliseconds) the master part should block all connection attempts to the slave after the communication has been flagged as disconnected (see `SPLIT_MAX_CONNECTION_ERRORS` above).
|
||||
|
||||
One communication attempt will be allowed everytime this amount of time has passed since the last attempt. If that attempt succeeds, the communication is seen as working again.
|
||||
One communication attempt will be allowed every time this amount of time has passed since the last attempt. If that attempt succeeds, the communication is seen as working again.
|
||||
|
||||
Set to 0 to disable this throttling of communications while disconnected. This can save you a couple of bytes of firmware size.
|
||||
|
||||
@@ -280,7 +280,7 @@ This enables syncing of the Host LED status (caps lock, num lock, etc) between b
|
||||
#define SPLIT_MODS_ENABLE
|
||||
```
|
||||
|
||||
This enables transmitting modifier state (normal, weak, oneshot and oneshot locked) to the non primary side of the split keyboard. The purpose of this feature is to support cosmetic use of modifer state (e.g. displaying status on an OLED screen).
|
||||
This enables transmitting modifier state (normal, weak, oneshot and oneshot locked) to the non primary side of the split keyboard. The purpose of this feature is to support cosmetic use of modifier state (e.g. displaying status on an OLED screen).
|
||||
|
||||
```c
|
||||
#define SPLIT_WPM_ENABLE
|
||||
@@ -304,7 +304,7 @@ This enables transmitting the current ST7565 on/off status to the slave side of
|
||||
#define SPLIT_POINTING_ENABLE
|
||||
```
|
||||
|
||||
This enables transmitting the pointing device status to the master side of the split keyboard. The purpose of this feature is to enable use pointing devices on the slave side.
|
||||
This enables transmitting the pointing device status to the master side of the split keyboard. The purpose of this feature is to enable use pointing devices on the slave side.
|
||||
|
||||
::: warning
|
||||
There is additional required configuration for `SPLIT_POINTING_ENABLE` outlined in the [pointing device documentation](pointing_device#split-keyboard-configuration).
|
||||
@@ -401,7 +401,7 @@ By default, the inbound and outbound data is limited to a maximum of 32 bytes ea
|
||||
|
||||
### Hardware Configuration Options
|
||||
|
||||
There are some settings that you may need to configure, based on how the hardware is set up.
|
||||
There are some settings that you may need to configure, based on how the hardware is set up.
|
||||
|
||||
```c
|
||||
#define MATRIX_ROW_PINS_RIGHT { <row pins> }
|
||||
@@ -433,7 +433,7 @@ This option enables synchronization of the RGB Light modes between the controlle
|
||||
#define RGBLED_SPLIT { 6, 6 }
|
||||
```
|
||||
|
||||
This sets how many LEDs are directly connected to each controller. The first number is the left side, and the second number is the right side.
|
||||
This sets how many LEDs are directly connected to each controller. The first number is the left side, and the second number is the right side.
|
||||
|
||||
::: tip
|
||||
This setting implies that `RGBLIGHT_SPLIT` is enabled, and will forcibly enable it, if it's not.
|
||||
@@ -479,7 +479,7 @@ This set the maximum slave timeout when waiting for communication from master wh
|
||||
|
||||
Master/slave delegation is made either by detecting voltage on VBUS connection or waiting for USB communication (`SPLIT_USB_DETECT`). Pro Micro boards can use VBUS detection out of the box and be used with or without `SPLIT_USB_DETECT`.
|
||||
|
||||
Many ARM boards, but not all, do not support VBUS detection. Because it is common that ARM boards lack VBUS detection, `SPLIT_USB_DETECT` is automatically defined on ARM targets (technically when ChibiOS is targetted).
|
||||
Many ARM boards, but not all, do not support VBUS detection. Because it is common that ARM boards lack VBUS detection, `SPLIT_USB_DETECT` is automatically defined on ARM targets (technically when ChibiOS is targeted).
|
||||
|
||||
### Teensy boards
|
||||
|
||||
@@ -497,11 +497,11 @@ Once you have done that, you will want to solder the diode from the 5V pad to th
|
||||
|
||||
You may need to use the 5V pad from the regulator block above as the pads were too small and placed too closely together to place the Schottky diode properly.
|
||||
|
||||

|
||||

|
||||
|
||||
## Additional Resources
|
||||
|
||||
Nicinabox has a [very nice and detailed guide](https://github.com/nicinabox/lets-split-guide) for the Let's Split keyboard, that covers most everything you need to know, including troubleshooting information.
|
||||
Nicinabox has a [very nice and detailed guide](https://github.com/nicinabox/lets-split-guide) for the Let's Split keyboard, that covers most everything you need to know, including troubleshooting information.
|
||||
|
||||
However, the RGB Light section is out of date, as it was written long before the RGB Split code was added to QMK Firmware. Instead, wire each strip up directly to the controller.
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user