mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-08 05:49:28 +00:00
Compare commits
1290 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d684b8cafe | ||
![]() |
39c8ed32b4 | ||
![]() |
5073dc33e9 | ||
![]() |
21aa7890cb | ||
![]() |
4dda716712 | ||
![]() |
9975e17712 | ||
![]() |
9dcd03b6ca | ||
![]() |
e0acd3e53d | ||
![]() |
c277ae4768 | ||
![]() |
b52b8f1d23 | ||
![]() |
b7ef959400 | ||
![]() |
17e6e04600 | ||
![]() |
a0ed583b75 | ||
![]() |
093a89c534 | ||
![]() |
c1bd8eed76 | ||
![]() |
9dffd35762 | ||
![]() |
b10728edc1 | ||
![]() |
94e80912a4 | ||
![]() |
7b666245d6 | ||
![]() |
23631de191 | ||
![]() |
0374e4c733 | ||
![]() |
add10524d6 | ||
![]() |
7aab06ffdf | ||
![]() |
ab6128e86d | ||
![]() |
8128c5f822 | ||
![]() |
770a3349be | ||
![]() |
c7c9f3e3cf | ||
![]() |
e660dcff09 | ||
![]() |
6eb18a6ccb | ||
![]() |
af91221ddb | ||
![]() |
261d94ce34 | ||
![]() |
a0cc2dc6d0 | ||
![]() |
597d2e0e7b | ||
![]() |
35dbe8ba03 | ||
![]() |
93496c8364 | ||
![]() |
5a06813b10 | ||
![]() |
6bafefa886 | ||
![]() |
1a3064afb1 | ||
![]() |
2b8f1fcdfb | ||
![]() |
7b055dcc55 | ||
![]() |
fc9a2167b1 | ||
![]() |
3aca3d3572 | ||
![]() |
305cca9a5e | ||
![]() |
1646c0f26c | ||
![]() |
f55e39e8a2 | ||
![]() |
84883d3400 | ||
![]() |
147cf8afbb | ||
![]() |
9da95bc3ab | ||
![]() |
088c71b4ea | ||
![]() |
7e14f85dd5 | ||
![]() |
0e53917471 | ||
![]() |
446ef4a676 | ||
![]() |
1f86c3ac96 | ||
![]() |
6750733cda | ||
![]() |
975e42ed3c | ||
![]() |
712d53c953 | ||
![]() |
2ca7a8677a | ||
![]() |
722b1d655d | ||
![]() |
e7d68c500b | ||
![]() |
5962f05f56 | ||
![]() |
3a6188fc55 | ||
![]() |
7cd9edab99 | ||
![]() |
0399271a73 | ||
![]() |
8ba537fa23 | ||
![]() |
0211e30032 | ||
![]() |
aa97f52963 | ||
![]() |
bc67ca6a59 | ||
![]() |
bbe453599f | ||
![]() |
5eb48994ad | ||
![]() |
d5a94b58d2 | ||
![]() |
e17a6c4f8d | ||
![]() |
3328aefd8e | ||
![]() |
f173963d95 | ||
![]() |
60da67fbd2 | ||
![]() |
1bb7905f78 | ||
![]() |
1a7c1c0036 | ||
![]() |
6152861356 | ||
![]() |
8feb767994 | ||
![]() |
d14f1ab7ff | ||
![]() |
0be53004b3 | ||
![]() |
d425fcc8b1 | ||
![]() |
10f8a6d983 | ||
![]() |
40f235a96c | ||
![]() |
e961e34c7f | ||
![]() |
db1eacdaac | ||
![]() |
a9aec546c8 | ||
![]() |
3023015c5b | ||
![]() |
1c81e69503 | ||
![]() |
d86a97a089 | ||
![]() |
4dd5f45b6c | ||
![]() |
22e9a0bd01 | ||
![]() |
3bee24a827 | ||
![]() |
f7c6d68b34 | ||
![]() |
1d3f775051 | ||
![]() |
6d1f059868 | ||
![]() |
3e1fa8cd31 | ||
![]() |
29e35d83b7 | ||
![]() |
526fbf0faf | ||
![]() |
a5d7e83985 | ||
![]() |
173aed3d0e | ||
![]() |
36ba4806b1 | ||
![]() |
0876bdf1a3 | ||
![]() |
4c13de9b45 | ||
![]() |
1e5962adbf | ||
![]() |
430cd6dbc2 | ||
![]() |
7ca4608427 | ||
![]() |
3efaa5ba7c | ||
![]() |
60cf7ae8b7 | ||
![]() |
cc77710b4a | ||
![]() |
f9a395e265 | ||
![]() |
b057194568 | ||
![]() |
83be6ba472 | ||
![]() |
9107c382f3 | ||
![]() |
495d47b7d2 | ||
![]() |
9c68e27ace | ||
![]() |
02e1912371 | ||
![]() |
1d50693e1b | ||
![]() |
937f5fe740 | ||
![]() |
cae4911ca8 | ||
![]() |
3d6d4bd949 | ||
![]() |
5195f97d35 | ||
![]() |
7262d5cc93 | ||
![]() |
ba66b63fe5 | ||
![]() |
eddd6aa113 | ||
![]() |
b2a63b42a5 | ||
![]() |
8f4603dd73 | ||
![]() |
bfbbb21197 | ||
![]() |
a6807d1822 | ||
![]() |
f594b22332 | ||
![]() |
0aaddf697f | ||
![]() |
cef1d19a6c | ||
![]() |
37ca66f6cf | ||
![]() |
2f6618d699 | ||
![]() |
5db0a8e2cc | ||
![]() |
542918d073 | ||
![]() |
10a3e3a341 | ||
![]() |
737fe8d763 | ||
![]() |
c6cc6ec7f6 | ||
![]() |
54e788364a | ||
![]() |
6e5e34662b | ||
![]() |
3efd94014f | ||
![]() |
ad0e6b6291 | ||
![]() |
4ccba9e3ac | ||
![]() |
32b697f5f1 | ||
![]() |
a2412e3f4c | ||
![]() |
9633f9a60f | ||
![]() |
17864b249f | ||
![]() |
0bada398df | ||
![]() |
fc52b43592 | ||
![]() |
7d21ce367d | ||
![]() |
9ada2f30ea | ||
![]() |
d471a691f7 | ||
![]() |
c305edc680 | ||
![]() |
9a3f4f8f8a | ||
![]() |
e9aee3bfd0 | ||
![]() |
77875e89ec | ||
![]() |
1ab2167ff9 | ||
![]() |
a116b3f1ae | ||
![]() |
bc38c38f8c | ||
![]() |
a3e7f3e7c5 | ||
![]() |
66ed80ad3a | ||
![]() |
3f854e16ac | ||
![]() |
4fa32f0f04 | ||
![]() |
5c924efa04 | ||
![]() |
30aae6298b | ||
![]() |
6c5e94061c | ||
![]() |
1426ffc0ee | ||
![]() |
f544b60aaa | ||
![]() |
7725d813c9 | ||
![]() |
60a39f4f5d | ||
![]() |
df57590ec6 | ||
![]() |
b7fe24923e | ||
![]() |
067a6f0174 | ||
![]() |
189e0d5b98 | ||
![]() |
56e5a83e68 | ||
![]() |
34f3918244 | ||
![]() |
f3a1629469 | ||
![]() |
3d922e6257 | ||
![]() |
38b9f67c3b | ||
![]() |
c6778dde82 | ||
![]() |
c27a458799 | ||
![]() |
8ed1addd1e | ||
![]() |
25c97e0019 | ||
![]() |
0fd8faa1ad | ||
![]() |
fc2b51194c | ||
![]() |
18dc12cd78 | ||
![]() |
489c814a48 | ||
![]() |
8190a795ed | ||
![]() |
d3963a61cb | ||
![]() |
4abc3ceb4b | ||
![]() |
05ee0afd54 | ||
![]() |
54e8dd0885 | ||
![]() |
63cdf80885 | ||
![]() |
2af86cec3d | ||
![]() |
e5cde191e1 | ||
![]() |
7be4047df0 | ||
![]() |
3fe356e65c | ||
![]() |
b95231c1e3 | ||
![]() |
f9fb52951d | ||
![]() |
b5419bd574 | ||
![]() |
8f660ca1e6 | ||
![]() |
2f47bafd6a | ||
![]() |
417a07c22d | ||
![]() |
611cd80861 | ||
![]() |
89bd04b9eb | ||
![]() |
5b394e82c9 | ||
![]() |
da6e888a32 | ||
![]() |
d3bf3d3b1c | ||
![]() |
dbd65d01b6 | ||
![]() |
c7ca67a036 | ||
![]() |
b88498ba85 | ||
![]() |
0c50a9eae9 | ||
![]() |
35944df7b0 | ||
![]() |
2a45d99059 | ||
![]() |
06f8cb1b8a | ||
![]() |
b2b075c123 | ||
![]() |
54dc6b7bf2 | ||
![]() |
ffa1507c2c | ||
![]() |
4f2afaa6fb | ||
![]() |
0b6d8150e4 | ||
![]() |
054adbaf1e | ||
![]() |
6b5e349d7e | ||
![]() |
1cecd593c8 | ||
![]() |
2bccb7132d | ||
![]() |
0d5458a7ad | ||
![]() |
cce9ddff80 | ||
![]() |
d330203486 | ||
![]() |
45a557641d | ||
![]() |
271c7d4923 | ||
![]() |
54bad99e0e | ||
![]() |
9a3ba6874c | ||
![]() |
5f670fbdc4 | ||
![]() |
bd07120d33 | ||
![]() |
4ff16fe73e | ||
![]() |
21c147c11b | ||
![]() |
752f5d6eb6 | ||
![]() |
b6c353db0c | ||
![]() |
666944df2e | ||
![]() |
3d37afd495 | ||
![]() |
f778ede8bd | ||
![]() |
8405d28670 | ||
![]() |
f93ad79f41 | ||
![]() |
dffa089173 | ||
![]() |
3990c0f43d | ||
![]() |
20f35afd53 | ||
![]() |
00eea387fc | ||
![]() |
2274631c8f | ||
![]() |
81be065fa5 | ||
![]() |
53a35c0d0c | ||
![]() |
cfbd9ba0e7 | ||
![]() |
5581ea8809 | ||
![]() |
fe9bd0afb9 | ||
![]() |
17c880b076 | ||
![]() |
ef6802ca60 | ||
![]() |
c7adb7a352 | ||
![]() |
10dfc8d92f | ||
![]() |
c7214e1d13 | ||
![]() |
94d9d2bb31 | ||
![]() |
0b560673ce | ||
![]() |
2b7078cd21 | ||
![]() |
99c46e4b73 | ||
![]() |
1e19227b31 | ||
![]() |
9b8c5c1860 | ||
![]() |
0afbf8cc3c | ||
![]() |
2aab8a114e | ||
![]() |
6b2a3a67a6 | ||
![]() |
cfefecd951 | ||
![]() |
05357d7937 | ||
![]() |
a0089aa345 | ||
![]() |
eb7e668eb9 | ||
![]() |
a3d717cb83 | ||
![]() |
fd65451679 | ||
![]() |
d0973e1cfb | ||
![]() |
c32264d9b7 | ||
![]() |
09a392433a | ||
![]() |
3975c712f0 | ||
![]() |
a8c013a145 | ||
![]() |
a69616c45c | ||
![]() |
39d31d3ee4 | ||
![]() |
588bcdc8ca | ||
![]() |
b33e6793de | ||
![]() |
bcceb701cd | ||
![]() |
9dea6f7720 | ||
![]() |
b64dabdffd | ||
![]() |
a2ac6f50aa | ||
![]() |
1a7a821582 | ||
![]() |
50e0f5dc80 | ||
![]() |
0f516d9026 | ||
![]() |
b23eeb6a14 | ||
![]() |
1298eab6ab | ||
![]() |
98939868fa | ||
![]() |
7daa2e210c | ||
![]() |
7d953332e0 | ||
![]() |
03685309fd | ||
![]() |
e09ca63317 | ||
![]() |
3dbb7f261d | ||
![]() |
93e8a401df | ||
![]() |
7f9409bbb3 | ||
![]() |
633464acfa | ||
![]() |
f744e22b49 | ||
![]() |
1a913aa12e | ||
![]() |
75f83210f4 | ||
![]() |
2170b75b26 | ||
![]() |
d1270c9d55 | ||
![]() |
546dfce209 | ||
![]() |
e0614e4f52 | ||
![]() |
49dc332a04 | ||
![]() |
60e1910e5b | ||
![]() |
4e2ab3a177 | ||
![]() |
41f649c9a9 | ||
![]() |
d91938c19d | ||
![]() |
a3cd1290be | ||
![]() |
7d33d1bace | ||
![]() |
4b9f5578a0 | ||
![]() |
59c8672f5c | ||
![]() |
a7920acff5 | ||
![]() |
79a87a9c2b | ||
![]() |
8d3581a49f | ||
![]() |
cd96377312 | ||
![]() |
8b98e67643 | ||
![]() |
6876263961 | ||
![]() |
4caeb64888 | ||
![]() |
70540a1f74 | ||
![]() |
f0dc206784 | ||
![]() |
caca8949de | ||
![]() |
0232941b1d | ||
![]() |
63445be4e5 | ||
![]() |
619885b484 | ||
![]() |
6592f83589 | ||
![]() |
43d74d7fa5 | ||
![]() |
cd981ec56a | ||
![]() |
12f308748f | ||
![]() |
ac0ba832c7 | ||
![]() |
c5ddada32e | ||
![]() |
8a950a7116 | ||
![]() |
64551a8386 | ||
![]() |
ae59a51193 | ||
![]() |
5dc7951dc0 | ||
![]() |
a866fbf381 | ||
![]() |
8af7200085 | ||
![]() |
f028dbf179 | ||
![]() |
aa2b4a688b | ||
![]() |
57475caab0 | ||
![]() |
34205f5bb5 | ||
![]() |
9f1608a6a2 | ||
![]() |
0a056cfd81 | ||
![]() |
5c1442766c | ||
![]() |
816f2f9cc2 | ||
![]() |
666623d39a | ||
![]() |
0eabb01e27 | ||
![]() |
b664db3cf3 | ||
![]() |
a5ecd4eb87 | ||
![]() |
f3f444c1df | ||
![]() |
81c51ec51c | ||
![]() |
b5a12fa6d3 | ||
![]() |
29c82cfb33 | ||
![]() |
2cd684f8e0 | ||
![]() |
c4d05010cb | ||
![]() |
6276f54752 | ||
![]() |
8e820cde13 | ||
![]() |
572395ac20 | ||
![]() |
95c74ae4ae | ||
![]() |
3fc710e0b1 | ||
![]() |
dd0a35273c | ||
![]() |
cf7404630e | ||
![]() |
ef872595ae | ||
![]() |
eac9ee8d3f | ||
![]() |
1d706bd77c | ||
![]() |
3e60997edb | ||
![]() |
a74846a0db | ||
![]() |
038d9118b6 | ||
![]() |
be771e5fd2 | ||
![]() |
1fbee7c316 | ||
![]() |
8b39ae13c7 | ||
![]() |
1bb6d8de6f | ||
![]() |
a888057453 | ||
![]() |
eae7343741 | ||
![]() |
c59fb1b477 | ||
![]() |
e7cb7bc737 | ||
![]() |
1ed48c774e | ||
![]() |
54b80ecf9f | ||
![]() |
97a73637e0 | ||
![]() |
653ecf91c2 | ||
![]() |
b7870ae78c | ||
![]() |
299008be36 | ||
![]() |
723d9af04d | ||
![]() |
6edcbdca19 | ||
![]() |
2882ee9f55 | ||
![]() |
78149505f9 | ||
![]() |
7b07ce3fef | ||
![]() |
d395c81606 | ||
![]() |
be257b6f9f | ||
![]() |
d4a8123267 | ||
![]() |
e1a7027fe8 | ||
![]() |
c5b0366a25 | ||
![]() |
217e3a59c4 | ||
![]() |
0ab88f5342 | ||
![]() |
8dfe37a3a3 | ||
![]() |
69eca63a84 | ||
![]() |
a5576f9738 | ||
![]() |
c833b77646 | ||
![]() |
ed446360a4 | ||
![]() |
9807225f90 | ||
![]() |
9331c22620 | ||
![]() |
cc84831cae | ||
![]() |
f490777502 | ||
![]() |
6e79767f5a | ||
![]() |
3bc7f46412 | ||
![]() |
8a2d3a8861 | ||
![]() |
538194344a | ||
![]() |
23765332fa | ||
![]() |
163e9b02bf | ||
![]() |
90f95de5c9 | ||
![]() |
ffc4380b30 | ||
![]() |
314ef9df03 | ||
![]() |
563be8ca2a | ||
![]() |
e527b375e8 | ||
![]() |
4e8a218d17 | ||
![]() |
57de02c9f2 | ||
![]() |
3c4972a53f | ||
![]() |
6af387ec6f | ||
![]() |
554b73643d | ||
![]() |
e941ae3811 | ||
![]() |
f75420c209 | ||
![]() |
d99806cc27 | ||
![]() |
cd8497b9fb | ||
![]() |
469b4b21d2 | ||
![]() |
926389f3a7 | ||
![]() |
52b7ebd6be | ||
![]() |
2e50b34c67 | ||
![]() |
a18e1305b3 | ||
![]() |
0779c34db8 | ||
![]() |
9e1d04fea7 | ||
![]() |
b44bffe954 | ||
![]() |
739925c902 | ||
![]() |
45e6bb7add | ||
![]() |
7b7689d307 | ||
![]() |
aa73411c14 | ||
![]() |
b96c18c952 | ||
![]() |
225bff226f | ||
![]() |
5d7ad69cd8 | ||
![]() |
b8ad5f4249 | ||
![]() |
63f9e7ee86 | ||
![]() |
88dce24375 | ||
![]() |
ea2a7c5ea4 | ||
![]() |
0ad7833ca4 | ||
![]() |
790f94533c | ||
![]() |
9089244db7 | ||
![]() |
aed8bace97 | ||
![]() |
4f5e0dd325 | ||
![]() |
6d8d20774f | ||
![]() |
2aa38f5bd3 | ||
![]() |
75fd6bd269 | ||
![]() |
86e6be342c | ||
![]() |
8556068534 | ||
![]() |
0763269ec5 | ||
![]() |
01b8ef39f5 | ||
![]() |
08e512a273 | ||
![]() |
1cbf1c681a | ||
![]() |
9b85b1b638 | ||
![]() |
788b1854b4 | ||
![]() |
86e28b4db8 | ||
![]() |
9c94de070a | ||
![]() |
23d6ca9942 | ||
![]() |
b16bfac107 | ||
![]() |
09dfc08207 | ||
![]() |
07fce7ba13 | ||
![]() |
52d8cbf092 | ||
![]() |
73b8f85816 | ||
![]() |
aadea5ab97 | ||
![]() |
54f7708eaa | ||
![]() |
d7aa245c33 | ||
![]() |
2cb0b41ce7 | ||
![]() |
e25f05224f | ||
![]() |
7639b5aa3e | ||
![]() |
4d41645598 | ||
![]() |
b1a8fafa62 | ||
![]() |
6461087c86 | ||
![]() |
7aa74c227b | ||
![]() |
0fd95e5db5 | ||
![]() |
8f30f4170c | ||
![]() |
ad4cfffe3d | ||
![]() |
2dcd67ce1a | ||
![]() |
4c3090ace9 | ||
![]() |
fb3777f085 | ||
![]() |
018b8e1d62 | ||
![]() |
ba3c346195 | ||
![]() |
e420b3981c | ||
![]() |
76cd6b662b | ||
![]() |
0b6ff59448 | ||
![]() |
0752b6b23c | ||
![]() |
c5b0b6ff32 | ||
![]() |
ab3986a684 | ||
![]() |
d0108869ee | ||
![]() |
58d043b0d0 | ||
![]() |
d918d571cc | ||
![]() |
75ab48958c | ||
![]() |
3200007a69 | ||
![]() |
7132526dd2 | ||
![]() |
f8266a228c | ||
![]() |
59c7deab09 | ||
![]() |
1a7f2c8f45 | ||
![]() |
e6905805bb | ||
![]() |
90c7ae70c6 | ||
![]() |
ef49a9243b | ||
![]() |
db7c8562ed | ||
![]() |
51eac99ce4 | ||
![]() |
c3f83b6761 | ||
![]() |
ce75f48acb | ||
![]() |
9fd5c6f619 | ||
![]() |
f41e5ec928 | ||
![]() |
cd12fe86d3 | ||
![]() |
d6fb8f12c6 | ||
![]() |
371fb853ee | ||
![]() |
a0f532072d | ||
![]() |
3405efe934 | ||
![]() |
af2e1f4e4d | ||
![]() |
4fe8c473fd | ||
![]() |
b2a0e98a60 | ||
![]() |
74372424ae | ||
![]() |
4a7a9e9951 | ||
![]() |
81fd005af9 | ||
![]() |
2395069b0b | ||
![]() |
032dfddb6b | ||
![]() |
e6f7da4036 | ||
![]() |
7190971b44 | ||
![]() |
6b1170cb97 | ||
![]() |
ec06ffe294 | ||
![]() |
03ea478f20 | ||
![]() |
e4d3ff2374 | ||
![]() |
bcbcb3d107 | ||
![]() |
765d8a33dd | ||
![]() |
58e733b5a0 | ||
![]() |
0828d0f5c7 | ||
![]() |
deaabff752 | ||
![]() |
6623744172 | ||
![]() |
e2d3cefc95 | ||
![]() |
dd61f7795f | ||
![]() |
aa038994b2 | ||
![]() |
1a5f6b54af | ||
![]() |
624359b725 | ||
![]() |
1581ea48dc | ||
![]() |
23ed6c4ec0 | ||
![]() |
804d5c1c5d | ||
![]() |
2485bbe784 | ||
![]() |
6a94e25f6d | ||
![]() |
d99e330548 | ||
![]() |
abe189377c | ||
![]() |
4dc8a2dd6f | ||
![]() |
d4be96e9dd | ||
![]() |
23fd1aee00 | ||
![]() |
39694d5eb0 | ||
![]() |
23ef327e11 | ||
![]() |
ba0b965c42 | ||
![]() |
285d0c3d7d | ||
![]() |
46f4422a87 | ||
![]() |
bee1b553cd | ||
![]() |
215caad320 | ||
![]() |
146b042514 | ||
![]() |
0b69e4df81 | ||
![]() |
2abfa624c9 | ||
![]() |
11146ecd08 | ||
![]() |
76e67a97f4 | ||
![]() |
6bbec56d09 | ||
![]() |
c868f93755 | ||
![]() |
eb7edaf4dc | ||
![]() |
150ab564a3 | ||
![]() |
eb0fffbd78 | ||
![]() |
37e14fd02b | ||
![]() |
a9fbefcd87 | ||
![]() |
36999494d6 | ||
![]() |
00d70925df | ||
![]() |
998c4c93a2 | ||
![]() |
d1a92aa52a | ||
![]() |
5660d80bb0 | ||
![]() |
316dcf4960 | ||
![]() |
c1e6febef7 | ||
![]() |
e1e66c78bf | ||
![]() |
329d5583e0 | ||
![]() |
b69614b98b | ||
![]() |
29c19b6f40 | ||
![]() |
311bff3d56 | ||
![]() |
14f0f8ce65 | ||
![]() |
a3934664dd | ||
![]() |
3b4b3c827c | ||
![]() |
46a22c9e70 | ||
![]() |
1216e807c0 | ||
![]() |
bb9316a2f9 | ||
![]() |
516afb0343 | ||
![]() |
8463553d71 | ||
![]() |
8760ff523d | ||
![]() |
72965a7106 | ||
![]() |
df7d3a1794 | ||
![]() |
f3cf9c5c07 | ||
![]() |
6e59fe0b4a | ||
![]() |
17ef79a067 | ||
![]() |
03679f0532 | ||
![]() |
f6e909600d | ||
![]() |
076dd3619e | ||
![]() |
fe4f7e6c73 | ||
![]() |
1f7f4ec4cf | ||
![]() |
b5e382cbc4 | ||
![]() |
f6de4085a0 | ||
![]() |
cec56b35b9 | ||
![]() |
d35d65f2e0 | ||
![]() |
b423ebff8b | ||
![]() |
8efc3b39de | ||
![]() |
c4bd6af837 | ||
![]() |
2e4f087615 | ||
![]() |
9682fca47b | ||
![]() |
1a97f29f5d | ||
![]() |
5655d6e5f5 | ||
![]() |
23c6d7ac52 | ||
![]() |
07100d5d4d | ||
![]() |
720597d7f8 | ||
![]() |
c588cb4299 | ||
![]() |
6b1c3e6283 | ||
![]() |
9853e35f69 | ||
![]() |
a6a93bc38a | ||
![]() |
a0a67d4f85 | ||
![]() |
7ab9f6a101 | ||
![]() |
4794f6ac4d | ||
![]() |
6a8379111c | ||
![]() |
9f6ac28d13 | ||
![]() |
73e2bf54f8 | ||
![]() |
fa4449283d | ||
![]() |
1ff18920a2 | ||
![]() |
8c317c49bb | ||
![]() |
fd6f7b56cd | ||
![]() |
161cea77ba | ||
![]() |
fdff75342b | ||
![]() |
7713f8f820 | ||
![]() |
63f8620d95 | ||
![]() |
6136cd3cd9 | ||
![]() |
bb11e726b8 | ||
![]() |
7852f4f7ec | ||
![]() |
e3f0157f6e | ||
![]() |
64e162af25 | ||
![]() |
307c97445b | ||
![]() |
84ee7e4fa8 | ||
![]() |
cd8c71a0eb | ||
![]() |
3716b2938c | ||
![]() |
8c1cdceb8b | ||
![]() |
9407392b14 | ||
![]() |
890f3a57b6 | ||
![]() |
8b6a9e2ae9 | ||
![]() |
9e05810cfe | ||
![]() |
f4f5ddfec2 | ||
![]() |
381429c039 | ||
![]() |
50c4afa841 | ||
![]() |
f89708c942 | ||
![]() |
1d44715d9d | ||
![]() |
a5f63dbf93 | ||
![]() |
fad659650b | ||
![]() |
fe7240628a | ||
![]() |
be70f466fe | ||
![]() |
5688655971 | ||
![]() |
bf3ee94b9a | ||
![]() |
842a8b35dd | ||
![]() |
e43ead8e96 | ||
![]() |
3345ce2686 | ||
![]() |
cdb9d55956 | ||
![]() |
2d55f34413 | ||
![]() |
899f8b0cde | ||
![]() |
d754266a6d | ||
![]() |
d565586e46 | ||
![]() |
ac33dc12da | ||
![]() |
65326f7d1f | ||
![]() |
9a2b0a5db1 | ||
![]() |
e545cc0b47 | ||
![]() |
4a10dfb54d | ||
![]() |
53b96f685d | ||
![]() |
02b5bb9b17 | ||
![]() |
95304f269b | ||
![]() |
b492d8499c | ||
![]() |
43e314b64e | ||
![]() |
0f41011ec9 | ||
![]() |
3559284839 | ||
![]() |
d36dbe66e1 | ||
![]() |
3fed8bced7 | ||
![]() |
b0e161e33d | ||
![]() |
d1806a26e4 | ||
![]() |
1bc8a6e5d4 | ||
![]() |
fa740f8129 | ||
![]() |
26ee9360bf | ||
![]() |
e768fb83bd | ||
![]() |
0b63fb5e81 | ||
![]() |
328a8322f4 | ||
![]() |
f1a3ce49cc | ||
![]() |
9ee1282019 | ||
![]() |
8e8b7113dc | ||
![]() |
c80e5f9f88 | ||
![]() |
f53e41ac81 | ||
![]() |
6f44c2ec31 | ||
![]() |
c27a778281 | ||
![]() |
4ddb5abea5 | ||
![]() |
3134698ad2 | ||
![]() |
5a37c1bd5c | ||
![]() |
c6aad80e29 | ||
![]() |
50d816fe99 | ||
![]() |
557cfecc15 | ||
![]() |
ecbbdbcd4e | ||
![]() |
d035bb51f4 | ||
![]() |
537b7614b9 | ||
![]() |
1f2fe2eab9 | ||
![]() |
7ce5ba645a | ||
![]() |
de8caf708c | ||
![]() |
72e515547a | ||
![]() |
101990139f | ||
![]() |
cd336b2b54 | ||
![]() |
57d2409c08 | ||
![]() |
8af7e5ea81 | ||
![]() |
afa88a4616 | ||
![]() |
4f598ee9fb | ||
![]() |
6573f24cd9 | ||
![]() |
a716517705 | ||
![]() |
6680aa6bdf | ||
![]() |
c2b0bd2a0a | ||
![]() |
5e3cd884eb | ||
![]() |
6e74abc643 | ||
![]() |
c93dc18ddc | ||
![]() |
bf1c40d682 | ||
![]() |
0edb99a255 | ||
![]() |
548b874a16 | ||
![]() |
06a28d024f | ||
![]() |
519032c61b | ||
![]() |
85dd86c64e | ||
![]() |
bedb72b0bc | ||
![]() |
e617f1cfcc | ||
![]() |
22368ee49e | ||
![]() |
b3c647bf7c | ||
![]() |
3f71bc8e79 | ||
![]() |
393f1ea38a | ||
![]() |
550359a4b4 | ||
![]() |
0b68c7441a | ||
![]() |
bc74027f39 | ||
![]() |
02654ad2d7 | ||
![]() |
068e11f7e2 | ||
![]() |
055cd47ba0 | ||
![]() |
6a5f29208e | ||
![]() |
986dc7f0e9 | ||
![]() |
5a73558a21 | ||
![]() |
7ff713f35f | ||
![]() |
4b2ab84c71 | ||
![]() |
8d06a230c2 | ||
![]() |
7ef4aba52c | ||
![]() |
0cd00b6c09 | ||
![]() |
0aed8746be | ||
![]() |
527cf2f3cf | ||
![]() |
872f656c3b | ||
![]() |
ded7b215be | ||
![]() |
fb9f619d89 | ||
![]() |
36c7c66831 | ||
![]() |
955eb58af5 | ||
![]() |
7161d65070 | ||
![]() |
738bd263c1 | ||
![]() |
7d5902752e | ||
![]() |
9aed856d78 | ||
![]() |
4107856b70 | ||
![]() |
39ed48f7a7 | ||
![]() |
627ceebef3 | ||
![]() |
448cc1acd5 | ||
![]() |
248413489f | ||
![]() |
d2f204c1e3 | ||
![]() |
3a98bd75c8 | ||
![]() |
b8031a1613 | ||
![]() |
51d40e0ef0 | ||
![]() |
d9dea7c4ec | ||
![]() |
0e59827023 | ||
![]() |
10c88cdcd5 | ||
![]() |
6233c6ac7b | ||
![]() |
5007cdac72 | ||
![]() |
a08c7c68cc | ||
![]() |
adf32da655 | ||
![]() |
7122adc4b8 | ||
![]() |
ffd768dfbc | ||
![]() |
380e1a28c9 | ||
![]() |
2a7584ecf0 | ||
![]() |
fe7e736c6b | ||
![]() |
d33191830b | ||
![]() |
5f51df6431 | ||
![]() |
9146d30f06 | ||
![]() |
0288142769 | ||
![]() |
0c44aa9503 | ||
![]() |
07a1574732 | ||
![]() |
f5a38b95c1 | ||
![]() |
c50ecb4bb0 | ||
![]() |
a1ddba6bc4 | ||
![]() |
5f2b7bd78e | ||
![]() |
052095d432 | ||
![]() |
620a946d01 | ||
![]() |
c1b2e87e89 | ||
![]() |
843643aef3 | ||
![]() |
c3eee3a842 | ||
![]() |
b4e02f8ddf | ||
![]() |
1816b16315 | ||
![]() |
44b8cba776 | ||
![]() |
be2f109bf1 | ||
![]() |
f554e290f7 | ||
![]() |
325c2b1487 | ||
![]() |
ac52331c4f | ||
![]() |
751af70b78 | ||
![]() |
a182338a8b | ||
![]() |
09ddc9fb2f | ||
![]() |
9bc7a856dd | ||
![]() |
a5c5da47fc | ||
![]() |
017c9f29c7 | ||
![]() |
3a703b4fe7 | ||
![]() |
bcb780fe02 | ||
![]() |
27749e1c96 | ||
![]() |
711388d3e3 | ||
![]() |
1861ace7d2 | ||
![]() |
78f742d894 | ||
![]() |
53ccc1969f | ||
![]() |
ec652e291e | ||
![]() |
a7e85240a8 | ||
![]() |
00b9ec088d | ||
![]() |
24b6c537f4 | ||
![]() |
16ab045e97 | ||
![]() |
bc47d66f43 | ||
![]() |
9a4618b05b | ||
![]() |
85079d6a2e | ||
![]() |
193a9a97fe | ||
![]() |
a524c8c806 | ||
![]() |
830b795ee3 | ||
![]() |
9591e992cc | ||
![]() |
dca4388056 | ||
![]() |
ae4ee7553a | ||
![]() |
db11a2a1fd | ||
![]() |
0fa2e7c790 | ||
![]() |
ef6329af7c | ||
![]() |
6cada2a35f | ||
![]() |
213e64f944 | ||
![]() |
3af97ef6a2 | ||
![]() |
051c0774f8 | ||
![]() |
424d59bc7e | ||
![]() |
2f79cf9247 | ||
![]() |
361a2cf8a5 | ||
![]() |
c9b3619299 | ||
![]() |
e5ecdd5242 | ||
![]() |
0171e67494 | ||
![]() |
e0769ea71d | ||
![]() |
5ba21060cb | ||
![]() |
1ed9c53816 | ||
![]() |
04d6d25ec3 | ||
![]() |
404bcc961c | ||
![]() |
c8edd6ec9e | ||
![]() |
13e4bd31d7 | ||
![]() |
cd53947d86 | ||
![]() |
915d757eb2 | ||
![]() |
a0e7333915 | ||
![]() |
6b9a7e21e9 | ||
![]() |
4fe4087d4a | ||
![]() |
787ff5b550 | ||
![]() |
d92ffd1157 | ||
![]() |
3780ab3fcd | ||
![]() |
8bcac0b726 | ||
![]() |
4e362df68c | ||
![]() |
f59cd6764d | ||
![]() |
d65db68f9f | ||
![]() |
99f3df2893 | ||
![]() |
bab9849a8b | ||
![]() |
30b46fad57 | ||
![]() |
be897cbc2f | ||
![]() |
349571d111 | ||
![]() |
784e4688f8 | ||
![]() |
2f145bc231 | ||
![]() |
9f1d2246a0 | ||
![]() |
5680f793cf | ||
![]() |
625f29368b | ||
![]() |
c979141002 | ||
![]() |
3c743f00c0 | ||
![]() |
a4e46fc5ac | ||
![]() |
7e5c58cdca | ||
![]() |
f70723da25 | ||
![]() |
cce7b91cb1 | ||
![]() |
9579e92451 | ||
![]() |
5fb4772323 | ||
![]() |
dde9dc7b60 | ||
![]() |
949fb1a91c | ||
![]() |
bf09a94fdf | ||
![]() |
d44e3dc021 | ||
![]() |
95ecd4e1d2 | ||
![]() |
05aa864338 | ||
![]() |
28b1c913b4 | ||
![]() |
b96db514f6 | ||
![]() |
30561a8de5 | ||
![]() |
3f4ff5b6a7 | ||
![]() |
1cdea7f530 | ||
![]() |
5a7ad4cb2d | ||
![]() |
08b37a58bb | ||
![]() |
a07c2a1377 | ||
![]() |
397e8e461f | ||
![]() |
f52baa4bc1 | ||
![]() |
1c3ec3a91f | ||
![]() |
20ef2aa57f | ||
![]() |
b58d164504 | ||
![]() |
37ebbe8d9e | ||
![]() |
e4ff5eb3eb | ||
![]() |
aa73ba7a67 | ||
![]() |
344f61f247 | ||
![]() |
1108210f1b | ||
![]() |
bdb757e189 | ||
![]() |
ea51cbf1d9 | ||
![]() |
8401b0a6e5 | ||
![]() |
34b88a2fd4 | ||
![]() |
b1e6f1b7e0 | ||
![]() |
ef3bd54a17 | ||
![]() |
87d9534d81 | ||
![]() |
1ab1ba3c3e | ||
![]() |
a9df4263bb | ||
![]() |
a9dee31362 | ||
![]() |
cfde37eec1 | ||
![]() |
6328c25573 | ||
![]() |
0857321317 | ||
![]() |
1bc8e785bf | ||
![]() |
b9ddccf035 | ||
![]() |
36784a99a9 | ||
![]() |
d5ab40aa60 | ||
![]() |
14c2f671cb | ||
![]() |
9e18f41fcf | ||
![]() |
78fe155b72 | ||
![]() |
3b1ffd2ede | ||
![]() |
a7c45daeb8 | ||
![]() |
19c180ef88 | ||
![]() |
d85b27bbbc | ||
![]() |
d668fd3977 | ||
![]() |
6b0ed6a29b | ||
![]() |
bfdedbe5b2 | ||
![]() |
732e80e3fe | ||
![]() |
2f18993905 | ||
![]() |
94746b6557 | ||
![]() |
814c4cb56d | ||
![]() |
ffaaadc270 | ||
![]() |
e0e67df933 | ||
![]() |
82a875056c | ||
![]() |
31c57aab35 | ||
![]() |
e702c7f1b4 | ||
![]() |
d6d15b91f3 | ||
![]() |
3a06e88566 | ||
![]() |
98b1cccd12 | ||
![]() |
f08a11fad3 | ||
![]() |
5abe666749 | ||
![]() |
f35b1127fa | ||
![]() |
296552e358 | ||
![]() |
bd2764cccc | ||
![]() |
6525551357 | ||
![]() |
fef4ed568e | ||
![]() |
ca7da3866d | ||
![]() |
ab375d3d07 | ||
![]() |
4b44452900 | ||
![]() |
749d9f2227 | ||
![]() |
a668640a3f | ||
![]() |
18ae86faf5 | ||
![]() |
15f0fa85c9 | ||
![]() |
3dfaf12030 | ||
![]() |
770e0f08d5 | ||
![]() |
ea7b82b33c | ||
![]() |
c7cfdd82bb | ||
![]() |
3810bda5a5 | ||
![]() |
84e71ecf10 | ||
![]() |
1504b328d1 | ||
![]() |
8233ab83c2 | ||
![]() |
e608447382 | ||
![]() |
811e0155ef | ||
![]() |
605d7c3ca2 | ||
![]() |
bf1d9de1d8 | ||
![]() |
f4cf0d2f28 | ||
![]() |
3c8da5eba8 | ||
![]() |
70e143e0c1 | ||
![]() |
30cd3faf97 | ||
![]() |
6155987d9f | ||
![]() |
1ade5aa922 | ||
![]() |
7cfcb0d271 | ||
![]() |
302b35c2a0 | ||
![]() |
017aa5988a | ||
![]() |
42f404d854 | ||
![]() |
f4b0cd3dfa | ||
![]() |
d96463ce12 | ||
![]() |
9b9012767c | ||
![]() |
1c0ccf9aaf | ||
![]() |
79d1db3324 | ||
![]() |
a2aed8ebd7 | ||
![]() |
1e061c7d59 | ||
![]() |
4244c306a8 | ||
![]() |
415d683ea7 | ||
![]() |
5ee3cb385f | ||
![]() |
120c87b630 | ||
![]() |
378edd9491 | ||
![]() |
b3f0e6a806 | ||
![]() |
f452eeb0ba | ||
![]() |
3bc436988d | ||
![]() |
5193a8d569 | ||
![]() |
6f9db2b48e | ||
![]() |
4fdde32346 | ||
![]() |
49e673861d | ||
![]() |
cf95a07ae8 | ||
![]() |
01a923f217 | ||
![]() |
35b8582e31 | ||
![]() |
9b2a52ff20 | ||
![]() |
837aa75666 | ||
![]() |
6e8adeeaac | ||
![]() |
ff2bd2ee18 | ||
![]() |
7464c1d330 | ||
![]() |
e5b292edf2 | ||
![]() |
a7daa5dda4 | ||
![]() |
09243ae686 | ||
![]() |
d758496ad1 | ||
![]() |
3cdccc3351 | ||
![]() |
f668ef5896 | ||
![]() |
7d9829af4c | ||
![]() |
0ff2d76f10 | ||
![]() |
da5ea61adf | ||
![]() |
14d2e40bab | ||
![]() |
1e0866325c | ||
![]() |
a06dda15e4 | ||
![]() |
a15c9057a1 | ||
![]() |
42f9d5c877 | ||
![]() |
64009220d3 | ||
![]() |
36a70e117a | ||
![]() |
e00bb81c49 | ||
![]() |
c8320726bd | ||
![]() |
eaa9106ec7 | ||
![]() |
54a8262dfe | ||
![]() |
1092cc4bbf | ||
![]() |
90137bbaa0 | ||
![]() |
c923426a7d | ||
![]() |
75111e967f | ||
![]() |
f7b0e803c2 | ||
![]() |
962bc8d9dd | ||
![]() |
c550047ba6 | ||
![]() |
e9eaf416b8 | ||
![]() |
9ae6e298bb | ||
![]() |
1b72b08b2c | ||
![]() |
c2ef0dac6b | ||
![]() |
ae06235e46 | ||
![]() |
2af7a724e1 | ||
![]() |
667161620a | ||
![]() |
e2c7f89347 | ||
![]() |
58fcdf8c07 | ||
![]() |
959f566118 | ||
![]() |
7e78699e79 | ||
![]() |
30331b383f | ||
![]() |
a828a82d59 | ||
![]() |
a1007627e4 | ||
![]() |
4394fc35ea | ||
![]() |
82007aa03a | ||
![]() |
e2e793c1c3 | ||
![]() |
ed19198c78 | ||
![]() |
b44532aa3d | ||
![]() |
9a178f6826 | ||
![]() |
56ef80216a | ||
![]() |
2a67ff690e | ||
![]() |
b2c26f7cdd | ||
![]() |
266a85eda0 | ||
![]() |
0d3aca062e | ||
![]() |
ededff8556 | ||
![]() |
95cbcef34f | ||
![]() |
6b8a85758e | ||
![]() |
d35af9fbc1 | ||
![]() |
98b8fd6d21 | ||
![]() |
0e2476554e | ||
![]() |
57b9b45242 | ||
![]() |
93fe3b6c66 | ||
![]() |
fc892e8c03 | ||
![]() |
531d30575f | ||
![]() |
7389b10867 | ||
![]() |
69661609b7 | ||
![]() |
c4d0d11f52 | ||
![]() |
7165915708 | ||
![]() |
57b0f69ca3 | ||
![]() |
f9269035fe | ||
![]() |
31ffc1eeb0 | ||
![]() |
621d54f662 | ||
![]() |
5846445f48 | ||
![]() |
f30a49df6a | ||
![]() |
cf2f13fc77 | ||
![]() |
e7db582e35 | ||
![]() |
d0aa9ff972 | ||
![]() |
fd7ab5a22b | ||
![]() |
25e972e8a4 | ||
![]() |
cd128bbadb | ||
![]() |
6daa204363 | ||
![]() |
5b2feecdf3 | ||
![]() |
ac5a1ccffb | ||
![]() |
34446b79d7 | ||
![]() |
b7d4a9dc25 | ||
![]() |
1f8acb7619 | ||
![]() |
271c0cf136 | ||
![]() |
e8e090aced | ||
![]() |
7456e6c776 | ||
![]() |
11bd98f684 | ||
![]() |
f27d8d9448 | ||
![]() |
f12000a1b6 | ||
![]() |
266343666f | ||
![]() |
e190872b82 | ||
![]() |
8e68003b28 | ||
![]() |
d8a9974a41 | ||
![]() |
7ecbc83e71 | ||
![]() |
ddfb558591 | ||
![]() |
5209576828 | ||
![]() |
f410dfa091 | ||
![]() |
428eb5faad | ||
![]() |
e45a2af683 | ||
![]() |
d288f2f5da | ||
![]() |
5fe3de3153 | ||
![]() |
39bd151472 | ||
![]() |
8a2a39ed06 | ||
![]() |
7b83bb188a | ||
![]() |
e3da93e658 | ||
![]() |
da8423ca97 | ||
![]() |
42cdba8680 | ||
![]() |
e319d501f7 | ||
![]() |
633d2cb648 | ||
![]() |
47b9b11009 | ||
![]() |
f231f24dda | ||
![]() |
b51cc6d67a | ||
![]() |
d5c89c8ed5 | ||
![]() |
f801c69c75 | ||
![]() |
78b12dee89 | ||
![]() |
a8ac486555 | ||
![]() |
a63db4b179 | ||
![]() |
09eb6381a9 | ||
![]() |
ade1a34cc8 | ||
![]() |
c989da4cfd | ||
![]() |
1b3504e329 | ||
![]() |
9410b15ac9 | ||
![]() |
163e47c29d | ||
![]() |
ed94fe28bf | ||
![]() |
5e9b002808 | ||
![]() |
154bf92b5b | ||
![]() |
aae0e12385 | ||
![]() |
e3ce3d6e30 | ||
![]() |
dae6249efa | ||
![]() |
4f2f21dc05 | ||
![]() |
7dd99f2b22 | ||
![]() |
e29b9e32bb | ||
![]() |
599043e7ff | ||
![]() |
79265fc2c0 | ||
![]() |
871d99e659 | ||
![]() |
25109f79f1 | ||
![]() |
9634c72d7e | ||
![]() |
8609fe8f46 | ||
![]() |
77185961dc | ||
![]() |
7ee3eb50b0 | ||
![]() |
525be128c9 | ||
![]() |
7b7763469b | ||
![]() |
9748b6b847 | ||
![]() |
d1b9a7e1bd | ||
![]() |
8ea2650ab2 | ||
![]() |
99d6349978 | ||
![]() |
0c5be869ff | ||
![]() |
0b37c0dfa0 | ||
![]() |
ffd7e44e5a | ||
![]() |
6c366ccf6a | ||
![]() |
a4866b31d6 | ||
![]() |
f1a67c42a0 | ||
![]() |
c6aa9c4ad7 | ||
![]() |
f83eefba37 | ||
![]() |
73dfc2b368 | ||
![]() |
010271d6ea | ||
![]() |
4551e57d64 | ||
![]() |
7771e544ac | ||
![]() |
5437c0af6e | ||
![]() |
45bace1328 | ||
![]() |
a0af5eb307 | ||
![]() |
363957f919 | ||
![]() |
524da962d3 | ||
![]() |
d6de97b116 | ||
![]() |
7c95e5ef3e | ||
![]() |
83d73b5407 | ||
![]() |
f971934dab | ||
![]() |
3656644c35 | ||
![]() |
bdc3578e29 | ||
![]() |
19fd0108d3 | ||
![]() |
529dad88dd | ||
![]() |
b02c694992 | ||
![]() |
dc6b0d3548 | ||
![]() |
1c04608b0a | ||
![]() |
47db2d3062 | ||
![]() |
286ab6d53f | ||
![]() |
3b06ab51e5 | ||
![]() |
3dde354736 | ||
![]() |
824175e69c | ||
![]() |
603d5fbeb1 | ||
![]() |
325179eb63 | ||
![]() |
96a5e560d7 | ||
![]() |
71fcfb3cb5 | ||
![]() |
8f867c1bef | ||
![]() |
37bb69686c | ||
![]() |
210e614d2a | ||
![]() |
296a6cf4ea | ||
![]() |
c8cd2caeac | ||
![]() |
d7385676bc | ||
![]() |
aee1798476 | ||
![]() |
24e827ee1f | ||
![]() |
8cb52b2048 | ||
![]() |
32f53c0671 | ||
![]() |
d11116f734 | ||
![]() |
35e684d1ff | ||
![]() |
45a1a3239d | ||
![]() |
d66c14b71e | ||
![]() |
06f9297f94 | ||
![]() |
115b60b0e1 | ||
![]() |
7797070b37 | ||
![]() |
973057cfe4 | ||
![]() |
e58f69ea6a | ||
![]() |
1bd9570ece | ||
![]() |
398f67290c | ||
![]() |
ddc27c2935 | ||
![]() |
41bf5505eb | ||
![]() |
4352416d77 | ||
![]() |
cb3dff5c3f | ||
![]() |
4631e4ef8e | ||
![]() |
45fa5416ab | ||
![]() |
5e2b53541b | ||
![]() |
9c205d4a29 | ||
![]() |
4f431e8a90 | ||
![]() |
13b31938ce | ||
![]() |
a5dd5bfd26 | ||
![]() |
2e0f2025bd | ||
![]() |
416dea2c54 | ||
![]() |
55f681a723 | ||
![]() |
c1b8b811ed | ||
![]() |
9a04739b98 | ||
![]() |
ac0ad5ad17 | ||
![]() |
6c8ed21022 | ||
![]() |
25a1cb5a15 | ||
![]() |
11ee2736bd | ||
![]() |
d7e285a4d9 | ||
![]() |
6873c4cf91 | ||
![]() |
a023484d64 | ||
![]() |
fdfcce57e1 | ||
![]() |
ed76f4394f | ||
![]() |
f77f715aa2 | ||
![]() |
15373c8367 | ||
![]() |
f743ff2256 | ||
![]() |
b8b8a294d3 | ||
![]() |
5e04ed9f53 | ||
![]() |
5689df7490 | ||
![]() |
cc14d32941 | ||
![]() |
95c39b3727 | ||
![]() |
eb3964bd57 | ||
![]() |
cf0ae2abe8 | ||
![]() |
7222210454 | ||
![]() |
07502a28f7 | ||
![]() |
0e65e9ad51 | ||
![]() |
7fba37db06 | ||
![]() |
4acfa14df1 | ||
![]() |
354262dfe9 | ||
![]() |
41a76cd810 | ||
![]() |
b36e32a676 | ||
![]() |
e31671ece0 | ||
![]() |
3aa2c122e1 | ||
![]() |
688b8df982 | ||
![]() |
d62e367280 | ||
![]() |
63d06655e6 | ||
![]() |
7043561459 | ||
![]() |
e199fb6190 | ||
![]() |
5cfbfc2c52 | ||
![]() |
2c121b3d8e | ||
![]() |
bb79fbaccf | ||
![]() |
af8697c85b | ||
![]() |
351f258bed | ||
![]() |
15200bd8f5 | ||
![]() |
f1fef16e4d | ||
![]() |
684773f2d4 | ||
![]() |
e1ced62836 | ||
![]() |
fac5e3b540 | ||
![]() |
64b395cb3a | ||
![]() |
dc1eebb566 | ||
![]() |
024b3bd0dd | ||
![]() |
7a6e7d87cc | ||
![]() |
4444f3cc55 | ||
![]() |
7e2ba2784e | ||
![]() |
ed2bb46658 | ||
![]() |
87291437bd | ||
![]() |
777a30cb42 | ||
![]() |
de44fdbaf2 | ||
![]() |
b5adf4d9e9 | ||
![]() |
0892741b10 | ||
![]() |
a8d0ec0749 | ||
![]() |
9c03a89596 | ||
![]() |
a4da9c47c8 | ||
![]() |
58a5193a2b | ||
![]() |
0abf4647e3 | ||
![]() |
9a0a2dce41 | ||
![]() |
4a5388a2b6 | ||
![]() |
3cc7d22732 | ||
![]() |
990d5189d1 |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -92,3 +92,4 @@ GRAPHICS
|
||||
# hex files
|
||||
*.hex binary
|
||||
*.eep binary
|
||||
nix/sources.nix linguist-generated=true
|
||||
|
21
.github/workflows/api.yml
vendored
21
.github/workflows/api.yml
vendored
@@ -25,18 +25,13 @@ jobs:
|
||||
- name: Generate API Data
|
||||
run: qmk generate-api
|
||||
|
||||
- name: Install rsync
|
||||
run: |
|
||||
apt-get update && apt-get install -y rsync
|
||||
|
||||
- name: Upload API Data
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
ACCESS_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH: main
|
||||
FOLDER: api_data/v1
|
||||
CLEAN: true
|
||||
GIT_CONFIG_EMAIL: hello@qmk.fm
|
||||
REPOSITORY_NAME: qmk/qmk_keyboards
|
||||
TARGET_FOLDER: v1
|
||||
args: --acl public-read --follow-symlinks --delete
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ secrets.API_SPACE_MASTER }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_KEY }}
|
||||
AWS_S3_ENDPOINT: https://nyc3.digitaloceanspaces.com
|
||||
SOURCE_DIR: 'api_data'
|
||||
|
2
.github/workflows/cli.yml
vendored
2
.github/workflows/cli.yml
vendored
@@ -23,6 +23,6 @@ jobs:
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install dependencies
|
||||
run: pip3 install -r requirements.txt
|
||||
run: pip3 install -r requirements-dev.txt
|
||||
- name: Run tests
|
||||
run: bin/qmk pytest
|
||||
|
21
.github/workflows/develop_api.yml
vendored
21
.github/workflows/develop_api.yml
vendored
@@ -25,18 +25,13 @@ jobs:
|
||||
- name: Generate API Data
|
||||
run: qmk generate-api
|
||||
|
||||
- name: Install rsync
|
||||
run: |
|
||||
apt-get update && apt-get install -y rsync
|
||||
|
||||
- name: Upload API Data
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
ACCESS_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH: main
|
||||
FOLDER: api_data/v1
|
||||
CLEAN: true
|
||||
GIT_CONFIG_EMAIL: hello@qmk.fm
|
||||
REPOSITORY_NAME: qmk/qmk_keyboards_devel
|
||||
TARGET_FOLDER: v1
|
||||
args: --acl public-read --follow-symlinks --delete
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ secrets.API_SPACE_DEVELOP }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_KEY }}
|
||||
AWS_S3_ENDPOINT: https://nyc3.digitaloceanspaces.com
|
||||
SOURCE_DIR: 'api_data'
|
||||
|
61
.github/workflows/format.yaml
vendored
61
.github/workflows/format.yaml
vendored
@@ -1,43 +1,42 @@
|
||||
name: Format Codebase
|
||||
name: PR Lint Format
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths:
|
||||
- 'drivers/**'
|
||||
- 'lib/arm_atsam/**'
|
||||
- 'lib/lib8tion/**'
|
||||
- 'lib/python/**'
|
||||
- 'platforms/**'
|
||||
- 'quantum/**'
|
||||
- 'tests/**'
|
||||
- 'tmk_core/**'
|
||||
|
||||
jobs:
|
||||
format:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: qmkfm/base_container
|
||||
|
||||
# protect against those who develop with their fork on master
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
steps:
|
||||
- uses: rlespinasse/github-slug-action@v3.x
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.API_TOKEN_GITHUB }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update && apt-get install -y dos2unix
|
||||
|
||||
- name: Format files
|
||||
run: |
|
||||
bin/qmk cformat -a
|
||||
bin/qmk pyformat
|
||||
bin/qmk fileformat
|
||||
|
||||
- name: Become QMK Bot
|
||||
run: |
|
||||
git config user.name 'QMK Bot'
|
||||
git config user.email 'hello@qmk.fm'
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
- uses: trilom/file-changes-action@v1.2.4
|
||||
id: file_changes
|
||||
with:
|
||||
delete-branch: true
|
||||
author: QMK Bot <hello@qmk.fm>
|
||||
committer: QMK Bot <hello@qmk.fm>
|
||||
commit-message: Format code according to conventions
|
||||
title: '[CI] Format code according to conventions'
|
||||
output: ' '
|
||||
fileOutput: ' '
|
||||
|
||||
- name: Run qmk cformat and qmk pyformat
|
||||
shell: 'bash {0}'
|
||||
run: |
|
||||
qmk cformat --core-only -n $(< ~/files.txt)
|
||||
cformat_exit=$?
|
||||
qmk pyformat -n
|
||||
pyformat_exit=$?
|
||||
|
||||
exit $((cformat_exit + pyformat_exit))
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@@ -5,6 +5,7 @@
|
||||
*.eep
|
||||
*.elf
|
||||
*.hex
|
||||
*.uf2
|
||||
*.qmk
|
||||
!util/bootloader.hex
|
||||
!quantum/tools/eeprom_reset.hex
|
||||
@@ -50,6 +51,7 @@ doxygen/
|
||||
.browse.VC.db*
|
||||
*.stackdump
|
||||
# Let these ones be user specific, since we have so many different configurations
|
||||
*.code-workspace
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/launch.json
|
||||
.vscode/tasks.json
|
||||
@@ -71,6 +73,7 @@ id_rsa_*
|
||||
|
||||
# python things
|
||||
__pycache__
|
||||
.python-version
|
||||
|
||||
# prerequisites for updating ChibiOS
|
||||
/util/fmpp*
|
||||
|
17
Makefile
17
Makefile
@@ -29,6 +29,13 @@ $(info QMK Firmware $(QMK_VERSION))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Determine which qmk cli to use
|
||||
ifeq (,$(shell which qmk))
|
||||
QMK_BIN = bin/qmk
|
||||
else
|
||||
QMK_BIN = qmk
|
||||
endif
|
||||
|
||||
# avoid 'Entering|Leaving directory' messages
|
||||
MAKEFLAGS += --no-print-directory
|
||||
|
||||
@@ -86,8 +93,8 @@ clean:
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
echo -n 'Deleting *.bin and *.hex ... '
|
||||
rm -f *.bin *.hex
|
||||
echo -n 'Deleting *.bin, *.hex, and *.uf2 ... '
|
||||
rm -f *.bin *.hex *.uf2
|
||||
echo 'done.'
|
||||
|
||||
#Compatibility with the old make variables, anything you specify directly on the command line
|
||||
@@ -384,7 +391,7 @@ define PARSE_KEYMAP
|
||||
# Format it in bold
|
||||
KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR)
|
||||
# Specify the variables that we are passing forward to submake
|
||||
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY)
|
||||
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY) QMK_BIN=$$(QMK_BIN)
|
||||
# And the first part of the make command
|
||||
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET)
|
||||
# The message to display
|
||||
@@ -501,8 +508,8 @@ endef
|
||||
%:
|
||||
# Check if we have the CMP tool installed
|
||||
cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
|
||||
# Ensure that bin/qmk works. This will be a failing check after the next develop merge
|
||||
if ! bin/qmk hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; fi
|
||||
# Ensure that $(QMK_BIN) works.
|
||||
if ! $(QMK_BIN) hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; exit 1; fi
|
||||
# Check if the submodules are dirty, and display a warning if they are
|
||||
ifndef SKIP_GIT
|
||||
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi
|
||||
|
46
bin/qmk
46
bin/qmk
@@ -3,7 +3,6 @@
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
from importlib.util import find_spec
|
||||
from pathlib import Path
|
||||
|
||||
# Add the QMK python libs to our path
|
||||
@@ -12,51 +11,9 @@ qmk_dir = script_dir.parent
|
||||
python_lib_dir = Path(qmk_dir / 'lib' / 'python').resolve()
|
||||
sys.path.append(str(python_lib_dir))
|
||||
|
||||
|
||||
def _check_modules(requirements):
|
||||
""" Check if the modules in the given requirements.txt are available.
|
||||
"""
|
||||
with Path(qmk_dir / requirements).open() as fd:
|
||||
for line in fd.readlines():
|
||||
line = line.strip().replace('<', '=').replace('>', '=')
|
||||
|
||||
if len(line) == 0 or line[0] == '#' or line.startswith('-r'):
|
||||
continue
|
||||
|
||||
if '#' in line:
|
||||
line = line.split('#')[0]
|
||||
|
||||
module = dict()
|
||||
module['name'] = module['import'] = line.split('=')[0] if '=' in line else line
|
||||
|
||||
# Not every module is importable by its own name.
|
||||
if module['name'] == "pep8-naming":
|
||||
module['import'] = "pep8ext_naming"
|
||||
|
||||
if not find_spec(module['import']):
|
||||
print('Could not find module %s!' % module['name'])
|
||||
print('Please run `python3 -m pip install -r %s` to install required python dependencies.' % (qmk_dir / requirements,))
|
||||
if developer:
|
||||
print('You can also turn off developer mode: qmk config user.developer=None')
|
||||
print()
|
||||
exit(255)
|
||||
|
||||
|
||||
developer = False
|
||||
# Make sure our modules have been setup
|
||||
_check_modules('requirements.txt')
|
||||
|
||||
# Setup the CLI
|
||||
import milc # noqa
|
||||
|
||||
# For developers additional modules are needed
|
||||
if milc.cli.config.user.developer:
|
||||
# Do not run the check for 'config',
|
||||
# so users can turn off developer mode
|
||||
if len(sys.argv) == 1 or (len(sys.argv) > 1 and 'config' != sys.argv[1]):
|
||||
developer = True
|
||||
_check_modules('requirements-dev.txt')
|
||||
|
||||
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
||||
|
||||
|
||||
@@ -72,8 +29,11 @@ def main():
|
||||
"""
|
||||
# Change to the root of our checkout
|
||||
os.environ['ORIG_CWD'] = os.getcwd()
|
||||
os.environ['DEPRECATED_BIN_QMK'] = '1'
|
||||
os.chdir(qmk_dir)
|
||||
|
||||
print('Warning: The bin/qmk script is being deprecated. Please install the QMK CLI: python3 -m pip install qmk', file=sys.stderr)
|
||||
|
||||
# Import the subcommands
|
||||
import qmk.cli # noqa
|
||||
|
||||
|
@@ -40,7 +40,7 @@
|
||||
ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
|
||||
OPT_DEFS += -DBOOTLOADER_DFU
|
||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||
ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||
@@ -50,7 +50,7 @@ endif
|
||||
ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_LUFA_DFU
|
||||
OPT_DEFS += -DBOOTLOADER_DFU
|
||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||
ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||
@@ -60,7 +60,7 @@ endif
|
||||
ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_QMK_DFU
|
||||
OPT_DEFS += -DBOOTLOADER_DFU
|
||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||
ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||
@@ -89,11 +89,17 @@ ifeq ($(strip $(BOOTLOADER)), USBasp)
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), lufa-ms)
|
||||
# DO NOT USE THIS BOOTLOADER IN NEW PROJECTS!
|
||||
# It is extremely prone to bricking, and is only included to support existing boards.
|
||||
OPT_DEFS += -DBOOTLOADER_MS
|
||||
BOOTLOADER_SIZE = 6144
|
||||
FIRMWARE_FORMAT = bin
|
||||
cpfirmware: lufa_warning
|
||||
.INTERMEDIATE: lufa_warning
|
||||
lufa_warning: $(FIRMWARE_FORMAT)
|
||||
$(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@)
|
||||
$(info LUFA MASS STORAGE Bootloader selected)
|
||||
$(info DO NOT USE THIS BOOTLOADER IN NEW PROJECTS!)
|
||||
$(info It is extremely prone to bricking, and is only included to support existing boards.)
|
||||
$(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@)
|
||||
endif
|
||||
ifdef BOOTLOADER_SIZE
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE))
|
||||
@@ -137,3 +143,6 @@ ifeq ($(strip $(BOOTLOADER)), stm32duino)
|
||||
DFU_ARGS = -d 1EAF:0003 -a 2 -R
|
||||
DFU_SUFFIX_ARGS = -v 1EAF -p 0003
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), tinyuf2)
|
||||
OPT_DEFS += -DBOOTLOADER_TINYUF2
|
||||
endif
|
||||
|
@@ -28,4 +28,4 @@ endif
|
||||
|
||||
# Generate the keymap.c
|
||||
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
|
||||
bin/qmk json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
|
||||
$(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
|
||||
|
@@ -12,6 +12,9 @@ endif
|
||||
|
||||
include common.mk
|
||||
|
||||
# Set the qmk cli to use
|
||||
QMK_BIN ?= qmk
|
||||
|
||||
# Set the filename for the final firmware binary
|
||||
KEYBOARD_FILESAFE := $(subst /,_,$(KEYBOARD))
|
||||
TARGET ?= $(KEYBOARD_FILESAFE)_$(KEYMAP)
|
||||
@@ -90,13 +93,16 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_1)/rules.mk)","")
|
||||
include $(KEYBOARD_PATH_1)/rules.mk
|
||||
endif
|
||||
|
||||
|
||||
MAIN_KEYMAP_PATH_1 := $(KEYBOARD_PATH_1)/keymaps/$(KEYMAP)
|
||||
MAIN_KEYMAP_PATH_2 := $(KEYBOARD_PATH_2)/keymaps/$(KEYMAP)
|
||||
MAIN_KEYMAP_PATH_3 := $(KEYBOARD_PATH_3)/keymaps/$(KEYMAP)
|
||||
MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP)
|
||||
MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)
|
||||
|
||||
# Pull in rules from info.json
|
||||
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/rules.mk)
|
||||
include $(INFO_RULES_MK)
|
||||
|
||||
# Check for keymap.json first, so we can regenerate keymap.c
|
||||
include build_json.mk
|
||||
|
||||
@@ -136,9 +142,7 @@ ifeq ($(strip $(CTPC)), yes)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
|
||||
TARGET := $(TARGET)_proton_c
|
||||
include platforms/chibios/GENERIC_STM32_F303XC/configs/proton_c.mk
|
||||
OPT_DEFS += -DCONVERT_TO_PROTON_C
|
||||
include platforms/chibios/QMK_PROTON_C/convert_to_proton_c.mk
|
||||
endif
|
||||
|
||||
ifneq ($(FORCE_LAYOUT),)
|
||||
@@ -204,6 +208,7 @@ endif
|
||||
#
|
||||
# https://docs.qmk.fm/#/feature_layouts?id=tips-for-making-layouts-keyboard-agnostic
|
||||
#
|
||||
QMK_KEYBOARD_H = $(KEYBOARD_OUTPUT)/src/default_keyboard.h
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/$(KEYBOARD_FOLDER_1).h)","")
|
||||
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_1).h
|
||||
endif
|
||||
@@ -272,6 +277,39 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_5)/post_config.h)","")
|
||||
POST_CONFIG_H += $(KEYBOARD_PATH_5)/post_config.h
|
||||
endif
|
||||
|
||||
# Pull in stuff from info.json
|
||||
INFO_JSON_FILES :=
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/info.json)","")
|
||||
INFO_JSON_FILES += $(KEYBOARD_PATH_1)/info.json
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_2)/info.json)","")
|
||||
INFO_JSON_FILES += $(KEYBOARD_PATH_2)/info.json
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_3)/info.json)","")
|
||||
INFO_JSON_FILES += $(KEYBOARD_PATH_3)/info.json
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_4)/info.json)","")
|
||||
INFO_JSON_FILES += $(KEYBOARD_PATH_4)/info.json
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/info.json)","")
|
||||
INFO_JSON_FILES += $(KEYBOARD_PATH_5)/info.json
|
||||
endif
|
||||
|
||||
CONFIG_H += $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h
|
||||
|
||||
$(KEYBOARD_OUTPUT)/src/info_config.h: $(INFO_JSON_FILES)
|
||||
$(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_config.h
|
||||
|
||||
$(KEYBOARD_OUTPUT)/src/default_keyboard.h: $(INFO_JSON_FILES)
|
||||
$(QMK_BIN) generate-keyboard-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/default_keyboard.h
|
||||
|
||||
$(KEYBOARD_OUTPUT)/src/layouts.h: $(INFO_JSON_FILES)
|
||||
$(QMK_BIN) generate-layouts --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/layouts.h
|
||||
|
||||
generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/default_keyboard.h $(KEYBOARD_OUTPUT)/src/layouts.h
|
||||
|
||||
.INTERMEDIATE : generated-files
|
||||
|
||||
# Userspace setup and definitions
|
||||
ifeq ("$(USER_NAME)","")
|
||||
USER_NAME := $(KEYMAP)
|
||||
@@ -282,6 +320,9 @@ USER_PATH := users/$(USER_NAME)
|
||||
ifneq ("$(wildcard $(USER_PATH)/config.h)","")
|
||||
CONFIG_H += $(USER_PATH)/config.h
|
||||
endif
|
||||
ifneq ("$(wildcard $(USER_PATH)/post_config.h)","")
|
||||
POST_CONFIG_H += $(USER_PATH)/post_config.h
|
||||
endif
|
||||
|
||||
# Disable features that a keyboard doesn't support
|
||||
-include disable_features.mk
|
||||
@@ -351,7 +392,7 @@ ALL_CONFIGS := $(PROJECT_CONFIG) $(CONFIG_H)
|
||||
OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
|
||||
$(KEYMAP_OUTPUT)_SRC := $(SRC)
|
||||
$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) \
|
||||
-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(QMK_KEYBOARD_H)\" -DQMK_KEYBOARD_CONFIG_H=\"$(KEYBOARD_PATH_1)/config.h\" \
|
||||
-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(QMK_KEYBOARD_H)\" \
|
||||
-DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\" \
|
||||
-DQMK_SUBPROJECT -DQMK_SUBPROJECT_H -DQMK_SUBPROJECT_CONFIG_H
|
||||
$(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS)
|
||||
@@ -376,3 +417,9 @@ objs-size: build
|
||||
|
||||
include show_options.mk
|
||||
include $(TMK_PATH)/rules.mk
|
||||
|
||||
# Ensure we have generated files available for each of the objects
|
||||
define GEN_FILES
|
||||
$1: generated-files
|
||||
endef
|
||||
$(foreach O,$(OBJ),$(eval $(call GEN_FILES,$(patsubst %.a,%.o,$(O)))))
|
||||
|
@@ -17,16 +17,12 @@ SERIAL_PATH := $(QUANTUM_PATH)/serial_link
|
||||
|
||||
QUANTUM_SRC += \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/send_string.c \
|
||||
$(QUANTUM_DIR)/bitwise.c \
|
||||
$(QUANTUM_DIR)/led.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
$(QUANTUM_DIR)/keycode_config.c
|
||||
|
||||
KEYBOARD_ENABLE ?= yes
|
||||
ifeq ($(strip $(KEYBOARD_ENABLE)), yes)
|
||||
OPT_DEFS += -DKEYBOARD_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), yes)
|
||||
OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
|
||||
CONSOLE_ENABLE = yes
|
||||
@@ -47,12 +43,31 @@ ifeq ($(strip $(COMMAND_ENABLE)), yes)
|
||||
OPT_DEFS += -DCOMMAND_ENABLE
|
||||
endif
|
||||
|
||||
AUDIO_ENABLE ?= no
|
||||
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||
ifeq ($(PLATFORM),CHIBIOS)
|
||||
AUDIO_DRIVER ?= dac_basic
|
||||
ifeq ($(strip $(AUDIO_DRIVER)), dac_basic)
|
||||
OPT_DEFS += -DAUDIO_DRIVER_DAC
|
||||
else ifeq ($(strip $(AUDIO_DRIVER)), dac_additive)
|
||||
OPT_DEFS += -DAUDIO_DRIVER_DAC
|
||||
## stm32f2 and above have a usable DAC unit, f1 do not, and need to use pwm instead
|
||||
else ifeq ($(strip $(AUDIO_DRIVER)), pwm_software)
|
||||
OPT_DEFS += -DAUDIO_DRIVER_PWM
|
||||
else ifeq ($(strip $(AUDIO_DRIVER)), pwm_hardware)
|
||||
OPT_DEFS += -DAUDIO_DRIVER_PWM
|
||||
endif
|
||||
else
|
||||
# fallback for all other platforms is pwm
|
||||
AUDIO_DRIVER ?= pwm_hardware
|
||||
OPT_DEFS += -DAUDIO_DRIVER_PWM
|
||||
endif
|
||||
OPT_DEFS += -DAUDIO_ENABLE
|
||||
MUSIC_ENABLE = yes
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
|
||||
SRC += $(QUANTUM_DIR)/audio/audio_$(PLATFORM_KEY).c
|
||||
SRC += $(QUANTUM_DIR)/audio/audio.c ## common audio code, hardware agnostic
|
||||
SRC += $(QUANTUM_DIR)/audio/driver_$(PLATFORM_KEY)_$(strip $(AUDIO_DRIVER)).c
|
||||
SRC += $(QUANTUM_DIR)/audio/voices.c
|
||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||
endif
|
||||
@@ -85,9 +100,10 @@ ifeq ($(strip $(VIRTSER_ENABLE)), yes)
|
||||
OPT_DEFS += -DVIRTSER_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
|
||||
OPT_DEFS += -DFAUXCLICKY_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/fauxclicky.c
|
||||
ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
|
||||
OPT_DEFS += -DMOUSEKEY_ENABLE
|
||||
OPT_DEFS += -DMOUSE_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/mousekey.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
|
||||
@@ -146,7 +162,7 @@ else
|
||||
# This ensures that the EEPROM page buffer fits into RAM
|
||||
USE_PROCESS_STACKSIZE = 0x600
|
||||
USE_EXCEPTIONS_STACKSIZE = 0x300
|
||||
|
||||
|
||||
SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
|
||||
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
|
||||
OPT_DEFS += -DEEPROM_EMU_STM32F042x6
|
||||
@@ -167,20 +183,39 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h
|
||||
OPT_DEFS += -DRGBLIGHT_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/color.c
|
||||
SRC += $(QUANTUM_DIR)/rgblight.c
|
||||
CIE1931_CURVE := yes
|
||||
RGB_KEYCODES_ENABLE := yes
|
||||
ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
|
||||
else
|
||||
WS2812_DRIVER_REQUIRED := yes
|
||||
endif
|
||||
RGBLIGHT_ENABLE ?= no
|
||||
VALID_RGBLIGHT_TYPES := WS2812 APA102 custom
|
||||
|
||||
ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
|
||||
RGBLIGHT_DRIVER ?= custom
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
RGBLIGHT_DRIVER ?= WS2812
|
||||
|
||||
ifeq ($(filter $(RGBLIGHT_DRIVER),$(VALID_RGBLIGHT_TYPES)),)
|
||||
$(error RGBLIGHT_DRIVER="$(RGBLIGHT_DRIVER)" is not a valid RGB type)
|
||||
else
|
||||
POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h
|
||||
OPT_DEFS += -DRGBLIGHT_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/color.c
|
||||
SRC += $(QUANTUM_DIR)/rgblight.c
|
||||
CIE1931_CURVE := yes
|
||||
RGB_KEYCODES_ENABLE := yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGBLIGHT_DRIVER)), WS2812)
|
||||
WS2812_DRIVER_REQUIRED := yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGBLIGHT_DRIVER)), APA102)
|
||||
APA102_DRIVER_REQUIRED := yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGBLIGHT_DRIVER)), custom)
|
||||
OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
|
||||
endif
|
||||
endif
|
||||
|
||||
LED_MATRIX_ENABLE ?= no
|
||||
VALID_LED_MATRIX_TYPES := IS31FL3731 custom
|
||||
@@ -188,14 +223,17 @@ VALID_LED_MATRIX_TYPES := IS31FL3731 custom
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
|
||||
ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),)
|
||||
$(error LED_MATRIX_DRIVER="$(LED_MATRIX_DRIVER)" is not a valid matrix type)
|
||||
else
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BACKLIGHT_DRIVER = custom
|
||||
OPT_DEFS += -DLED_MATRIX_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/led_matrix.c
|
||||
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
|
||||
$(error "$(LED_MATRIX_DRIVER)" is not a valid matrix type)
|
||||
endif
|
||||
OPT_DEFS += -DLED_MATRIX_ENABLE
|
||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
|
||||
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
|
||||
OPT_DEFS += -DLIB8_ATTINY
|
||||
endif
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
|
||||
SRC += $(QUANTUM_DIR)/led_matrix.c
|
||||
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
|
||||
CIE1931_CURVE := yes
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
|
||||
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
@@ -213,7 +251,7 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||
$(error "$(RGB_MATRIX_DRIVER)" is not a valid matrix type)
|
||||
endif
|
||||
OPT_DEFS += -DRGB_MATRIX_ENABLE
|
||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2))
|
||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
|
||||
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
|
||||
OPT_DEFS += -DLIB8_ATTINY
|
||||
endif
|
||||
@@ -256,6 +294,11 @@ endif
|
||||
WS2812_DRIVER_REQUIRED := yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), APA102)
|
||||
OPT_DEFS += -DAPA102
|
||||
APA102_DRIVER_REQUIRED := yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
|
||||
OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB
|
||||
endif
|
||||
@@ -307,7 +350,11 @@ endif
|
||||
VALID_BACKLIGHT_TYPES := pwm timer software custom
|
||||
|
||||
BACKLIGHT_ENABLE ?= no
|
||||
BACKLIGHT_DRIVER ?= pwm
|
||||
ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
|
||||
BACKLIGHT_DRIVER ?= software
|
||||
else
|
||||
BACKLIGHT_DRIVER ?= pwm
|
||||
endif
|
||||
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
||||
ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),)
|
||||
$(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
|
||||
@@ -358,6 +405,11 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(APA102_DRIVER_REQUIRED)), yes)
|
||||
COMMON_VPATH += $(DRIVER_PATH)/apa102
|
||||
SRC += apa102.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||
CIE1931_CURVE := yes
|
||||
endif
|
||||
@@ -377,10 +429,6 @@ ifeq ($(strip $(TERMINAL_ENABLE)), yes)
|
||||
OPT_DEFS += -DUSER_PRINT
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(USB_HID_ENABLE)), yes)
|
||||
include $(TMK_DIR)/protocol/usb_hid.mk
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(WPM_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/wpm.c
|
||||
OPT_DEFS += -DWPM_ENABLE
|
||||
@@ -414,6 +462,23 @@ ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/dip_switch.c
|
||||
endif
|
||||
|
||||
VALID_MAGIC_TYPES := yes full lite
|
||||
BOOTMAGIC_ENABLE ?= no
|
||||
ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
|
||||
ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),)
|
||||
$(error BOOTMAGIC_ENABLE="$(BOOTMAGIC_ENABLE)" is not a valid type of magic)
|
||||
endif
|
||||
ifneq ($(strip $(BOOTMAGIC_ENABLE)), full)
|
||||
OPT_DEFS += -DBOOTMAGIC_LITE
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_lite.c
|
||||
else
|
||||
OPT_DEFS += -DBOOTMAGIC_ENABLE
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_full.c
|
||||
endif
|
||||
endif
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/bootmagic
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/magic.c
|
||||
|
||||
VALID_CUSTOM_MATRIX_TYPES:= yes lite no
|
||||
|
||||
CUSTOM_MATRIX ?= no
|
||||
@@ -464,7 +529,7 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||
|
||||
# Determine which (if any) transport files are required
|
||||
ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c
|
||||
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/transport.c
|
||||
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
|
||||
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
|
||||
ifeq ($(PLATFORM),AVR)
|
||||
@@ -606,7 +671,26 @@ ifeq ($(strip $(JOYSTICK_ENABLE)), digital)
|
||||
OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(SWITCH_CONTROLLER_ENABLE)), yes)
|
||||
OPT_DEFS += -DSWITCH_CONTROLLER_ENABLE
|
||||
OPT_DEFS += -DGAMEPAD_ENABLE
|
||||
endif
|
||||
USBPD_ENABLE ?= no
|
||||
VALID_USBPD_DRIVER_TYPES = custom vendor
|
||||
USBPD_DRIVER ?= vendor
|
||||
ifeq ($(strip $(USBPD_ENABLE)), yes)
|
||||
ifeq ($(filter $(strip $(USBPD_DRIVER)),$(VALID_USBPD_DRIVER_TYPES)),)
|
||||
$(error USBPD_DRIVER="$(USBPD_DRIVER)" is not a valid USBPD driver)
|
||||
else
|
||||
OPT_DEFS += -DUSBPD_ENABLE
|
||||
ifeq ($(strip $(USBPD_DRIVER)), vendor)
|
||||
# Vendor-specific implementations
|
||||
OPT_DEFS += -DUSBPD_VENDOR
|
||||
ifeq ($(strip $(MCU_SERIES)), STM32G4xx)
|
||||
OPT_DEFS += -DUSBPD_STM32G4
|
||||
SRC += usbpd_stm32g4.c
|
||||
else
|
||||
$(error There is no vendor-provided USBPD driver available)
|
||||
endif
|
||||
else ifeq ($(strip $(USBPD_DRIVER)), custom)
|
||||
OPT_DEFS += -DUSBPD_CUSTOM
|
||||
# Board designers can add their own driver to $(SRC)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
46
data/mappings/info_config.json
Normal file
46
data/mappings/info_config.json
Normal file
@@ -0,0 +1,46 @@
|
||||
# This file maps keys between `config.h` and `info.json`. It is used by QMK
|
||||
# to correctly and consistently map back and forth between the two systems.
|
||||
{
|
||||
# Format:
|
||||
# <config.h key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]}
|
||||
# value_type: one of "array", "array.int", "int", "hex", "list", "mapping"
|
||||
# to_json: Default `true`. Set to `false` to exclude this mapping from info.json
|
||||
# to_c: Default `true`. Set to `false` to exclude this mapping from config.h
|
||||
# warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places
|
||||
"DEBOUNCE": {"info_key": "debounce", "value_type": "int"}
|
||||
"DEVICE_VER": {"info_key": "usb.device_ver", "value_type": "hex"},
|
||||
"DESCRIPTION": {"info_key": "keyboard_folder", "to_json": false},
|
||||
"DIODE_DIRECTION": {"info_key": "diode_direction"},
|
||||
"LAYOUTS": {"info_key": "layout_aliases", "value_type": "mapping"},
|
||||
"LED_CAPS_LOCK_PIN": {"info_key": "indicators.caps_lock"},
|
||||
"LED_NUM_LOCK_PIN": {"info_key": "indicators.num_lock"},
|
||||
"LED_SCROLL_LOCK_PIN": {"info_key": "indicators.scroll_lock"},
|
||||
"MANUFACTURER": {"info_key": "manufacturer"},
|
||||
"RGB_DI_PIN": {"info_key": "rgblight.pin"},
|
||||
"RGBLED_NUM": {"info_key": "rgblight.led_count", "value_type": "int"},
|
||||
"RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"},
|
||||
"RGBLIGHT_ANIMATIONS": {"info_key": "rgblight.animations.all", "value_type": "bool"},
|
||||
"RGBLIGHT_EFFECT_ALTERNATING": {"info_key": "rgblight.animations.alternating", "value_type": "bool"},
|
||||
"RGBLIGHT_EFFECT_BREATHING": {"info_key": "rgblight.animations.breathing", "value_type": "bool"},
|
||||
"RGBLIGHT_EFFECT_CHRISTMAS": {"info_key": "rgblight.animations.christmas", "value_type": "bool"},
|
||||
"RGBLIGHT_EFFECT_KNIGHT": {"info_key": "rgblight.animations.knight", "value_type": "bool"},
|
||||
"RGBLIGHT_EFFECT_RAINBOW_MOOD": {"info_key": "rgblight.animations.rainbow_mood", "value_type": "bool"},
|
||||
"RGBLIGHT_EFFECT_RAINBOW_SWIRL": {"info_key": "rgblight.animations.rainbow_swirl", "value_type": "bool"},
|
||||
"RGBLIGHT_EFFECT_RGB_TEST": {"info_key": "rgblight.animations.rgb_test", "value_type": "bool"},
|
||||
"RGBLIGHT_EFFECT_SNAKE": {"info_key": "rgblight.animations.snake", "value_type": "bool"},
|
||||
"RGBLIGHT_EFFECT_STATIC_GRADIENT": {"info_key": "rgblight.animations.static_gradient", "value_type": "bool"},
|
||||
"RGBLIGHT_EFFECT_TWINKLE": {"info_key": "rgblight.animations.twinkle"},
|
||||
"RGBLIGHT_LIMIT_VAL": {"info_key": "rgblight.max_brightness", "value_type": "int"},
|
||||
"RGBLIGHT_HUE_STEP": {"info_key": "rgblight.hue_steps", "value_type": "int"},
|
||||
"RGBLIGHT_SAT_STEP": {"info_key": "rgblight.saturation_steps", "value_type": "int"},
|
||||
"RGBLIGHT_VAL_STEP": {"info_key": "rgblight.brightness_steps", "value_type": "int"},
|
||||
"RGBLIGHT_SLEEP": {"info_key": "rgblight.sleep", "value_type": "bool"},
|
||||
"RGBLIGHT_SPLIT": {"info_key": "rgblight.split", "value_type": "bool"},
|
||||
"PRODUCT": {"info_key": "keyboard_folder", "to_json": false},
|
||||
"PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex"},
|
||||
"VENDOR_ID": {"info_key": "usb.vid", "value_type": "hex"},
|
||||
"QMK_ESC_OUTPUT": {"info_key": "qmk_lufa_bootloader.esc_output"},
|
||||
"QMK_ESC_INPUT": {"info_key": "qmk_lufa_bootloader.esc_input"},
|
||||
"QMK_LED": {"info_key": "qmk_lufa_bootloader.led"},
|
||||
"QMK_SPEAKER": {"info_key": "qmk_lufa_bootloader.speaker"}
|
||||
}
|
15
data/mappings/info_rules.json
Normal file
15
data/mappings/info_rules.json
Normal file
@@ -0,0 +1,15 @@
|
||||
# This file maps keys between `rules.mk` and `info.json`. It is used by QMK
|
||||
# to correctly and consistently map back and forth between the two systems.
|
||||
{
|
||||
# Format:
|
||||
# <rules.mk key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]}
|
||||
# value_type: one of "array", "array.int", "int", "list", "hex", "mapping"
|
||||
# to_json: Default `true`. Set to `false` to exclude this mapping from info.json
|
||||
# to_c: Default `true`. Set to `false` to exclude this mapping from rules.mk
|
||||
# warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places
|
||||
"BOARD": {"info_key": "board"},
|
||||
"BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false},
|
||||
"LAYOUTS": {"info_key": "community_layouts", "value_type": "list"},
|
||||
"LED_MATRIX_DRIVER": {"info_key": "led_matrix.driver"},
|
||||
"MCU": {"info_key": "processor", "warn_duplicate": false},
|
||||
}
|
443
data/mappings/keyboard_aliases.json
Normal file
443
data/mappings/keyboard_aliases.json
Normal file
@@ -0,0 +1,443 @@
|
||||
{
|
||||
# Format for each entry:
|
||||
# <alias>: {
|
||||
# target: <keyboard_folder>,
|
||||
# layouts: {
|
||||
# <layout_alias>: <layout_target>
|
||||
# }
|
||||
# }
|
||||
#
|
||||
# Both target and layouts are optional.
|
||||
'2_milk': {
|
||||
target: 'spaceman/2_milk'
|
||||
},
|
||||
'aeboards/ext65': {
|
||||
target: 'aeboards/ext65/rev1'
|
||||
},
|
||||
'ai03/equinox': {
|
||||
target: 'ai03/equinox/rev1'
|
||||
},
|
||||
aleth42: {
|
||||
target: 'aleth42/rev1'
|
||||
},
|
||||
alice: {
|
||||
target: 'tgr/alice'
|
||||
},
|
||||
angel17: {
|
||||
target: 'angel17/alpha'
|
||||
},
|
||||
angel64: {
|
||||
target: 'angel64/alpha'
|
||||
},
|
||||
at101_blackheart: {
|
||||
target: 'at101_bh'
|
||||
},
|
||||
'atom47/rev2': {
|
||||
target: 'maartenwut/atom47/rev2'
|
||||
},
|
||||
'atom47/rev3': {
|
||||
target: 'maartenwut/atom47/rev3'
|
||||
},
|
||||
bear_face: {
|
||||
target: 'bear_face/v1'
|
||||
},
|
||||
'bpiphany/pegasushoof': {
|
||||
target: 'bpiphany/pegasushoof/2013'
|
||||
},
|
||||
chavdai40: {
|
||||
target: 'chavdai40/rev1'
|
||||
},
|
||||
'candybar/lefty': {
|
||||
target: 'tkc/candybar/lefty'
|
||||
},
|
||||
'candybar/righty': {
|
||||
target: 'tkc/candybar/righty'
|
||||
},
|
||||
canoe: {
|
||||
target: 'percent/canoe'
|
||||
},
|
||||
'cmm_studio/saka68': {
|
||||
target: 'cmm_studio/saka68/solder'
|
||||
},
|
||||
'crkbd/rev1': {
|
||||
target: 'crkbd/rev1/legacy'
|
||||
},
|
||||
'doro67/multi': {
|
||||
layouts: {
|
||||
LAYOUT_ansi: 'LAYOUT_65_ansi_blocker'
|
||||
}
|
||||
},
|
||||
'doro67/regular': {
|
||||
layouts: {
|
||||
LAYOUT: 'LAYOUT_65_ansi_blocker'
|
||||
}
|
||||
},
|
||||
'doro67/rgb': {
|
||||
layouts: {
|
||||
LAYOUT: 'LAYOUT_65_ansi_blocker'
|
||||
}
|
||||
},
|
||||
drakon: {
|
||||
target: 'jagdpietr/drakon'
|
||||
},
|
||||
'dztech/dz60rgb': {
|
||||
target: 'dztech/dz60rgb/v1'
|
||||
},
|
||||
'dztech/dz60rgb_ansi': {
|
||||
target: 'dztech/dz60rgb_ansi/v1'
|
||||
},
|
||||
'dztech/dz60rgb_wkl': {
|
||||
target: 'dztech/dz60rgb_wkl/v1'
|
||||
},
|
||||
'dztech/dz65rgb': {
|
||||
target: 'dztech/dz65rgb/v1'
|
||||
},
|
||||
eek: {
|
||||
target: 'eek/silk_down'
|
||||
},
|
||||
ergoinu: {
|
||||
target: 'dm9records/ergoinu'
|
||||
},
|
||||
'exclusive/e85': {
|
||||
target: 'exclusive/e85/hotswap'
|
||||
},
|
||||
gh60: {
|
||||
target: 'gh60/revc'
|
||||
},
|
||||
'handwired/ferris': {
|
||||
target: 'ferris/0_1'
|
||||
},
|
||||
'helix/pico/sc/back': {
|
||||
target: 'helix/pico/sc'
|
||||
},
|
||||
'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'
|
||||
},
|
||||
id80: {
|
||||
target: 'id80/ansi'
|
||||
},
|
||||
idb_60: {
|
||||
target: 'idb/idb_60',
|
||||
layouts: {
|
||||
LAYOUT: 'LAYOUT_all'
|
||||
}
|
||||
},
|
||||
jones: {
|
||||
target: 'jones/v03_1'
|
||||
},
|
||||
katana60: {
|
||||
target: 'rominronin/katana60/rev1'
|
||||
},
|
||||
'kbdfans/kbd67mkiirgb': {
|
||||
target: 'kbdfans/kbd67/mkiirgb',
|
||||
layouts: {
|
||||
LAYOUT: 'LAYOUT_65_ansi_blocker'
|
||||
}
|
||||
},
|
||||
'kbdfans/kbd67/mkiirgb': {
|
||||
target: 'kbdfans/kbd67/mkiirgb/v1'
|
||||
},
|
||||
'keebio/dsp40': {
|
||||
target: 'keebio/dsp40/rev1'
|
||||
},
|
||||
'keycapsss/plaid_pad': {
|
||||
target: 'keycapsss/plaid_pad/rev1'
|
||||
},
|
||||
kudox: {
|
||||
target: 'kudox/rev1'
|
||||
},
|
||||
'lfkeyboards/lfk78': {
|
||||
target: 'lfkeyboards/lfk78/revj'
|
||||
},
|
||||
'lfkeyboards/smk65': {
|
||||
target: 'lfkeyboards/smk65/revb'
|
||||
},
|
||||
'maartenwut/atom47/rev2': {
|
||||
target: 'evyd13/atom47/rev2'
|
||||
},
|
||||
'maartenwut/atom47/rev3': {
|
||||
target: 'evyd13/atom47/rev3'
|
||||
},
|
||||
'maartenwut/eon40': {
|
||||
target: 'evyd13/eon40'
|
||||
},
|
||||
'maartenwut/eon65': {
|
||||
target: 'evyd13/eon65'
|
||||
},
|
||||
'maartenwut/eon75': {
|
||||
target: 'evyd13/eon75'
|
||||
},
|
||||
'maartenwut/eon87': {
|
||||
target: 'evyd13/eon87'
|
||||
},
|
||||
'maartenwut/eon95': {
|
||||
target: 'evyd13/eon95'
|
||||
},
|
||||
'maartenwut/gh80_1800': {
|
||||
target: 'evyd13/gh80_1800'
|
||||
},
|
||||
'maartenwut/gh80_3700': {
|
||||
target: 'evyd13/gh80_3700'
|
||||
},
|
||||
'maartenwut/minitomic': {
|
||||
target: 'evyd13/minitomic'
|
||||
},
|
||||
'maartenwut/mx5160': {
|
||||
target: 'evyd13/mx5160'
|
||||
},
|
||||
'maartenwut/nt660': {
|
||||
target: 'evyd13/nt660'
|
||||
},
|
||||
'maartenwut/omrontkl': {
|
||||
target: 'evyd13/omrontkl'
|
||||
},
|
||||
'maartenwut/plain60': {
|
||||
target: 'evyd13/plain60'
|
||||
},
|
||||
'maartenwut/pockettype': {
|
||||
target: 'evyd13/pockettype'
|
||||
},
|
||||
'maartenwut/quackfire': {
|
||||
target: 'evyd13/quackfire'
|
||||
},
|
||||
'maartenwut/solheim68': {
|
||||
target: 'evyd13/solheim68'
|
||||
},
|
||||
'maartenwut/ta65': {
|
||||
target: 'evyd13/ta65'
|
||||
},
|
||||
'maartenwut/wasdat': {
|
||||
target: 'evyd13/wasdat'
|
||||
},
|
||||
'maartenwut/wasdat_code': {
|
||||
target: 'evyd13/wasdat_code'
|
||||
},
|
||||
'maartenwut/wonderland': {
|
||||
target: 'evyd13/wonderland'
|
||||
},
|
||||
'mechlovin/hannah910': {
|
||||
target: 'mechlovin/hannah910/rev1'
|
||||
},
|
||||
'mechlovin/adelais/rgb_led': {
|
||||
target: 'mechlovin/adelais/rgb_led/rev1'
|
||||
},
|
||||
'mechlovin/adelais/standard_led': {
|
||||
target: 'mechlovin/adelais/standard_led/rev2'
|
||||
},
|
||||
'mechlovin/delphine': {
|
||||
target: 'mechlovin/delphine/mono_led'
|
||||
},
|
||||
'mechlovin/hannah60rgb': {
|
||||
target: 'mechlovin/hannah60rgb/rev1'
|
||||
},
|
||||
'melgeek/z70ultra': {
|
||||
target: 'melgeek/z70ultra/rev1'
|
||||
},
|
||||
'mechlovin/hannah65': {
|
||||
target: 'mechlovin/hannah65/rev1'
|
||||
},
|
||||
model01: {
|
||||
target: 'keyboardio/model01'
|
||||
},
|
||||
m0lly: {
|
||||
target: 'tkc/m0lly'
|
||||
},
|
||||
'montsinger/rebound': {
|
||||
target: 'montsinger/rebound/rev1'
|
||||
},
|
||||
nomu30: {
|
||||
target: 'nomu30/rev1'
|
||||
},
|
||||
'noxary/268_2': {
|
||||
layouts: {
|
||||
LAYOUT: 'LAYOUT_65_ansi_blocker'
|
||||
}
|
||||
},
|
||||
oddball: {
|
||||
target: 'oddball/v1'
|
||||
},
|
||||
omnikey_blackheart: {
|
||||
target: 'omnikey_bh'
|
||||
},
|
||||
'pabile/p20': {
|
||||
target: 'pabile/p20/ver1'
|
||||
},
|
||||
'pancake/feather': {
|
||||
target: 'spaceman/pancake/feather'
|
||||
},
|
||||
'pancake/promicro': {
|
||||
target: 'spaceman/pancake/promicro'
|
||||
},
|
||||
'percent/canoe': {
|
||||
layouts: {
|
||||
LAYOUT_iso: 'LAYOUT_65_iso_blocker'
|
||||
}
|
||||
},
|
||||
plaid: {
|
||||
target: 'dm9records/plaid'
|
||||
},
|
||||
plain60: {
|
||||
target: 'maartenwut/plain60'
|
||||
},
|
||||
'ploopyco/trackball': {
|
||||
target: 'ploopyco/trackball/rev1_005'
|
||||
},
|
||||
polilla: {
|
||||
target: 'polilla/rev1'
|
||||
},
|
||||
'preonic/rev1': {
|
||||
layouts: {
|
||||
LAYOUT_preonic_grid: 'LAYOUT_ortho_5x12'
|
||||
}
|
||||
},
|
||||
'preonic/rev2': {
|
||||
layouts: {
|
||||
LAYOUT_preonic_grid: 'LAYOUT_ortho_5x12'
|
||||
}
|
||||
},
|
||||
'preonic/rev3': {
|
||||
layouts: {
|
||||
LAYOUT_preonic_grid: 'LAYOUT_ortho_5x12'
|
||||
}
|
||||
},
|
||||
'primekb/prime_l': {
|
||||
target: 'primekb/prime_l/v1'
|
||||
},
|
||||
'primekb/prime_l_v2': {
|
||||
target: 'primekb/prime_l/v2'
|
||||
},
|
||||
'projectkb/alice': {
|
||||
target: 'projectkb/alice/rev1'
|
||||
},
|
||||
'rama/koyu': {
|
||||
target: 'wilba_tech/rama_works_koyu'
|
||||
},
|
||||
'rama/m6_a': {
|
||||
target: 'wilba_tech/rama_works_m6_a'
|
||||
},
|
||||
'rama/m6_b': {
|
||||
target: 'wilba_tech/rama_works_m6_b'
|
||||
},
|
||||
'rama/m10_b': {
|
||||
target: 'wilba_tech/rama_works_m10_b'
|
||||
},
|
||||
'rama/m60_a': {
|
||||
target: 'wilba_tech/rama_works_m60_a'
|
||||
},
|
||||
'rama/u80_a': {
|
||||
target: 'wilba_tech/rama_works_u80_a'
|
||||
},
|
||||
'ramonimbao/herringbone': {
|
||||
target: 'ramonimbao/herringbone/v1'
|
||||
},
|
||||
'rgbkb/pan': {
|
||||
target: 'rgbkb/pan/rev1/32a'
|
||||
},
|
||||
'rgbkb/pan/rev1': {
|
||||
target: 'rgbkb/pan/rev1/32a'
|
||||
},
|
||||
romac: {
|
||||
target: 'kingly_keys/romac'
|
||||
},
|
||||
ropro: {
|
||||
target: 'kingly_keys/ropro'
|
||||
},
|
||||
satan: {
|
||||
target: 'gh60/satan'
|
||||
},
|
||||
skog: {
|
||||
target: 'percent/skog'
|
||||
},
|
||||
speedo: {
|
||||
target: 'cozykeys/speedo/v2'
|
||||
},
|
||||
stoutgat: {
|
||||
target: 'tkw/stoutgat/v1'
|
||||
},
|
||||
suihankey: {
|
||||
target: 'suihankey/split/alpha'
|
||||
},
|
||||
ta65: {
|
||||
target: 'maartenwut/ta65'
|
||||
},
|
||||
tartan: {
|
||||
target: 'dm9records/tartan'
|
||||
},
|
||||
tkc1800: {
|
||||
target: 'tkc/tkc1800'
|
||||
},
|
||||
'tkw/stoutgat/v2': {
|
||||
target: 'tkw/stoutgat/v2/f411'
|
||||
},
|
||||
underscore33: {
|
||||
target: 'underscore33/rev1'
|
||||
},
|
||||
vinta: {
|
||||
layouts: {
|
||||
LAYOUT_67_ansi: 'LAYOUT_65_ansi_blocker'
|
||||
}
|
||||
},
|
||||
wasdat: {
|
||||
target: 'maartenwut/wasdat'
|
||||
},
|
||||
'westfoxtrot/cypher': {
|
||||
target: 'westfoxtrot/cypher/rev1'
|
||||
},
|
||||
'whale/sk': {
|
||||
target: 'whale/sk/v3'
|
||||
},
|
||||
'xelus/dawn60': {
|
||||
target: 'xelus/dawn60/rev1'
|
||||
},
|
||||
'xelus/valor': {
|
||||
target: 'xelus/valor/rev1'
|
||||
},
|
||||
yd60mq: {
|
||||
target: 'yd60mq/12led'
|
||||
},
|
||||
ymd75: {
|
||||
target: 'ymd75/rev1'
|
||||
},
|
||||
z150_blackheart: {
|
||||
target: 'z150_bh'
|
||||
},
|
||||
zeal60: {
|
||||
target: 'wilba_tech/zeal60'
|
||||
},
|
||||
zeal65: {
|
||||
target: 'wilba_tech/zeal65'
|
||||
}
|
||||
}
|
35
data/schemas/api_keyboard.jsonschema
Normal file
35
data/schemas/api_keyboard.jsonschema
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"allOf": [
|
||||
{ "$ref": "qmk.keyboard.v1" },
|
||||
{
|
||||
"$id": "qmk.api.keyboard.v1",
|
||||
"keymaps": {
|
||||
"type": "string"
|
||||
},
|
||||
"parse_errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"parse_warnings": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"processor_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"protocol": {
|
||||
"type": "string"
|
||||
},
|
||||
"keyboard_folder": {
|
||||
"type": "string"
|
||||
},
|
||||
"platform": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
1
data/schemas/false.jsonschema
Normal file
1
data/schemas/false.jsonschema
Normal file
@@ -0,0 +1 @@
|
||||
false
|
326
data/schemas/keyboard.jsonschema
Normal file
326
data/schemas/keyboard.jsonschema
Normal file
@@ -0,0 +1,326 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/schema#",
|
||||
"$id": "qmk.keyboard.v1",
|
||||
"title": "Keyboard Information",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"keyboard_name": {
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"maxLength": 250
|
||||
},
|
||||
"maintainer": {
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"maxLength": 250
|
||||
},
|
||||
"manufacturer": {
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"maxLength": 250
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"processor": {
|
||||
"type": "string",
|
||||
"enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L433", "STM32L443", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
|
||||
},
|
||||
"board": {
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"pattern": "^[a-zA-Z_][0-9a-zA-Z_]*$"
|
||||
},
|
||||
"bootloader": {
|
||||
"type": "string",
|
||||
"enum": ["atmel-dfu", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "stm32-dfu", "stm32duino", "unknown", "USBasp", "tinyuf2"]
|
||||
},
|
||||
"diode_direction": {
|
||||
"type": "string",
|
||||
"enum": ["COL2ROW", "ROW2COL"]
|
||||
},
|
||||
"debounce": {
|
||||
"type": "number",
|
||||
"min": 0,
|
||||
"multipleOf": 1
|
||||
},
|
||||
"height": {
|
||||
"type": "number",
|
||||
"min": 0.25
|
||||
},
|
||||
"width": {
|
||||
"type": "number",
|
||||
"min": 0.25
|
||||
},
|
||||
"community_layouts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"pattern": "^[0-9a-z_]*$"
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"type": "object",
|
||||
"additionalProperties": {"type": "boolean"}
|
||||
},
|
||||
"indicators": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"caps_lock": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-K]\\d{1,2}$"
|
||||
},
|
||||
"num_lock": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-K]\\d{1,2}$"
|
||||
},
|
||||
"scroll_lock": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-K]\\d{1,2}$"
|
||||
}
|
||||
}
|
||||
},
|
||||
"layout_aliases": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"enum": ["LAYOUT", "LAYOUT_planck_1x2uC"]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^LAYOUT_[0-9a-z_]*$"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"layouts": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"filename": {
|
||||
"type": "string"
|
||||
},
|
||||
"c_macro": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"key_count": {
|
||||
"type": "number",
|
||||
"min": 0,
|
||||
"multipleOf": 1
|
||||
},
|
||||
"layout": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"label": {"type": "string"},
|
||||
"matrix": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"maxItems": 2,
|
||||
"items": {
|
||||
"type": "number",
|
||||
"min": 0,
|
||||
"multipleOf": 1
|
||||
}
|
||||
},
|
||||
"h": {
|
||||
"type": "number",
|
||||
"min": 0.25
|
||||
},
|
||||
"r": {
|
||||
"type": "number",
|
||||
"min": 0
|
||||
},
|
||||
"rx": {
|
||||
"type": "number",
|
||||
"min": 0
|
||||
},
|
||||
"ry": {
|
||||
"type": "number",
|
||||
"min": 0
|
||||
},
|
||||
"w": {
|
||||
"type": "number",
|
||||
"min": 0.25
|
||||
},
|
||||
"x": {
|
||||
"type": "number",
|
||||
"min": 0
|
||||
},
|
||||
"y": {
|
||||
"type": "number",
|
||||
"min": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"matrix_pins": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"direct": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^[A-K]\\d{1,2}$"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"multipleOf": 1
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"cols": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^[A-K]\\d{1,2}$"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"multipleOf": 1
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"rows": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^[A-K]\\d{1,2}$"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"multipleOf": 1
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"rgblight": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"animations": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"brightness_steps": {
|
||||
"type": "number",
|
||||
"min": 0,
|
||||
"multipleOf": 1
|
||||
},
|
||||
"hue_steps": {
|
||||
"type": "number",
|
||||
"min": 0,
|
||||
"multipleOf": 1
|
||||
},
|
||||
"led_count": {
|
||||
"type": "number",
|
||||
"min": 0,
|
||||
"multipleOf": 1
|
||||
},
|
||||
"max_brightness": {
|
||||
"type": "number",
|
||||
"min": 0,
|
||||
"max": 255,
|
||||
"multipleOf": 1
|
||||
},
|
||||
"pin": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-K]\\d{1,2}$"
|
||||
},
|
||||
"saturation_steps": {
|
||||
"type": "number",
|
||||
"min": 0,
|
||||
"multipleOf": 1
|
||||
},
|
||||
"sleep": {"type": "boolean"},
|
||||
"split": {"type": "boolean"},
|
||||
"split_count": {
|
||||
"type": "array",
|
||||
"minLength": 2,
|
||||
"maxLength": 2,
|
||||
"items": {
|
||||
"type": "number",
|
||||
"min": 0,
|
||||
"multipleOf": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"usb": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"device_ver": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
|
||||
},
|
||||
"pid": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
|
||||
},
|
||||
"vid": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"qmk_lufa_bootloader": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"esc_output": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-K]\\d{1,2}$"
|
||||
},
|
||||
"esc_input": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-K]\\d{1,2}$"
|
||||
},
|
||||
"led": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-K]\\d{1,2}$"
|
||||
},
|
||||
"speaker": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-K]\\d{1,2}$"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
data/schemas/true.jsonschema
Normal file
1
data/schemas/true.jsonschema
Normal file
@@ -0,0 +1 @@
|
||||
true
|
@@ -5,7 +5,7 @@ Four times a year QMK runs a process for merging Breaking Changes. A Breaking Ch
|
||||
|
||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||
|
||||
### Relocated Keyboards :id-relocated-keyboards
|
||||
### Relocated Keyboards :id=relocated-keyboards
|
||||
|
||||
#### The Key Company project consolidation ([#9547](https://github.com/qmk/qmk_firmware/pull/9547))
|
||||
#### relocating boards by flehrad to flehrad/ folder ([#9635](https://github.com/qmk/qmk_firmware/pull/9635))
|
||||
|
@@ -5,7 +5,7 @@ Four times a year QMK runs a process for merging Breaking Changes. A Breaking Ch
|
||||
|
||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||
|
||||
### Relocated Keyboards :id-relocated-keyboards
|
||||
### Relocated Keyboards :id=relocated-keyboards
|
||||
|
||||
#### Reduce Helix keyboard build variation ([#8669](https://github.com/qmk/qmk_firmware/pull/8669))
|
||||
|
||||
|
169
docs/ChangeLog/20210227.md
Normal file
169
docs/ChangeLog/20210227.md
Normal file
@@ -0,0 +1,169 @@
|
||||
# QMK Breaking Changes - 2021 February 27 Changelog
|
||||
|
||||
## Changes Requiring User Action
|
||||
|
||||
The following keyboards have had their source moved within QMK:
|
||||
|
||||
Old Keyboard Name | New Keyboard Name
|
||||
:---------------- | :----------------
|
||||
bear_65 | jacky_studio/bear_65
|
||||
s7_elephant/rev1 | jacky_studio/s7_elephant/rev1
|
||||
s7_elephant/rev2 | jacky_studio/s7_elephant/rev2
|
||||
aplx6 | aplyard/aplx6/rev1
|
||||
southpaw75 | fr4/southpaw75
|
||||
|
||||
The [Aplyard Aplx6 rev2](https://github.com/qmk/qmk_firmware/tree/0.12.0/keyboards/aplyard/aplx6/rev1) and the [FR4Boards Unix60](https://github.com/qmk/qmk_firmware/tree/0.12.0/keyboards/fr4/unix60) have also been added as part of these changes.
|
||||
|
||||
Additionally, the `handwired/bluepill/bluepill70` keyboard has been removed.
|
||||
|
||||
## Core Changes
|
||||
|
||||
### ChibiOS Update and Config Migration
|
||||
|
||||
QMK's ChibiOS and ChibiOS-Contrib submodules have been updated to version 20.3.2.
|
||||
|
||||
Along with this, QMK now provides default configuration files for all commonly-supported ARM microcontrollers running on ChibiOS. As such, keyboards are now only required to define settings which differ from the defaults, thereby reducing the size of pull requests for keyboards running atop ChibiOS.
|
||||
|
||||
### QMK Infrastructure and Internals
|
||||
|
||||
Python is now required to build QMK. The minimum Python version has been increased to 3.7.
|
||||
|
||||
The power of `info.json` has been massively expanded. Most keyboard parameters can now be expressed in `info.json` instead of `config.h`/`rules.mk`. This should make maintaining keyboards easier, and will enable tooling that can allow non-technical users to add and maintain QMK keyboards without writing any code.
|
||||
|
||||
To ease migration a new command has been provided, `qmk generate-info-json -kb <keyboard>`. You can use this command to generate a complete `info.json` file for a keyboard and then remove the duplicate information from `config.h` and `rules.mk`.
|
||||
|
||||
Detailed example showing how to generate a new info.json and identify duplicate keys:
|
||||
|
||||
```
|
||||
user@hostname:~/qmk_firmware/keyboards/lets_split:0$ qmk generate-info-json > new-info.json
|
||||
user@hostname:~/qmk_firmware/keyboards/lets_split:0$ mv new-info.json info.json
|
||||
user@hostname:~/qmk_firmware/keyboards/lets_split:0$ qmk info
|
||||
⚠ lets_split/rev2: DEBOUNCE in config.h is overwriting debounce in info.json
|
||||
⚠ lets_split/rev2: DEVICE_VER in config.h is overwriting usb.device_ver in info.json
|
||||
⚠ lets_split/rev2: DIODE_DIRECTION in config.h is overwriting diode_direction in info.json
|
||||
⚠ lets_split/rev2: MANUFACTURER in config.h is overwriting manufacturer in info.json
|
||||
⚠ lets_split/rev2: RGB_DI_PIN in config.h is overwriting rgblight.pin in info.json
|
||||
⚠ lets_split/rev2: RGBLED_NUM in config.h is overwriting rgblight.led_count in info.json
|
||||
⚠ lets_split/rev2: PRODUCT_ID in config.h is overwriting usb.pid in info.json
|
||||
⚠ lets_split/rev2: VENDOR_ID in config.h is overwriting usb.vid in info.json
|
||||
⚠ lets_split/rev2: Matrix pins are specified in both info.json and config.h, the config.h values win.
|
||||
⚠ lets_split/rev2: LAYOUTS in rules.mk is overwriting community_layouts in info.json
|
||||
⚠ lets_split/rev2: Feature bootmagic is specified in both info.json and rules.mk, the rules.mk value wins.
|
||||
⚠ lets_split/rev2: Feature mousekey is specified in both info.json and rules.mk, the rules.mk value wins.
|
||||
⚠ lets_split/rev2: Feature extrakey is specified in both info.json and rules.mk, the rules.mk value wins.
|
||||
⚠ lets_split/rev2: Feature console is specified in both info.json and rules.mk, the rules.mk value wins.
|
||||
⚠ lets_split/rev2: Feature command is specified in both info.json and rules.mk, the rules.mk value wins.
|
||||
⚠ lets_split/rev2: Feature nkro is specified in both info.json and rules.mk, the rules.mk value wins.
|
||||
⚠ lets_split/rev2: Feature backlight is specified in both info.json and rules.mk, the rules.mk value wins.
|
||||
⚠ lets_split/rev2: Feature midi is specified in both info.json and rules.mk, the rules.mk value wins.
|
||||
⚠ lets_split/rev2: Feature audio is specified in both info.json and rules.mk, the rules.mk value wins.
|
||||
⚠ lets_split/rev2: Feature unicode is specified in both info.json and rules.mk, the rules.mk value wins.
|
||||
⚠ lets_split/rev2: Feature bluetooth is specified in both info.json and rules.mk, the rules.mk value wins.
|
||||
⚠ lets_split/rev2: Feature rgblight is specified in both info.json and rules.mk, the rules.mk value wins.
|
||||
⚠ lets_split/rev2: Feature sleep_led is specified in both info.json and rules.mk, the rules.mk value wins.
|
||||
Keyboard Name: Let's Split
|
||||
Manufacturer: Wootpatoot
|
||||
Website:
|
||||
Maintainer: QMK Community
|
||||
Keyboard Folder: lets_split/rev2
|
||||
Layouts: LAYOUT, LAYOUT_ortho_4x12
|
||||
Size: 13 x 4
|
||||
Processor: atmega32u4
|
||||
Bootloader: caterina
|
||||
```
|
||||
|
||||
## Detailed Change List
|
||||
|
||||
### Changes Requiring User Action
|
||||
|
||||
* Refactor Jacky's boards (Bear65 and S7 Elephant) ([#10528](https://github.com/qmk/qmk_firmware/pull/10528), [#11981](https://github.com/qmk/qmk_firmware/pull/11981))
|
||||
* Remove handwired/bluepill ([#11415](https://github.com/qmk/qmk_firmware/pull/11415))
|
||||
* Aplyard Aplx6 Added rev2 & move rev1+rev2 to parent folder ([#10973](https://github.com/qmk/qmk_firmware/pull/10973))
|
||||
* added `unix60`, moved together with `southpaw75` into `fr4` folder ([#11195](https://github.com/qmk/qmk_firmware/pull/11195))
|
||||
|
||||
### Fixes
|
||||
|
||||
* GCC 10 can now compile Drop Alt firmware ([#9485](https://github.com/qmk/qmk_firmware/pull/9485))
|
||||
* Fix compiling on `develop` branch ([#11409](https://github.com/qmk/qmk_firmware/pull/11409))
|
||||
* Fix broken keyboards and keymaps ([#11412](https://github.com/qmk/qmk_firmware/pull/11412), [#11427](https://github.com/qmk/qmk_firmware/pull/11427), [#11448](https://github.com/qmk/qmk_firmware/pull/11448), [#11447](https://github.com/qmk/qmk_firmware/pull/11447), [#11473](https://github.com/qmk/qmk_firmware/pull/11473), [#11584](https://github.com/qmk/qmk_firmware/pull/11584), [#11600](https://github.com/qmk/qmk_firmware/pull/11600))
|
||||
* Fixed up build dependencies so that generated files are made available before compiling any object files ([#11435](https://github.com/qmk/qmk_firmware/pull/11435))
|
||||
* Formatting fixes ([`378edd9`](https://github.com/qmk/qmk_firmware/commit/378edd9491f2ab0d3d8a970c9a8e64bc03ca15cf), [#11594](https://github.com/qmk/qmk_firmware/pull/11594), [`27749e1`](https://github.com/qmk/qmk_firmware/commit/27749e1c967c02c05e62a89a0ae2776dd7e5158c))
|
||||
* Include `stdbool.h` in `uart.h` to fix compiler errors ([#11728](https://github.com/qmk/qmk_firmware/pull/11728))
|
||||
* Decouple USB events from the USB interrupt handler in ChibiOS ([#10437](https://github.com/qmk/qmk_firmware/pull/10437))
|
||||
* Fixes an issue while using Backlight and External EEPROM at the same time that would cause the MCU to lock up.
|
||||
* Address wake from sleep instability ([#11450](https://github.com/qmk/qmk_firmware/pull/11450))
|
||||
* Fix pressing media key on a momentarily activated layer may lead to missing key up events ([#11162](https://github.com/qmk/qmk_firmware/pull/11162))
|
||||
* Fix an RGB initialisation bug on Massdrop keyboards ([#12022](https://github.com/qmk/qmk_firmware/pull/12022))
|
||||
* Fix file encoding errors on Windows, and layouts not correctly merging into info.json ([#12039](https://github.com/qmk/qmk_firmware/pull/12039))
|
||||
|
||||
### Additions and Enhancements
|
||||
|
||||
* Allow configuration of serial USART timeout ([#11057](https://github.com/qmk/qmk_firmware/pull/11057))
|
||||
* Added Sync Timer feature for Split Common keyboards ([#10997](https://github.com/qmk/qmk_firmware/pull/10997))
|
||||
* Add modifier state to the Split Common transport ([#10400](https://github.com/qmk/qmk_firmware/pull/10400))
|
||||
* Add Pix keyboard by sendz (`sendyyeah/pix`) ([#11154](https://github.com/qmk/qmk_firmware/pull/11154))
|
||||
* Implement option for kinetic mouse movement algorithm for mouse keys ([#6739](https://github.com/qmk/qmk_firmware/pull/6739))
|
||||
* Improved Language Specific Keycodes for US International and Extended Layouts ([#11307](https://github.com/qmk/qmk_firmware/pull/11307))
|
||||
* Modified `QWIIC_ENABLE` in `rules.mk` to be yes/no choice, adding `QWIIC_DRIVERS` to allow for inclusion of specific drivers ([#11426](https://github.com/qmk/qmk_firmware/pull/11426))
|
||||
* Allow AVR-based keyboards to override the `bootloader_jump` function ([#11418](https://github.com/qmk/qmk_firmware/pull/11418))
|
||||
* Refine RGBLight Twinkle effect to be smoother (use breathing curve) ([#11350](https://github.com/qmk/qmk_firmware/pull/11350))
|
||||
* Keep track of last matrix activity ([#10730](https://github.com/qmk/qmk_firmware/pull/10730), [`ab375d3`](https://github.com/qmk/qmk_firmware/commit/ab375d3d075c105f09a1ddd0e155f178225518bc), [#11552](https://github.com/qmk/qmk_firmware/pull/11552))
|
||||
* fix `matrix_io_delay()` timing in `quantum/matrix.c` ([#9603](https://github.com/qmk/qmk_firmware/pull/9603))
|
||||
* Keep track of encoder activity ([#11595](https://github.com/qmk/qmk_firmware/pull/11595))
|
||||
* Backport ChibiOS Audio changes from ZSA ([#11687](https://github.com/qmk/qmk_firmware/pull/11687))
|
||||
* Add support for 8 buttons to mouse report ([#10807](https://github.com/qmk/qmk_firmware/pull/10807))
|
||||
* Allow `post_config.h` to be implemented in userspace ([#11519](https://github.com/qmk/qmk_firmware/pull/11519))
|
||||
* Adds AT90USB162 support ([#11570](https://github.com/qmk/qmk_firmware/pull/11570))
|
||||
* Stop sounds when suspended ([#11553](https://github.com/qmk/qmk_firmware/pull/11553))
|
||||
* Revamp spidey3 userspace and keymaps ([#11768](https://github.com/qmk/qmk_firmware/pull/11768))
|
||||
* Add support for analog USBPD on STM32G4xx ([#11824](https://github.com/qmk/qmk_firmware/pull/11824))
|
||||
* Master matrix can now be transported to the slave side in Split Common keyboards ([#11046](https://github.com/qmk/qmk_firmware/pull/11046))
|
||||
* RGBLight: Allow configurable default settings ([#11912](https://github.com/qmk/qmk_firmware/pull/11912))
|
||||
* Add `tap_code_delay(code, delay)` ([#11913](https://github.com/qmk/qmk_firmware/pull/11913), [#11938](https://github.com/qmk/qmk_firmware/pull/11938))
|
||||
|
||||
### Clean-ups and Optimizations
|
||||
|
||||
* Fix duplicate `I2C_KEYMAP_START` define ([#11237](https://github.com/qmk/qmk_firmware/pull/11237))
|
||||
* Rewrite APA102 support for RGBLight ([#10894](https://github.com/qmk/qmk_firmware/pull/10894))
|
||||
* Update ADB Protocol implementation in TMK Core ([#11168](https://github.com/qmk/qmk_firmware/pull/11168))
|
||||
* Remove unused `action_get_macro()` usages in user files ([#11165](https://github.com/qmk/qmk_firmware/pull/11165))
|
||||
* Remove `QMK_KEYBOARD_CONFIG_H` ([#11576](https://github.com/qmk/qmk_firmware/pull/11576))
|
||||
* Remove duplicated housekeeping in `arm_atsam` ([#11672](https://github.com/qmk/qmk_firmware/pull/11672))
|
||||
* UART driver refactor ([#11637](https://github.com/qmk/qmk_firmware/pull/11637))
|
||||
* Move `transport.c` to `QUANTUM_LIB_SRC` ([#11751](https://github.com/qmk/qmk_firmware/pull/11751))
|
||||
* Remove `MIDI_ENABLE_STRICT` from user keymaps ([#11750](https://github.com/qmk/qmk_firmware/pull/11750))
|
||||
* Remove legacy print backward compatiblitly ([#11805](https://github.com/qmk/qmk_firmware/pull/11805))
|
||||
* Migrate mousekey to quantum ([#11804](https://github.com/qmk/qmk_firmware/pull/11804))
|
||||
* remove deprecated `qmk json-keymap` ([#11823](https://github.com/qmk/qmk_firmware/pull/11823))
|
||||
* Remove FAUXCLICKY feature (deprecated) ([#11829](https://github.com/qmk/qmk_firmware/pull/11829))
|
||||
* Refactor platform logic within `print.h` ([#11863](https://github.com/qmk/qmk_firmware/pull/11863))
|
||||
* Audio system overhaul ([#11820](https://github.com/qmk/qmk_firmware/pull/11820))
|
||||
* Output selection: Remove "USB and BT" option for Bluetooth ([#11940](https://github.com/qmk/qmk_firmware/pull/11940))
|
||||
* `tmk_core/common/action.c`: refactor for code size; merge multiple `case`s into one ([#11943](https://github.com/qmk/qmk_firmware/pull/11943))
|
||||
* Remove rules and settings from user keymaps that are already defined at keyboard level ([#11966](https://github.com/qmk/qmk_firmware/pull/11966))
|
||||
|
||||
### QMK Infrastructure and Internals
|
||||
|
||||
* bump to python 3.7 ([#11408](https://github.com/qmk/qmk_firmware/pull/11408))
|
||||
* `develop` branch is now formatted as part of CI tasks ([#11893](https://github.com/qmk/qmk_firmware/pull/11893), [#11905](https://github.com/qmk/qmk_firmware/pull/11905), [#11907](https://github.com/qmk/qmk_firmware/pull/11907), [#11928](https://github.com/qmk/qmk_firmware/pull/11928), [#11936](https://github.com/qmk/qmk_firmware/pull/11936))
|
||||
* Configure keyboard matrix from info.json ([#10817](https://github.com/qmk/qmk_firmware/pull/10817))
|
||||
* Validate our JSON data using json_schema ([#11101](https://github.com/qmk/qmk_firmware/pull/11101))
|
||||
* Use the schema to eliminate custom code ([#11108](https://github.com/qmk/qmk_firmware/pull/11108))
|
||||
* Add support for specifying BOARD in `info.json` ([#11492](https://github.com/qmk/qmk_firmware/pull/11492))
|
||||
* Document how to add data driven configurations ([#11502](https://github.com/qmk/qmk_firmware/pull/11502))
|
||||
* Process info.json rules ahead of userspace rules ([#11542](https://github.com/qmk/qmk_firmware/pull/11542))
|
||||
* Remove duplicate manufacturer definitions ([#11544](https://github.com/qmk/qmk_firmware/pull/11544))
|
||||
* Update list of MCUs in `keyboard.jsonschema` to mirror `qmk.constants.py` ([#11688](https://github.com/qmk/qmk_firmware/pull/11688))
|
||||
* Create a system to map between `info.json` and `config.h`/`rules.mk` ([#11548](https://github.com/qmk/qmk_firmware/pull/11548))
|
||||
* Make LAYOUT parsing more robust ([#12000](https://github.com/qmk/qmk_firmware/pull/12000))
|
||||
|
||||
|
||||
### ChibiOS Update and Config Migration
|
||||
|
||||
* Add board specific to Proton-C, with usual defaults turned on to match Pro-Micro ([#10976](https://github.com/qmk/qmk_firmware/pull/10976))
|
||||
* Disable almost all ChibiOS subsystems in default configs ([#11111](https://github.com/qmk/qmk_firmware/pull/11111))
|
||||
* Config Migrations ([#10418](https://github.com/qmk/qmk_firmware/pull/10418), [#11123](https://github.com/qmk/qmk_firmware/pull/11123), [#11261](https://github.com/qmk/qmk_firmware/pull/11261), [#11413](https://github.com/qmk/qmk_firmware/pull/11413), [#11414](https://github.com/qmk/qmk_firmware/pull/11414), [#11495](https://github.com/qmk/qmk_firmware/pull/11495), [#11504](https://github.com/qmk/qmk_firmware/pull/11504), [#11529](https://github.com/qmk/qmk_firmware/pull/11529), [#11588](https://github.com/qmk/qmk_firmware/pull/11588), [#11598](https://github.com/qmk/qmk_firmware/pull/11598), [#11607](https://github.com/qmk/qmk_firmware/pull/11607), [#11617](https://github.com/qmk/qmk_firmware/pull/11617), [#11620](https://github.com/qmk/qmk_firmware/pull/11620), [#11630](https://github.com/qmk/qmk_firmware/pull/11630), [#11646](https://github.com/qmk/qmk_firmware/pull/11646), [#11689](https://github.com/qmk/qmk_firmware/pull/11689), [#11846](https://github.com/qmk/qmk_firmware/pull/11846), [#11927](https://github.com/qmk/qmk_firmware/pull/11927), [#12001](https://github.com/qmk/qmk_firmware/pull/12001))
|
||||
* Disable subsystems repo-wide ([#11449](https://github.com/qmk/qmk_firmware/pull/11449))
|
||||
* Leftover early initialisation conversions ([#11615](https://github.com/qmk/qmk_firmware/pull/11615))
|
||||
* Fix up comments showing how to execute config migration ([#11621](https://github.com/qmk/qmk_firmware/pull/11621))
|
||||
* Add STM32G431 and STM32G474 board definitions ([#11793](https://github.com/qmk/qmk_firmware/pull/11793))
|
192
docs/ChangeLog/20210529.md
Normal file
192
docs/ChangeLog/20210529.md
Normal file
@@ -0,0 +1,192 @@
|
||||
# QMK Breaking Changes - 2021 May 29 Changelog
|
||||
|
||||
## Notable Changes :id=notable-changes
|
||||
|
||||
### RGB Matrix support for split common ([#11055](https://github.com/qmk/qmk_firmware/pull/11055)) :id=rgb-matrix-split-common
|
||||
|
||||
Split boards can now use RGB Matrix without defining a custom matrix.
|
||||
|
||||
### Teensy 3.6 support ([#12258](https://github.com/qmk/qmk_firmware/pull/12258)) :id=teensy-3-6-support
|
||||
|
||||
Added support for MK66F18 (Teensy 3.6) microcontroller.
|
||||
|
||||
### New command: qmk console ([#12828](https://github.com/qmk/qmk_firmware/pull/12828)) :id=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.
|
||||
|
||||
### Improved command: qmk config :id=improve-command-qmk-config
|
||||
|
||||
We've updated the `qmk config` command to show only the configuration items you have actually set. You can now display (almost) all of the available configuration options, along with their default values, using `qmk config -a`.
|
||||
|
||||
### LED Matrix Improvements ([#12509](https://github.com/qmk/qmk_firmware/pull/12509), [#12580](https://github.com/qmk/qmk_firmware/pull/12580), [#12588](https://github.com/qmk/qmk_firmware/pull/12588), [#12633](https://github.com/qmk/qmk_firmware/pull/12633), [#12651](https://github.com/qmk/qmk_firmware/pull/12651), [#12685](https://github.com/qmk/qmk_firmware/pull/12685)) :id=led-matrix-improvements
|
||||
|
||||
LED Matrix has been improved with effects, CIE1931 curves, and a task system.
|
||||
|
||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||
|
||||
### Updated Keyboard Codebases :id=updated-keyboard-codebases
|
||||
|
||||
* Durgod keyboard refactor in preparation for adding additional durgod keyboards ([#11978](https://github.com/qmk/qmk_firmware/pull/11978))
|
||||
* Updated Function96 with V2 files and removed chconf.h and halconf.h ([#12613](https://github.com/qmk/qmk_firmware/pull/12613))
|
||||
* [Keyboard] updated a vendor name / fixed minor keymap issues ([#12881](https://github.com/qmk/qmk_firmware/pull/12881))
|
||||
* [Keyboard] Corne - Remove legacy revision support ([#12226](https://github.com/qmk/qmk_firmware/pull/12226))
|
||||
|
||||
The following keyboards have had their source moved within QMK:
|
||||
|
||||
Old Keyboard Name | New Keyboard Name
|
||||
:---------------- | :----------------
|
||||
crkbd/rev1/common | crkbd/rev1
|
||||
function96 | function96/v1
|
||||
nckiibs/flatbread60 | delikeeb/flatbread60
|
||||
nckiibs/vaguettelite | delikeeb/vaguettelite
|
||||
nckiibs/vanana/rev1 | delikeeb/vanana/rev1
|
||||
nckiibs/vanana/rev2 | delikeeb/vanana/rev2
|
||||
nckiibs/vaneela | delikeeb/vaneela
|
||||
nckiibs/vaneelaex | delikeeb/vaneelaex
|
||||
nckiibs/waaffle/rev3/elite_c | delikeeb/waaffle/rev3/elite_c
|
||||
nckiibs/waaffle/rev3/pro_micro | delikeeb/waaffle/rev3/pro_micro
|
||||
|
||||
The [Function96 V2](https://github.com/qmk/qmk_firmware/tree/0.13.0/keyboards/function96/v2) has also been added as part of these changes.
|
||||
|
||||
The codebase for the [Durgod K320](https://github.com/qmk/qmk_firmware/tree/0.13.0/keyboards/durgod/k320) has been reworked in anticipation of additional Durgod keyboards gaining QMK support.
|
||||
|
||||
Additionally, the `crkbd/rev1/legacy` keyboard has been removed.
|
||||
|
||||
### Bootmagic Deprecation and Refactor ([#12172](https://github.com/qmk/qmk_firmware/pull/12172)) :id=bootmagic-deprecation-and-refactor
|
||||
|
||||
QMK has decided to deprecate the full Bootmagic feature and leave Bootmagic Lite as the only remaining option.
|
||||
|
||||
This pull request changes the behavior of `BOOTMAGIC_ENABLE` such that specifying `BOOTMAGIC_ENABLE = yes` enables Bootmagic Lite instead of full Bootmagic.
|
||||
|
||||
If attempts to use Bootmagic functionality result in unexpected behavior, check your `rules.mk` file and change the `BOOTMAGIC_ENABLE` setting to specify either `lite` or `full`.
|
||||
|
||||
#### Tentative Deprecation Schedule
|
||||
|
||||
This is the current planned roadmap for the behavior of `BOOTMAGIC_ENABLE`:
|
||||
|
||||
- From 2021 May 29, setting `BOOTMAGIC_ENABLE = yes` will enable Bootmagic Lite instead of full Bootmagic.
|
||||
- From 2021 Aug 28, `BOOTMAGIC_ENABLE` must be either `yes`, `lite`, or `no` – setting `BOOTMAGIC_ENABLE = full` will cause compilation to fail.
|
||||
- From 2021 Nov 27, `BOOTMAGIC_ENABLE` must be either `yes` or `no` – setting `BOOTMAGIC_ENABLE = lite` will cause compilation to fail.
|
||||
|
||||
### Removal of LAYOUT_kc ([#12160](https://github.com/qmk/qmk_firmware/pull/12160)) :id=removal-of-layout-kc
|
||||
|
||||
We've removed support for `LAYOUT_kc` macros, if your keymap uses one you will need to update it use a regular `LAYOUT` macro.
|
||||
|
||||
### Encoder callbacks are now boolean ([#12805](https://github.com/qmk/qmk_firmware/pull/12805), [#12985](https://github.com/qmk/qmk_firmware/pull/12985)) :id=encoder-callback-boolean
|
||||
|
||||
To allow for keyboards to override (or not) keymap level code the `encoder_update_kb` function has been changed from `void` to `bool`. You will need to update your function definition to reflect this and ensure that you return a `true` or `false` value.
|
||||
|
||||
Example code before change:
|
||||
|
||||
```c
|
||||
void encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
encoder_update_user(index, clockwise);
|
||||
}
|
||||
```
|
||||
|
||||
Example code after change:
|
||||
|
||||
```c
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
return encoder_update_user(index, clockwise);
|
||||
}
|
||||
```
|
||||
|
||||
## Core Changes :id=core-changes
|
||||
|
||||
### Fixes :id=core-fixes
|
||||
|
||||
* Fix connection issue in split keyboards when slave and OLED display are connected via I2C (fixes #9335) ([#11487](https://github.com/qmk/qmk_firmware/pull/11487))
|
||||
* Terrazzo: Fix wrong LED Matrix function names ([#12561](https://github.com/qmk/qmk_firmware/pull/12561))
|
||||
* Apply the "NO_LIMITED_CONTROLLER_CONNECT" fix to atmega16u2 ([#12482](https://github.com/qmk/qmk_firmware/pull/12482))
|
||||
* Fix comment parsing ([#12750](https://github.com/qmk/qmk_firmware/pull/12750))
|
||||
* Turn OLED off on suspend in soundmonster Corne keymap ([#10419](https://github.com/qmk/qmk_firmware/pull/10419))
|
||||
* Fixup build errors on `develop` branch. ([#12723](https://github.com/qmk/qmk_firmware/pull/12723))
|
||||
* Fix syntax error when compiling for ARM ([#12866](https://github.com/qmk/qmk_firmware/pull/12866))
|
||||
* Add missing LED Matrix suspend code to suspend.c ([#12878](https://github.com/qmk/qmk_firmware/pull/12878))
|
||||
* Fix spelling mistake regarding LED Matrix in split_common. ([#12888](https://github.com/qmk/qmk_firmware/pull/12888))
|
||||
* [Keymap] Fix QWERTY/DVORAK status output for kzar keymap ([#12895](https://github.com/qmk/qmk_firmware/pull/12895))
|
||||
* Fixup housekeeping from being invoked twice per loop. ([#12933](https://github.com/qmk/qmk_firmware/pull/12933))
|
||||
* wait for matrix row signal to go HIGH for every row ([#12945](https://github.com/qmk/qmk_firmware/pull/12945))
|
||||
* ensure we do not conflict with existing keymap aliases ([#12976](https://github.com/qmk/qmk_firmware/pull/12976))
|
||||
* [Keyboard] Fix Terrazzo build failure ([#12977](https://github.com/qmk/qmk_firmware/pull/12977))
|
||||
* Do not hard set config in CPTC files ([#11864](https://github.com/qmk/qmk_firmware/pull/11864))
|
||||
|
||||
### Additions and Enhancements :id=core-additions
|
||||
|
||||
* ARM - Refactor SLEEP_LED to support more platforms ([#8403](https://github.com/qmk/qmk_firmware/pull/8403))
|
||||
* Add ability to toggle One Shot functionality ([#4198](https://github.com/qmk/qmk_firmware/pull/4198))
|
||||
* Add RGB Matrix support to Split Common ([#11055](https://github.com/qmk/qmk_firmware/pull/11055))
|
||||
* Add support for complementary outputs to the ChibiOS WS2812 PWM driver ([#11988](https://github.com/qmk/qmk_firmware/pull/11988))
|
||||
* Enable RGB Matrix for Corne ([#12091](https://github.com/qmk/qmk_firmware/pull/12091))
|
||||
* Set default OLED Update Interval for Split Keyboards to improve matrix scan performance ([#12107](https://github.com/qmk/qmk_firmware/pull/12107))
|
||||
* Add support for MK66F18 (Teensy 3.6) micro controller ([#12258](https://github.com/qmk/qmk_firmware/pull/12258))
|
||||
* Split RGB Matrix support for RGBKB Zygomorph ([#11083](https://github.com/qmk/qmk_firmware/pull/11083))
|
||||
* Add baudrate and circular buffer to ARM WS2812 SPI config ([#12216](https://github.com/qmk/qmk_firmware/pull/12216))
|
||||
* Add keyboard level weak function for slave matrix scan ([#12317](https://github.com/qmk/qmk_firmware/pull/12317))
|
||||
* Add link to schematic on EasyEDA for XD60 ([#12018](https://github.com/qmk/qmk_firmware/pull/12018))
|
||||
* Add Config functions for LED Matrix ([#12361](https://github.com/qmk/qmk_firmware/pull/12361))
|
||||
* Add pin definitions for MK66F18 ([#12419](https://github.com/qmk/qmk_firmware/pull/12419))
|
||||
* add kinesis/kint36 keyboard ([#10171](https://github.com/qmk/qmk_firmware/pull/10171))
|
||||
* Add support for producing UF2-format binaries. ([#12435](https://github.com/qmk/qmk_firmware/pull/12435))
|
||||
* Implement CIE1931 curve for LED Matrix ([#12417](https://github.com/qmk/qmk_firmware/pull/12417))
|
||||
* Change `BOOTMAGIC_ENABLE=yes` to use Bootmagic Lite ([#12172](https://github.com/qmk/qmk_firmware/pull/12172))
|
||||
* Add kzar keymap for Kinesis Advantage ([#12444](https://github.com/qmk/qmk_firmware/pull/12444))
|
||||
* LED Matrix: suspend code ([#12509](https://github.com/qmk/qmk_firmware/pull/12509))
|
||||
* LED Matrix: Task system ([#12580](https://github.com/qmk/qmk_firmware/pull/12580))
|
||||
* Add missing RGB_MODE_TWINKLE / RGB_M_TW keycodes ([#11935](https://github.com/qmk/qmk_firmware/pull/11935))
|
||||
* Enhancement of WPM feature ([#11727](https://github.com/qmk/qmk_firmware/pull/11727))
|
||||
* Add Per Key functionality for AutoShift ([#11536](https://github.com/qmk/qmk_firmware/pull/11536))
|
||||
* LED Matrix: Reactive effect buffers & advanced indicators ([#12588](https://github.com/qmk/qmk_firmware/pull/12588))
|
||||
* LED Matrix: support for Split keyboards ([#12633](https://github.com/qmk/qmk_firmware/pull/12633))
|
||||
* add setting to enable infinite timeout for leader key ([#6580](https://github.com/qmk/qmk_firmware/pull/6580), [#12721](https://github.com/qmk/qmk_firmware/pull/12721 "Fix bad PR merge for #6580"))
|
||||
* Update ADC driver for STM32F1xx, STM32F3xx, STM32F4xx ([#12403](https://github.com/qmk/qmk_firmware/pull/12403))
|
||||
* Add initial support for tinyuf2 bootloader (when hosted on F411 blackpill) ([#12600](https://github.com/qmk/qmk_firmware/pull/12600))
|
||||
* Add support for STM32F446 MCU ([#12619](https://github.com/qmk/qmk_firmware/pull/12619))
|
||||
* Add STM32L433 and L443 support ([#12063](https://github.com/qmk/qmk_firmware/pull/12063))
|
||||
* Added OLED fade out support ([#12086](https://github.com/qmk/qmk_firmware/pull/12086))
|
||||
* New command: `qmk console` ([#12828](https://github.com/qmk/qmk_firmware/pull/12828))
|
||||
* LED Matrix: Effects! ([#12651](https://github.com/qmk/qmk_firmware/pull/12651))
|
||||
* Add setup, clone, and env to the list of commands we allow even with broken modules ([#12868](https://github.com/qmk/qmk_firmware/pull/12868))
|
||||
* LED Matrix: Documentation ([#12685](https://github.com/qmk/qmk_firmware/pull/12685))
|
||||
* Add function to allow repeated blinking of one layer ([#12237](https://github.com/qmk/qmk_firmware/pull/12237))
|
||||
* Add support for up to 4 IS31FL3733 drivers ([#12342](https://github.com/qmk/qmk_firmware/pull/12342))
|
||||
* Convert Encoder callbacks to be boolean functions ([#12805](https://github.com/qmk/qmk_firmware/pull/12805), [#12985](https://github.com/qmk/qmk_firmware/pull/12985))
|
||||
* [Keymap] Update to Drashna keymap and user code (based on develop) ([#12936](https://github.com/qmk/qmk_firmware/pull/12936))
|
||||
* Add Full-duplex serial driver for ARM boards ([#9842](https://github.com/qmk/qmk_firmware/pull/9842))
|
||||
* Document LED_MATRIX_FRAMEBUFFER_EFFECTS ([#12987](https://github.com/qmk/qmk_firmware/pull/12987))
|
||||
* Backlight: add defines for default level and breathing state ([#12560](https://github.com/qmk/qmk_firmware/pull/12560), [#13024](https://github.com/qmk/qmk_firmware/pull/13024))
|
||||
* Add dire message about LUFA mass storage bootloader ([#13014](https://github.com/qmk/qmk_firmware/pull/13014))
|
||||
|
||||
### Clean-ups and Optimizations :id=core-optimizations
|
||||
|
||||
* Overhaul bootmagic logic to have single entrypoint ([#8532](https://github.com/qmk/qmk_firmware/pull/8532))
|
||||
* Refactor of USB code within split_common ([#11890](https://github.com/qmk/qmk_firmware/pull/11890))
|
||||
* Begin the process of deprecating `bin/qmk` in favor of the global CLI ([#12109](https://github.com/qmk/qmk_firmware/pull/12109))
|
||||
* LED Matrix: decouple from Backlight ([#12054](https://github.com/qmk/qmk_firmware/pull/12054))
|
||||
* Remove `FUNC()` ([#12161](https://github.com/qmk/qmk_firmware/pull/12161))
|
||||
* Move gpio wait logic to wait.h ([#12067](https://github.com/qmk/qmk_firmware/pull/12067))
|
||||
* LED Matrix: Clean up includes ([#12197](https://github.com/qmk/qmk_firmware/pull/12197))
|
||||
* Consistently use bin/qmk when that script is called ([#12286](https://github.com/qmk/qmk_firmware/pull/12286))
|
||||
* LED Matrix: Additional common_features.mk tweaks ([#12187](https://github.com/qmk/qmk_firmware/pull/12187))
|
||||
* LED Matrix: Fix up eeconfig code ([#12327](https://github.com/qmk/qmk_firmware/pull/12327))
|
||||
* Big quantum_keycodes cleanup ([#12249](https://github.com/qmk/qmk_firmware/pull/12249))
|
||||
* Fix up builds that are now too big for `develop` branch. ([#12495](https://github.com/qmk/qmk_firmware/pull/12495))
|
||||
* [Keyboard] kint36: switch to sym_eager_pk debouncing ([#12626](https://github.com/qmk/qmk_firmware/pull/12626))
|
||||
* [Keyboard] kint2pp: reduce input latency by ≈10ms ([#12625](https://github.com/qmk/qmk_firmware/pull/12625))
|
||||
* eeprom driver: Refactor where eeprom driver initialisation (and EEPROM emulation initialisation) occurs to make it non-target-specific. ([#12671](https://github.com/qmk/qmk_firmware/pull/12671))
|
||||
* Change RGB/LED Matrix to use a simple define for USB suspend ([#12697](https://github.com/qmk/qmk_firmware/pull/12697), [#12770](https://github.com/qmk/qmk_firmware/pull/12770 "Fixing transport's led/rgb matrix suspend state logic"))
|
||||
* Remove pointless SERIAL_LINK_ENABLE rules ([#12846](https://github.com/qmk/qmk_firmware/pull/12846))
|
||||
* Make Swap Hands use PROGMEM ([#12284](https://github.com/qmk/qmk_firmware/pull/12284))
|
||||
* Remove KEYMAP and LAYOUT_kc ([#12160](https://github.com/qmk/qmk_firmware/pull/12160))
|
||||
* Rename `point_t` -> `led_point_t` ([#12864](https://github.com/qmk/qmk_firmware/pull/12864))
|
||||
* Deprecate `send_unicode_hex_string()` ([#12602](https://github.com/qmk/qmk_firmware/pull/12602))
|
||||
* [Keyboard] Remove redundant legacy and common headers for crkbd ([#13023](https://github.com/qmk/qmk_firmware/pull/13023))
|
||||
|
||||
### QMK Infrastructure and Internals :id=qmk-internals
|
||||
|
||||
* trivial change to trigger api update ([`b15288fb87`](https://github.com/qmk/qmk_firmware/commit/b15288fb87))
|
||||
* fix some references to bin/qmk that slipped in ([#12832](https://github.com/qmk/qmk_firmware/pull/12832))
|
||||
* Resolve a number of warnings in `qmk generate-api` ([#12833](https://github.com/qmk/qmk_firmware/pull/12833))
|
||||
* Fix another bin/qmk reference ([#12856](https://github.com/qmk/qmk_firmware/pull/12856))
|
||||
* Use milc.subcommand.config instead of qmk.cli.config ([#12915](https://github.com/qmk/qmk_firmware/pull/12915))
|
@@ -29,6 +29,7 @@
|
||||
* [Overview](cli.md)
|
||||
* [Configuration](cli_configuration.md)
|
||||
* [Commands](cli_commands.md)
|
||||
* [Tab Completion](cli_tab_complete.md)
|
||||
|
||||
* Using QMK
|
||||
* Guides
|
||||
@@ -107,6 +108,7 @@
|
||||
* [Haptic Feedback](feature_haptic_feedback.md)
|
||||
* [Joystick](feature_joystick.md)
|
||||
* [LED Indicators](feature_led_indicators.md)
|
||||
* [MIDI](feature_midi.md)
|
||||
* [Proton C Conversion](proton_c_conversion.md)
|
||||
* [PS/2 Mouse](feature_ps2_mouse.md)
|
||||
* [Split Keyboard](feature_split_keyboard.md)
|
||||
@@ -119,12 +121,8 @@
|
||||
* Breaking Changes
|
||||
* [Overview](breaking_changes.md)
|
||||
* [My Pull Request Was Flagged](breaking_changes_instructions.md)
|
||||
* History
|
||||
* [2020 Nov 28](ChangeLog/20201128.md)
|
||||
* [2020 Aug 29](ChangeLog/20200829.md)
|
||||
* [2020 May 30](ChangeLog/20200530.md)
|
||||
* [2020 Feb 29](ChangeLog/20200229.md)
|
||||
* [2019 Aug 30](ChangeLog/20190830.md)
|
||||
* [Most Recent ChangeLog](ChangeLog/20210529.md "QMK v0.13.0 - 2021 May 29")
|
||||
* [Past Breaking Changes](breaking_changes_history.md)
|
||||
|
||||
* C Development
|
||||
* [ARM Debugging Guide](arm_debugging.md)
|
||||
@@ -133,11 +131,13 @@
|
||||
* [Compatible Microcontrollers](compatible_microcontrollers.md)
|
||||
* [Drivers](hardware_drivers.md)
|
||||
* [ADC Driver](adc_driver.md)
|
||||
* [Audio Driver](audio_driver.md)
|
||||
* [I2C Driver](i2c_driver.md)
|
||||
* [SPI Driver](spi_driver.md)
|
||||
* [WS2812 Driver](ws2812_driver.md)
|
||||
* [EEPROM Driver](eeprom_driver.md)
|
||||
* ['serial' Driver](serial_driver.md)
|
||||
* [UART Driver](uart_driver.md)
|
||||
* [GPIO Controls](internals_gpio_control.md)
|
||||
* [Keyboard Guidelines](hardware_keyboard_guidelines.md)
|
||||
|
||||
@@ -159,6 +159,7 @@
|
||||
* [Contributing to QMK](contributing.md)
|
||||
* [Translating the QMK Docs](translating.md)
|
||||
* [Config Options](config_options.md)
|
||||
* [Data Driven Configuration](data_driven_config.md)
|
||||
* [Make Documentation](getting_started_make_guide.md)
|
||||
* [Documentation Best Practices](documentation_best_practices.md)
|
||||
* [Documentation Templates](documentation_templates.md)
|
||||
|
@@ -47,73 +47,79 @@ Note that some of these pins are doubled-up on ADCs with the same channel. This
|
||||
|
||||
Also note that the F0 and F3 use different numbering schemes. The F0 has a single ADC and the channels are 0-indexed, whereas the F3 has 4 ADCs and the channels are 1-indexed. This is because the F0 uses the `ADCv1` implementation of the ADC, whereas the F3 uses the `ADCv3` implementation.
|
||||
|
||||
|ADC|Channel|STM32F0xx|STM32F3xx|
|
||||
|---|-------|---------|---------|
|
||||
|1 |0 |`A0` | |
|
||||
|1 |1 |`A1` |`A0` |
|
||||
|1 |2 |`A2` |`A1` |
|
||||
|1 |3 |`A3` |`A2` |
|
||||
|1 |4 |`A4` |`A3` |
|
||||
|1 |5 |`A5` |`F4` |
|
||||
|1 |6 |`A6` |`C0` |
|
||||
|1 |7 |`A7` |`C1` |
|
||||
|1 |8 |`B0` |`C2` |
|
||||
|1 |9 |`B1` |`C3` |
|
||||
|1 |10 |`C0` |`F2` |
|
||||
|1 |11 |`C1` | |
|
||||
|1 |12 |`C2` | |
|
||||
|1 |13 |`C3` | |
|
||||
|1 |14 |`C4` | |
|
||||
|1 |15 |`C5` | |
|
||||
|1 |16 | | |
|
||||
|2 |1 | |`A4` |
|
||||
|2 |2 | |`A5` |
|
||||
|2 |3 | |`A6` |
|
||||
|2 |4 | |`A7` |
|
||||
|2 |5 | |`C4` |
|
||||
|2 |6 | |`C0` |
|
||||
|2 |7 | |`C1` |
|
||||
|2 |8 | |`C2` |
|
||||
|2 |9 | |`C3` |
|
||||
|2 |10 | |`F2` |
|
||||
|2 |11 | |`C5` |
|
||||
|2 |12 | |`B2` |
|
||||
|2 |13 | | |
|
||||
|2 |14 | | |
|
||||
|2 |15 | | |
|
||||
|2 |16 | | |
|
||||
|3 |1 | |`B1` |
|
||||
|3 |2 | |`E9` |
|
||||
|3 |3 | |`E13` |
|
||||
|3 |4 | | |
|
||||
|3 |5 | | |
|
||||
|3 |6 | |`E8` |
|
||||
|3 |7 | |`D10` |
|
||||
|3 |8 | |`D11` |
|
||||
|3 |9 | |`D12` |
|
||||
|3 |10 | |`D13` |
|
||||
|3 |11 | |`D14` |
|
||||
|3 |12 | |`B0` |
|
||||
|3 |13 | |`E7` |
|
||||
|3 |14 | |`E10` |
|
||||
|3 |15 | |`E11` |
|
||||
|3 |16 | |`E12` |
|
||||
|4 |1 | |`E14` |
|
||||
|4 |2 | |`B12` |
|
||||
|4 |3 | |`B13` |
|
||||
|4 |4 | |`B14` |
|
||||
|4 |5 | |`B15` |
|
||||
|4 |6 | |`E8` |
|
||||
|4 |7 | |`D10` |
|
||||
|4 |8 | |`D11` |
|
||||
|4 |9 | |`D12` |
|
||||
|4 |10 | |`D13` |
|
||||
|4 |11 | |`D14` |
|
||||
|4 |12 | |`D8` |
|
||||
|4 |13 | |`D9` |
|
||||
|4 |14 | | |
|
||||
|4 |15 | | |
|
||||
|4 |16 | | |
|
||||
|ADC|Channel|STM32F0xx|STM32F1xx|STM32F3xx|STM32F4xx|
|
||||
|---|-------|---------|---------|---------|---------|
|
||||
|1 |0 |`A0` |`A0` | |`A0` |
|
||||
|1 |1 |`A1` |`A1` |`A0` |`A1` |
|
||||
|1 |2 |`A2` |`A2` |`A1` |`A2` |
|
||||
|1 |3 |`A3` |`A3` |`A2` |`A3` |
|
||||
|1 |4 |`A4` |`A4` |`A3` |`A4` |
|
||||
|1 |5 |`A5` |`A5` |`F4` |`A5` |
|
||||
|1 |6 |`A6` |`A6` |`C0` |`A6` |
|
||||
|1 |7 |`A7` |`A7` |`C1` |`A7` |
|
||||
|1 |8 |`B0` |`B0` |`C2` |`B0` |
|
||||
|1 |9 |`B1` |`B1` |`C3` |`B1` |
|
||||
|1 |10 |`C0` |`C0` |`F2` |`C0` |
|
||||
|1 |11 |`C1` |`C1` | |`C1` |
|
||||
|1 |12 |`C2` |`C2` | |`C2` |
|
||||
|1 |13 |`C3` |`C3` | |`C3` |
|
||||
|1 |14 |`C4` |`C4` | |`C4` |
|
||||
|1 |15 |`C5` |`C5` | |`C5` |
|
||||
|1 |16 | | | | |
|
||||
|2 |0 | |`A0`¹ | |`A0`² |
|
||||
|2 |1 | |`A1`¹ |`A4` |`A1`² |
|
||||
|2 |2 | |`A2`¹ |`A5` |`A2`² |
|
||||
|2 |3 | |`A3`¹ |`A6` |`A3`² |
|
||||
|2 |4 | |`A4`¹ |`A7` |`A4`² |
|
||||
|2 |5 | |`A5`¹ |`C4` |`A5`² |
|
||||
|2 |6 | |`A6`¹ |`C0` |`A6`² |
|
||||
|2 |7 | |`A7`¹ |`C1` |`A7`² |
|
||||
|2 |8 | |`B0`¹ |`C2` |`B0`² |
|
||||
|2 |9 | |`B1`¹ |`C3` |`B1`² |
|
||||
|2 |10 | |`C0`¹ |`F2` |`C0`² |
|
||||
|2 |11 | |`C1`¹ |`C5` |`C1`² |
|
||||
|2 |12 | |`C2`¹ |`B2` |`C2`² |
|
||||
|2 |13 | |`C3`¹ | |`C3`² |
|
||||
|2 |14 | |`C4`¹ | |`C4`² |
|
||||
|2 |15 | |`C5`¹ | |`C5`² |
|
||||
|2 |16 | | | | |
|
||||
|3 |0 | |`A0`¹ | |`A0`² |
|
||||
|3 |1 | |`A1`¹ |`B1` |`A1`² |
|
||||
|3 |2 | |`A2`¹ |`E9` |`A2`² |
|
||||
|3 |3 | |`A3`¹ |`E13` |`A3`² |
|
||||
|3 |4 | |`F6`¹ | |`F6`² |
|
||||
|3 |5 | |`F7`¹ |`B13` |`F7`² |
|
||||
|3 |6 | |`F8`¹ |`E8` |`F8`² |
|
||||
|3 |7 | |`F9`¹ |`D10` |`F9`² |
|
||||
|3 |8 | |`F10`¹ |`D11` |`F10`² |
|
||||
|3 |9 | | |`D12` |`F3`² |
|
||||
|3 |10 | |`C0`¹ |`D13` |`C0`² |
|
||||
|3 |11 | |`C1`¹ |`D14` |`C1`² |
|
||||
|3 |12 | |`C2`¹ |`B0` |`C2`² |
|
||||
|3 |13 | |`C3`¹ |`E7` |`C3`² |
|
||||
|3 |14 | | |`E10` |`F4`² |
|
||||
|3 |15 | | |`E11` |`F5`² |
|
||||
|3 |16 | | |`E12` | |
|
||||
|4 |1 | | |`E14` | |
|
||||
|4 |2 | | |`E15` | |
|
||||
|4 |3 | | |`B12` | |
|
||||
|4 |4 | | |`B14` | |
|
||||
|4 |5 | | |`B15` | |
|
||||
|4 |6 | | |`E8` | |
|
||||
|4 |7 | | |`D10` | |
|
||||
|4 |8 | | |`D11` | |
|
||||
|4 |9 | | |`D12` | |
|
||||
|4 |10 | | |`D13` | |
|
||||
|4 |11 | | |`D14` | |
|
||||
|4 |12 | | |`D8` | |
|
||||
|4 |13 | | |`D9` | |
|
||||
|4 |14 | | | | |
|
||||
|4 |15 | | | | |
|
||||
|4 |16 | | | | |
|
||||
|
||||
<sup>¹ As of ChibiOS 20.3.4, the ADC driver for STM32F1xx devices supports only ADC1, therefore any configurations involving ADC2 or ADC3 cannot actually be used. In particular, pins `F6`…`F10`, which are present at least on some STM32F103x[C-G] devices, cannot be used as ADC inputs because of this driver limitation.</sup>
|
||||
|
||||
<sup>² Not all STM32F4xx devices have ADC2 and/or ADC3, therefore some configurations shown in this table may be unavailable; in particular, pins `F4`…`F10` cannot be used as ADC inputs on devices which do not have ADC3. Check the device datasheet to confirm which pin functions are supported.</sup>
|
||||
|
||||
## Functions
|
||||
|
||||
@@ -141,10 +147,10 @@ Also note that the F0 and F3 use different numbering schemes. The F0 has a singl
|
||||
|
||||
The ARM implementation of the ADC has a few additional options that you can override in your own keyboards and keymaps to change how it operates. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options.
|
||||
|
||||
|`#define` |Type |Default |Description |
|
||||
|---------------------|------|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|`ADC_CIRCULAR_BUFFER`|`bool`|`false` |If `true`, then the implementation will use a circular buffer. |
|
||||
|`ADC_NUM_CHANNELS` |`int` |`1` |Sets the number of channels that will be scanned as part of an ADC operation. The current implementation only supports `1`. |
|
||||
|`ADC_BUFFER_DEPTH` |`int` |`2` |Sets the depth of each result. Since we are only getting a 12-bit result by default, we set this to 2 bytes so we can contain our one value. This could be set to 1 if you opt for an 8-bit or lower result.|
|
||||
|`ADC_SAMPLING_RATE` |`int` |`ADC_SMPR_SMP_1P5` |Sets the sampling rate of the ADC. By default, it is set to the fastest setting. |
|
||||
|`ADC_RESOLUTION` |`int` |`ADC_CFGR1_RES_12BIT`|The resolution of your result. We choose 12 bit by default, but you can opt for 12, 10, 8, or 6 bit. |
|
||||
|`#define` |Type |Default |Description |
|
||||
|---------------------|------|----------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|`ADC_CIRCULAR_BUFFER`|`bool`|`false` |If `true`, then the implementation will use a circular buffer. |
|
||||
|`ADC_NUM_CHANNELS` |`int` |`1` |Sets the number of channels that will be scanned as part of an ADC operation. The current implementation only supports `1`. |
|
||||
|`ADC_BUFFER_DEPTH` |`int` |`2` |Sets the depth of each result. Since we are only getting a 10-bit result by default, we set this to 2 bytes so we can contain our one value. This could be set to 1 if you opt for an 8-bit or lower result.|
|
||||
|`ADC_SAMPLING_RATE` |`int` |`ADC_SMPR_SMP_1P5` |Sets the sampling rate of the ADC. By default, it is set to the fastest setting. |
|
||||
|`ADC_RESOLUTION` |`int` |`ADC_CFGR1_RES_10BIT` or `ADC_CFGR_RES_10BITS`|The resolution of your result. We choose 10 bit by default, but you can opt for 12, 10, 8, or 6 bit. Different MCUs use slightly different names for the resolution constants. |
|
||||
|
221
docs/audio_driver.md
Normal file
221
docs/audio_driver.md
Normal file
@@ -0,0 +1,221 @@
|
||||
# Audio Driver :id=audio-driver
|
||||
|
||||
The [Audio feature](feature_audio.md) breaks the hardware specifics out into separate, exchangeable driver units, with a common interface to the audio-"core" - which itself handles playing songs and notes while tracking their progress in an internal state, initializing/starting/stopping the driver as needed.
|
||||
|
||||
Not all MCUs support every available driver, either the platform-support is not there (yet?) or the MCU simply does not have the required hardware peripheral.
|
||||
|
||||
|
||||
## AVR :id=avr
|
||||
|
||||
Boards built around an Atmega32U4 can use two sets of PWM capable pins, each driving a separate speaker.
|
||||
The possible configurations are:
|
||||
|
||||
| | Timer3 | Timer1 |
|
||||
|--------------|-------------|--------------|
|
||||
| one speaker | C4,C5 or C6 | |
|
||||
| one speaker | | B4, B5 or B7 |
|
||||
| two speakers | C4,C5 or C6 | B4, B5 or B7 |
|
||||
|
||||
Currently there is only one/default driver for AVR based boards, which is automatically configured to:
|
||||
|
||||
```make
|
||||
AUDIO_DRIVER = pwm_hardware
|
||||
```
|
||||
|
||||
|
||||
## ARM :id=arm
|
||||
|
||||
For Arm based boards, QMK depends on ChibiOS - hence any MCU supported by the later is likely usable, as long as certain hardware peripherals are available.
|
||||
|
||||
Supported wiring configurations, with their ChibiOS/MCU peripheral requirement are listed below;
|
||||
piezo speakers are marked with :one: for the first/primary and :two: for the secondary.
|
||||
|
||||
| driver | GPTD6<br>Tim6 | GPTD7<br>Tim7 | GPTD8<br>Tim8 | PWMD1<sup>1</sup><br>Tim1_Ch1 |
|
||||
|--------------|------------------------------------------|------------------------|---------------|-------------------------------|
|
||||
| dac_basic | A4+DACD1 = :one: | A5+DACD2 = :one: | state | |
|
||||
| | A4+DACD1 = :one: + Gnd | A5+DACD2 = :two: + Gnd | state | |
|
||||
| | A4+DACD1 = :two: + Gnd | A5+DACD2 = :one: + Gnd | state | |
|
||||
| | A4+DACD1 = :one: + Gnd | | state | |
|
||||
| | | A5+DACD2 = :one: + Gnd | state | |
|
||||
| dac_additive | A4+DACD1 = :one: + Gnd | | | |
|
||||
| | A5+DACD2 = :one: + Gnd | | | |
|
||||
| | A4+DACD1 + A5+DACD2 = :one: <sup>2</sup> | | | |
|
||||
| pwm_software | state-update | | | any = :one: |
|
||||
| pwm hardware | state-update | | | A8 = :one: <sup>3</sup> |
|
||||
|
||||
|
||||
<sup>1</sup>: the routing and alternate functions for PWM differ sometimes between STM32 MCUs, if in doubt consult the data-sheet
|
||||
<sup>2</sup>: one piezo connected to A4 and A5, with AUDIO_PIN_ALT_AS_NEGATIVE set
|
||||
<sup>3</sup>: TIM1_CH1 = A8 on STM32F103C8, other combinations are possible, see Data-sheet. configured with: AUDIO_PWM_DRIVER and AUDIO_PWM_CHANNEL
|
||||
|
||||
|
||||
|
||||
### DAC basic :id=dac-basic
|
||||
|
||||
The default driver for ARM boards, in absence of an overriding configuration.
|
||||
This driver needs one Timer per enabled/used DAC channel, to trigger conversion; and a third timer to trigger state updates with the audio-core.
|
||||
|
||||
Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timers 6, 7 and 8:
|
||||
|
||||
``` c
|
||||
//halconf.h:
|
||||
#define HAL_USE_DAC TRUE
|
||||
#define HAL_USE_GPT TRUE
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
|
||||
``` c
|
||||
// mcuconf.h:
|
||||
#include_next <mcuconf.h>
|
||||
#undef STM32_DAC_USE_DAC1_CH1
|
||||
#define STM32_DAC_USE_DAC1_CH1 TRUE
|
||||
#undef STM32_DAC_USE_DAC1_CH2
|
||||
#define STM32_DAC_USE_DAC1_CH2 TRUE
|
||||
#undef STM32_GPT_USE_TIM6
|
||||
#define STM32_GPT_USE_TIM6 TRUE
|
||||
#undef STM32_GPT_USE_TIM7
|
||||
#define STM32_GPT_USE_TIM7 TRUE
|
||||
#undef STM32_GPT_USE_TIM8
|
||||
#define STM32_GPT_USE_TIM8 TRUE
|
||||
```
|
||||
|
||||
?> Note: DAC1 (A4) uses TIM6, DAC2 (A5) uses TIM7, and the audio state timer uses TIM8 (configurable).
|
||||
|
||||
You can also change the timer used for the overall audio state by defining the driver. For instance:
|
||||
|
||||
```c
|
||||
#define AUDIO_STATE_TIMER GPTD9
|
||||
```
|
||||
|
||||
### DAC additive :id=dac-additive
|
||||
|
||||
only needs one timer (GPTD6, Tim6) to trigger the DAC unit to do a conversion; the audio state updates are in turn triggered during the DAC callback.
|
||||
|
||||
Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timer 6:
|
||||
|
||||
``` c
|
||||
//halconf.h:
|
||||
#define HAL_USE_DAC TRUE
|
||||
#define HAL_USE_GPT TRUE
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
|
||||
``` c
|
||||
// mcuconf.h:
|
||||
#include_next <mcuconf.h>
|
||||
#undef STM32_DAC_USE_DAC1_CH1
|
||||
#define STM32_DAC_USE_DAC1_CH1 TRUE
|
||||
#undef STM32_DAC_USE_DAC1_CH2
|
||||
#define STM32_DAC_USE_DAC1_CH2 TRUE
|
||||
#undef STM32_GPT_USE_TIM6
|
||||
#define STM32_GPT_USE_TIM6 TRUE
|
||||
```
|
||||
|
||||
### DAC Config
|
||||
|
||||
| Define | Defaults | Description --------------------------------------------------------------------------------------------- |
|
||||
| `AUDIO_DAC_SAMPLE_MAX` | `4095U` | Highest value allowed. Lower value means lower volume. And 4095U is the upper limit, since this is limited to a 12 bit value. Only effects non-pregenerated samples. |
|
||||
| `AUDIO_DAC_OFF_VALUE` | `AUDIO_DAC_SAMPLE_MAX / 2` | The value of the DAC when notplaying anything. Some setups may require a high (`AUDIO_DAC_SAMPLE_MAX`) or low (`0`) value here. |
|
||||
| `AUDIO_MAX_SIMULTANEOUS_TONES` | __see next table__ | The number of tones that can be played simultaneously. A value that is too high may freeze the controller or glitch out when too many tones are being played. |
|
||||
| `AUDIO_DAC_SAMPLE_RATE` | __see next table__ | Effective bit rate of the DAC (in hertz), higher limits simultaneous tones, and lower sacrifices quality. |
|
||||
|
||||
There are a number of predefined quality settings that you can use, with "sane minimum" being the default. You can use custom values by simply defining the sample rate and number of simultaneous tones, instead of using one of the listed presets.
|
||||
|
||||
| Define | Sample Rate | Simultaneous tones |
|
||||
| `AUDIO_DAC_QUALITY_VERY_LOW` | `11025U` | `8` |
|
||||
| `AUDIO_DAC_QUALITY_LOW` | `22040U` | `4` |
|
||||
| `AUDIO_DAC_QUALITY_HIGH` | `44100U` | `2` |
|
||||
| `AUDIO_DAC_QUALITY_VERY_HIGH` | `88200U` | `1` |
|
||||
| `AUDIO_DAC_QUALITY_SANE_MINIMUM` | `16384U` | `8` |
|
||||
|
||||
|
||||
```c
|
||||
/* zero crossing (or approach, whereas zero == DAC_OFF_VALUE, which can be configured to anything from 0 to DAC_SAMPLE_MAX)
|
||||
* ============================*=*========================== AUDIO_DAC_SAMPLE_MAX
|
||||
* * *
|
||||
* * *
|
||||
* ---------------------------------------------------------
|
||||
* * * } AUDIO_DAC_SAMPLE_MAX/100
|
||||
* --------------------------------------------------------- AUDIO_DAC_OFF_VALUE
|
||||
* * * } AUDIO_DAC_SAMPLE_MAX/100
|
||||
* ---------------------------------------------------------
|
||||
* *
|
||||
* * *
|
||||
* * *
|
||||
* =====*=*================================================= 0x0
|
||||
*/
|
||||
```
|
||||
|
||||
|
||||
### PWM hardware :id=pwm-hardware
|
||||
|
||||
This driver uses the ChibiOS-PWM system to produce a square-wave on specific output pins that are connected to the PWM hardware.
|
||||
The hardware directly toggles the pin via its alternate function. See your MCU's data-sheet for which pin can be driven by what timer - looking for TIMx_CHy and the corresponding alternate function.
|
||||
|
||||
A configuration example for the STM32F103C8 would be:
|
||||
``` c
|
||||
//halconf.h:
|
||||
#define HAL_USE_PWM TRUE
|
||||
#define HAL_USE_PAL TRUE
|
||||
#define HAL_USE_GPT TRUE
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
|
||||
``` c
|
||||
// mcuconf.h:
|
||||
#include_next <mcuconf.h>
|
||||
#undef STM32_PWM_USE_TIM1
|
||||
#define STM32_PWM_USE_TIM1 TRUE
|
||||
#undef STM32_GPT_USE_TIM4
|
||||
#define STM32_GPT_USE_TIM4 TRUE
|
||||
```
|
||||
|
||||
If we now target pin A8, looking through the data-sheet of the STM32F103C8, for the timers and alternate functions
|
||||
- TIM1_CH1 = PA8 <- alternate0
|
||||
- TIM1_CH2 = PA9
|
||||
- TIM1_CH3 = PA10
|
||||
- TIM1_CH4 = PA11
|
||||
|
||||
with all this information, the configuration would contain these lines:
|
||||
``` c
|
||||
//config.h:
|
||||
#define AUDIO_PIN A8
|
||||
#define AUDIO_PWM_DRIVER PWMD1
|
||||
#define AUDIO_PWM_CHANNEL 1
|
||||
#define AUDIO_STATE_TIMER GPTD4
|
||||
```
|
||||
|
||||
ChibiOS uses GPIOv1 for the F103, which only knows of one alternate function.
|
||||
On 'larger' STM32s, GPIOv2 or GPIOv3 are used; with them it is also necessary to configure `AUDIO_PWM_PAL_MODE` to the correct alternate function for the selected pin, timer and timer-channel.
|
||||
|
||||
|
||||
### PWM software :id=pwm-software
|
||||
|
||||
This driver uses the PWM callbacks from PWMD1 with TIM1_CH1 to toggle the selected AUDIO_PIN in software.
|
||||
During the same callback, with AUDIO_PIN_ALT_AS_NEGATIVE set, the AUDIO_PIN_ALT is toggled inversely to AUDIO_PIN. This is useful for setups that drive a piezo from two pins (instead of one and Gnd).
|
||||
|
||||
You can also change the timer used for software PWM by defining the driver. For instance:
|
||||
|
||||
```c
|
||||
#define AUDIO_STATE_TIMER GPTD8
|
||||
```
|
||||
|
||||
|
||||
### Testing Notes :id=testing-notes
|
||||
|
||||
While not an exhaustive list, the following table provides the scenarios that have been partially validated:
|
||||
|
||||
| | DAC basic | DAC additive | PWM hardware | PWM software |
|
||||
|--------------------------|--------------------|--------------------|--------------------|--------------------|
|
||||
| Atmega32U4 | :o: | :o: | :heavy_check_mark: | :o: |
|
||||
| STM32F103C8 (bluepill) | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: |
|
||||
| STM32F303CCT6 (proton-c) | :heavy_check_mark: | :heavy_check_mark: | ? | :heavy_check_mark: |
|
||||
| STM32F405VG | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|
||||
| L0xx | :x: (no Tim8) | ? | ? | ? |
|
||||
|
||||
|
||||
:heavy_check_mark: : works and was tested
|
||||
:o: : does not apply
|
||||
:x: : not supported by MCU
|
||||
|
||||
*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.*
|
@@ -6,6 +6,8 @@ The breaking change period is when we will merge PR's that change QMK in dangero
|
||||
|
||||
## What has been included in past Breaking Changes?
|
||||
|
||||
* [2021 May 29](ChangeLog/20210529.md)
|
||||
* [2021 Feb 27](ChangeLog/20210227.md)
|
||||
* [2020 Nov 28](ChangeLog/20201128.md)
|
||||
* [2020 Aug 29](ChangeLog/20200829.md)
|
||||
* [2020 May 30](ChangeLog/20200530.md)
|
||||
@@ -14,16 +16,16 @@ The breaking change period is when we will merge PR's that change QMK in dangero
|
||||
|
||||
## When is the next Breaking Change?
|
||||
|
||||
The next Breaking Change is scheduled for February 27, 2021.
|
||||
The next Breaking Change is scheduled for August 28, 2021.
|
||||
|
||||
### Important Dates
|
||||
|
||||
* [x] 2020 Nov 28 - `develop` is created. Each push to `master` is subsequently merged to `develop`
|
||||
* [ ] 2021 Jan 30 - `develop` closed to new PR's.
|
||||
* [ ] 2021 Jan 30 - Call for testers.
|
||||
* [ ] 2021 Feb 25 - `master` is locked, no PR's merged.
|
||||
* [ ] 2021 Feb 27 - Merge `develop` to `master`.
|
||||
* [ ] 2021 Feb 27 - `master` is unlocked. PR's can be merged again.
|
||||
* [x] 2021 May 29 - `develop` is created. Each push to `master` is subsequently merged to `develop`
|
||||
* [ ] 2021 Jul 31 - `develop` closed to new PR's.
|
||||
* [ ] 2021 Jul 31 - Call for testers.
|
||||
* [ ] 2021 Aug 26 - `master` is locked, no PR's merged.
|
||||
* [ ] 2021 Aug 28 - Merge `develop` to `master`.
|
||||
* [ ] 2021 Aug 28 - `master` is unlocked. PR's can be merged again.
|
||||
|
||||
## What changes will be included?
|
||||
|
||||
|
11
docs/breaking_changes_history.md
Normal file
11
docs/breaking_changes_history.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Past Breaking Changes
|
||||
|
||||
This page links to all previous changelogs from the QMK Breaking Changes process.
|
||||
|
||||
* [2021 May 29](ChangeLog/20210529.md) - version 0.13.0
|
||||
* [2021 Feb 27](ChangeLog/20210227.md) - version 0.12.0
|
||||
* [2020 Nov 28](ChangeLog/20201128.md) - version 0.11.0
|
||||
* [2020 Aug 29](ChangeLog/20200829.md) - version 0.10.0
|
||||
* [2020 May 30](ChangeLog/20200530.md) - version 0.9.0
|
||||
* [2020 Feb 29](ChangeLog/20200229.md) - version 0.8.0
|
||||
* [2019 Aug 30](ChangeLog/20190830.md) - version 0.7.0
|
@@ -107,6 +107,54 @@ This command lets you configure the behavior of QMK. For the full `qmk config` d
|
||||
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
||||
```
|
||||
|
||||
## `qmk console`
|
||||
|
||||
This command lets you connect to keyboard consoles to get debugging messages. It only works if your keyboard firmware has been compiled with `CONSOLE_ENABLED=yes`.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk console [-d <pid>:<vid>[:<index>]] [-l] [-n] [-t] [-w <seconds>]
|
||||
```
|
||||
|
||||
**Examples**:
|
||||
|
||||
Connect to all available keyboards and show their console messages:
|
||||
|
||||
```
|
||||
qmk console
|
||||
```
|
||||
|
||||
List all devices:
|
||||
|
||||
```
|
||||
qmk console -l
|
||||
```
|
||||
|
||||
Show only messages from clueboard/66/rev3 keyboards:
|
||||
|
||||
```
|
||||
qmk console -d C1ED:2370
|
||||
```
|
||||
|
||||
Show only messages from the second clueboard/66/rev3:
|
||||
|
||||
```
|
||||
qmk console -d C1ED:2370:2
|
||||
```
|
||||
|
||||
Show timestamps and VID:PID instead of names:
|
||||
|
||||
```
|
||||
qmk console -n -t
|
||||
```
|
||||
|
||||
Disable bootloader messages:
|
||||
|
||||
```
|
||||
qmk console --no-bootloaders
|
||||
```
|
||||
|
||||
## `qmk doctor`
|
||||
|
||||
This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
|
||||
@@ -131,6 +179,16 @@ Check your environment and report problems only:
|
||||
|
||||
qmk doctor -n
|
||||
|
||||
## `qmk format-json`
|
||||
|
||||
Formats a JSON file in a (mostly) human-friendly way. Will usually correctly detect the format of the JSON (info.json or keymap.json) but you can override this with `--format` if neccesary.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk format-json [-f FORMAT] <json_file>
|
||||
```
|
||||
|
||||
## `qmk info`
|
||||
|
||||
Displays information about keyboards and keymaps in QMK. You can use this to get information about a keyboard, show the layouts, display the underlying key matrix, or to pretty-print JSON keymaps.
|
||||
@@ -170,7 +228,7 @@ qmk json2c [-o OUTPUT] filename
|
||||
## `qmk c2json`
|
||||
|
||||
Creates a keymap.json from a keymap.c.
|
||||
**Note:** Parsing C source files is not easy, therefore this subcommand may not work your keymap. In some cases not using the C pre-processor helps.
|
||||
**Note:** Parsing C source files is not easy, therefore this subcommand may not work with your keymap. In some cases not using the C pre-processor helps.
|
||||
|
||||
**Usage**:
|
||||
|
||||
@@ -218,6 +276,18 @@ This command is directory aware. It will automatically fill in KEYBOARD if you a
|
||||
qmk list-keymaps -kb planck/ez
|
||||
```
|
||||
|
||||
## `qmk new-keyboard`
|
||||
|
||||
This command creates a new keyboard based on available templates.
|
||||
|
||||
This command will prompt for input to guide you though the generation process.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk new-keyboard
|
||||
```
|
||||
|
||||
## `qmk new-keymap`
|
||||
|
||||
This command creates a new keymap based on a keyboard's existing default keymap.
|
||||
|
27
docs/cli_tab_complete.md
Normal file
27
docs/cli_tab_complete.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Tab Completion for QMK
|
||||
|
||||
If you are using Bash 4.2 or later, Zsh, or FiSH you can enable Tab Completion for the QMK CLI. This will let you tab complete the names of flags, keyboards, files, and other `qmk` options.
|
||||
|
||||
## Setup
|
||||
|
||||
There are several ways you can setup tab completion.
|
||||
|
||||
### For Your User Only
|
||||
|
||||
Add this to the end of your `.profile` or `.bashrc`:
|
||||
|
||||
source ~/qmk_firmware/util/qmk_tab_complete.sh
|
||||
|
||||
If you put `qmk_firmware` into another location you will need to adjust this path.
|
||||
|
||||
### System Wide Symlink
|
||||
|
||||
If you want the tab completion available to all users of the system you can add a symlink to the `qmk_tab_complete.sh` script:
|
||||
|
||||
`ln -s ~/qmk_firmware/util/qmk_tab_complete.sh /etc/profile.d/qmk_tab_complete.sh`
|
||||
|
||||
### System Wide Copy
|
||||
|
||||
In some cases a symlink may not work. Instead you can copy the file directly into place. Be aware that updates to the tab complete script may happen from time to time, you will want to recopy the file periodically.
|
||||
|
||||
cp util/qmk_tab_complete.sh /etc/profile.d
|
@@ -9,6 +9,7 @@ The following use [LUFA](https://www.fourwalledcubicle.com/LUFA.php) as the USB
|
||||
* [ATmega16U2](https://www.microchip.com/wwwproducts/en/ATmega16U2) / [ATmega32U2](https://www.microchip.com/wwwproducts/en/ATmega32U2)
|
||||
* [ATmega16U4](https://www.microchip.com/wwwproducts/en/ATmega16U4) / [ATmega32U4](https://www.microchip.com/wwwproducts/en/ATmega32U4)
|
||||
* [AT90USB64](https://www.microchip.com/wwwproducts/en/AT90USB646) / [AT90USB128](https://www.microchip.com/wwwproducts/en/AT90USB1286)
|
||||
* [AT90USB162](https://www.microchip.com/wwwproducts/en/AT90USB162)
|
||||
|
||||
Certain MCUs which do not have native USB will use [V-USB](https://www.obdev.at/products/vusb/index.html) instead:
|
||||
|
||||
@@ -25,6 +26,13 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s
|
||||
* [STM32F0x2](https://www.st.com/en/microcontrollers-microprocessors/stm32f0x2.html)
|
||||
* [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html)
|
||||
* [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)
|
||||
* [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html)
|
||||
* [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html)
|
||||
* [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html)
|
||||
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
|
||||
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
|
||||
* [STM32L433](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
|
||||
* [STM32L443](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
|
||||
|
||||
### NXP (Kinetis)
|
||||
|
||||
|
@@ -67,16 +67,22 @@ This is a C header file that is one of the first things included, and will persi
|
||||
* turns on the alternate audio voices (to cycle through)
|
||||
* `#define C4_AUDIO`
|
||||
* enables audio on pin C4
|
||||
* Deprecated. Use `#define AUDIO_PIN C4`
|
||||
* `#define C5_AUDIO`
|
||||
* enables audio on pin C5
|
||||
* Deprecated. Use `#define AUDIO_PIN C5`
|
||||
* `#define C6_AUDIO`
|
||||
* enables audio on pin C6
|
||||
* Deprecated. Use `#define AUDIO_PIN C6`
|
||||
* `#define B5_AUDIO`
|
||||
* enables audio on pin B5 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO)
|
||||
* enables audio on pin B5 (duophony is enabled if one of B pins is enabled along with one of C pins)
|
||||
* Deprecated. Use `#define AUDIO_PIN B5`, or use `#define AUDIO_PIN_ALT B5` if a `C` pin is enabled with `AUDIO_PIN`
|
||||
* `#define B6_AUDIO`
|
||||
* enables audio on pin B6 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO)
|
||||
* enables audio on pin B6 (duophony is enabled if one of B pins is enabled along with one of C pins)
|
||||
* Deprecated. Use `#define AUDIO_PIN B6`, or use `#define AUDIO_PIN_ALT B6` if a `C` pin is enabled with `AUDIO_PIN`
|
||||
* `#define B7_AUDIO`
|
||||
* enables audio on pin B7 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO)
|
||||
* enables audio on pin B7 (duophony is enabled if one of B pins is enabled along with one of C pins)
|
||||
* Deprecated. Use `#define AUDIO_PIN B7`, or use `#define AUDIO_PIN_ALT B7` if a `C` pin is enabled with `AUDIO_PIN`
|
||||
* `#define BACKLIGHT_PIN B7`
|
||||
* pin of the backlight
|
||||
* `#define BACKLIGHT_LEVELS 3`
|
||||
@@ -97,6 +103,8 @@ This is a C header file that is one of the first things included, and will persi
|
||||
* sets the maximum power (in mA) over USB for the device (default: 500)
|
||||
* `#define USB_POLLING_INTERVAL_MS 10`
|
||||
* sets the USB polling rate in milliseconds for the keyboard, mouse, and shared (NKRO/media keys) interfaces
|
||||
* `#define USB_SUSPEND_WAKEUP_DELAY 200`
|
||||
* set the number of milliseconde to pause after sending a wakeup packet
|
||||
* `#define F_SCL 100000L`
|
||||
* sets the I2C clock rate speed for keyboards using I2C. The default is `400000L`, except for keyboards using `split_common`, where the default is `100000L`.
|
||||
|
||||
|
91
docs/data_driven_config.md
Normal file
91
docs/data_driven_config.md
Normal file
@@ -0,0 +1,91 @@
|
||||
# Data Driven Configuration
|
||||
|
||||
This page describes how QMK's data driven JSON configuration system works. It is aimed at developers who want to work on QMK itself.
|
||||
|
||||
## History
|
||||
|
||||
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 1500 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.
|
||||
|
||||
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.
|
||||
|
||||
## Overview
|
||||
|
||||
On the C side of things nothing changes. When you need to create a new rule or define you follow the same process:
|
||||
|
||||
1. Add it to `docs/config_options.md`
|
||||
1. Set a default in the appropriate core file
|
||||
1. Add your ifdef statements as needed
|
||||
|
||||
You will then need to add support for your new configuration to `info.json`. The basic process is:
|
||||
|
||||
1. Add it to the schema in `data/schemas/keyboards.jsonschema`
|
||||
1. Add a mapping in `data/maps`
|
||||
1. (optional and discoraged) Add code to extract/generate it to:
|
||||
* `lib/python/qmk/info.py`
|
||||
* `lib/python/qmk/cli/generate/config_h.py`
|
||||
* `lib/python/qmk/cli/generate/rules_mk.py`
|
||||
|
||||
## Adding an option to info.json
|
||||
|
||||
This section describes adding support for a `config.h`/`rules.mk` value to info.json.
|
||||
|
||||
### Add it to the schema
|
||||
|
||||
QMK maintains [jsonschema](https://json-schema.org/) files in `data/schemas`. The values that go into keyboard-specific `info.json` files are kept in `keyboard.jsonschema`. Any value you want to make available to end users to edit must go in here.
|
||||
|
||||
In some cases you can simply add a new top-level key. Some examples to follow are `keyboard_name`, `maintainer`, `processor`, and `url`. This is appropriate when your option is self-contained and not directly related to other options.
|
||||
|
||||
In other cases you should group like options together in an `object`. This is particularly true when adding support for a feature. Some examples to follow for this are `indicators`, `matrix_pins`, and `rgblight`. If you are not sure how to integrate your new option(s) [open an issue](https://github.com/qmk/qmk_firmware/issues/new?assignees=&labels=cli%2C+python&template=other_issues.md&title=) or [join #cli on Discord](https://discord.gg/heQPAgy) and start a conversation there.
|
||||
|
||||
### Add a mapping
|
||||
|
||||
In most cases you can add a simple mapping. These are maintained as JSON files in `data/mappings/info_config.json` and `data/mappings/info_rules.json`, and control mapping for `config.h` and `rules.mk`, respectively. Each mapping is keyed by the `config.h` or `rules.mk` variable, and the value is a hash with the following keys:
|
||||
|
||||
* `info_key`: (required) The location within `info.json` for this value. See below.
|
||||
* `value_type`: (optional) Default `str`. The format for this variable's value. See below.
|
||||
* `to_json`: (optional) Default `true`. Set to `false` to exclude this mapping from info.json
|
||||
* `to_c`: (optional) Default `true`. Set to `false` to exclude this mapping from config.h
|
||||
* `warn_duplicate`: (optional) Default `true`. Set to `false` to turn off warning when a value exists in both places
|
||||
|
||||
#### Info Key
|
||||
|
||||
We use JSON dot notation to address variables within info.json. For example, to access `info_json["rgblight"]["split_count"]` I would specify `rgblight.split_count`. This allows you to address deeply nested keys with a simple string.
|
||||
|
||||
Under the hood we use [Dotty Dict](https://dotty-dict.readthedocs.io/en/latest/), you can refer to that documentation for how these strings are converted to object access.
|
||||
|
||||
#### Value Types
|
||||
|
||||
By default we treat all values as simple strings. If your value is more complex you can use one of these types to intelligently parse the data:
|
||||
|
||||
* `array`: A comma separated array of strings
|
||||
* `array.int`: A comma separated array of integers
|
||||
* `int`: An integer
|
||||
* `hex`: A number formatted as hex
|
||||
* `list`: A space separate array of strings
|
||||
* `mapping`: A hash of key/value pairs
|
||||
|
||||
### Add code to extract it
|
||||
|
||||
Most use cases can be solved by the mapping files described above. If yours can't you can instead write code to extract your config values.
|
||||
|
||||
Whenever QMK generates a complete `info.json` it extracts information from `config.h` and `rules.mk`. You will need to add code for your new config value to `lib/python/qmk/info.py`. Typically this means adding a new `_extract_<feature>()` function and then calling your function in either `_extract_config_h()` or `_extract_rules_mk()`.
|
||||
|
||||
If you are not sure how to edit this file or are not comfortable with Python [open an issue](https://github.com/qmk/qmk_firmware/issues/new?assignees=&labels=cli%2C+python&template=other_issues.md&title=) or [join #cli on Discord](https://discord.gg/heQPAgy) and someone can help you with this part.
|
||||
|
||||
### Add code to generate it
|
||||
|
||||
The final piece of the puzzle is providing your new option to the build system. This is done by generating two files:
|
||||
|
||||
* `.build/obj_<keyboard>/src/info_config.h`
|
||||
* `.build/obj_<keyboard>/src/rules.mk`
|
||||
|
||||
These two files are generated by the code here:
|
||||
|
||||
* `lib/python/qmk/cli/generate/config_h.py`
|
||||
* `lib/python/qmk/cli/generate/rules_mk.py`
|
||||
|
||||
For `config.h` values you'll need to write a function for your rule(s) and call that function in `generate_config_h()`.
|
||||
|
||||
If you have a new top-level `info.json` key for `rules.mk` you can simply add your keys to `info_to_rules` at the top of `lib/python/qmk/cli/generate/rules_mk.py`. Otherwise you'll need to create a new if block for your feature in `generate_rules_mk()`.
|
@@ -109,6 +109,19 @@ If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes
|
||||
|
||||
You may need privileges to access the device an OS like Linux. Try `sudo hid_listen`.
|
||||
|
||||
On many Linux distros you can avoid having to run hid_listen as root
|
||||
by creating a file called `/etc/udev/rules.d/70-hid-listen.rules` with
|
||||
the following content:
|
||||
|
||||
```
|
||||
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="abcd", ATTRS{idProduct}=="def1", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
```
|
||||
|
||||
Replace abcd and def1 with your keyboard's vendor and product id,
|
||||
letters must be lowercase. The `RUN{builtin}+="uaccess"` part is only
|
||||
needed for older distros.
|
||||
|
||||
|
||||
## Can't Get Message on Console
|
||||
Check:
|
||||
- *hid_listen* finds your device. See above.
|
||||
|
@@ -23,6 +23,141 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown
|
||||
|
||||
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.
|
||||
|
||||
# Checking Modifier State :id=checking-modifier-state
|
||||
|
||||
The current modifier state can mainly be accessed with two functions: `get_mods()` for normal modifiers and modtaps and `get_oneshot_mods()` for one-shot modifiers (unless they're held, in which case they act like normal modifier keys).
|
||||
|
||||
The presence of one or more specific modifiers in the current modifier state can be detected by ANDing the modifier state with a mod mask corresponding to the set of modifiers you want to match for. The reason why bitwise operators are used is that the modifier state is stored as a single byte in the format (GASC)<sub>R</sub>(GASC)<sub>L</sub>.
|
||||
|
||||
Thus, to give an example, `01000010` would be the internal representation of LShift+RAlt.
|
||||
For more information on bitwise operators in C, click [here](https://en.wikipedia.org/wiki/Bitwise_operations_in_C) to open the Wikipedia page on the topic.
|
||||
|
||||
In practice, this means that you can check whether a given modifier is active with `get_mods() & MOD_BIT(KC_<modifier>)` (see the [list of modifier keycodes](keycodes_basic.md#modifiers)) or with `get_mods() & MOD_MASK_<modifier>` if the difference between left and right hand modifiers is not important and you want to match both. Same thing can be done for one-shot modifiers if you replace `get_mods()` with `get_oneshot_mods()`.
|
||||
|
||||
To check that *only* a specific set of mods is active at a time, AND the modifier state and your desired mod mask as explained above and compare the result to the mod mask itself: `get_mods() & <mod mask> == <mod mask>`.
|
||||
|
||||
For example, let's say you want to trigger a piece of custom code if one-shot left control and one-shot left shift are on but every other one-shot mods are off. To do so, you can compose the desired mod mask by combining the mod bits for left control and shift with `(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))` and then plug it in: `get_oneshot_mods & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT)) == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))`. Using `MOD_MASK_CS` instead for the mod bitmask would have forced you to press four modifier keys (both versions of control and shift) to fulfill the condition.
|
||||
|
||||
The full list of mod masks is as follows:
|
||||
|
||||
| Mod Mask Name | Matching Modifiers |
|
||||
|--------------------|------------------------------------------------|
|
||||
| `MOD_MASK_CTRL` | LCTRL , RCTRL |
|
||||
| `MOD_MASK_SHIFT` | LSHIFT , RSHIFT |
|
||||
| `MOD_MASK_ALT` | LALT , RALT |
|
||||
| `MOD_MASK_GUI` | LGUI , RGUI |
|
||||
| `MOD_MASK_CS` | CTRL , SHIFT |
|
||||
| `MOD_MASK_CA` | (L/R)CTRL , (L/R)ALT |
|
||||
| `MOD_MASK_CG` | (L/R)CTRL , (L/R)GUI |
|
||||
| `MOD_MASK_SA` | (L/R)SHIFT , (L/R)ALT |
|
||||
| `MOD_MASK_SG` | (L/R)SHIFT , (L/R)GUI |
|
||||
| `MOD_MASK_AG` | (L/R)ALT , (L/R)GUI |
|
||||
| `MOD_MASK_CSA` | (L/R)CTRL , (L/R)SHIFT , (L/R)ALT |
|
||||
| `MOD_MASK_CSG` | (L/R)CTRL , (L/R)SHIFT , (L/R)GUI |
|
||||
| `MOD_MASK_CAG` | (L/R)CTRL , (L/R)ALT , (L/R)GUI |
|
||||
| `MOD_MASK_SAG` | (L/R)SHIFT , (L/R)ALT , (L/R)GUI |
|
||||
| `MOD_MASK_CSAG` | (L/R)CTRL , (L/R)SHIFT , (L/R)ALT , (L/R)GUI |
|
||||
|
||||
Aside from accessing the currently active modifiers using `get_mods()`, there exists some other functions you can use to modify the modifier state, where the `mods` argument refers to the modifiers bitmask.
|
||||
|
||||
* `add_mods(mods)`: Enable `mods` without affecting any other modifiers
|
||||
* `register_mods(mods)`: Like `add_mods` but send a keyboard report immediately.
|
||||
* `del_mods(mods)`: Disable `mods` without affecting any other modifiers
|
||||
* `unregister_mods(mods)`: Like `del_mods` but send a keyboard report immediately.
|
||||
* `set_mods(mods)`: Overwrite current modifier state with `mods`
|
||||
* `clear_mods()`: Reset the modifier state by disabling all modifiers
|
||||
|
||||
Similarly, in addition to `get_oneshot_mods()`, there also exists these functions for one-shot mods:
|
||||
|
||||
* `add_oneshot_mods(mods)`: Enable `mods` without affecting any other one-shot modifiers
|
||||
* `del_oneshot_mods(mods)`: Disable `mods` without affecting any other one-shot modifiers
|
||||
* `set_oneshot_mods(mods)`: Overwrite current one-shot modifier state with `mods`
|
||||
* `clear_oneshot_mods()`: Reset the one-shot modifier state by disabling all one-shot modifiers
|
||||
|
||||
## Examples :id=examples
|
||||
|
||||
The following examples use [advanced macro functions](feature_macros.md#advanced-macro-functions) which you can read more about in the [documentation page on macros](feature_macros.md).
|
||||
|
||||
### Alt + Escape for Alt + Tab :id=alt-escape-for-alt-tab
|
||||
|
||||
Simple example where chording Left Alt with `KC_ESC` makes it behave like `KC_TAB` for alt-tabbing between applications. This example strictly checks if only Left Alt is active, meaning you can't do Alt+Shift+Esc to switch between applications in reverse order. Also keep in mind that this removes the ability to trigger the actual Alt+Escape keyboard shortcut, though it keeps the ability to do AltGr+Escape.
|
||||
|
||||
```c
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
|
||||
case KC_ESC:
|
||||
// Detect the activation of only Left Alt
|
||||
if ((get_mods() & MOD_BIT(KC_LALT)) == MOD_BIT(KC_LALT)) {
|
||||
if (record->event.pressed) {
|
||||
// No need to register KC_LALT because it's already active.
|
||||
// The Alt modifier will apply on this KC_TAB.
|
||||
register_code(KC_TAB);
|
||||
} else {
|
||||
unregister_code(KC_TAB);
|
||||
}
|
||||
// Do not let QMK process the keycode further
|
||||
return false;
|
||||
}
|
||||
// Else, let QMK process the KC_ESC keycode as usual
|
||||
return true;
|
||||
|
||||
}
|
||||
return true;
|
||||
};
|
||||
```
|
||||
|
||||
### Shift + Backspace for Delete :id=shift-backspace-for-delete
|
||||
|
||||
Advanced example where the original behaviour of shift is cancelled when chorded with `KC_BSPC` and is instead fully replaced by `KC_DEL`. Two main variables are created to make this work well: `mod_state` and `delkey_registered`. The first one stores the modifier state and is used to restore it after registering `KC_DEL`. The second variable is a boolean variable (true or false) which keeps track of the status of `KC_DEL` to manage the release of the whole Backspace/Delete key correctly.
|
||||
|
||||
As opposed to the previous example, this doesn't use strict modifier checking. Pressing `KC_BSPC` while one or two shifts are active is enough to trigger this custom code, regardless of the state of other modifiers. That approach offers some perks: Ctrl+Shift+Backspace lets us delete the next word (Ctrl+Delete) and Ctrl+Alt+Shift+Backspace lets us execute the Ctrl+Alt+Del keyboard shortcut.
|
||||
|
||||
```c
|
||||
// Initialize variable holding the binary
|
||||
// representation of active modifiers.
|
||||
uint8_t mod_state;
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
// Store the current modifier state in the variable for later reference
|
||||
mod_state = get_mods();
|
||||
switch (keycode) {
|
||||
|
||||
case KC_BSPC:
|
||||
{
|
||||
// Initialize a boolean variable that keeps track
|
||||
// of the delete key status: registered or not?
|
||||
static bool delkey_registered;
|
||||
if (record->event.pressed) {
|
||||
// Detect the activation of either shift keys
|
||||
if (mod_state & MOD_MASK_SHIFT) {
|
||||
// First temporarily canceling both shifts so that
|
||||
// shift isn't applied to the KC_DEL keycode
|
||||
del_mods(MOD_MASK_SHIFT);
|
||||
register_code(KC_DEL);
|
||||
// Update the boolean variable to reflect the status of KC_DEL
|
||||
delkey_registered = true;
|
||||
// Reapplying modifier state so that the held shift key(s)
|
||||
// still work even after having tapped the Backspace/Delete key.
|
||||
set_mods(mod_state);
|
||||
return false;
|
||||
}
|
||||
} else { // on release of KC_BSPC
|
||||
// In case KC_DEL is still being sent even after the release of KC_BSPC
|
||||
if (delkey_registered) {
|
||||
unregister_code(KC_DEL);
|
||||
delkey_registered = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Let QMK process the KC_BSPC keycode as usual outside of shift
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
};
|
||||
```
|
||||
|
||||
# Legacy Content :id=legacy-content
|
||||
|
||||
This page used to encompass a large set of features. We have moved many sections that used to be part of this page to their own pages. Everything below this point is simply a redirect so that people following old links on the web find what they're looking for.
|
||||
|
@@ -1,21 +1,117 @@
|
||||
# Audio
|
||||
|
||||
Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any AVR keyboard that allows access to certain PWM-capable pins, you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
|
||||
Your keyboard can make sounds! If you've got a spare pin you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
|
||||
|
||||
Up to two simultaneous audio voices are supported, one driven by timer 1 and another driven by timer 3. The following pins can be defined as audio outputs in config.h:
|
||||
To activate this feature, add `AUDIO_ENABLE = yes` to your `rules.mk`.
|
||||
|
||||
Timer 1:
|
||||
`#define B5_AUDIO`
|
||||
`#define B6_AUDIO`
|
||||
`#define B7_AUDIO`
|
||||
## AVR based boards
|
||||
On Atmega32U4 based boards, up to two simultaneous tones can be rendered.
|
||||
With one speaker connected to a PWM capable pin on PORTC driven by timer 3 and the other on one of the PWM pins on PORTB driven by timer 1.
|
||||
|
||||
Timer 3:
|
||||
`#define C4_AUDIO`
|
||||
`#define C5_AUDIO`
|
||||
`#define C6_AUDIO`
|
||||
The following pins can be configured as audio outputs in `config.h` - for one speaker set either one out of:
|
||||
|
||||
If you add `AUDIO_ENABLE = yes` to your `rules.mk`, there's a couple different sounds that will automatically be enabled without any other configuration:
|
||||
* `#define AUDIO_PIN C4`
|
||||
* `#define AUDIO_PIN C5`
|
||||
* `#define AUDIO_PIN C6`
|
||||
* `#define AUDIO_PIN B5`
|
||||
* `#define AUDIO_PIN B6`
|
||||
* `#define AUDIO_PIN B7`
|
||||
|
||||
and *optionally*, for a second speaker, one of:
|
||||
* `#define AUDIO_PIN_ALT B5`
|
||||
* `#define AUDIO_PIN_ALT B6`
|
||||
* `#define AUDIO_PIN_ALT B7`
|
||||
|
||||
### Wiring
|
||||
per speaker is - for example with a piezo buzzer - the black lead to Ground, and the red lead connected to the selected AUDIO_PIN for the primary; and similarly with AUDIO_PIN_ALT for the secondary.
|
||||
|
||||
|
||||
## ARM based boards
|
||||
for more technical details, see the notes on [Audio driver](audio_driver.md).
|
||||
|
||||
<!-- because I'm not sure where to fit this in: https://waveeditonline.com/ -->
|
||||
### DAC (basic)
|
||||
Most STM32 MCUs have DAC peripherals, with a notable exception of the STM32F1xx series. Generally, the DAC peripheral drives pins A4 or A5. To enable DAC-based audio output on STM32 devices, add `AUDIO_DRIVER = dac_basic` to `rules.mk` and set in `config.h` either:
|
||||
|
||||
`#define AUDIO_PIN A4` or `#define AUDIO_PIN A5`
|
||||
|
||||
the other DAC channel can optionally be used with a secondary speaker, just set:
|
||||
|
||||
`#define AUDIO_PIN_ALT A4` or `#define AUDIO_PIN_ALT A5`
|
||||
|
||||
Do note though that the dac_basic driver is only capable of reproducing one tone per speaker/channel at a time, for more tones simultaneously, try the dac_additive driver.
|
||||
|
||||
#### Wiring:
|
||||
for two piezos, for example configured as `AUDIO_PIN A4` and `AUDIO_PIN_ALT A5` would be: red lead to A4 and black to Ground, and similarly with the second one: A5 = red, and Ground = black
|
||||
|
||||
another alternative is to drive *one* piezo with both DAC pins - for an extra "push".
|
||||
wiring red to A4 and black to A5 (or the other way round) and add `#define AUDIO_PIN_ALT_AS_NEGATIVE` to `config.h`
|
||||
|
||||
##### Proton-C Example:
|
||||
The Proton-C comes (optionally) with one 'builtin' piezo, which is wired to A4+A5.
|
||||
For this board `config.h` would include these defines:
|
||||
|
||||
```c
|
||||
#define AUDIO_PIN A5
|
||||
#define AUDIO_PIN_ALT A4
|
||||
#define AUDIO_PIN_ALT_AS_NEGATIVE
|
||||
```
|
||||
|
||||
### DAC (additive)
|
||||
Another option, besides dac_basic (which produces sound through a square-wave), is to use the DAC to do additive wave synthesis.
|
||||
With a number of predefined wave-forms or by providing your own implementation to generate samples on the fly.
|
||||
To use this feature set `AUDIO_DRIVER = dac_additive` in your `rules.mk`, and select in `config.h` EITHER `#define AUDIO_PIN A4` or `#define AUDIO_PIN A5`.
|
||||
|
||||
The used waveform *defaults* to sine, but others can be selected by adding one of the following defines to `config.h`:
|
||||
|
||||
* `#define AUDIO_DAC_SAMPLE_WAVEFORM_SINE`
|
||||
* `#define AUDIO_DAC_SAMPLE_WAVEFORM_TRIANGLE`
|
||||
* `#define AUDIO_DAC_SAMPLE_WAVEFORM_TRAPEZOID`
|
||||
* `#define AUDIO_DAC_SAMPLE_WAVEFORM_SQUARE`
|
||||
|
||||
Should you rather choose to generate and use your own sample-table with the DAC unit, implement `uint16_t dac_value_generate(void)` with your keyboard - for an example implementation see keyboards/planck/keymaps/synth_sample or keyboards/planck/keymaps/synth_wavetable
|
||||
|
||||
|
||||
### PWM (software)
|
||||
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.
|
||||
|
||||
#### Wiring
|
||||
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.
|
||||
|
||||
### PWM (hardware)
|
||||
STM32F1xx have to fall back to using PWM, but can do so in hardware; but again on currently only one speaker/pin.
|
||||
|
||||
`AUDIO_DRIVER = pwm_hardware` in `rules.mk`, and in `config.h`:
|
||||
`#define AUDIO_PIN A8`
|
||||
`#define AUDIO_PWM_DRIVER PWMD1`
|
||||
`#define AUDIO_PWM_CHANNEL 1`
|
||||
(as well as `#define AUDIO_PWM_PAL_MODE 42` if you are on STM32F2 or larger)
|
||||
which will use Timer 1 to directly drive pin PA8 through the PWM hardware (TIM1_CH1 = PA8).
|
||||
Should you want to use the pwm-hardware on another pin and timer - be ready to dig into the STM32 data-sheet to pick the right TIMx_CHy and pin-alternate function.
|
||||
|
||||
|
||||
## Tone Multiplexing
|
||||
Since most drivers can only render one tone per speaker at a time (with the one exception: arm dac-additive) there also exists a "workaround-feature" that does time-slicing/multiplexing - which does what the name implies: cycle through a set of active tones (e.g. when playing chords in Music Mode) at a given rate, and put one tone at a time out through the one/few speakers that are available.
|
||||
|
||||
To enable this feature, and configure a starting-rate, add the following defines to `config.h`:
|
||||
```c
|
||||
#define AUDIO_ENABLE_TONE_MULTIPLEXING
|
||||
#define AUDIO_TONE_MULTIPLEXING_RATE_DEFAULT 10
|
||||
```
|
||||
|
||||
The audio core offers interface functions to get/set/change the tone multiplexing rate from within `keymap.c`.
|
||||
|
||||
|
||||
## Songs
|
||||
There's a couple of different sounds that will automatically be enabled without any other configuration:
|
||||
```
|
||||
STARTUP_SONG // plays when the keyboard starts up (audio.c)
|
||||
GOODBYE_SONG // plays when you press the RESET key (quantum.c)
|
||||
@@ -67,15 +163,34 @@ The available keycodes for audio are:
|
||||
* `AU_OFF` - Turn Audio Feature off
|
||||
* `AU_TOG` - Toggle Audio Feature state
|
||||
|
||||
!> These keycodes turn all of the audio functionality on and off. Turning it off means that audio feedback, audio clicky, music mode, etc. are disabled, completely.
|
||||
!> These keycodes turn all of the audio functionality on and off. Turning it off means that audio feedback, audio clicky, music mode, etc. are disabled, completely.
|
||||
|
||||
## Tempo
|
||||
the 'speed' at which SONGs are played is dictated by the set Tempo, which is measured in beats-per-minute. Note lengths are defined relative to that.
|
||||
The initial/default tempo is set to 120 bpm, but can be configured by setting `TEMPO_DEFAULT` in `config.c`.
|
||||
There is also a set of functions to modify the tempo from within the user/keymap code:
|
||||
```c
|
||||
void audio_set_tempo(uint8_t tempo);
|
||||
void audio_increase_tempo(uint8_t tempo_change);
|
||||
void audio_decrease_tempo(uint8_t tempo_change);
|
||||
```
|
||||
|
||||
## ARM Audio Volume
|
||||
|
||||
For ARM devices, you can adjust the DAC sample values. If your board is too loud for you or your coworkers, you can set the max using `DAC_SAMPLE_MAX` in your `config.h`:
|
||||
For ARM devices, you can adjust the DAC sample values. If your board is too loud for you or your coworkers, you can set the max using `AUDIO_DAC_SAMPLE_MAX` in your `config.h`:
|
||||
|
||||
```c
|
||||
#define DAC_SAMPLE_MAX 65535U
|
||||
#define AUDIO_DAC_SAMPLE_MAX 4095U
|
||||
```
|
||||
the DAC usually runs in 12Bit mode, hence a volume of 100% = 4095U
|
||||
|
||||
Note: this only adjusts the volume aka 'works' if you stick to WAVEFORM_SQUARE, since its samples are generated on the fly - any other waveform uses a hardcoded/precomputed sample-buffer.
|
||||
|
||||
## Voices
|
||||
Aka "audio effects", different ones can be enabled by setting in `config.h` these defines:
|
||||
`#define AUDIO_VOICES` to enable the feature, and `#define AUDIO_VOICE_DEFAULT something` to select a specific effect
|
||||
for details see quantum/audio/voices.h and .c
|
||||
|
||||
|
||||
## Music Mode
|
||||
|
||||
@@ -176,7 +291,7 @@ You can configure the default, min and max frequencies, the stepping and built i
|
||||
|--------|---------------|-------------|
|
||||
| `AUDIO_CLICKY_FREQ_DEFAULT` | 440.0f | Sets the default/starting audio frequency for the clicky sounds. |
|
||||
| `AUDIO_CLICKY_FREQ_MIN` | 65.0f | Sets the lowest frequency (under 60f are a bit buggy). |
|
||||
| `AUDIO_CLICKY_FREQ_MAX` | 1500.0f | Sets the the highest frequency. Too high may result in coworkers attacking you. |
|
||||
| `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_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. |
|
||||
@@ -186,8 +301,7 @@ You can configure the default, min and max frequencies, the stepping and built i
|
||||
|
||||
## MIDI Functionality
|
||||
|
||||
This is still a WIP, but check out `quantum/process_keycode/process_midi.c` to see what's happening. Enable from the Makefile.
|
||||
|
||||
See [MIDI](feature_midi.md)
|
||||
|
||||
## Audio Keycodes
|
||||
|
||||
@@ -204,120 +318,3 @@ This is still a WIP, but check out `quantum/process_keycode/process_midi.c` to s
|
||||
|`MU_OFF` | |Turns off Music Mode |
|
||||
|`MU_TOG` | |Toggles Music Mode |
|
||||
|`MU_MOD` | |Cycles through the music modes |
|
||||
|
||||
<!-- FIXME: this formatting needs work
|
||||
|
||||
## Audio
|
||||
|
||||
```c
|
||||
#ifdef AUDIO_ENABLE
|
||||
AU_ON,
|
||||
AU_OFF,
|
||||
AU_TOG,
|
||||
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
FC_ON,
|
||||
FC_OFF,
|
||||
FC_TOG,
|
||||
#endif
|
||||
|
||||
// Music mode on/off/toggle
|
||||
MU_ON,
|
||||
MU_OFF,
|
||||
MU_TOG,
|
||||
|
||||
// Music voice iterate
|
||||
MUV_IN,
|
||||
MUV_DE,
|
||||
#endif
|
||||
```
|
||||
|
||||
### Midi
|
||||
|
||||
#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
|
||||
MI_ON, // send midi notes when music mode is enabled
|
||||
MI_OFF, // don't send midi notes when music mode is enabled
|
||||
#endif
|
||||
|
||||
MIDI_TONE_MIN,
|
||||
MIDI_TONE_MAX
|
||||
|
||||
MI_C = MIDI_TONE_MIN,
|
||||
MI_Cs,
|
||||
MI_Db = MI_Cs,
|
||||
MI_D,
|
||||
MI_Ds,
|
||||
MI_Eb = MI_Ds,
|
||||
MI_E,
|
||||
MI_F,
|
||||
MI_Fs,
|
||||
MI_Gb = MI_Fs,
|
||||
MI_G,
|
||||
MI_Gs,
|
||||
MI_Ab = MI_Gs,
|
||||
MI_A,
|
||||
MI_As,
|
||||
MI_Bb = MI_As,
|
||||
MI_B,
|
||||
|
||||
MIDI_TONE_KEYCODE_OCTAVES > 1
|
||||
|
||||
where x = 1-5:
|
||||
MI_C_x,
|
||||
MI_Cs_x,
|
||||
MI_Db_x = MI_Cs_x,
|
||||
MI_D_x,
|
||||
MI_Ds_x,
|
||||
MI_Eb_x = MI_Ds_x,
|
||||
MI_E_x,
|
||||
MI_F_x,
|
||||
MI_Fs_x,
|
||||
MI_Gb_x = MI_Fs_x,
|
||||
MI_G_x,
|
||||
MI_Gs_x,
|
||||
MI_Ab_x = MI_Gs_x,
|
||||
MI_A_x,
|
||||
MI_As_x,
|
||||
MI_Bb_x = MI_As_x,
|
||||
MI_B_x,
|
||||
|
||||
MI_OCT_Nx 1-2
|
||||
MI_OCT_x 0-7
|
||||
MIDI_OCTAVE_MIN = MI_OCT_N2,
|
||||
MIDI_OCTAVE_MAX = MI_OCT_7,
|
||||
MI_OCTD, // octave down
|
||||
MI_OCTU, // octave up
|
||||
|
||||
MI_TRNS_Nx 1-6
|
||||
MI_TRNS_x 0-6
|
||||
MIDI_TRANSPOSE_MIN = MI_TRNS_N6,
|
||||
MIDI_TRANSPOSE_MAX = MI_TRNS_6,
|
||||
MI_TRNSD, // transpose down
|
||||
MI_TRNSU, // transpose up
|
||||
|
||||
MI_VEL_x 1-10
|
||||
MIDI_VELOCITY_MIN = MI_VEL_1,
|
||||
MIDI_VELOCITY_MAX = MI_VEL_9,
|
||||
MI_VELD, // velocity down
|
||||
MI_VELU, // velocity up
|
||||
|
||||
MI_CHx 1-16
|
||||
MIDI_CHANNEL_MIN = MI_CH1
|
||||
MIDI_CHANNEL_MAX = MI_CH16,
|
||||
MI_CHD, // previous channel
|
||||
MI_CHU, // next channel
|
||||
|
||||
MI_ALLOFF, // all notes off
|
||||
|
||||
MI_SUS, // sustain
|
||||
MI_PORT, // portamento
|
||||
MI_SOST, // sostenuto
|
||||
MI_SOFT, // soft pedal
|
||||
MI_LEG, // legato
|
||||
|
||||
MI_MOD, // modulation
|
||||
MI_MODSD, // decrease modulation speed
|
||||
MI_MODSU, // increase modulation speed
|
||||
#endif // MIDI_ADVANCED
|
||||
|
||||
-->
|
||||
|
@@ -109,6 +109,33 @@ Do not Auto Shift numeric keys, zero through nine.
|
||||
|
||||
Do not Auto Shift alpha characters, which include A through Z.
|
||||
|
||||
### Auto Shift Per Key
|
||||
|
||||
This is a function that allows you to determine which keys shold be autoshifted, much like the tap-hold keys.
|
||||
|
||||
The default function looks like this:
|
||||
|
||||
```c
|
||||
bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
# ifndef NO_AUTO_SHIFT_ALPHA
|
||||
case KC_A ... KC_Z:
|
||||
# endif
|
||||
# ifndef NO_AUTO_SHIFT_NUMERIC
|
||||
case KC_1 ... KC_0:
|
||||
# endif
|
||||
# ifndef NO_AUTO_SHIFT_SPECIAL
|
||||
case KC_TAB:
|
||||
case KC_MINUS ... KC_SLASH:
|
||||
case KC_NONUS_BSLASH:
|
||||
# endif
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
```
|
||||
This functionality is enabled by default, and does not need a define.
|
||||
|
||||
### AUTO_SHIFT_REPEAT (simple define)
|
||||
|
||||
Enables keyrepeat.
|
||||
|
@@ -62,15 +62,17 @@ Valid driver values are `pwm`, `software`, `custom` or `no`. See below for help
|
||||
|
||||
To configure the backlighting, `#define` these in your `config.h`:
|
||||
|
||||
| Define | Default | Description |
|
||||
|------------------------|---------------|-------------------------------------------------------------------------------------------------------------------|
|
||||
| `BACKLIGHT_PIN` | *Not defined* | The pin that controls the LED(s) |
|
||||
| `BACKLIGHT_LEVELS` | `3` | The number of brightness levels (maximum 31 excluding off) |
|
||||
| `BACKLIGHT_CAPS_LOCK` | *Not defined* | Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) |
|
||||
| `BACKLIGHT_BREATHING` | *Not defined* | Enable backlight breathing, if supported |
|
||||
| `BREATHING_PERIOD` | `6` | The length of one backlight "breath" in seconds |
|
||||
| `BACKLIGHT_ON_STATE` | `1` | The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low |
|
||||
| `BACKLIGHT_LIMIT_VAL ` | `255` | The maximum duty cycle of the backlight -- `255` allows for full brightness, any lower will decrease the maximum. |
|
||||
|Define |Default |Description |
|
||||
|-----------------------------|------------------|-----------------------------------------------------------------------------------------------------------------|
|
||||
|`BACKLIGHT_PIN` |*Not defined* |The pin that controls the LED(s) |
|
||||
|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 31 excluding off) |
|
||||
|`BACKLIGHT_CAPS_LOCK` |*Not defined* |Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) |
|
||||
|`BACKLIGHT_BREATHING` |*Not defined* |Enable backlight breathing, if supported |
|
||||
|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds |
|
||||
|`BACKLIGHT_ON_STATE` |`1` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low |
|
||||
|`BACKLIGHT_LIMIT_VAL` |`255` |The maximum duty cycle of the backlight -- `255` allows for full brightness, any lower will decrease the maximum.|
|
||||
|`BACKLIGHT_DEFAULT_LEVEL` |`BACKLIGHT_LEVELS`|The default backlight level to use upon clearing the EEPROM |
|
||||
|`BACKLIGHT_DEFAULT_BREATHING`|*Not defined* |Whether to enable backlight breathing upon clearing the EEPROM |
|
||||
|
||||
Unless you are designing your own keyboard, you generally should not need to change the `BACKLIGHT_PIN` or `BACKLIGHT_ON_STATE`.
|
||||
|
||||
@@ -93,18 +95,18 @@ BACKLIGHT_DRIVER = pwm
|
||||
|
||||
On AVR boards, QMK automatically decides which driver to use according to the following table:
|
||||
|
||||
|Backlight Pin|AT90USB64/128|ATmega16/32U4|ATmega16/32U2|ATmega32A|ATmega328/P|
|
||||
|-------------|-------------|-------------|-------------|---------|-----------|
|
||||
|`B1` | | | | |Timer 1 |
|
||||
|`B2` | | | | |Timer 1 |
|
||||
|`B5` |Timer 1 |Timer 1 | | | |
|
||||
|`B6` |Timer 1 |Timer 1 | | | |
|
||||
|`B7` |Timer 1 |Timer 1 |Timer 1 | | |
|
||||
|`C4` |Timer 3 | | | | |
|
||||
|`C5` |Timer 3 | |Timer 1 | | |
|
||||
|`C6` |Timer 3 |Timer 3 |Timer 1 | | |
|
||||
|`D4` | | | |Timer 1 | |
|
||||
|`D5` | | | |Timer 1 | |
|
||||
|Backlight Pin|AT90USB64/128|AT90USB162|ATmega16/32U4|ATmega16/32U2|ATmega32A|ATmega328/P|
|
||||
|-------------|-------------|----------|-------------|-------------|---------|-----------|
|
||||
|`B1` | | | | | |Timer 1 |
|
||||
|`B2` | | | | | |Timer 1 |
|
||||
|`B5` |Timer 1 | |Timer 1 | | | |
|
||||
|`B6` |Timer 1 | |Timer 1 | | | |
|
||||
|`B7` |Timer 1 |Timer 1 |Timer 1 |Timer 1 | | |
|
||||
|`C4` |Timer 3 | | | | | |
|
||||
|`C5` |Timer 3 |Timer 1 | |Timer 1 | | |
|
||||
|`C6` |Timer 3 |Timer 1 |Timer 3 |Timer 1 | | |
|
||||
|`D4` | | | | |Timer 1 | |
|
||||
|`D5` | | | | |Timer 1 | |
|
||||
|
||||
All other pins will use timer-assisted software PWM:
|
||||
|
||||
@@ -171,7 +173,7 @@ BACKLIGHT_DRIVER = software
|
||||
|
||||
#### Multiple Backlight Pins :id=multiple-backlight-pins
|
||||
|
||||
Most keyboards have only one backlight pin which control all backlight LEDs (especially if the backlight is connected to an hardware PWM pin).
|
||||
Most keyboards have only one backlight pin which controls all backlight LEDs (especially if the backlight is connected to a hardware PWM pin).
|
||||
In software PWM, it is possible to define multiple backlight pins, which will be turned on and off at the same time during the PWM duty cycle.
|
||||
|
||||
This feature allows to set, for instance, the Caps Lock LED's (or any other controllable LED) brightness at the same level as the other LEDs of the backlight. This is useful if you have mapped Control in place of Caps Lock and you need the Caps Lock LED to be part of the backlight instead of being activated when Caps Lock is on, as it is usually wired to a separate pin from the backlight.
|
||||
|
@@ -53,15 +53,15 @@ If you are using different pinouts for the encoders on each half of a split keyb
|
||||
The callback functions can be inserted into your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
void encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
encoder_update_user(index, clockwise);
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
return encoder_update_user(index, clockwise);
|
||||
}
|
||||
```
|
||||
|
||||
or `keymap.c`:
|
||||
|
||||
```c
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGDN);
|
||||
@@ -75,9 +75,29 @@ void 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. Returning `false` will override the keyboard level code. Depending on how the keyboard level function is set up.
|
||||
|
||||
## Hardware
|
||||
|
||||
The A an B lines of the encoders should be wired directly to the MCU, and the C/common lines should be wired to ground.
|
||||
|
||||
## Multiple Encoders
|
||||
|
||||
Multiple encoders may share pins so long as each encoder has a distinct pair of pins.
|
||||
|
||||
For example you can support two encoders using only 3 pins like this
|
||||
```
|
||||
#define ENCODERS_PAD_A { B1, B1 }
|
||||
#define ENCODERS_PAD_B { B2, B3 }
|
||||
```
|
||||
|
||||
You could even support three encoders using only three pins (one per encoder) however in this configuration, rotating two encoders which share pins simultaneously will often generate incorrect output. For example:
|
||||
```
|
||||
#define ENCODERS_PAD_A { B1, B1, B2 }
|
||||
#define ENCODERS_PAD_B { B2, B3, B3 }
|
||||
```
|
||||
Here rotating Encoder 0 `B1 B2` and Encoder 1 `B1 B3` could be interpreted as rotating Encoder 2 `B2 B3` or `B3 B2` depending on the timing. This may still be a useful configuration depending on your use case
|
||||
|
@@ -39,7 +39,7 @@ Not all keycodes below will work depending on which haptic mechanism you have ch
|
||||
|
||||
First 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.
|
||||
|
||||
[Wiring diagram provided by Adafruit](https://playground.arduino.cc/uploads/Learning/solenoid_driver.pdf)
|
||||
[Wiring diagram provided by Adafruit](https://cdn-shop.adafruit.com/product-files/412/solenoid_driver.pdf)
|
||||
|
||||
|
||||
| Settings | Default | Description |
|
||||
|
@@ -19,12 +19,10 @@ These functions allow you to activate layers in various ways. Note that layers a
|
||||
|
||||
### Caveats :id=caveats
|
||||
|
||||
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Specifically, dual function keys like `LT` and `MT` use a 16 bit keycode. 4 bits are used for the function identifier, the next 12 are divided into the parameters. Layer Tap uses 4 bits for the layer (and is why it's limited to layers 0-15, actually), while Mod Tap does the same, 4 bits for the identifier, 4 bits for which mods are used, and all of them use 8 bits for the keycode. Because of this, the keycode used is limited to `0xFF` (0-255), which are the basic keycodes only.
|
||||
Currently, the `layer` argument of `LT()` is limited to layers 0-15, and the `kc` argument to the [Basic Keycode set](keycodes_basic.md), 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.
|
||||
|
||||
Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
||||
|
||||
Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two.
|
||||
|
||||
## Working with Layers :id=working-with-layers
|
||||
|
||||
Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems.
|
||||
|
@@ -72,6 +72,19 @@ SEQ_THREE_KEYS(KC_C, KC_C, KC_C) {
|
||||
}
|
||||
```
|
||||
|
||||
## Infinite Leader key timeout
|
||||
|
||||
Sometimes your leader key is not on a comfortable places as the rest of keys on your sequence. Imagine that your leader key is one of your outer top right keys, you may need to reposition your hand just to reach your leader key.
|
||||
This can make typing the entire sequence on time hard even if you are able to type most of the sequence fast. For example, if your sequence is `Leader + asd` typing `asd` fast is very easy once you have your hands in your home row. However starting the sequence in time after moving your hand out of the home row to reach the leader key and back is not.
|
||||
To remove the stress this situation produces to your hands you can enable an infinite timeout just for the leader key. This mean that, after you hit the leader key you will have an infinite amount of time to start the rest of the sequence, allowing you to proper position your hands on the best position to type the rest of the sequence comfortably.
|
||||
This infinite timeout only affects the leader key, so in our previous example of `Leader + asd` you will have an infinite amount of time between `Leader` and `a`, but once you start the sequence the timeout you have configured (global or per key) will work normally.
|
||||
This way you can configure a very short `LEADER_TIMEOUT` but still have plenty of time to position your hands.
|
||||
|
||||
In order to enable this, place this in your `config.h`:
|
||||
```c
|
||||
#define LEADER_NO_TIMEOUT
|
||||
```
|
||||
|
||||
## Strict Key Processing
|
||||
|
||||
By default, the Leader Key feature will filter the keycode out of [`Mod-Tap`](mod_tap.md) and [`Layer Tap`](feature_layers.md#switching-and-toggling-layers) functions when checking for the Leader sequences. That means if you're using `LT(3, KC_A)`, it will pick this up as `KC_A` for the sequence, rather than `LT(3, KC_A)`, giving a more expected behavior for newer users.
|
||||
@@ -92,7 +105,7 @@ void leader_start(void) {
|
||||
}
|
||||
|
||||
void leader_end(void) {
|
||||
// sequence ended (no success/failuer detection)
|
||||
// sequence ended (no success/failure detection)
|
||||
}
|
||||
```
|
||||
|
||||
|
@@ -1,26 +1,28 @@
|
||||
# LED Matrix Lighting
|
||||
# LED Matrix Lighting :id=led-matrix-lighting
|
||||
|
||||
This feature allows you to use LED matrices driven by external drivers. It hooks into the backlight system so you can use the same keycodes as backlighting to control it.
|
||||
|
||||
If you want to use RGB LED's you should use the [RGB Matrix Subsystem](feature_rgb_matrix.md) instead.
|
||||
|
||||
## Driver configuration
|
||||
## Driver configuration :id=driver-configuration
|
||||
---
|
||||
### IS31FL3731 :id=is31fl3731
|
||||
|
||||
### IS31FL3731
|
||||
There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 LED controller. To enable it, add this to your `rules.mk`:
|
||||
|
||||
There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
|
||||
```make
|
||||
LED_MATRIX_ENABLE = yes
|
||||
LED_MATRIX_DRIVER = IS31FL3731
|
||||
```
|
||||
|
||||
LED_MATRIX_ENABLE = yes
|
||||
LED_MATRIX_DRIVER = IS31FL3731
|
||||
|
||||
You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
|
||||
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages | 100 |
|
||||
| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
|
||||
| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
|
||||
| `LED_DRIVER_COUNT` | (Required) How many LED driver IC's are present | |
|
||||
| `LED_DRIVER_LED_COUNT` | (Required) How many LED lights are present across all drivers | |
|
||||
| `DRIVER_LED_TOTAL` | (Required) How many LED lights are present across all drivers | |
|
||||
| `LED_DRIVER_ADDR_1` | (Required) Address for the first LED driver | |
|
||||
| `LED_DRIVER_ADDR_2` | (Optional) Address for the second LED driver | |
|
||||
| `LED_DRIVER_ADDR_3` | (Optional) Address for the third LED driver | |
|
||||
@@ -28,64 +30,348 @@ You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>
|
||||
|
||||
Here is an example using 2 drivers.
|
||||
|
||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||
// set to 0 for write, 1 for read (as per I2C protocol)
|
||||
// The address will vary depending on your wiring:
|
||||
// 0b1110100 AD <-> GND
|
||||
// 0b1110111 AD <-> VCC
|
||||
// 0b1110101 AD <-> SCL
|
||||
// 0b1110110 AD <-> SDA
|
||||
#define LED_DRIVER_ADDR_1 0b1110100
|
||||
#define LED_DRIVER_ADDR_2 0b1110110
|
||||
```c
|
||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||
// set to 0 for write, 1 for read (as per I2C protocol)
|
||||
// The address will vary depending on your wiring:
|
||||
// 0b1110100 AD <-> GND
|
||||
// 0b1110111 AD <-> VCC
|
||||
// 0b1110101 AD <-> SCL
|
||||
// 0b1110110 AD <-> SDA
|
||||
#define LED_DRIVER_ADDR_1 0b1110100
|
||||
#define LED_DRIVER_ADDR_2 0b1110110
|
||||
|
||||
#define LED_DRIVER_COUNT 2
|
||||
#define LED_DRIVER_1_LED_COUNT 25
|
||||
#define LED_DRIVER_2_LED_COUNT 24
|
||||
#define LED_DRIVER_LED_COUNT LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL
|
||||
#define LED_DRIVER_COUNT 2
|
||||
#define LED_DRIVER_1_LED_TOTAL 25
|
||||
#define LED_DRIVER_2_LED_TOTAL 24
|
||||
#define DRIVER_LED_TOTAL (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)
|
||||
```
|
||||
|
||||
Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
|
||||
!> Note the parentheses, this is so when `LED_DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)` will give very different results than `rand() % LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL`.
|
||||
|
||||
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
||||
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
/* Refer to IS31 manual for these locations
|
||||
* driver
|
||||
* | LED address
|
||||
* | | */
|
||||
{0, C3_3},
|
||||
....
|
||||
}
|
||||
```c
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
/* Refer to IS31 manual for these locations
|
||||
* driver
|
||||
* | LED address
|
||||
* | | */
|
||||
{ 0, C1_1 },
|
||||
{ 0, C1_15 },
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731-simple.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ).
|
||||
|
||||
## Keycodes
|
||||
---
|
||||
|
||||
All LED matrix keycodes are currently shared with the [backlight system](feature_backlight.md).
|
||||
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
|
||||
|
||||
## LED Matrix Effects
|
||||
```c
|
||||
led_config_t g_led_config = { {
|
||||
// Key Matrix to LED Index
|
||||
{ 5, NO_LED, NO_LED, 0 },
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED },
|
||||
{ 4, NO_LED, NO_LED, 1 },
|
||||
{ 3, NO_LED, NO_LED, 2 }
|
||||
}, {
|
||||
// LED Index to Physical Position
|
||||
{ 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 }
|
||||
}, {
|
||||
// LED Index to Flag
|
||||
1, 4, 4, 4, 4, 1
|
||||
} };
|
||||
```
|
||||
|
||||
Currently no LED matrix effects have been created.
|
||||
The first part, `// Key Matrix to LED Index`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `// LED Index to Physical Position` represents the LED's physical `{ x, y }` position on the keyboard. The default expected range of values for `{ x, y }` is the inclusive range `{ 0..224, 0..64 }`. This default expected range is due to effects that calculate the center of the keyboard for their animations. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents `{ x, y }` coordinate `{ 0, 0 }` and the bottom right of your keyboard represents `{ 224, 64 }`. Using this as a basis, you can use the following formula to calculate the physical position:
|
||||
|
||||
## Custom layer effects
|
||||
```c
|
||||
x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION
|
||||
y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION
|
||||
```
|
||||
|
||||
Custom layer effects can be done by defining this in your `<keyboard>.c`:
|
||||
Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout.
|
||||
|
||||
void led_matrix_indicators_kb(void) {
|
||||
led_matrix_set_index_value(index, value);
|
||||
}
|
||||
As mentioned earlier, the center of the keyboard by default is expected to be `{ 112, 32 }`, but this can be changed if you want to more accurately calculate the LED's physical `{ x, y }` positions. Keyboard designers can implement `#define LED_MATRIX_CENTER { 112, 32 }` in their config.h file with the new center point of the keyboard, or where they want it to be allowing more possibilities for the `{ x, y }` values. Do note that the maximum value for x or y is 255, and the recommended maximum is 224 as this gives animations runoff room before they reset.
|
||||
|
||||
A similar function works in the keymap as `led_matrix_indicators_user`.
|
||||
`// LED Index to Flag` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type.
|
||||
|
||||
## Suspended state
|
||||
## Flags :id=flags
|
||||
|
||||
To use the suspend feature, add this to your `<keyboard>.c`:
|
||||
|Define |Value |Description |
|
||||
|----------------------------|------|-------------------------------------------------|
|
||||
|`HAS_FLAGS(bits, flags)` |*n/a* |Evaluates to `true` if `bits` has all `flags` set|
|
||||
|`HAS_ANY_FLAGS(bits, flags)`|*n/a* |Evaluates to `true` if `bits` has any `flags` set|
|
||||
|`LED_FLAG_NONE` |`0x00`|If this LED has no flags |
|
||||
|`LED_FLAG_ALL` |`0xFF`|If this LED has all flags |
|
||||
|`LED_FLAG_MODIFIER` |`0x01`|If the LED is on a modifier key |
|
||||
|`LED_FLAG_KEYLIGHT` |`0x04`|If the LED is for key backlight |
|
||||
|`LED_FLAG_INDICATOR` |`0x08`|If the LED is for keyboard state indication |
|
||||
|
||||
void suspend_power_down_kb(void)
|
||||
{
|
||||
led_matrix_set_suspend_state(true);
|
||||
}
|
||||
## Keycodes :id=keycodes
|
||||
|
||||
void suspend_wakeup_init_kb(void)
|
||||
{
|
||||
led_matrix_set_suspend_state(false);
|
||||
}
|
||||
All LED matrix keycodes are currently shared with the [Backlight feature](feature_backlight.md).
|
||||
|
||||
|Key |Description |
|
||||
|---------|-----------------------------|
|
||||
|`BL_TOGG`|Toggle LED Matrix on or off |
|
||||
|`BL_STEP`|Cycle through modes |
|
||||
|`BL_ON` |Turn on LED Matrix |
|
||||
|`BL_OFF` |Turn off LED Matrix |
|
||||
|`BL_INC` |Increase the brightness level|
|
||||
|`BL_DEC` |Decrease the brightness level|
|
||||
|
||||
## LED Matrix Effects :id=led-matrix-effects
|
||||
|
||||
These are the effects that are currently available:
|
||||
|
||||
```c
|
||||
enum led_matrix_effects {
|
||||
LED_MATRIX_NONE = 0,
|
||||
LED_MATRIX_SOLID = 1, // Static single val, no speed support
|
||||
LED_MATRIX_ALPHAS_MODS, // Static dual val, speed is val for LEDs marked as modifiers
|
||||
LED_MATRIX_BREATHING, // Cycling brightness animation
|
||||
LED_MATRIX_BAND, // Band fading brightness scrolling left to right
|
||||
LED_MATRIX_BAND_PINWHEEL, // 3 blade spinning pinwheel fades brightness
|
||||
LED_MATRIX_BAND_SPIRAL, // Spinning spiral fades brightness
|
||||
LED_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right
|
||||
LED_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom
|
||||
LED_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in
|
||||
LED_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
|
||||
#if defined(LED_MATRIX_KEYPRESSES) || defined(LED_MATRIX_KEYRELEASES)
|
||||
LED_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit then fades out
|
||||
LED_MATRIX_SOLID_REACTIVE_WIDE // Value pulses near a single key hit then fades out
|
||||
LED_MATRIX_SOLID_REACTIVE_MULTIWIDE // Value pulses near multiple key hits then fades out
|
||||
LED_MATRIX_SOLID_REACTIVE_CROSS // Value pulses the same column and row of a single key hit then fades out
|
||||
LED_MATRIX_SOLID_REACTIVE_MULTICROSS // Value pulses the same column and row of multiple key hits then fades out
|
||||
LED_MATRIX_SOLID_REACTIVE_NEXUS // Value pulses away on the same column and row of a single key hit then fades out
|
||||
LED_MATRIX_SOLID_REACTIVE_MULTINEXUS // Value pulses away on the same column and row of multiple key hits then fades out
|
||||
LED_MATRIX_SOLID_SPLASH, // Value pulses away from a single key hit then fades out
|
||||
LED_MATRIX_SOLID_MULTISPLASH, // Value pulses away from multiple key hits then fades out
|
||||
#endif
|
||||
LED_MATRIX_WAVE_LEFT_RIGHT // Sine wave scrolling from left to right
|
||||
LED_MATRIX_WAVE_UP_DOWN // Sine wave scrolling from up to down
|
||||
LED_MATRIX_EFFECT_MAX
|
||||
};
|
||||
```
|
||||
|
||||
You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`:
|
||||
|
||||
|
||||
|Define |Description |
|
||||
|-------------------------------------------------------|-----------------------------------------------|
|
||||
|`#define DISABLE_LED_MATRIX_ALPHAS_MODS` |Disables `LED_MATRIX_ALPHAS_MODS` |
|
||||
|`#define DISABLE_LED_MATRIX_BREATHING` |Disables `LED_MATRIX_BREATHING` |
|
||||
|`#define DISABLE_LED_MATRIX_BAND` |Disables `LED_MATRIX_BAND` |
|
||||
|`#define DISABLE_LED_MATRIX_BAND_PINWHEEL` |Disables `LED_MATRIX_BAND_PINWHEEL` |
|
||||
|`#define DISABLE_LED_MATRIX_BAND_SPIRAL` |Disables `LED_MATRIX_BAND_SPIRAL` |
|
||||
|`#define DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT` |Disables `LED_MATRIX_CYCLE_LEFT_RIGHT` |
|
||||
|`#define DISABLE_LED_MATRIX_CYCLE_UP_DOWN` |Disables `LED_MATRIX_CYCLE_UP_DOWN` |
|
||||
|`#define DISABLE_LED_MATRIX_CYCLE_OUT_IN` |Disables `LED_MATRIX_CYCLE_OUT_IN` |
|
||||
|`#define DISABLE_LED_MATRIX_DUAL_BEACON` |Disables `LED_MATRIX_DUAL_BEACON` |
|
||||
|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `LED_MATRIX_SOLID_REACTIVE_SIMPLE` |
|
||||
|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE` |Disables `LED_MATRIX_SOLID_REACTIVE_WIDE` |
|
||||
|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` |
|
||||
|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS` |Disables `LED_MATRIX_SOLID_REACTIVE_CROSS` |
|
||||
|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTICROSS`|
|
||||
|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS` |Disables `LED_MATRIX_SOLID_REACTIVE_NEXUS` |
|
||||
|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTINEXUS`|
|
||||
|`#define DISABLE_LED_MATRIX_SOLID_SPLASH` |Disables `LED_MATRIX_SOLID_SPLASH` |
|
||||
|`#define DISABLE_LED_MATRIX_SOLID_MULTISPLASH` |Disables `LED_MATRIX_SOLID_MULTISPLASH` |
|
||||
|`#define DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT` |Disables `LED_MATRIX_WAVE_LEFT_RIGHT` |
|
||||
|`#define DISABLE_LED_MATRIX_WAVE_UP_DOWN` |Disables `LED_MATRIX_WAVE_UP_DOWN` |
|
||||
|
||||
## Custom LED Matrix Effects :id=custom-led-matrix-effects
|
||||
|
||||
By setting `LED_MATRIX_CUSTOM_USER` (and/or `LED_MATRIX_CUSTOM_KB`) in `rules.mk`, new effects can be defined directly from userspace, without having to edit any QMK core files.
|
||||
|
||||
To declare new effects, create a new `led_matrix_user/kb.inc` that looks something like this:
|
||||
|
||||
`led_matrix_user.inc` should go in the root of the keymap directory.
|
||||
`led_matrix_kb.inc` should go in the root of the keyboard directory.
|
||||
|
||||
To use custom effects in your code, simply prepend `LED_MATRIX_CUSTOM_` to the effect name specified in `LED_MATRIX_EFFECT()`. For example, an effect declared as `LED_MATRIX_EFFECT(my_cool_effect)` would be referenced with:
|
||||
|
||||
```c
|
||||
led_matrix_mode(led_MATRIX_CUSTOM_my_cool_effect);
|
||||
```
|
||||
|
||||
```c
|
||||
// !!! DO NOT ADD #pragma once !!! //
|
||||
|
||||
// Step 1.
|
||||
// Declare custom effects using the LED_MATRIX_EFFECT macro
|
||||
// (note the lack of semicolon after the macro!)
|
||||
LED_MATRIX_EFFECT(my_cool_effect)
|
||||
LED_MATRIX_EFFECT(my_cool_effect2)
|
||||
|
||||
// Step 2.
|
||||
// Define effects inside the `LED_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block
|
||||
#ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
|
||||
|
||||
// e.g: A simple effect, self-contained within a single method
|
||||
static bool my_cool_effect(effect_params_t* params) {
|
||||
LED_MATRIX_USE_LIMITS(led_min, led_max);
|
||||
for (uint8_t i = led_min; i < led_max; i++) {
|
||||
led_matrix_set_value(i, 0xFF);
|
||||
}
|
||||
return led_max < DRIVER_LED_TOTAL;
|
||||
}
|
||||
|
||||
// e.g: A more complex effect, relying on external methods and state, with
|
||||
// dedicated init and run methods
|
||||
static uint8_t some_global_state;
|
||||
static void my_cool_effect2_complex_init(effect_params_t* params) {
|
||||
some_global_state = 1;
|
||||
}
|
||||
static bool my_cool_effect2_complex_run(effect_params_t* params) {
|
||||
LED_MATRIX_USE_LIMITS(led_min, led_max);
|
||||
for (uint8_t i = led_min; i < led_max; i++) {
|
||||
led_matrix_set_value(i, some_global_state++);
|
||||
}
|
||||
|
||||
return led_max < DRIVER_LED_TOTAL;
|
||||
}
|
||||
static bool my_cool_effect2(effect_params_t* params) {
|
||||
if (params->init) my_cool_effect2_complex_init(params);
|
||||
return my_cool_effect2_complex_run(params);
|
||||
}
|
||||
|
||||
#endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
|
||||
```
|
||||
|
||||
For inspiration and examples, check out the built-in effects under `quantum/led_matrix_animations/`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Additional `config.h` Options :id=additional-configh-options
|
||||
|
||||
```c
|
||||
#define LED_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
#define LED_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
||||
#define LED_MATRIX_FRAMEBUFFER_EFFECTS // enable framebuffer effects
|
||||
#define LED_DISABLE_TIMEOUT 0 // number of milliseconds to wait until led automatically turns off
|
||||
#define LED_DISABLE_AFTER_TIMEOUT 0 // OBSOLETE: number of ticks to wait until disabling effects
|
||||
#define LED_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
|
||||
#define LED_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
|
||||
#define LED_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
||||
#define LED_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs
|
||||
#define LED_MATRIX_STARTUP_MODE LED_MATRIX_SOLID // Sets the default mode, if none has been set
|
||||
#define LED_MATRIX_STARTUP_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
|
||||
#define LED_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, 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 LED_MATRIX_KEYPRESSES or LED_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
|
||||
```
|
||||
|
||||
## EEPROM storage :id=eeprom-storage
|
||||
|
||||
The EEPROM for it is currently shared with the RGB Matrix system (it's generally assumed only one feature would be used at a time), but could be configured to use its own 32bit address with:
|
||||
|
||||
```c
|
||||
#define EECONFIG_LED_MATRIX (uint32_t *)28
|
||||
```
|
||||
|
||||
Where `28` is an unused index from `eeconfig.h`.
|
||||
|
||||
### Direct Operation :id=direct-operation
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`led_matrix_set_value_all(v)` |Set all of the LEDs to the given value, where `v` is between 0 and 255 (not written to EEPROM) |
|
||||
|`led_matrix_set_value(index, v)` |Set a single LED to the given value, where `v` is between 0 and 255, and `index` is between 0 and `DRIVER_LED_TOTAL` (not written to EEPROM) |
|
||||
|
||||
### Disable/Enable Effects :id=disable-enable-effects
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`led_matrix_toggle()` |Toggle effect range LEDs between on and off |
|
||||
|`led_matrix_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) |
|
||||
|`led_matrix_enable()` |Turn effect range LEDs on, based on their previous state |
|
||||
|`led_matrix_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) |
|
||||
|`led_matrix_disable()` |Turn effect range LEDs off, based on their previous state |
|
||||
|`led_matrix_disable_noeeprom()` |Turn effect range LEDs off, based on their previous state (not written to EEPROM) |
|
||||
|
||||
### Change Effect Mode :id=change-effect-mode
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`led_matrix_mode(mode)` |Set the mode, if LED animations are enabled |
|
||||
|`led_matrix_mode_noeeprom(mode)` |Set the mode, if LED animations are enabled (not written to EEPROM) |
|
||||
|`led_matrix_step()` |Change the mode to the next LED animation in the list of enabled LED animations |
|
||||
|`led_matrix_step_noeeprom()` |Change the mode to the next LED animation in the list of enabled LED animations (not written to EEPROM) |
|
||||
|`led_matrix_step_reverse()` |Change the mode to the previous LED animation in the list of enabled LED animations |
|
||||
|`led_matrix_step_reverse_noeeprom()` |Change the mode to the previous LED animation in the list of enabled LED animations (not written to EEPROM) |
|
||||
|`led_matrix_increase_speed()` |Increase the speed of the animations |
|
||||
|`led_matrix_increase_speed_noeeprom()` |Increase the speed of the animations (not written to EEPROM) |
|
||||
|`led_matrix_decrease_speed()` |Decrease the speed of the animations |
|
||||
|`led_matrix_decrease_speed_noeeprom()` |Decrease the speed of the animations (not written to EEPROM) |
|
||||
|`led_matrix_set_speed(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 |
|
||||
|`led_matrix_set_speed_noeeprom(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 (not written to EEPROM) |
|
||||
|
||||
### Change Value :id=change-value
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`led_matrix_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value |
|
||||
|`led_matrix_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) |
|
||||
|`led_matrix_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value |
|
||||
|`led_matrix_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) |
|
||||
|
||||
### Query Current Status :id=query-current-status
|
||||
|Function |Description |
|
||||
|---------------------------------|---------------------------|
|
||||
|`led_matrix_is_enabled()` |Gets current on/off status |
|
||||
|`led_matrix_get_mode()` |Gets current mode |
|
||||
|`led_matrix_get_val()` |Gets current val |
|
||||
|`led_matrix_get_speed()` |Gets current speed |
|
||||
|`led_matrix_get_suspend_state()` |Gets current suspend state |
|
||||
|
||||
## Callbacks :id=callbacks
|
||||
|
||||
### Indicators :id=indicators
|
||||
|
||||
If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `led_matrix_indicators_kb` or `led_matrix_indicators_user` function for that:
|
||||
```c
|
||||
void led_matrix_indicators_kb(void) {
|
||||
led_matrix_set_color(index, value);
|
||||
}
|
||||
```
|
||||
|
||||
In addition, there are the advanced indicator functions. These are aimed at those with heavily customized displays, where rendering every LED per cycle is expensive. This includes a special macro to help make this easier to use: `LED_MATRIX_INDICATOR_SET_VALUE(i, v)`.
|
||||
|
||||
```c
|
||||
void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
||||
LED_MATRIX_INDICATOR_SET_VALUE(index, value);
|
||||
}
|
||||
```
|
||||
|
||||
## Suspended State :id=suspended-state
|
||||
To use the suspend feature, make sure that `#define LED_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file.
|
||||
|
||||
Additionally add this to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
void suspend_power_down_kb(void) {
|
||||
led_matrix_set_suspend_state(true);
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb(void) {
|
||||
led_matrix_set_suspend_state(false);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
```
|
||||
or add this to your `keymap.c`:
|
||||
```c
|
||||
void suspend_power_down_user(void) {
|
||||
led_matrix_set_suspend_state(true);
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_user(void) {
|
||||
led_matrix_set_suspend_state(false);
|
||||
}
|
||||
```
|
||||
|
@@ -4,7 +4,7 @@ Macros allow you to send multiple keystrokes when pressing just one key. QMK has
|
||||
|
||||
!> **Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets a hold of your keyboard will be able to access that information by opening a text editor.
|
||||
|
||||
## The New Way: `SEND_STRING()` & `process_record_user`
|
||||
## `SEND_STRING()` & `process_record_user`
|
||||
|
||||
Sometimes you want a key to type out words or phrases. For the most common situations, we've provided `SEND_STRING()`, which will type out a string (i.e. a sequence of characters) for you. All ASCII characters that are easily translatable to a keycode are supported (e.g. `qmk 123\n\t`).
|
||||
|
||||
@@ -209,7 +209,7 @@ SEND_STRING(".."SS_TAP(X_END));
|
||||
|
||||
There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro, if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple.
|
||||
|
||||
?> You can also use the functions described in [Useful functions](ref_functions.md) for additional functionality. For example `reset_keyboard()` allows you to reset the keyboard as part of a macro.
|
||||
?> You can also use the functions described in [Useful function](ref_functions.md) and [Checking modifier state](feature_advanced_keycodes#checking-modifier-state) for additional functionality. For example, `reset_keyboard()` allows you to reset the keyboard as part of a macro and `get_mods() & MOD_MASK_SHIFT` lets you check for the existence of active shift modifiers.
|
||||
|
||||
### `record->event.pressed`
|
||||
|
||||
@@ -233,9 +233,15 @@ Parallel to `register_code` function, this sends the `<kc>` keyup event to the c
|
||||
|
||||
### `tap_code(<kc>);`
|
||||
|
||||
This will send `register_code(<kc>)` and then `unregister_code(<kc>)`. This is useful if you want to send both the press and release events ("tap" the key, rather than hold it).
|
||||
Sends `register_code(<kc>)` and then `unregister_code(<kc>)`. This is useful if you want to send both the press and release events ("tap" the key, rather than hold it).
|
||||
|
||||
If you're having issues with taps (un)registering, you can add a delay between the register and unregister events by setting `#define TAP_CODE_DELAY 100` in your `config.h` file. The value is in milliseconds.
|
||||
If `TAP_CODE_DELAY` is defined (default 0), this function waits that many milliseconds before calling `unregister_code(<kc>)`. This can be useful when you are having issues with taps (un)registering.
|
||||
|
||||
If the keycode is `KC_CAPS`, it waits `TAP_HOLD_CAPS_DELAY` milliseconds instead (default 80), as macOS prevents accidental Caps Lock activation by waiting for the key to be held for a certain amount of time.
|
||||
|
||||
### `tap_code_delay(<kc>, <delay>);`
|
||||
|
||||
Like `tap_code(<kc>)`, but with a `delay` parameter for specifying arbitrary intervals before sending the unregister event.
|
||||
|
||||
### `register_code16(<kc>);`, `unregister_code16(<kc>);` and `tap_code16(<kc>);`
|
||||
|
||||
@@ -262,15 +268,15 @@ This will clear all keys besides the mods currently pressed.
|
||||
This macro will register `KC_LALT` and tap `KC_TAB`, then wait for 1000ms. If the key is tapped again, it will send another `KC_TAB`; if there is no tap, `KC_LALT` will be unregistered, thus allowing you to cycle through windows.
|
||||
|
||||
```c
|
||||
bool is_alt_tab_active = false; # ADD this near the begining of keymap.c
|
||||
uint16_t alt_tab_timer = 0; # we will be using them soon.
|
||||
bool is_alt_tab_active = false; // ADD this near the begining of keymap.c
|
||||
uint16_t alt_tab_timer = 0; // we will be using them soon.
|
||||
|
||||
enum custom_keycodes { # Make sure have the awesome keycode ready
|
||||
enum custom_keycodes { // Make sure have the awesome keycode ready
|
||||
ALT_TAB = SAFE_RANGE,
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) { # This will do most of the grunt work with the keycodes.
|
||||
switch (keycode) { // This will do most of the grunt work with the keycodes.
|
||||
case ALT_TAB:
|
||||
if (record->event.pressed) {
|
||||
if (!is_alt_tab_active) {
|
||||
@@ -287,7 +293,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) { # The very important timer.
|
||||
void matrix_scan_user(void) { // The very important timer.
|
||||
if (is_alt_tab_active) {
|
||||
if (timer_elapsed(alt_tab_timer) > 1000) {
|
||||
unregister_code(KC_LALT);
|
||||
@@ -296,104 +302,3 @@ void matrix_scan_user(void) { # The very important timer.
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## **(DEPRECATED)** The Old Way: `MACRO()` & `action_get_macro`
|
||||
|
||||
!> This is inherited from TMK, and hasn't been updated - it's recommended that you use `SEND_STRING` and `process_record_user` instead.
|
||||
|
||||
By default QMK assumes you don't have any macros. To define your macros you create an `action_get_macro()` function. For example:
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||
case 1:
|
||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
This defines two macros which will be run when the key they are assigned to is pressed. If instead you'd like them to run when the key is released you can change the if statement:
|
||||
|
||||
if (!record->event.pressed) {
|
||||
|
||||
### Macro Commands
|
||||
|
||||
A macro can include the following commands:
|
||||
|
||||
* I() change interval of stroke in milliseconds.
|
||||
* D() press key.
|
||||
* U() release key.
|
||||
* T() type key(press and release).
|
||||
* W() wait (milliseconds).
|
||||
* END end mark.
|
||||
|
||||
### Mapping a Macro to a Key
|
||||
|
||||
Use the `M()` function within your keymap to call a macro. For example, here is the keymap for a 2-key keyboard:
|
||||
|
||||
```c
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
M(0), M(1)
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||
case 1:
|
||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
When you press the key on the left it will type "Hi!" and when you press the key on the right it will type "Bye!".
|
||||
|
||||
### Naming Your Macros
|
||||
|
||||
If you have a bunch of macros you want to refer to from your keymap while keeping the keymap easily readable you can name them using `#define` at the top of your file.
|
||||
|
||||
```c
|
||||
#define M_HI M(0)
|
||||
#define M_BYE M(1)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
M_HI, M_BYE
|
||||
),
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
## Advanced Example:
|
||||
|
||||
### Single-Key Copy/Paste
|
||||
|
||||
This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released.
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch(id) {
|
||||
case 0: {
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||
} else {
|
||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
260
docs/feature_midi.md
Normal file
260
docs/feature_midi.md
Normal file
@@ -0,0 +1,260 @@
|
||||
# MIDI
|
||||
|
||||
## Usage
|
||||
|
||||
First, enable MIDI by adding the following to your `rules.mk`:
|
||||
|
||||
```makefile
|
||||
MIDI_ENABLE = yes
|
||||
```
|
||||
|
||||
There are two MIDI systems in QMK: basic and advanced. With basic MIDI you will only be able to send Note On and Note Off messages using the note keycodes, meaning that keycodes like `MI_OCTU` and `MI_OCTD` will not work. Advanced MIDI allows you to do things like octave shifts, channel changes, velocity changes, modulation, and more.
|
||||
|
||||
### Basic MIDI
|
||||
|
||||
To enable basic MIDI, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define MIDI_BASIC
|
||||
```
|
||||
|
||||
### Advanced MIDI
|
||||
|
||||
To enable advanced MIDI, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define MIDI_ADVANCED
|
||||
```
|
||||
|
||||
#### Sending Control Change (CC) Messages
|
||||
|
||||
If you're aiming to emulate the features of something like a Launchpad or other MIDI controller you'll need to access the internal MIDI device directly.
|
||||
|
||||
Because there are so many possible CC messages, not all of them are implemented as keycodes. Additionally, you might need to provide more than just two values that you would get from a keycode (pressed and released) - for example, the analog values from a fader or a potentiometer. So, you will need to implement [custom keycodes](feature_macros.md) if you want to use them in your keymap directly using `process_record_user()`.
|
||||
|
||||
|
||||
For reference of all the possible control code numbers see [MIDI Specification](#midi-specification)
|
||||
|
||||
#### Example code for using Generic On Off Switches as per MIDI Specification.
|
||||
```c
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern MidiDevice midi_device;
|
||||
|
||||
// MIDI CC codes for generic on/off switches (80, 81, 82, 83)
|
||||
// Off: 0-63
|
||||
// On: 64-127
|
||||
|
||||
#define MIDI_CC_OFF 0
|
||||
#define MIDI_CC_ON 127
|
||||
|
||||
enum custom_keycodes {
|
||||
MIDI_CC80 = SAFE_RANGE,
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case MIDI_CC80:
|
||||
if (record->event.pressed) {
|
||||
midi_send_cc(&midi_device, midi_config.channel, 80, ON);
|
||||
} else {
|
||||
midi_send_cc(&midi_device, midi_config.channel, 80, OFF);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
LAYOUT(
|
||||
// ...
|
||||
MIDI_CC80,
|
||||
// ...
|
||||
)
|
||||
};
|
||||
```
|
||||
|
||||
### Keycodes
|
||||
|
||||
|Keycode |Aliases |Description |
|
||||
|------------|---------|---------------------------------|
|
||||
|`MI_ON` | |Turn MIDI on |
|
||||
|`MI_OFF` | |Turn MIDI off |
|
||||
|`MI_TOG` | |Toggle MIDI enabled |
|
||||
|`MI_C` | |C octave 0 |
|
||||
|`MI_Cs` |`MI_Db` |C♯/D♭ octave 0 |
|
||||
|`MI_D` | |D octave 0 |
|
||||
|`MI_Ds` |`MI_Eb` |D♯/E♭ octave 0 |
|
||||
|`MI_E` | |E octave 0 |
|
||||
|`MI_F` | |F octave 0 |
|
||||
|`MI_Fs` |`MI_Gb` |F♯/G♭ octave 0 |
|
||||
|`MI_G` | |G octave 0 |
|
||||
|`MI_Gs` |`MI_Gs` |G♯/A♭ octave 0 |
|
||||
|`MI_A` | |A octave 0 |
|
||||
|`MI_As` |`MI_Bb` |A♯/B♭ octave 0 |
|
||||
|`MI_B` | |B octave 0 |
|
||||
|`MI_C_1` | |C octave 1 |
|
||||
|`MI_Cs_1` |`MI_Db_1`|C♯/D♭ octave 1 |
|
||||
|`MI_D_1` | |D octave 1 |
|
||||
|`MI_Ds_1` |`MI_Eb_1`|D♯/E♭ octave 1 |
|
||||
|`MI_E_1` | |E octave 1 |
|
||||
|`MI_F_1` | |F octave 1 |
|
||||
|`MI_Fs_1` |`MI_Gb_1`|F♯/G♭ octave 1 |
|
||||
|`MI_G_1` | |G octave 1 |
|
||||
|`MI_Gs_1` |`MI_Ab_1`|G♯/A♭ octave 1 |
|
||||
|`MI_A_1` | |A octave 1 |
|
||||
|`MI_As_1` |`MI_Bb_1`|A♯/B♭ octave 1 |
|
||||
|`MI_B_1` | |B octave 1 |
|
||||
|`MI_C_2` | |C octave 2 |
|
||||
|`MI_Cs_2` |`MI_Db_2`|C♯/D♭ octave 2 |
|
||||
|`MI_D_2` | |D octave 2 |
|
||||
|`MI_Ds_2` |`MI_Eb_2`|D♯/E♭ octave 2 |
|
||||
|`MI_E_2` | |E octave 2 |
|
||||
|`MI_F_2` | |F octave 2 |
|
||||
|`MI_Fs_2` |`MI_Gb_2`|F♯/G♭ octave 2 |
|
||||
|`MI_G_2` | |G octave 2 |
|
||||
|`MI_Gs_2` |`MI_Ab_2`|G♯/A♭ octave 2 |
|
||||
|`MI_A_2` | |A octave 2 |
|
||||
|`MI_As_2` |`MI_Bb_2`|A♯/B♭ octave 2 |
|
||||
|`MI_B_2` | |B octave 2 |
|
||||
|`MI_C_3` | |C octave 3 |
|
||||
|`MI_Cs_3` |`MI_Db_3`|C♯/D♭ octave 3 |
|
||||
|`MI_D_3` | |D octave 3 |
|
||||
|`MI_Ds_3` |`MI_Eb_3`|D♯/E♭ octave 3 |
|
||||
|`MI_E_3` | |E octave 3 |
|
||||
|`MI_F_3` | |F octave 3 |
|
||||
|`MI_Fs_3` |`MI_Gb_3`|F♯/G♭ octave 3 |
|
||||
|`MI_G_3` | |G octave 3 |
|
||||
|`MI_Gs_3` |`MI_Ab_3`|G♯/A♭ octave 3 |
|
||||
|`MI_A_3` | |A octave 3 |
|
||||
|`MI_As_3` |`MI_Bb_3`|A♯/B♭ octave 3 |
|
||||
|`MI_B_3` | |B octave 3 |
|
||||
|`MI_C_4` | |C octave 4 |
|
||||
|`MI_Cs_4` |`MI_Db_4`|C♯/D♭ octave 4 |
|
||||
|`MI_D_4` | |D octave 4 |
|
||||
|`MI_Ds_4` |`MI_Eb_4`|D♯/E♭ octave 4 |
|
||||
|`MI_E_4` | |E octave 4 |
|
||||
|`MI_F_4` | |F octave 4 |
|
||||
|`MI_Fs_4` |`MI_Gb_4`|F♯/G♭ octave 4 |
|
||||
|`MI_G_4` | |G octave 4 |
|
||||
|`MI_Gs_4` |`MI_Ab_4`|G♯/A♭ octave 4 |
|
||||
|`MI_A_4` | |A octave 4 |
|
||||
|`MI_As_4` |`MI_Bb_4`|A♯/B♭ octave 4 |
|
||||
|`MI_B_4` | |B octave 4 |
|
||||
|`MI_C_5` | |C octave 5 |
|
||||
|`MI_Cs_5` |`MI_Db_5`|C♯/D♭ octave 5 |
|
||||
|`MI_D_5` | |D octave 5 |
|
||||
|`MI_Ds_5` |`MI_Eb_5`|D♯/E♭ octave 5 |
|
||||
|`MI_E_5` | |E octave 5 |
|
||||
|`MI_F_5` | |F octave 5 |
|
||||
|`MI_Fs_5` |`MI_Gb_5`|F♯/G♭ octave 5 |
|
||||
|`MI_G_5` | |G octave 5 |
|
||||
|`MI_Gs_5` |`MI_Ab_5`|G♯/A♭ octave 5 |
|
||||
|`MI_A_5` | |A octave 5 |
|
||||
|`MI_As_5` |`MI_Bb_5`|A♯/B♭ octave 5 |
|
||||
|`MI_B_5` | |B octave 5 |
|
||||
|`MI_OCT_N2` | |Set octave to -2 |
|
||||
|`MI_OCT_N1` | |Set octave to -1 |
|
||||
|`MI_OCT_0` | |Set octave to 0 |
|
||||
|`MI_OCT_1` | |Set octave to 1 |
|
||||
|`MI_OCT_2` | |Set octave to 2 |
|
||||
|`MI_OCT_3` | |Set octave to 3 |
|
||||
|`MI_OCT_4` | |Set octave to 4 |
|
||||
|`MI_OCT_5` | |Set octave to 5 |
|
||||
|`MI_OCT_6` | |Set octave to 6 |
|
||||
|`MI_OCT_7` | |Set octave to 7 |
|
||||
|`MI_OCTD` | |Move down an octave |
|
||||
|`MI_OCTU` | |Move up an octave |
|
||||
|`MI_TRNS_N6`| |Set transposition to -6 semitones|
|
||||
|`MI_TRNS_N5`| |Set transposition to -5 semitones|
|
||||
|`MI_TRNS_N4`| |Set transposition to -4 semitones|
|
||||
|`MI_TRNS_N3`| |Set transposition to -3 semitones|
|
||||
|`MI_TRNS_N2`| |Set transposition to -2 semitones|
|
||||
|`MI_TRNS_N1`| |Set transposition to -1 semitone |
|
||||
|`MI_TRNS_0` | |No transposition |
|
||||
|`MI_TRNS_1` | |Set transposition to +1 semitone |
|
||||
|`MI_TRNS_2` | |Set transposition to +2 semitones|
|
||||
|`MI_TRNS_3` | |Set transposition to +3 semitones|
|
||||
|`MI_TRNS_4` | |Set transposition to +4 semitones|
|
||||
|`MI_TRNS_5` | |Set transposition to +5 semitones|
|
||||
|`MI_TRNS_6` | |Set transposition to +6 semitones|
|
||||
|`MI_TRNSD` | |Decrease transposition |
|
||||
|`MI_TRNSU` | |Increase transposition |
|
||||
|`MI_VEL_0` | |Set velocity to 0 |
|
||||
|`MI_VEL_1` | |Set velocity to 12 |
|
||||
|`MI_VEL_2` | |Set velocity to 25 |
|
||||
|`MI_VEL_3` | |Set velocity to 38 |
|
||||
|`MI_VEL_4` | |Set velocity to 51 |
|
||||
|`MI_VEL_5` | |Set velocity to 64 |
|
||||
|`MI_VEL_6` | |Set velocity to 76 |
|
||||
|`MI_VEL_7` | |Set velocity to 89 |
|
||||
|`MI_VEL_8` | |Set velocity to 102 |
|
||||
|`MI_VEL_9` | |Set velocity to 114 |
|
||||
|`MI_VEL_10` | |Set velocity to 127 |
|
||||
|`MI_VELD` | |Decrease velocity |
|
||||
|`MI_VELU` | |Increase velocity |
|
||||
|`MI_CH1` | |Set channel to 1 |
|
||||
|`MI_CH2` | |Set channel to 2 |
|
||||
|`MI_CH3` | |Set channel to 3 |
|
||||
|`MI_CH4` | |Set channel to 4 |
|
||||
|`MI_CH5` | |Set channel to 5 |
|
||||
|`MI_CH6` | |Set channel to 6 |
|
||||
|`MI_CH7` | |Set channel to 7 |
|
||||
|`MI_CH8` | |Set channel to 8 |
|
||||
|`MI_CH9` | |Set channel to 9 |
|
||||
|`MI_CH10` | |Set channel to 10 |
|
||||
|`MI_CH11` | |Set channel to 11 |
|
||||
|`MI_CH12` | |Set channel to 12 |
|
||||
|`MI_CH13` | |Set channel to 13 |
|
||||
|`MI_CH14` | |Set channel to 14 |
|
||||
|`MI_CH15` | |Set channel to 15 |
|
||||
|`MI_CH16` | |Set channel to 16 |
|
||||
|`MI_CHD` | |Decrease channel |
|
||||
|`MI_CHU` | |Increase channel |
|
||||
|`MI_ALLOFF` | |Stop all notes |
|
||||
|`MI_SUS` | |Sustain |
|
||||
|`MI_PORT` | |Portmento |
|
||||
|`MI_SOST` | |Sostenuto |
|
||||
|`MI_SOFT` | |Soft Pedal |
|
||||
|`MI_LEG` | |Legato |
|
||||
|`MI_MOD` | |Modulation |
|
||||
|`MI_MODSD` | |Decrease modulation speed |
|
||||
|`MI_MODSU` | |Increase modulation speed |
|
||||
|`MI_BENDD` | |Bend pitch down |
|
||||
|`MI_BENDU` | |Bend pitch up |
|
||||
|
||||
### Configuration
|
||||
|
||||
Certain values are stored in the `midi_config` struct. This configuration is not persisted to EEPROM. By default, these values are:
|
||||
|
||||
|Configuration |Value|Comments |
|
||||
|-------------------|-----|-------------------------|
|
||||
|Octave |`4` |Corresponds to `MI_OCT_2`|
|
||||
|Transposition |`0` | |
|
||||
|Velocity |`127`| |
|
||||
|Channel |`0` | |
|
||||
|Modulation Interval|`8` | |
|
||||
|
||||
For the above, the `MI_C` keycode will produce a C3 (note number 48), and so on.
|
||||
|
||||
### References
|
||||
#### MIDI Specification
|
||||
|
||||
* [MIDI.org](https://www.midi.org/specifications-old/item/table-1-summary-of-midi-message)
|
||||
* [CMU MIDI Programmer's Reference](https://www.cs.cmu.edu/~music/cmsip/readings/MIDI%20tutorial%20for%20programmers.html)
|
||||
#### QMK C Files
|
||||
|
||||
* `quantum/process_keycode/process_midi.c`
|
||||
* `quantum/quantum_keycodes.h`
|
||||
* `tmk_core/protocol/midi.h`
|
||||
* `tmk_core/protocol/midi.c`
|
||||
* `tmk_core/protocol/qmk_midi.c`
|
||||
* `tmk_core/protocol/midi_device.h`
|
||||
|
||||
<!--
|
||||
#### QMK Internals (Autogenerated)
|
||||
|
||||
* [Internals/MIDI Device Setup Process](internals_midi_device_setup_process.md)
|
||||
* [Internals/MIDI Device](internals_midi_device.md)
|
||||
* [Internals/MIDI Util](internals_midi_util.md)
|
||||
-->
|
@@ -29,6 +29,9 @@ In your keymap you can use the following keycodes to map key presses to mouse ac
|
||||
|`KC_MS_BTN3` |`KC_BTN3`|Press button 3 |
|
||||
|`KC_MS_BTN4` |`KC_BTN4`|Press button 4 |
|
||||
|`KC_MS_BTN5` |`KC_BTN5`|Press button 5 |
|
||||
|`KC_MS_BTN6` |`KC_BTN6`|Press button 6 |
|
||||
|`KC_MS_BTN7` |`KC_BTN7`|Press button 7 |
|
||||
|`KC_MS_BTN8` |`KC_BTN8`|Press button 8 |
|
||||
|`KC_MS_WH_UP` |`KC_WH_U`|Move wheel up |
|
||||
|`KC_MS_WH_DOWN` |`KC_WH_D`|Move wheel down |
|
||||
|`KC_MS_WH_LEFT` |`KC_WH_L`|Move wheel left |
|
||||
@@ -42,6 +45,7 @@ In your keymap you can use the following keycodes to map key presses to mouse ac
|
||||
Mouse keys supports three different modes to move the cursor:
|
||||
|
||||
* **Accelerated (default):** Holding movement keys accelerates the cursor until it reaches its maximum speed.
|
||||
* **Kinetic:** Holding movement keys accelerates the cursor with its speed following a quadratic curve until it reaches its maximum speed.
|
||||
* **Constant:** Holding movement keys moves the cursor at constant speeds.
|
||||
* **Combined:** Holding movement keys accelerates the cursor until it reaches its maximum speed, but holding acceleration and movement keys simultaneously moves the cursor at constant speeds.
|
||||
|
||||
@@ -56,7 +60,8 @@ This is the default mode. You can adjust the cursor and scrolling acceleration u
|
||||
|Define |Default|Description |
|
||||
|----------------------------|-------|---------------------------------------------------------|
|
||||
|`MOUSEKEY_DELAY` |300 |Delay between pressing a movement key and cursor movement|
|
||||
|`MOUSEKEY_INTERVAL` |50 |Time between cursor movements |
|
||||
|`MOUSEKEY_INTERVAL` |50 |Time between cursor movements in milliseconds |
|
||||
|`MOUSEKEY_MOVE_DELTA` |5 |Step size |
|
||||
|`MOUSEKEY_MAX_SPEED` |10 |Maximum cursor speed at which acceleration stops |
|
||||
|`MOUSEKEY_TIME_TO_MAX` |20 |Time until maximum cursor speed is reached |
|
||||
|`MOUSEKEY_WHEEL_DELAY` |300 |Delay between pressing a wheel key and wheel movement |
|
||||
@@ -73,6 +78,30 @@ Tips:
|
||||
|
||||
Cursor acceleration uses the same algorithm as the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys).
|
||||
|
||||
### Kinetic Mode
|
||||
|
||||
This is an extension of the accelerated mode. The kinetic mode uses a quadratic curve on the cursor speed which allows precise movements at the beginning and allows to cover large distances by increasing cursor speed quickly thereafter. You can adjust the cursor and scrolling acceleration using the following settings in your keymap’s `config.h` file:
|
||||
|
||||
|Define |Default |Description |
|
||||
|--------------------------------------|---------|---------------------------------------------------------------|
|
||||
|`MK_KINETIC_SPEED` |undefined|Enable kinetic mode |
|
||||
|`MOUSEKEY_DELAY` |8 |Delay between pressing a movement key and cursor movement |
|
||||
|`MOUSEKEY_INTERVAL` |8 |Time between cursor movements in milliseconds |
|
||||
|`MOUSEKEY_MOVE_DELTA` |25 |Step size for accelerating from initial to base speed |
|
||||
|`MOUSEKEY_INITIAL_SPEED` |100 |Initial speed of the cursor in pixel per second |
|
||||
|`MOUSEKEY_BASE_SPEED` |1000 |Maximum cursor speed at which acceleration stops |
|
||||
|`MOUSEKEY_DECELERATED_SPEED` |400 |Decelerated cursor speed |
|
||||
|`MOUSEKEY_ACCELERATED_SPEED` |3000 |Accelerated cursor speed |
|
||||
|`MOUSEKEY_WHEEL_INITIAL_MOVEMENTS` |16 |Initial number of movements of the mouse wheel |
|
||||
|`MOUSEKEY_WHEEL_BASE_MOVEMENTS` |32 |Maximum number of movements at which acceleration stops |
|
||||
|`MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS`|48 |Accelerated wheel movements |
|
||||
|`MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS`|8 |Decelerated wheel movements |
|
||||
|
||||
Tips:
|
||||
|
||||
* The smoothness of the cursor movement depends on the `MOUSEKEY_INTERVAL` setting. The shorter the interval is set the smoother the movement will be. Setting the value too low makes the cursor unresponsive. Lower settings are possible if the micro processor is fast enough. For example: At an interval of `8` milliseconds, `125` movements per second will be initiated. With a base speed of `1000` each movement will move the cursor by `8` pixels.
|
||||
* Mouse wheel movements are implemented differently from cursor movements. While it's okay for the cursor to move multiple pixels at once for the mouse wheel this would lead to jerky movements. Instead, the mouse wheel operates at step size `1`. Setting mouse wheel speed is done by adjusting the number of wheel movements per second.
|
||||
|
||||
### Constant mode
|
||||
|
||||
In this mode you can define multiple different speeds for both the cursor and the mouse wheel. There is no acceleration. `KC_ACL0`, `KC_ACL1` and `KC_ACL2` change the cursor and scroll speed to their respective setting.
|
||||
|
@@ -145,6 +145,8 @@ void oled_task_user(void) {
|
||||
|`OLED_FONT_WIDTH` |`6` |The font width |
|
||||
|`OLED_FONT_HEIGHT` |`8` |The font height (untested) |
|
||||
|`OLED_TIMEOUT` |`60000` |Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
|
||||
|`OLED_FADE_OUT` |*Not defined* |Enables fade out animation. Use together with `OLED_TIMEOUT`. |
|
||||
|`OLED_FADE_OUT_INTERVAL` |`0` |The speed of fade out animation, from 0 to 15. Larger values are slower. |
|
||||
|`OLED_SCROLL_TIMEOUT` |`0` |Scrolls the OLED screen after 0ms of OLED inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
|
||||
|`OLED_SCROLL_TIMEOUT_RIGHT`|*Not defined* |Scroll timeout direction is right when defined, left when undefined. |
|
||||
|`OLED_IC` |`OLED_IC_SSD1306`|Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
|
||||
|
@@ -19,7 +19,7 @@ Keep in mind that a report_mouse_t (here "mouseReport") has the following proper
|
||||
* `mouseReport.y` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing movement (+ upward, - downward) on the y axis.
|
||||
* `mouseReport.v` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing vertical scrolling (+ upward, - downward).
|
||||
* `mouseReport.h` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing horizontal scrolling (+ right, - left).
|
||||
* `mouseReport.buttons` - this is a uint8_t in which the last 5 bits are used. These bits represent the mouse button state - bit 3 is mouse button 5, and bit 7 is mouse button 1.
|
||||
* `mouseReport.buttons` - this is a uint8_t in which all 8 bits are used. These bits represent the mouse button state - bit 0 is mouse button 1, and bit 7 is mouse button 8.
|
||||
|
||||
Once you have made the necessary changes to the mouse report, you need to send it:
|
||||
|
||||
|
@@ -15,7 +15,20 @@ RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = IS31FL3731
|
||||
```
|
||||
|
||||
Configure the hardware via your `config.h`:
|
||||
You can use between 1 and 4 IS31FL3731 IC's. Do not specify `DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
|
||||
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
|
||||
| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
|
||||
| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
|
||||
| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | |
|
||||
| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | |
|
||||
| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | |
|
||||
| `DRIVER_ADDR_3` | (Optional) Address for the third RGB driver | |
|
||||
| `DRIVER_ADDR_4` | (Optional) Address for the fourth RGB driver | |
|
||||
|
||||
Here is an example using 2 drivers.
|
||||
|
||||
```c
|
||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||
@@ -36,8 +49,6 @@ Configure the hardware via your `config.h`:
|
||||
|
||||
!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
|
||||
|
||||
Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
|
||||
|
||||
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
@@ -53,12 +64,10 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
}
|
||||
```
|
||||
|
||||
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now).
|
||||
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3`).
|
||||
|
||||
---
|
||||
### IS31FL3733/IS31FL3737 :id=is31fl3733is31fl3737
|
||||
|
||||
!> For the IS31FL3737, replace all instances of `IS31FL3733` below with `IS31FL3737`.
|
||||
### IS31FL3733 :id=is31fl3733
|
||||
|
||||
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`:
|
||||
|
||||
@@ -67,7 +76,24 @@ RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = IS31FL3733
|
||||
```
|
||||
|
||||
Configure the hardware via your `config.h`:
|
||||
You can use between 1 and 4 IS31FL3733 IC's. Do not specify `DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
|
||||
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
|
||||
| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
|
||||
| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
|
||||
| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | |
|
||||
| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | |
|
||||
| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | |
|
||||
| `DRIVER_ADDR_3` | (Optional) Address for the third RGB driver | |
|
||||
| `DRIVER_ADDR_4` | (Optional) Address for the fourth RGB driver | |
|
||||
| `DRIVER_SYNC_1` | (Optional) Sync configuration for the first RGB driver | 0 |
|
||||
| `DRIVER_SYNC_2` | (Optional) Sync configuration for the second RGB driver | 0 |
|
||||
| `DRIVER_SYNC_3` | (Optional) Sync configuration for the third RGB driver | 0 |
|
||||
| `DRIVER_SYNC_4` | (Optional) Sync configuration for the fourth RGB driver | 0 |
|
||||
|
||||
Here is an example using 2 drivers.
|
||||
|
||||
```c
|
||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||
@@ -81,6 +107,58 @@ Configure the hardware via your `config.h`:
|
||||
// ADDR2 represents A3:A2 of the 7-bit address.
|
||||
// The result is: 0b101(ADDR2)(ADDR1)
|
||||
#define DRIVER_ADDR_1 0b1010000
|
||||
#define DRIVER_ADDR_2 0b1010011
|
||||
|
||||
#define DRIVER_COUNT 2
|
||||
#define DRIVER_1_LED_TOTAL 58
|
||||
#define DRIVER_2_LED_TOTAL 10
|
||||
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||
```
|
||||
|
||||
!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
|
||||
|
||||
Currently only 4 drivers are supported, but it would be trivial to support all 8 combinations.
|
||||
|
||||
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
/* Refer to IS31 manual for these locations
|
||||
* driver
|
||||
* | R location
|
||||
* | | G location
|
||||
* | | | B location
|
||||
* | | | | */
|
||||
{0, B_1, A_1, C_1},
|
||||
....
|
||||
}
|
||||
```
|
||||
|
||||
Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` for now).
|
||||
|
||||
---
|
||||
### IS31FL3737 :id=is31fl3737
|
||||
|
||||
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3737 RGB controller. To enable it, add this to your `rules.mk`:
|
||||
|
||||
```makefile
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = IS31FL3737
|
||||
```
|
||||
|
||||
Configure the hardware via your `config.h`:
|
||||
|
||||
```c
|
||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||
// set to 0 for write, 1 for read (as per I2C protocol)
|
||||
// The address will vary depending on your wiring:
|
||||
// 0000 <-> GND
|
||||
// 0101 <-> SCL
|
||||
// 1010 <-> SDA
|
||||
// 1111 <-> VCC
|
||||
// ADDR represents A3:A0 of the 7-bit address.
|
||||
// The result is: 0b101(ADDR)
|
||||
#define DRIVER_ADDR_1 0b1010000
|
||||
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
|
||||
|
||||
#define DRIVER_COUNT 2
|
||||
@@ -105,7 +183,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
}
|
||||
```
|
||||
|
||||
Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now).
|
||||
Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3737.pdf) and the header file `drivers/issi/is31fl3737.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now).
|
||||
|
||||
---
|
||||
|
||||
@@ -129,6 +207,28 @@ Configure the hardware via your `config.h`:
|
||||
|
||||
---
|
||||
|
||||
### APA102 :id=apa102
|
||||
|
||||
There is basic support for APA102 based addressable LED strands. To enable it, add this to your `rules.mk`:
|
||||
|
||||
```makefile
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = APA102
|
||||
```
|
||||
|
||||
Configure the hardware via your `config.h`:
|
||||
|
||||
```c
|
||||
// The pin connected to the data pin of the LEDs
|
||||
#define RGB_DI_PIN D7
|
||||
// The pin connected to the clock pin of the LEDs
|
||||
#define RGB_CI_PIN D6
|
||||
// The number of LEDs connected
|
||||
#define DRIVER_LED_TOTAL 70
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
|
||||
|
||||
```c
|
||||
@@ -232,6 +332,9 @@ enum rgb_matrix_effects {
|
||||
RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard
|
||||
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
|
||||
#if define(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
|
||||
RGB_MATRIX_TYPING_HEATMAP, // How hot is your WPM!
|
||||
RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation
|
||||
@@ -261,6 +364,7 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
|
||||
|-------------------------------------------------------|-----------------------------------------------|
|
||||
|`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` |
|
||||
|`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` |
|
||||
|`#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT` |Disables `MATRIX_GRADIENT_LEFT_RIGHT` |
|
||||
|`#define DISABLE_RGB_MATRIX_BREATHING` |Disables `RGB_MATRIX_BREATHING` |
|
||||
|`#define DISABLE_RGB_MATRIX_BAND_SAT` |Disables `RGB_MATRIX_BAND_SAT` |
|
||||
|`#define DISABLE_RGB_MATRIX_BAND_VAL` |Disables `RGB_MATRIX_BAND_VAL` |
|
||||
@@ -271,20 +375,23 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
|
||||
|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` |
|
||||
|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` |
|
||||
|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` |
|
||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |
|
||||
|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN` |Disables `RGB_MATRIX_CYCLE_OUT_IN` |
|
||||
|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL` |Disables `RGB_MATRIX_CYCLE_OUT_IN_DUAL` |
|
||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |
|
||||
|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` |
|
||||
|`#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL` |Disables `RGB_MATRIX_CYCLE_PINWHEEL` |
|
||||
|`#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL` |Disables `RGB_MATRIX_CYCLE_SPIRAL` |
|
||||
|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` |
|
||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` |
|
||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` |
|
||||
|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` |
|
||||
|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` |
|
||||
|`#define DISABLE_RGB_MATRIX_HUE_BREATHING` |Disables `RGB_MATRIX_HUE_BREATHING` |
|
||||
|`#define DISABLE_RGB_MATRIX_HUE_PENDULUM` |Disables `RGB_MATRIX_HUE_PENDULUM` |
|
||||
|`#define DISABLE_RGB_MATRIX_HUE_WAVE ` |Disables `RGB_MATRIX_HUE_WAVE ` |
|
||||
|`#define DISABLE_RGB_MATRIX_TYPING_HEATMAP` |Disables `RGB_MATRIX_TYPING_HEATMAP` |
|
||||
|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` |
|
||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` |
|
||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |
|
||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` |
|
||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_WIDE` |
|
||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` |
|
||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS` |Disables `RGB_MATRIX_SOLID_REACTIVE_CROSS` |
|
||||
@@ -369,7 +476,7 @@ static bool my_cool_effect2(effect_params_t* params) {
|
||||
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
|
||||
```
|
||||
|
||||
For inspiration and examples, check out the built-in effects under `quantum/rgb_matrix_animation/`
|
||||
For inspiration and examples, check out the built-in effects under `quantum/rgb_matrix_animations/`
|
||||
|
||||
|
||||
## Colors :id=colors
|
||||
@@ -405,9 +512,10 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
|
||||
```c
|
||||
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
||||
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS // enable framebuffer effects
|
||||
#define RGB_DISABLE_TIMEOUT 0 // number of milliseconds to wait until rgb automatically turns off
|
||||
#define RGB_DISABLE_AFTER_TIMEOUT 0 // OBSOLETE: number of ticks to wait until disabling effects
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
|
||||
#define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
|
||||
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
||||
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
||||
@@ -417,11 +525,13 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
|
||||
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
|
||||
#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
|
||||
#define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature)
|
||||
#define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
|
||||
// If RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
|
||||
```
|
||||
|
||||
## EEPROM storage :id=eeprom-storage
|
||||
|
||||
The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with:
|
||||
The EEPROM for it is currently shared with the LED Matrix system (it's generally assumed only one feature would be used at a time), but could be configured to use its own 32bit address with:
|
||||
|
||||
```c
|
||||
#define EECONFIG_RGB_MATRIX (uint32_t *)28
|
||||
|
@@ -10,6 +10,7 @@ Currently QMK supports the following addressable LEDs (however, the white LED in
|
||||
|
||||
* WS2811, WS2812, WS2812B, WS2812C, etc.
|
||||
* SK6812, SK6812MINI, SK6805
|
||||
* APA102
|
||||
|
||||
These LEDs are called "addressable" because instead of using a wire per color, each LED contains a small microchip that understands a special protocol sent over a single wire. The chip passes on the remaining data to the next LED, allowing them to be chained together. In this way, you can easily control the color of the individual LEDs.
|
||||
|
||||
@@ -21,11 +22,19 @@ On keyboards with onboard RGB LEDs, it is usually enabled by default. If it is n
|
||||
RGBLIGHT_ENABLE = yes
|
||||
```
|
||||
|
||||
At minimum you must define the data pin your LED strip is connected to, and the number of LEDs in the strip, in your `config.h`. If your keyboard has onboard RGB LEDs, and you are simply creating a keymap, you usually won't need to modify these.
|
||||
For APA102 LEDs, add the following to your `rules.mk`:
|
||||
|
||||
```make
|
||||
RGBLIGHT_ENABLE = yes
|
||||
RGBLIGHT_DRIVER = APA102
|
||||
```
|
||||
|
||||
At minimum you must define the data pin your LED strip is connected to, and the number of LEDs in the strip, in your `config.h`. For APA102 LEDs, you must also define the clock pin. If your keyboard has onboard RGB LEDs, and you are simply creating a keymap, you usually won't need to modify these.
|
||||
|
||||
|Define |Description |
|
||||
|---------------|---------------------------------------------------------------------------------------------------------|
|
||||
|`RGB_DI_PIN` |The pin connected to the data pin of the LEDs |
|
||||
|`RGB_CI_PIN` |The pin connected to the clock pin of the LEDs (APA102 only) |
|
||||
|`RGBLED_NUM` |The number of LEDs connected |
|
||||
|`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half directly wired to `RGB_DI_PIN` |
|
||||
|
||||
@@ -65,6 +74,7 @@ Changing the **Value** sets the overall brightness.<br>
|
||||
|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode |
|
||||
|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
|
||||
|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode |
|
||||
|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode |
|
||||
|
||||
!> By default, if you have both the RGB Light and the [RGB Matrix](feature_rgb_matrix.md) feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature.
|
||||
|
||||
@@ -73,15 +83,20 @@ Changing the **Value** sets the overall brightness.<br>
|
||||
|
||||
Your RGB lighting can be configured by placing these `#define`s in your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|---------------------|-------------|-----------------------------------------------------------------------------|
|
||||
|`RGBLIGHT_HUE_STEP` |`10` |The number of steps to cycle through the hue by |
|
||||
|`RGBLIGHT_SAT_STEP` |`17` |The number of steps to increment the saturation by |
|
||||
|`RGBLIGHT_VAL_STEP` |`17` |The number of steps to increment the brightness by |
|
||||
|`RGBLIGHT_LIMIT_VAL` |`255` |The maximum brightness level |
|
||||
|`RGBLIGHT_SLEEP` |*Not defined*|If defined, the RGB lighting will be switched off when the host goes to sleep|
|
||||
|`RGBLIGHT_SPLIT` |*Not defined*|If defined, synchronization functionality for split keyboards is added|
|
||||
|`RGBLIGHT_DISABLE_KEYCODES`|*not defined*|If defined, disables the ability to control RGB Light from the keycodes. You must use code functions to control the feature|
|
||||
|Define |Default |Description |
|
||||
|---------------------------|----------------------------|---------------------------------------------------------------------------------------------------------------------------|
|
||||
|`RGBLIGHT_HUE_STEP` |`10` |The number of steps to cycle through the hue by |
|
||||
|`RGBLIGHT_SAT_STEP` |`17` |The number of steps to increment the saturation by |
|
||||
|`RGBLIGHT_VAL_STEP` |`17` |The number of steps to increment the brightness by |
|
||||
|`RGBLIGHT_LIMIT_VAL` |`255` |The maximum brightness level |
|
||||
|`RGBLIGHT_SLEEP` |*Not defined* |If defined, the RGB lighting will be switched off when the host goes to sleep |
|
||||
|`RGBLIGHT_SPLIT` |*Not defined* |If defined, synchronization functionality for split keyboards is added |
|
||||
|`RGBLIGHT_DISABLE_KEYCODES`|*Not defined* |If defined, disables the ability to control RGB Light from the keycodes. You must use code functions to control the feature|
|
||||
|`RGBLIGHT_DEFAULT_MODE` |`RGBLIGHT_MODE_STATIC_LIGHT`|The default mode to use upon clearing the EEPROM |
|
||||
|`RGBLIGHT_DEFAULT_HUE` |`0` (red) |The default hue to use upon clearing the EEPROM |
|
||||
|`RGBLIGHT_DEFAULT_SAT` |`UINT8_MAX` (255) |The default saturation to use upon clearing the EEPROM |
|
||||
|`RGBLIGHT_DEFAULT_VAL` |`RGBLIGHT_LIMIT_VAL` |The default value (brightness) to use upon clearing the EEPROM |
|
||||
|`RGBLIGHT_DEFAULT_SPD` |`0` |The default speed to use upon clearing the EEPROM |
|
||||
|
||||
## Effects and Animations
|
||||
|
||||
@@ -139,7 +154,7 @@ The following options are used to tweak the various animations:
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|
||||
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls |
|
||||
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
||||
|`RGBLIGHT_EFFECT_TWINKLE_LIFE` |`75` |Adjusts how quickly each LED brightens and dims when twinkling (in animation steps) |
|
||||
|`RGBLIGHT_EFFECT_TWINKLE_LIFE` |`200` |Adjusts how quickly each LED brightens and dims when twinkling (in animation steps) |
|
||||
|`RGBLIGHT_EFFECT_TWINKLE_PROBABILITY`|`1/127` |Adjusts how likely each LED is to twinkle (on each animation step) |
|
||||
|
||||
### Example Usage to Reduce Memory Footprint
|
||||
@@ -295,6 +310,18 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
```
|
||||
|
||||
You can also use `rgblight_blink_layer_repeat` to specify the amount of times the layer is supposed to blink. Using the layers from above,
|
||||
```c
|
||||
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case DEBUG:
|
||||
rgblight_blink_layer_repeat(debug_enable ? 0 : 1, 200, 3);
|
||||
break;
|
||||
}
|
||||
}
|
||||
```
|
||||
would turn the layer 0 (or 1) on and off again three times when `DEBUG` is pressed.
|
||||
|
||||
### Overriding RGB Lighting on/off status
|
||||
|
||||
Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `RGB_TOG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`.
|
||||
@@ -345,9 +372,9 @@ rgblight_set(); // Utility functions do not call rgblight_set() automatically, s
|
||||
|
||||
Example:
|
||||
```c
|
||||
rgblight_sethsv(HSV_WHITE, 0); // led 0
|
||||
rgblight_sethsv(HSV_RED, 1); // led 1
|
||||
rgblight_sethsv(HSV_GREEN, 2); // led 2
|
||||
rgblight_sethsv_at(HSV_WHITE, 0); // led 0
|
||||
rgblight_sethsv_at(HSV_RED, 1); // led 1
|
||||
rgblight_sethsv_at(HSV_GREEN, 2); // led 2
|
||||
// The above functions automatically calls rgblight_set(), so there is no need to call it explicitly.
|
||||
// Note that it is inefficient to call repeatedly.
|
||||
```
|
||||
|
@@ -109,6 +109,10 @@ Normally, when a diode is connected to an intersection, it is judged to be left.
|
||||
#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT
|
||||
```
|
||||
|
||||
Note that adding a diode at a previously unused intersection will effectively tell the firmware that there is a key held down at that point. You can instruct qmk to ignore that intersection by defining `MATRIX_MASKED` and then defining a `matrix_row_t matrix_mask[MATRIX_ROWS]` array in your keyboard config. Each bit of a single value (starting form the least-significant bit) is used to tell qmk whether or not to pay attention to key presses at that intersection.
|
||||
|
||||
While `MATRIX_MASKED` isn't necessary to use `SPLIT_HAND_MATRIX_GRID` successfully, without it you may experience issues trying to suspend your computer with your keyboard attached as the matrix will always report at least one key-press.
|
||||
|
||||
#### 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.
|
||||
@@ -129,6 +133,12 @@ However, you'll have to flash the EEPROM files for the correct hand to each cont
|
||||
* `:dfu-util-split-left`
|
||||
* `:dfu-util-split-right`
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
make crkbd:default:avrdude-split-left
|
||||
```
|
||||
|
||||
This setting is not changed when re-initializing the EEPROM using the `EEP_RST` 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]()'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).
|
||||
@@ -181,6 +191,22 @@ If you're having issues with serial communication, you can change this value, as
|
||||
* **`4`**: about 26kbps
|
||||
* **`5`**: about 20kbps
|
||||
|
||||
```c
|
||||
#define SPLIT_MODS_ENABLE
|
||||
```
|
||||
|
||||
This enables transmitting modifier state (normal, weak and oneshot) to the non
|
||||
primary side of the split keyboard. This adds a few bytes of data to the split
|
||||
communication protocol and may impact the matrix scan speed when enabled.
|
||||
The purpose of this feature is to support cosmetic use of modifer state (e.g.
|
||||
displaying status on an OLED screen).
|
||||
|
||||
```c
|
||||
#define SPLIT_TRANSPORT_MIRROR
|
||||
```
|
||||
|
||||
This mirrors the master side matrix to the slave side for features that react or require knowledge of master side key presses on the slave side. This adds a few bytes of data to the split communication protocol and may impact the matrix scan speed when enabled. The purpose of this feature is to support cosmetic use of key events (e.g. RGB reacting to Keypresses).
|
||||
|
||||
### Hardware Configuration Options
|
||||
|
||||
There are some settings that you may need to configure, based on how the hardware is set up.
|
||||
@@ -223,7 +249,12 @@ This sets how many LEDs are directly connected to each controller. The first nu
|
||||
```c
|
||||
#define SPLIT_USB_DETECT
|
||||
```
|
||||
This option changes the startup behavior to detect an active USB connection when delegating master/slave. If this operation times out, then the half is assume to be a slave. This is the default behavior for ARM, and required for AVR Teensy boards (due to hardware limitations).
|
||||
|
||||
Enabling this option changes the startup behavior to listen for an active USB communication to delegate which part is master and which is slave. With this option enabled and theres's USB communication, then that half assumes it is the master, otherwise it assumes it is the slave.
|
||||
|
||||
Without this option, the master is the half that can detect voltage on the physical USB connection (VBUS detection).
|
||||
|
||||
Enabled by default on ChibiOS/ARM.
|
||||
|
||||
?> This setting will stop the ability to demo using battery packs.
|
||||
|
||||
@@ -239,9 +270,13 @@ This sets the poll frequency when detecting master/slave when using `SPLIT_USB_D
|
||||
|
||||
## Hardware Considerations and Mods
|
||||
|
||||
While most any Pro Micro can be used, micro controllers like the AVR Teensys and most (if not all) ARM boards require the Split USB Detect.
|
||||
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`.
|
||||
|
||||
However, with the Teensy 2.0 and Teensy++ 2.0, there is a simple hardware mod that you can perform to add VBUS detection, so you don't need the Split USB detection option.
|
||||
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).
|
||||
|
||||
### Teensy boards
|
||||
|
||||
Teensy boards lack VBUS detection out of the box and must have `SPLIT_USB_DETECT` defined. With the Teensy 2.0 and Teensy++ 2.0, there is a simple hardware mod that you can perform to add VBUS detection, so you don't need the `SPLIT_USB_DETECT` option.
|
||||
|
||||
You'll only need a few things:
|
||||
|
||||
|
@@ -7,7 +7,7 @@ The swap-hands action allows support for one-handed typing without requiring a s
|
||||
The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck:
|
||||
|
||||
```C
|
||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
|
||||
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
|
||||
{{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
|
||||
|
@@ -76,7 +76,7 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS),
|
||||
};
|
||||
|
||||
// Add tap dance item in place of a key code
|
||||
// Add tap dance item to your keymap in place of a keycode
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// ...
|
||||
TD(TD_ESC_CAPS)
|
||||
@@ -206,20 +206,22 @@ You will need a few things that can be used for 'Quad Function Tap-Dance'.
|
||||
You'll need to add these to the top of your `keymap.c` file, before your keymap.
|
||||
|
||||
```c
|
||||
typedef enum {
|
||||
TD_NONE,
|
||||
TD_UNKNOWN,
|
||||
TD_SINGLE_TAP,
|
||||
TD_SINGLE_HOLD,
|
||||
TD_DOUBLE_TAP,
|
||||
TD_DOUBLE_HOLD,
|
||||
TD_DOUBLE_SINGLE_TAP, // Send two single taps
|
||||
TD_TRIPLE_TAP,
|
||||
TD_TRIPLE_HOLD
|
||||
} td_state_t;
|
||||
|
||||
typedef struct {
|
||||
bool is_press_action;
|
||||
uint8_t state;
|
||||
} tap;
|
||||
|
||||
enum {
|
||||
SINGLE_TAP = 1,
|
||||
SINGLE_HOLD,
|
||||
DOUBLE_TAP,
|
||||
DOUBLE_HOLD,
|
||||
DOUBLE_SINGLE_TAP, // Send two single taps
|
||||
TRIPLE_TAP,
|
||||
TRIPLE_HOLD
|
||||
};
|
||||
td_state_t state;
|
||||
} td_tap_t;
|
||||
|
||||
// Tap dance enums
|
||||
enum {
|
||||
@@ -227,7 +229,7 @@ enum {
|
||||
SOME_OTHER_DANCE
|
||||
};
|
||||
|
||||
uint8_t cur_dance(qk_tap_dance_state_t *state);
|
||||
td_state_t cur_dance(qk_tap_dance_state_t *state);
|
||||
|
||||
// For the x tap dance. Put it here so it can be used in any keymap
|
||||
void x_finished(qk_tap_dance_state_t *state, void *user_data);
|
||||
@@ -261,61 +263,61 @@ Now, at the bottom of your `keymap.c` file, you'll need to add the following:
|
||||
* Letters used in common words as a double. For example 'p' in 'pepper'. If a tap dance function existed on the
|
||||
* letter 'p', the word 'pepper' would be quite frustating to type.
|
||||
*
|
||||
* For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested
|
||||
* For the third point, there does exist the 'TD_DOUBLE_SINGLE_TAP', however this is not fully tested
|
||||
*
|
||||
*/
|
||||
uint8_t cur_dance(qk_tap_dance_state_t *state) {
|
||||
td_state_t cur_dance(qk_tap_dance_state_t *state) {
|
||||
if (state->count == 1) {
|
||||
if (state->interrupted || !state->pressed) return SINGLE_TAP;
|
||||
if (state->interrupted || !state->pressed) return TD_SINGLE_TAP;
|
||||
// Key has not been interrupted, but the key is still held. Means you want to send a 'HOLD'.
|
||||
else return SINGLE_HOLD;
|
||||
else return TD_SINGLE_HOLD;
|
||||
} else if (state->count == 2) {
|
||||
// DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap
|
||||
// TD_DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap
|
||||
// action when hitting 'pp'. Suggested use case for this return value is when you want to send two
|
||||
// keystrokes of the key, and not the 'double tap' action/macro.
|
||||
if (state->interrupted) return DOUBLE_SINGLE_TAP;
|
||||
else if (state->pressed) return DOUBLE_HOLD;
|
||||
else return DOUBLE_TAP;
|
||||
if (state->interrupted) return TD_DOUBLE_SINGLE_TAP;
|
||||
else if (state->pressed) return TD_DOUBLE_HOLD;
|
||||
else return TD_DOUBLE_TAP;
|
||||
}
|
||||
|
||||
// Assumes no one is trying to type the same letter three times (at least not quickly).
|
||||
// If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add
|
||||
// an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP'
|
||||
// an exception here to return a 'TD_TRIPLE_SINGLE_TAP', and define that enum just like 'TD_DOUBLE_SINGLE_TAP'
|
||||
if (state->count == 3) {
|
||||
if (state->interrupted || !state->pressed) return TRIPLE_TAP;
|
||||
else return TRIPLE_HOLD;
|
||||
} else return 8; // Magic number. At some point this method will expand to work for more presses
|
||||
if (state->interrupted || !state->pressed) return TD_TRIPLE_TAP;
|
||||
else return TD_TRIPLE_HOLD;
|
||||
} else return TD_UNKNOWN;
|
||||
}
|
||||
|
||||
// Create an instance of 'tap' for the 'x' tap dance.
|
||||
static tap xtap_state = {
|
||||
// Create an instance of 'td_tap_t' for the 'x' tap dance.
|
||||
static td_tap_t xtap_state = {
|
||||
.is_press_action = true,
|
||||
.state = 0
|
||||
.state = TD_NONE
|
||||
};
|
||||
|
||||
void x_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
xtap_state.state = cur_dance(state);
|
||||
switch (xtap_state.state) {
|
||||
case SINGLE_TAP: register_code(KC_X); break;
|
||||
case SINGLE_HOLD: register_code(KC_LCTRL); break;
|
||||
case DOUBLE_TAP: register_code(KC_ESC); break;
|
||||
case DOUBLE_HOLD: register_code(KC_LALT); break;
|
||||
case TD_SINGLE_TAP: register_code(KC_X); break;
|
||||
case TD_SINGLE_HOLD: register_code(KC_LCTRL); break;
|
||||
case TD_DOUBLE_TAP: register_code(KC_ESC); break;
|
||||
case TD_DOUBLE_HOLD: register_code(KC_LALT); break;
|
||||
// Last case is for fast typing. Assuming your key is `f`:
|
||||
// For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
|
||||
// In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
|
||||
case DOUBLE_SINGLE_TAP: tap_code(KC_X); register_code(KC_X);
|
||||
case TD_DOUBLE_SINGLE_TAP: tap_code(KC_X); register_code(KC_X);
|
||||
}
|
||||
}
|
||||
|
||||
void x_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch (xtap_state.state) {
|
||||
case SINGLE_TAP: unregister_code(KC_X); break;
|
||||
case SINGLE_HOLD: unregister_code(KC_LCTRL); break;
|
||||
case DOUBLE_TAP: unregister_code(KC_ESC); break;
|
||||
case DOUBLE_HOLD: unregister_code(KC_LALT);
|
||||
case DOUBLE_SINGLE_TAP: unregister_code(KC_X);
|
||||
case TD_SINGLE_TAP: unregister_code(KC_X); break;
|
||||
case TD_SINGLE_HOLD: unregister_code(KC_LCTRL); break;
|
||||
case TD_DOUBLE_TAP: unregister_code(KC_ESC); break;
|
||||
case TD_DOUBLE_HOLD: unregister_code(KC_LALT);
|
||||
case TD_DOUBLE_SINGLE_TAP: unregister_code(KC_X);
|
||||
}
|
||||
xtap_state.state = 0;
|
||||
xtap_state.state = TD_NONE;
|
||||
}
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
@@ -343,9 +345,11 @@ enum td_keycodes {
|
||||
|
||||
// Define a type containing as many tapdance states as you need
|
||||
typedef enum {
|
||||
SINGLE_TAP,
|
||||
SINGLE_HOLD,
|
||||
DOUBLE_SINGLE_TAP
|
||||
TD_NONE,
|
||||
TD_UNKNOWN,
|
||||
TD_SINGLE_TAP,
|
||||
TD_SINGLE_HOLD,
|
||||
TD_DOUBLE_SINGLE_TAP
|
||||
} td_state_t;
|
||||
|
||||
// Create a global instance of the tapdance state type
|
||||
@@ -354,7 +358,7 @@ static td_state_t td_state;
|
||||
// Declare your tapdance functions:
|
||||
|
||||
// Function to determine the current tapdance state
|
||||
uint8_t cur_dance(qk_tap_dance_state_t *state);
|
||||
td_state_t cur_dance(qk_tap_dance_state_t *state);
|
||||
|
||||
// `finished` and `reset` functions for each tapdance keycode
|
||||
void altlp_finished(qk_tap_dance_state_t *state, void *user_data);
|
||||
@@ -365,14 +369,14 @@ Below your `LAYOUT`, define each of the tapdance functions:
|
||||
|
||||
```c
|
||||
// Determine the tapdance state to return
|
||||
uint8_t cur_dance(qk_tap_dance_state_t *state) {
|
||||
td_state_t cur_dance(qk_tap_dance_state_t *state) {
|
||||
if (state->count == 1) {
|
||||
if (state->interrupted || !state->pressed) return SINGLE_TAP;
|
||||
else return SINGLE_HOLD;
|
||||
if (state->interrupted || !state->pressed) return TD_SINGLE_TAP;
|
||||
else return TD_SINGLE_HOLD;
|
||||
}
|
||||
|
||||
if (state->count == 2) return DOUBLE_SINGLE_TAP;
|
||||
else return 3; // Any number higher than the maximum state value you return above
|
||||
if (state->count == 2) return TD_DOUBLE_SINGLE_TAP;
|
||||
else return TD_UNKNOWN; // Any number higher than the maximum state value you return above
|
||||
}
|
||||
|
||||
// Handle the possible states for each tapdance keycode you define:
|
||||
@@ -380,13 +384,13 @@ uint8_t cur_dance(qk_tap_dance_state_t *state) {
|
||||
void altlp_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
td_state = cur_dance(state);
|
||||
switch (td_state) {
|
||||
case SINGLE_TAP:
|
||||
case TD_SINGLE_TAP:
|
||||
register_code16(KC_LPRN);
|
||||
break;
|
||||
case SINGLE_HOLD:
|
||||
case TD_SINGLE_HOLD:
|
||||
register_mods(MOD_BIT(KC_LALT)); // For a layer-tap key, use `layer_on(_MY_LAYER)` here
|
||||
break;
|
||||
case DOUBLE_SINGLE_TAP: // Allow nesting of 2 parens `((` within tapping term
|
||||
case TD_DOUBLE_SINGLE_TAP: // Allow nesting of 2 parens `((` within tapping term
|
||||
tap_code16(KC_LPRN);
|
||||
register_code16(KC_LPRN);
|
||||
}
|
||||
@@ -394,13 +398,13 @@ void altlp_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
|
||||
void altlp_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch (td_state) {
|
||||
case SINGLE_TAP:
|
||||
case TD_SINGLE_TAP:
|
||||
unregister_code16(KC_LPRN);
|
||||
break;
|
||||
case SINGLE_HOLD:
|
||||
case TD_SINGLE_HOLD:
|
||||
unregister_mods(MOD_BIT(KC_LALT)); // For a layer-tap key, use `layer_off(_MY_LAYER)` here
|
||||
break;
|
||||
case DOUBLE_SINGLE_TAP:
|
||||
case TD_DOUBLE_SINGLE_TAP:
|
||||
unregister_code16(KC_LPRN);
|
||||
}
|
||||
}
|
||||
@@ -420,17 +424,19 @@ Tap Dance can be used to mimic MO(layer) and TG(layer) functionality. For this e
|
||||
The first step is to include the following code towards the beginning of your `keymap.c`:
|
||||
|
||||
```c
|
||||
// Define a type for as many tap dance states as you need
|
||||
typedef enum {
|
||||
TD_NONE,
|
||||
TD_UNKNOWN,
|
||||
TD_SINGLE_TAP,
|
||||
TD_SINGLE_HOLD,
|
||||
TD_DOUBLE_TAP
|
||||
} td_state_t;
|
||||
|
||||
typedef struct {
|
||||
bool is_press_action;
|
||||
uint8_t state;
|
||||
} tap;
|
||||
|
||||
// Define a type for as many tap dance states as you need
|
||||
enum {
|
||||
SINGLE_TAP = 1,
|
||||
SINGLE_HOLD,
|
||||
DOUBLE_TAP
|
||||
};
|
||||
td_state_t state;
|
||||
} td_tap_t;
|
||||
|
||||
enum {
|
||||
QUOT_LAYR, // Our custom tap dance key; add any other tap dance keys to this enum
|
||||
@@ -439,7 +445,7 @@ enum {
|
||||
// Declare the functions to be used with your tap dance key(s)
|
||||
|
||||
// Function associated with all tap dances
|
||||
uint8_t cur_dance(qk_tap_dance_state_t *state);
|
||||
td_state_t cur_dance(qk_tap_dance_state_t *state);
|
||||
|
||||
// Functions associated with individual tap dances
|
||||
void ql_finished(qk_tap_dance_state_t *state, void *user_data);
|
||||
@@ -450,31 +456,31 @@ Towards the bottom of your `keymap.c`, include the following code:
|
||||
|
||||
```c
|
||||
// Determine the current tap dance state
|
||||
uint8_t cur_dance(qk_tap_dance_state_t *state) {
|
||||
td_state_t cur_dance(qk_tap_dance_state_t *state) {
|
||||
if (state->count == 1) {
|
||||
if (!state->pressed) return SINGLE_TAP;
|
||||
else return SINGLE_HOLD;
|
||||
} else if (state->count == 2) return DOUBLE_TAP;
|
||||
else return 8;
|
||||
if (!state->pressed) return TD_SINGLE_TAP;
|
||||
else return TD_SINGLE_HOLD;
|
||||
} else if (state->count == 2) return TD_DOUBLE_TAP;
|
||||
else return TD_UNKNOWN;
|
||||
}
|
||||
|
||||
// Initialize tap structure associated with example tap dance key
|
||||
static tap ql_tap_state = {
|
||||
static td_tap_t ql_tap_state = {
|
||||
.is_press_action = true,
|
||||
.state = 0
|
||||
.state = TD_NONE
|
||||
};
|
||||
|
||||
// Functions that control what our tap dance key does
|
||||
void ql_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
ql_tap_state.state = cur_dance(state);
|
||||
switch (ql_tap_state.state) {
|
||||
case SINGLE_TAP:
|
||||
case TD_SINGLE_TAP:
|
||||
tap_code(KC_QUOT);
|
||||
break;
|
||||
case SINGLE_HOLD:
|
||||
case TD_SINGLE_HOLD:
|
||||
layer_on(_MY_LAYER);
|
||||
break;
|
||||
case DOUBLE_TAP:
|
||||
case TD_DOUBLE_TAP:
|
||||
// Check to see if the layer is already set
|
||||
if (layer_state_is(_MY_LAYER)) {
|
||||
// If already set, then switch it off
|
||||
@@ -489,10 +495,10 @@ void ql_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
|
||||
void ql_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
// If the key was held down and now is released then switch off the layer
|
||||
if (ql_tap_state.state == SINGLE_HOLD) {
|
||||
if (ql_tap_state.state == TD_SINGLE_HOLD) {
|
||||
layer_off(_MY_LAYER);
|
||||
}
|
||||
ql_tap_state.state = 0;
|
||||
ql_tap_state.state = TD_NONE;
|
||||
}
|
||||
|
||||
// Associate our tap dance key with its functionality
|
||||
@@ -505,7 +511,7 @@ The above code is similar to that used in previous examples. The one point to no
|
||||
|
||||
The use of `cur_dance()` and `ql_tap_state` mirrors the above examples.
|
||||
|
||||
The `case:SINGLE_TAP` in `ql_finished` is similar to the above examples. The `SINGLE_HOLD` case works in conjunction with `ql_reset()` to switch to `_MY_LAYER` while the tap dance key is held, and to switch away from `_MY_LAYER` when the key is released. This mirrors the use of `MO(_MY_LAYER)`. The `DOUBLE_TAP` case works by checking whether `_MY_LAYER` is the active layer, and toggling it on or off accordingly. This mirrors the use of `TG(_MY_LAYER)`.
|
||||
The `case: TD_SINGLE_TAP` in `ql_finished` is similar to the above examples. The `TD_SINGLE_HOLD` case works in conjunction with `ql_reset()` to switch to `_MY_LAYER` while the tap dance key is held, and to switch away from `_MY_LAYER` when the key is released. This mirrors the use of `MO(_MY_LAYER)`. The `TD_DOUBLE_TAP` case works by checking whether `_MY_LAYER` is the active layer, and toggling it on or off accordingly. This mirrors the use of `TG(_MY_LAYER)`.
|
||||
|
||||
`tap_dance_actions[]` works similar to the above examples. Note that I used `ACTION_TAP_DANCE_FN_ADVANCED_TIME()` instead of `ACTION_TAP_DANCE_FN_ADVANCED()`. This is because I like my `TAPPING_TERM` to be short (\~175ms) for my non-tap-dance keys but find that this is too quick for me to reliably complete tap dance actions - thus the increased time of 275ms here.
|
||||
|
||||
|
@@ -126,6 +126,8 @@ The following input modes are available:
|
||||
Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else.
|
||||
By default, this mode uses Ctrl+Shift+U (`LCTL(LSFT(KC_U))`) to start Unicode input, but this can be changed by defining [`UNICODE_KEY_LNX`](#input-key-configuration) with a different keycode. This might be required for IBus versions ≥1.5.15, where Ctrl+Shift+U behavior is consolidated into Ctrl+Shift+E.
|
||||
|
||||
Users who wish support in non-GTK apps without IBus may need to resort to a more indirect method, such as creating a custom keyboard layout ([more on this method](#custom-linux-layout)).
|
||||
|
||||
* **`UC_WIN`**: _(not recommended)_ Windows built-in hex numpad Unicode input. Supports code points up to `0xFFFF`.
|
||||
|
||||
To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Reboot afterwards.
|
||||
@@ -228,7 +230,7 @@ send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
|
||||
|
||||
Example uses include sending Unicode strings when a key is pressed, as described in [Macros](feature_macros.md).
|
||||
|
||||
### `send_unicode_hex_string()`
|
||||
### `send_unicode_hex_string()` (Deprecated)
|
||||
|
||||
Similar to `send_unicode_string()`, but the characters are represented by their Unicode code points, written in hexadecimal and separated by spaces. For example, the table flip above would be achieved with:
|
||||
|
||||
@@ -270,3 +272,22 @@ AutoHotkey inserts the Text right of `Send, ` when this combination is pressed.
|
||||
|
||||
If you enable the US International layout on the system, it will use punctuation to accent the characters. For instance, typing "\`a" will result in à.
|
||||
You can find details on how to enable this [here](https://support.microsoft.com/en-us/help/17424/windows-change-keyboard-layout).
|
||||
|
||||
## Software keyboard layout on Linux :id=custom-linux-layout
|
||||
|
||||
This method does not require Unicode support on the keyboard itself but instead uses a custom keyboard layout for Xorg. This is how special characters are inserted by regular keyboards. This does not require IBus and works in practically all software. Help on creating a custom layout can be found [here](https://www.linux.com/news/creating-custom-keyboard-layouts-x11-using-xkb/), [here](http://karols.github.io/blog/2013/11/18/creating-custom-keyboard-layouts-for-linux/) and [here](https://wiki.archlinux.org/index.php/X_keyboard_extension). An example of how you could edit the `us` layout to gain 🤣 on `RALT(KC_R)`:
|
||||
|
||||
Edit the keyboard layout file `/usr/share/X11/xkb/symbols/us`.
|
||||
|
||||
Inside `xkb_symbols "basic" {`, add `include "level3(ralt_switch)"`.
|
||||
|
||||
Find the line defining the R key and add an entry to the list, making it look like this:
|
||||
```
|
||||
key <AD04> { [ r, R, U1F923 ] };
|
||||
```
|
||||
|
||||
Save the file and run the command `setxkbmap us` to reload the layout.
|
||||
|
||||
You can define one custom character for key defined in the layout, and another if you populate the fourth layer. Additional layers up to 8th are also possible.
|
||||
|
||||
This method is specific to the computer on which you set the custom layout. The custom keys will be available only when Xorg is running. To avoid accidents, you should always reload the layout using `setxkbmap`, otherwise an invalid layout could prevent you from logging into your system, locking you out.
|
||||
|
@@ -1,25 +1,62 @@
|
||||
# Word Per Minute (WPM) Calculcation
|
||||
|
||||
The WPM feature uses time between keystrokes to compute a rolling average words
|
||||
per minute rate and makes this available for various uses.
|
||||
The WPM feature uses time between keystrokes to compute a rolling average words per minute rate and makes this available for various uses.
|
||||
|
||||
Enable the WPM system by adding this to your `rules.mk`:
|
||||
|
||||
WPM_ENABLE = yes
|
||||
|
||||
For split keyboards using soft serial, the computed WPM
|
||||
score will be available on the master AND slave half.
|
||||
For split keyboards using soft serial, the computed WPM score will be available on the master AND slave half.
|
||||
|
||||
## Configuration
|
||||
|
||||
|Define |Default | Description |
|
||||
|-----------------------------|--------------|------------------------------------------------------------------------------------------|
|
||||
|`WPM_SMOOTHING` |`0.0487` | Sets the smoothing to about 40 keystrokes |
|
||||
|`WPM_ESTIMATED_WORD_SIZE` |`5` | This is the value used when estimating average word size (for regression and normal use) |
|
||||
|`WPM_ALLOW_COUNT_REGRESSOIN` |_Not defined_ | If defined allows the WPM to be decreased when hitting Delete or Backspace |
|
||||
## Public Functions
|
||||
|
||||
`uint8_t get_current_wpm(void);`
|
||||
This function returns the current WPM as an unsigned integer.
|
||||
|Function |Description |
|
||||
|--------------------------|--------------------------------------------------|
|
||||
|`get_current_wpm(void)` | Returns the current WPM as a value between 0-255 |
|
||||
|`set_current_wpm(x)` | Sets the current WPM to `x` (between 0-255) |
|
||||
|
||||
## Callbacks
|
||||
|
||||
## Customized keys for WPM calc
|
||||
By default, the WPM score only includes letters, numbers, space and some punctuation. If you want to change the set of characters considered as part of the WPM calculation, you can implement your own `bool wpm_keycode_user(uint16_t keycode)` and return true for any characters you would like included in the calculation, or false to not count that particular keycode.
|
||||
|
||||
By default, the WPM score only includes letters, numbers, space and some
|
||||
punctuation. If you want to change the set of characters considered as part of
|
||||
the WPM calculation, you can implement `wpm_keycode_user(uint16_t keycode)`
|
||||
and return true for any characters you would like included in the calculation,
|
||||
or false to not count that particular keycode.
|
||||
For instance, the default is:
|
||||
|
||||
```c
|
||||
bool wpm_keycode_user(uint16_t keycode) {
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
|
||||
keycode = keycode & 0xFF;
|
||||
} else if (keycode > 0xFF) {
|
||||
keycode = 0;
|
||||
}
|
||||
if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLASH)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
```
|
||||
|
||||
Additionally, if `WPM_ALLOW_COUNT_REGRESSION` is defined, there is the `uint8_t wpm_regress_count(uint16_t keycode)` function that allows you to decrease the WPM. This is useful if you want to be able to penalize certain keycodes (or even combinations).
|
||||
|
||||
__attribute__((weak)) uint8_t wpm_regress_count(uint16_t keycode) {
|
||||
bool weak_modded = (keycode >= QK_LCTL && keycode < QK_LSFT) || (keycode >= QK_RCTL && keycode < QK_RSFT);
|
||||
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
|
||||
keycode = keycode & 0xFF;
|
||||
} else if (keycode > 0xFF) {
|
||||
keycode = 0;
|
||||
}
|
||||
if (((get_mods() | get_oneshot_mods()) & MOD_MASK_CTRL} || weak_modded) && (keycode == KC_DEL || keycode == KC_BSPC)) {
|
||||
return WPM_ESTIMATED_WORD_SIZE;
|
||||
}
|
||||
if (keycode == KC_DEL || keycode == KC_BSPC) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@@ -249,3 +249,29 @@ Flashing sequence:
|
||||
2. Wait for the OS to detect the device
|
||||
3. Flash a .bin file
|
||||
4. Reset the device into application mode (may be done automatically)
|
||||
|
||||
## tinyuf2
|
||||
|
||||
Keyboards may opt into supporting the tinyuf2 bootloader. This is currently only supported on the F411 blackpill.
|
||||
|
||||
The `rules.mk` setting for this bootloader is `tinyuf2`, and can be specified at the keymap or user level.
|
||||
|
||||
To ensure compatibility with the tinyuf2 bootloader, make sure this block is present in your `rules.mk`:
|
||||
|
||||
```make
|
||||
# Bootloader selection
|
||||
BOOTLOADER = tinyuf2
|
||||
```
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
* Any application able to copy a file from one place to another, such as _macOS Finder_ or _Windows Explorer_.
|
||||
|
||||
Flashing sequence:
|
||||
|
||||
1. Enter the bootloader using any of the following methods:
|
||||
* Tap the `RESET` keycode
|
||||
* Double-tap the `nRST` button on the PCB.
|
||||
2. Wait for the OS to detect the device
|
||||
3. Copy the .uf2 file to the new USB disk
|
||||
4. Wait for the keyboard to become available
|
||||
|
@@ -4,8 +4,9 @@ This project includes a Docker workflow that will allow you to build a new firmw
|
||||
|
||||
## Requirements
|
||||
|
||||
The main prerequisite is a working `docker` install.
|
||||
The main prerequisite is a working `docker` or `podman` install.
|
||||
* [Docker CE](https://docs.docker.com/install/#supported-platforms)
|
||||
* [Podman](https://podman.io/getting-started/installation)
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -38,6 +39,13 @@ util/docker_build.sh
|
||||
# Reads parameters as input (leave blank for all keyboards/keymaps)
|
||||
```
|
||||
|
||||
You can manually set which container runtime you want to use by setting the `RUNTIME` environment variable to it's name or path.
|
||||
By default docker or podman are automatically detected and docker is preferred over podman.
|
||||
|
||||
```bash
|
||||
RUNTIME="podman" util/docker_build.sh keyboard:keymap:target
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
||||
### Why can't I flash on Windows/macOS
|
||||
|
@@ -22,8 +22,8 @@ The `<target>` means the following
|
||||
|
||||
The following targets are for developers:
|
||||
|
||||
* `show-path` shows the path of the source and object files.
|
||||
* `dump-vars` dumps the makefile variable.
|
||||
* `show_path` shows the path of the source and object files.
|
||||
* `dump_vars` dumps the makefile variable.
|
||||
* `objs-size` displays the size of individual object files.
|
||||
* `show_build_options` shows the options set in 'rules.mk'.
|
||||
* `check-md5` displays the md5 checksum of the generated binary file.
|
||||
@@ -121,10 +121,6 @@ For further details, as well as limitations, see the [Unicode page](feature_unic
|
||||
|
||||
This allows you output audio on the C6 pin (needs abstracting). See the [audio page](feature_audio.md) for more information.
|
||||
|
||||
`FAUXCLICKY_ENABLE`
|
||||
|
||||
Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue switches. By default, uses the C6 pin, same as `AUDIO_ENABLE`.
|
||||
|
||||
`VARIABLE_TRACE`
|
||||
|
||||
Use this to debug changes to variable values, see the [tracing variables](unit_testing.md#tracing-variables) section of the Unit Testing page for more information.
|
||||
|
155
docs/ja/adc_driver.md
Normal file
155
docs/ja/adc_driver.md
Normal file
@@ -0,0 +1,155 @@
|
||||
# ADC ドライバ
|
||||
|
||||
<!---
|
||||
original document: 0.10.52:docs/adc_driver.md
|
||||
git diff 0.10.52 HEAD -- docs/adc_driver.md | cat
|
||||
-->
|
||||
|
||||
QMK は対応している MCU のアナログ・デジタルコンバータ(ADC) を使用し、特定のピンの電圧を計測することができます。この機能はデジタル出力の[ロータリーエンコーダ](ja/feature_encoders.md)などではなく、アナログ計測が必要な可変抵抗器を使用したボリュームコントロールや Bluetooth キーボードのバッテリー残量表示などの実装に役立ちます。
|
||||
|
||||
このドライバは現在 AVR と一部の ARM デバイスをサポートしています。返される値は 0V と VCC (通常 AVR の場合は 5V または 3.3V、ARM の場合は 3.3V)の間でマッピングされた 10ビットの整数 (0-1023) ですが、ARM の場合、もしもより精度が必要であれば `#define` を使うと操作をより柔軟に制御できます。
|
||||
|
||||
## 使い方
|
||||
|
||||
このドライバを使うには、`rules.mk` に以下を追加します:
|
||||
|
||||
```make
|
||||
SRC += analog.c
|
||||
```
|
||||
|
||||
そして、コードの先頭に以下の include を置きます:
|
||||
|
||||
```c
|
||||
#include "analog.h"
|
||||
```
|
||||
|
||||
## チャンネル
|
||||
|
||||
### AVR
|
||||
|
||||
|Channel|AT90USB64/128|ATmega16/32U4|ATmega32A|ATmega328/P|
|
||||
|-------|-------------|-------------|---------|-----------|
|
||||
|0 |`F0` |`F0` |`A0` |`C0` |
|
||||
|1 |`F1` |`F1` |`A1` |`C1` |
|
||||
|2 |`F2` | |`A2` |`C2` |
|
||||
|3 |`F3` | |`A3` |`C3` |
|
||||
|4 |`F4` |`F4` |`A4` |`C4` |
|
||||
|5 |`F5` |`F5` |`A5` |`C5` |
|
||||
|6 |`F6` |`F6` |`A6` |* |
|
||||
|7 |`F7` |`F7` |`A7` |* |
|
||||
|8 | |`D4` | | |
|
||||
|9 | |`D6` | | |
|
||||
|10 | |`D7` | | |
|
||||
|11 | |`B4` | | |
|
||||
|12 | |`B5` | | |
|
||||
|13 | |`B6` | | |
|
||||
|
||||
<sup>\* ATmega328/P には余分な2つの ADC チャンネルがありますが、DIP ピンアウトには存在せず、GPIO ピンとは共有されません。これらに直接アクセスするために、`adc_read()` を使えます。
|
||||
|
||||
### ARM
|
||||
|
||||
これらのピンの一部は同じチャンネルを使って ADC 上でダブルアップされることに注意してください。これは、これらのピンがどちらかの ADC に使われる可能性があるからです。
|
||||
|
||||
また、F0 と F3 は異なるナンバリングスキーマを使うことに注意してください。F0 には1つの ADC があり、チャンネルは0から始まるインデックスですが、F3 には4つの ADC があり、チャンネルは1から始まるインデックスです。これは、F0 が ADC の `ADCv1` 実装を使用するのに対し、F3 が `ADCv3` 実装を使用するためです。
|
||||
|
||||
|ADC|Channel|STM32F0xx|STM32F3xx|
|
||||
|---|-------|---------|---------|
|
||||
|1 |0 |`A0` | |
|
||||
|1 |1 |`A1` |`A0` |
|
||||
|1 |2 |`A2` |`A1` |
|
||||
|1 |3 |`A3` |`A2` |
|
||||
|1 |4 |`A4` |`A3` |
|
||||
|1 |5 |`A5` |`F4` |
|
||||
|1 |6 |`A6` |`C0` |
|
||||
|1 |7 |`A7` |`C1` |
|
||||
|1 |8 |`B0` |`C2` |
|
||||
|1 |9 |`B1` |`C3` |
|
||||
|1 |10 |`C0` |`F2` |
|
||||
|1 |11 |`C1` | |
|
||||
|1 |12 |`C2` | |
|
||||
|1 |13 |`C3` | |
|
||||
|1 |14 |`C4` | |
|
||||
|1 |15 |`C5` | |
|
||||
|1 |16 | | |
|
||||
|2 |1 | |`A4` |
|
||||
|2 |2 | |`A5` |
|
||||
|2 |3 | |`A6` |
|
||||
|2 |4 | |`A7` |
|
||||
|2 |5 | |`C4` |
|
||||
|2 |6 | |`C0` |
|
||||
|2 |7 | |`C1` |
|
||||
|2 |8 | |`C2` |
|
||||
|2 |9 | |`C3` |
|
||||
|2 |10 | |`F2` |
|
||||
|2 |11 | |`C5` |
|
||||
|2 |12 | |`B2` |
|
||||
|2 |13 | | |
|
||||
|2 |14 | | |
|
||||
|2 |15 | | |
|
||||
|2 |16 | | |
|
||||
|3 |1 | |`B1` |
|
||||
|3 |2 | |`E9` |
|
||||
|3 |3 | |`E13` |
|
||||
|3 |4 | | |
|
||||
|3 |5 | | |
|
||||
|3 |6 | |`E8` |
|
||||
|3 |7 | |`D10` |
|
||||
|3 |8 | |`D11` |
|
||||
|3 |9 | |`D12` |
|
||||
|3 |10 | |`D13` |
|
||||
|3 |11 | |`D14` |
|
||||
|3 |12 | |`B0` |
|
||||
|3 |13 | |`E7` |
|
||||
|3 |14 | |`E10` |
|
||||
|3 |15 | |`E11` |
|
||||
|3 |16 | |`E12` |
|
||||
|4 |1 | |`E14` |
|
||||
|4 |2 | |`B12` |
|
||||
|4 |3 | |`B13` |
|
||||
|4 |4 | |`B14` |
|
||||
|4 |5 | |`B15` |
|
||||
|4 |6 | |`E8` |
|
||||
|4 |7 | |`D10` |
|
||||
|4 |8 | |`D11` |
|
||||
|4 |9 | |`D12` |
|
||||
|4 |10 | |`D13` |
|
||||
|4 |11 | |`D14` |
|
||||
|4 |12 | |`D8` |
|
||||
|4 |13 | |`D9` |
|
||||
|4 |14 | | |
|
||||
|4 |15 | | |
|
||||
|4 |16 | | |
|
||||
|
||||
## 関数
|
||||
|
||||
### AVR
|
||||
|
||||
|関数 |説明 |
|
||||
|----------------------------|------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|`analogReference(mode)` |アナログの電圧リファレンスソースを設定する。`ADC_REF_EXTERNAL`、`ADC_REF_POWER`、`ADC_REF_INTERNAL` のいずれかでなければなりません。|
|
||||
|`analogReadPin(pin)` |指定されたピンから値を読み取ります。例えば、ATmega32U4 の ADC6 の場合 `F6`。 |
|
||||
|`pinToMux(pin)` |指定されたピンを mux 値に変換します。サポートされていないピンが指定された場合、"0V (GND)" の mux 値を返します。 |
|
||||
|`adc_read(mux)` |指定された mux に従って ADC から値を読み取ります。詳細は、MCU のデータシートを見てください。 |
|
||||
|
||||
### ARM
|
||||
|
||||
|関数 |説明 |
|
||||
|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|`analogReadPin(pin)` |指定されたピンから値を読み取ります。STM32F0 では チャンネル 0 の `A0`、STM32F3 ではチャンネル 1 の ADC1。ピンを複数の ADC に使える場合は、この関数のために番号の小さい ADC が選択されることに注意してください。例えば、`C0` は、ADC2 にも使える場合、ADC1 のチャンネル 6 になります。 |
|
||||
|`analogReadPinAdc(pin, adc)`|指定されたピンと ADC から値を読み取ります。例えば、`C0, 1` は、ADC1 ではなく ADC2 のチャンネル 6 から読み取ります。この関数では、ADC はインデックス 0 から始まることに注意してください。 |
|
||||
|`pinToMux(pin)` |指定されたピンをチャンネルと ADC の組み合わせに変換します。サポートされていないピンが指定された場合、"0V (GND)" の mux 値を返します。 |
|
||||
|`adc_read(mux)` |指定されたピンと ADC の組み合わせに応じて ADC から値を読み取ります。詳細は、MCU のデータシートを見てください。 |
|
||||
|
||||
## 設定
|
||||
|
||||
## ARM
|
||||
|
||||
ADC の ARM 実装には、独自のキーボードとキーマップでオーバーライドして動作方法を変更できる幾つかの追加オプションがあります。利用可能なオプションの詳細については、特定のマイクロコントローラについて ChibiOS の対応する `hal_adc_lld.h` を調べてください。
|
||||
|
||||
|`#define` |型 |既定値 |説明 |
|
||||
|---------------------|------|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|`ADC_CIRCULAR_BUFFER`|`bool`|`false` |`true` の場合、この実装は循環バッファを使います。 |
|
||||
|`ADC_NUM_CHANNELS` |`int` |`1` |ADC 動作の一部としてスキャンされるチャンネル数を設定します。現在の実装は `1` のみをサポートします。 |
|
||||
|`ADC_BUFFER_DEPTH` |`int` |`2` |各結果の深さを設定します。デフォルトでは12ビットの結果しか取得できないため、これを2バイトに設定して1つの値を含めることができます。8ビット以下の結果を選択した場合は、これを 1 に設定できます。 |
|
||||
|`ADC_SAMPLING_RATE` |`int` |`ADC_SMPR_SMP_1P5` |ADC のサンプリングレートを設定します。デフォルトでは、最も速い設定に設定されています。 |
|
||||
|`ADC_RESOLUTION` |`int` |`ADC_CFGR1_RES_12BIT`|結果の分解能。デフォルトでは12ビットを選択しますが、12、10、8、6ビットを選択できます。 |
|
@@ -14,6 +14,7 @@ QMK は十分な容量のフラッシュメモリを備えた USB 対応 AVR ま
|
||||
* [ATmega16U2](https://www.microchip.com/wwwproducts/en/ATmega16U2) / [ATmega32U2](https://www.microchip.com/wwwproducts/en/ATmega32U2)
|
||||
* [ATmega16U4](https://www.microchip.com/wwwproducts/en/ATmega16U4) / [ATmega32U4](https://www.microchip.com/wwwproducts/en/ATmega32U4)
|
||||
* [AT90USB64](https://www.microchip.com/wwwproducts/en/AT90USB646) / [AT90USB128](https://www.microchip.com/wwwproducts/en/AT90USB1286)
|
||||
* [AT90USB162](https://www.microchip.com/wwwproducts/en/AT90USB162)
|
||||
|
||||
組み込みの USB インターフェースを持たない、いくつかの MCU は代わりに [V-USB](https://www.obdev.at/products/vusb/index.html) を使います:
|
||||
|
||||
@@ -30,6 +31,13 @@ QMK は十分な容量のフラッシュメモリを備えた USB 対応 AVR ま
|
||||
* [STM32F0x2](https://www.st.com/en/microcontrollers-microprocessors/stm32f0x2.html)
|
||||
* [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html)
|
||||
* [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)
|
||||
* [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html)
|
||||
* [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html)
|
||||
* [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html)
|
||||
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
|
||||
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
|
||||
* [STM32L433](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
|
||||
* [STM32L443](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
|
||||
|
||||
### NXP (Kinetis)
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# キーボードの挙動をカスタマイズする方法
|
||||
|
||||
<!---
|
||||
original document: 0.10.52:docs/custom_quantum_functions.md
|
||||
git diff 0.10.52 HEAD -- docs/custom_quantum_functions.md | cat
|
||||
original document: 0.12.41:docs/custom_quantum_functions.md
|
||||
git diff 0.12.41 HEAD -- docs/custom_quantum_functions.md | cat
|
||||
-->
|
||||
|
||||
多くの人にとって、カスタムキーボードはボタンの押下をコンピュータに送信するだけではありません。単純なボタンの押下やマクロよりも複雑なことを実行できるようにしたいでしょう。QMK にはコードを挿入したり、機能を上書きしたり、様々な状況でキーボードの挙動をカスタマイズできるフックがあります。
|
||||
@@ -190,6 +190,14 @@ void keyboard_post_init_user(void) {
|
||||
|
||||
カスタムマトリックススキャンコードが必要な場合は、この関数を使う必要があります。また、カスタムステータス出力 (LED あるいはディスプレイなど)や、ユーザが入力していない場合でも定期的にトリガーするその他の機能のために使うことができます。
|
||||
|
||||
# キーボードハウスキーピング :id=keyboard-housekeeping
|
||||
|
||||
* キーボード/リビジョン: `void housekeeping_task_kb(void)`
|
||||
* キーマップ: `void housekeeping_task_user(void)`
|
||||
|
||||
この関数は、全ての QMK 処理の最後に、次の繰り返しを開始する前に呼び出されます。`housekeeping_task_*` の関数が呼び出された時点で、QMK が最後のマトリックススキャンを処理したと、安全に見なすことができます -- レイヤーの状態が更新され、USB レポートが送信され、LED が更新され、表示が描画されています。
|
||||
|
||||
`matrix_scan_*` と同様に、これらは MCU が処理できる頻度で呼び出されます。キーボードの応答性を維持するために、これらの関数の呼び出し中にできるだけ何もしないことをお勧めします。実際に何か特別なものを実装する必要がある場合に動作を停止させる可能性があります。
|
||||
|
||||
# キーボードアイドリング/ウェイクコード
|
||||
|
||||
|
@@ -220,12 +220,6 @@ const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_ortho_4x12(
|
||||
AU_OFF,
|
||||
AU_TOG,
|
||||
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
FC_ON,
|
||||
FC_OFF,
|
||||
FC_TOG,
|
||||
#endif
|
||||
|
||||
// Music mode on/off/toggle
|
||||
MU_ON,
|
||||
MU_OFF,
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# レイヤー :id=layers
|
||||
|
||||
<!---
|
||||
original document: 0.9.43:docs/feature_layers.md
|
||||
git diff 0.9.43 HEAD -- docs/feature_layers.md | cat
|
||||
original document: 0.12.41:docs/feature_layers.md
|
||||
git diff 0.12.41 HEAD -- docs/feature_layers.md | cat
|
||||
-->
|
||||
|
||||
QMK ファームウェアの最も強力で良く使われている機能の一つは、レイヤーを使う機能です。ほとんどの人にとって、これはラップトップやタブレットキーボードにあるのと同じように、様々なキーを可能にするファンクションキーに相当します。
|
||||
@@ -24,12 +24,10 @@ QMK ファームウェアの最も強力で良く使われている機能の一
|
||||
|
||||
### 注意事項 :id=caveats
|
||||
|
||||
現在のところ、`LT()` と `MT()` は[基本的なキーコードセット](ja/keycodes_basic.md)に制限されています。つまり、`LCTL()`、`KC_TILD` あるいは `0xFF` より大きなキーコードを使うことができません。特に、`LT` と `MT` のような二重の機能キーは16ビットキーコードを使います。4ビットは機能の識別のために使われ、次の12ビットはパラメータに分かれます。レイヤータップはレイヤーに4ビットを使います(実はレイヤータップがレイヤー 0-15 に制限されている理由です)。モッドタップも同じですが、識別子に4ビット、モッドのために4ビットが使われ、全体でキーコードに8ビットを使います。このため、使用されるキーコードは `0xFF` (0-255) に制限され、基本的なキーコードのみです。
|
||||
現在のところ、`LT()` の `layer` 引数はレイヤー 0-15 に制限され、`kc` 引数は[基本的なキーコードセット](ja/keycodes_basic.md)に制限されています。つまり、`LCTL()`、`KC_TILD` あるいは `0xFF` より大きなキーコードを使うことができません。これは、QMK が16ビットのキーコードを使うためです。4ビットは機能の識別のために使われ、4ビットはレイヤーのために使われ、キーコードには8ビットしか残されていません。
|
||||
|
||||
これを拡張してもせいぜい複雑になるだけでしょう。32ビットキーコードに移行すると、これの多くが解決されますが、キーマップマトリックスが使用する領域が2倍になります。また、問題が起きる可能性もあります。タップしたキーコードにモディファイアを適用する必要がある場合は、[タップダンス](ja/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys)を使うことができます。
|
||||
|
||||
さらに、モッドタップあるいはレイヤータップで少なくとも1つの右手用のモディファイアが指定された場合、指定された全てのモディファイアが右手用になるため、2つをうまく組み合わせて一致させることはできません。
|
||||
|
||||
## レイヤーとの連携 :id=working-with-layers
|
||||
|
||||
レイヤーを切り替える時は注意してください。(キーボードを取り外さずに)そのレイヤーを非アクティブにすることができずレイヤーから移動できなくなる可能性があります。最も一般的な問題を避けるためのガイドラインを作成しました。
|
||||
|
@@ -25,7 +25,7 @@ I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED
|
||||
| `ISSI_TIMEOUT` | (オプション) i2c メッセージを待つ時間 | 100 |
|
||||
| `ISSI_PERSISTENCE` | (オプション) 失敗したメッセージをこの回数再試行する | 0 |
|
||||
| `LED_DRIVER_COUNT` | (必須) LED ドライバ IC の数 | |
|
||||
| `LED_DRIVER_LED_COUNT` | (必須) 全てのドライバの LED ライトの数 | |
|
||||
| `DRIVER_LED_TOTAL` | (必須) 全てのドライバの LED ライトの数 | |
|
||||
| `LED_DRIVER_ADDR_1` | (必須) 最初の LED ドライバのアドレス | |
|
||||
| `LED_DRIVER_ADDR_2` | (オプション) 2番目の LED ドライバのアドレス | |
|
||||
| `LED_DRIVER_ADDR_3` | (オプション) 3番目の LED ドライバのアドレス | |
|
||||
@@ -46,7 +46,7 @@ I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED
|
||||
#define LED_DRIVER_COUNT 2
|
||||
#define LED_DRIVER_1_LED_COUNT 25
|
||||
#define LED_DRIVER_2_LED_COUNT 24
|
||||
#define LED_DRIVER_LED_COUNT LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL
|
||||
#define DRIVER_LED_TOTAL LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL
|
||||
|
||||
現在、2つのドライバのみがサポートされますが、4つの組み合わせ全てをサポートすることは簡単です。
|
||||
|
||||
@@ -76,7 +76,7 @@ I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED
|
||||
カスタムレイヤー効果は `<keyboard>.c` 内で以下を定義することで行うことができます:
|
||||
|
||||
void led_matrix_indicators_kb(void) {
|
||||
led_matrix_set_index_value(index, value);
|
||||
led_matrix_set_value(index, value);
|
||||
}
|
||||
|
||||
同様の関数がキーマップ内で `led_matrix_indicators_user` として動作します。
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
!> **セキュリティの注意**: マクロを使って、パスワード、クレジットカード番号、その他の機密情報のいずれも送信することが可能ですが、それは非常に悪い考えです。あなたのキーボードを手に入れた人は誰でもテキストエディタを開いてその情報にアクセスすることができます。
|
||||
|
||||
## 新しい方法: `SEND_STRING()` と `process_record_user`
|
||||
## `SEND_STRING()` と `process_record_user`
|
||||
|
||||
単語またはフレーズを入力するキーが欲しい時があります。最も一般的な状況のために `SEND_STRING()` を提供しています。これは文字列(つまり、文字のシーケンス)を入力します。簡単にキーコードに変換することができる全ての ASCII 文字がサポートされています (例えば、`qmk 123\n\t`)。
|
||||
|
||||
@@ -267,15 +267,15 @@ SEND_STRING(".."SS_TAP(X_END));
|
||||
このマクロは `KC_LALT` を登録し、`KC_TAB` をタップして、1000ms 待ちます。キーが再度タップされると、別の `KC_TAB` が送信されます; タップが無い場合、`KC_LALT` が登録解除され、ウィンドウを切り替えることができます。
|
||||
|
||||
```c
|
||||
bool is_alt_tab_active = false; # keymap.c の先頭付近にこれを追加します
|
||||
uint16_t alt_tab_timer = 0; # すぐにそれらを使います
|
||||
bool is_alt_tab_active = false; // keymap.c の先頭付近にこれを追加します
|
||||
uint16_t alt_tab_timer = 0; // すぐにそれらを使います
|
||||
|
||||
enum custom_keycodes { # 素晴らしいキーコードを用意してください
|
||||
enum custom_keycodes { // 素晴らしいキーコードを用意してください
|
||||
ALT_TAB = SAFE_RANGE,
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) { # これはキーコードを利用したつまらない作業のほとんどを行います。
|
||||
switch (keycode) { // これはキーコードを利用したつまらない作業のほとんどを行います。
|
||||
case ALT_TAB:
|
||||
if (record->event.pressed) {
|
||||
if (!is_alt_tab_active) {
|
||||
@@ -292,7 +292,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) { # とても重要なタイマー
|
||||
void matrix_scan_user(void) { // とても重要なタイマー
|
||||
if (is_alt_tab_active) {
|
||||
if (timer_elapsed(alt_tab_timer) > 1000) {
|
||||
unregister_code(KC_LALT);
|
||||
@@ -301,104 +301,3 @@ void matrix_scan_user(void) { # とても重要なタイマー
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## **(非推奨)** 古い方法: `MACRO()` と `action_get_macro`
|
||||
|
||||
!> これは TMK から継承されており、更新されていません - 代わりに `SEND_STRING` と `process_record_user` を使うことをお勧めします。
|
||||
|
||||
デフォルトでは、QMK はマクロが無いことを前提としています。マクロを定義するには、`action_get_macro()` 関数を作成します。例えば:
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||
case 1:
|
||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
これは割り当てられているキーが押された時に実行される2つのマクロを定義します。キーが放された時にそれらを実行したい場合は、if 文を変更することができます。
|
||||
|
||||
if (!record->event.pressed) {
|
||||
|
||||
### マクロコマンド
|
||||
|
||||
マクロは以下のコマンドを含めることができます:
|
||||
|
||||
* I() はストロークの間隔をミリ秒単位で変更します。
|
||||
* D() はキーを押します。
|
||||
* U() はキーを放します。
|
||||
* T() はキーをタイプ(押して放す)します。
|
||||
* W() は待ちます (ミリ秒)。
|
||||
* END 終了マーク。
|
||||
|
||||
### マクロをキーにマッピングする
|
||||
|
||||
マクロを呼び出すにはキーマップ内で `M()` 関数を使います。例えば、2キーのキーボードのキーマップは以下の通りです:
|
||||
|
||||
```c
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
M(0), M(1)
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||
case 1:
|
||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
左側のキーを押すと、"Hi!" を入力し、右側のキーを押すと "Bye!" を入力します。
|
||||
|
||||
### マクロに名前を付ける
|
||||
|
||||
キーマップを読みやすくしながらキーマップから参照したいマクロがたくさんある場合は、ファイルの先頭で `#define` を使って名前を付けることができます。
|
||||
|
||||
```c
|
||||
#define M_HI M(0)
|
||||
#define M_BYE M(1)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
M_HI, M_BYE
|
||||
),
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
## 高度な例:
|
||||
|
||||
### 単一キーのコピーと貼り付け
|
||||
|
||||
この例は、押された時に `Ctrl-C` を送信し、放される時に `Ctrl-V` を送信するマクロを定義します。
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch(id) {
|
||||
case 0: {
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||
} else {
|
||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
@@ -34,6 +34,9 @@ MOUSEKEY_ENABLE = yes
|
||||
| `KC_MS_BTN3` | `KC_BTN3` | ボタン3を押す |
|
||||
| `KC_MS_BTN4` | `KC_BTN4` | ボタン4を押す |
|
||||
| `KC_MS_BTN5` | `KC_BTN5` | ボタン5を押す |
|
||||
| `KC_MS_BTN6` | `KC_BTN6` | ボタン6を押す |
|
||||
| `KC_MS_BTN7` | `KC_BTN7` | ボタン7を押す |
|
||||
| `KC_MS_BTN8` | `KC_BTN8` | ボタン8を押す |
|
||||
| `KC_MS_WH_UP` | `KC_WH_U` | ホイールを向こう側に回転 |
|
||||
| `KC_MS_WH_DOWN` | `KC_WH_D` | ホイールを手前側に回転 |
|
||||
| `KC_MS_WH_LEFT` | `KC_WH_L` | ホイールを左に倒す |
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# Raw HID
|
||||
|
||||
<!---
|
||||
original document: 0.10.47:docs/feature_rawhid.md
|
||||
git diff 0.10.47 HEAD -- docs/feature_rawhid.md | cat
|
||||
original document: 0.12.41:docs/feature_rawhid.md
|
||||
git diff 0.12.41 HEAD -- docs/feature_rawhid.md | cat
|
||||
-->
|
||||
|
||||
Raw HID は、HID インタフェースを介して QMK とホストコンピュータ間の双方向通信を可能にします。これには、キーマップをその場で切り替えたり、RGB LED の色とモードを変更したりなど、多くの潜在的な使用方法があります。
|
||||
@@ -34,7 +34,7 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
|
||||
}
|
||||
```
|
||||
|
||||
`raw_hid_receive` はホストから最大長 `RAW_EPSIZE` の可変サイズのパケットを受信することができます。一方、`raw_hid_send` はパケットを厳密に `RAW_EPSIZE` の長さで送信するため、長さ `RAW_EPSIZE` のデータを使う必要があります。
|
||||
これら2つの関数は、ホストとの間で長さ `RAW_EPSIZE` バイトのパケットを送受信します (LUFA/ChibiOS/V-USB では 32、ATSAM では 64)。
|
||||
|
||||
ホスト側での作業を進める前に、raw 対応のファームウェアを書き込むようにしてください。
|
||||
|
||||
|
@@ -12,7 +12,7 @@
|
||||
設定テーブルは列/行から新しい列/行にマップするための単純な2次元配列です。Planck の `hand_swap_config` の例:
|
||||
|
||||
```C
|
||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
|
||||
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
|
||||
{{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
|
||||
|
277
docs/ja/feature_unicode.md
Normal file
277
docs/ja/feature_unicode.md
Normal file
@@ -0,0 +1,277 @@
|
||||
# Unicode サポート
|
||||
|
||||
<!---
|
||||
original document: 0.10.53:docs/feature_unicode.md
|
||||
git diff 0.10.53 HEAD -- docs/feature_unicode.md | cat
|
||||
-->
|
||||
|
||||
Unicode 文字はキーボードから直接入力することができます!ただし幾つかの制限があります。
|
||||
|
||||
キーボードで Unicode サポートを有効にするには、以下の事をする必要があります:
|
||||
|
||||
1. サポートされている Unicode 実装のいずれかを選択します: [Basic Unicode](#basic-unicode)、[Unicode Map](#unicode-map)、[UCIS](#ucis)。
|
||||
2. オペレーティングシステムとセットアップに最適な[入力モード](#input-modes)を見つけます。
|
||||
3. コンフィギュレーションに適切な入力モード(または複数のモード)を[設定](#setting-the-input-mode)します。
|
||||
4. キーマップに Unicode キーコードを追加します。
|
||||
|
||||
|
||||
## 1. メソッド :id=methods
|
||||
|
||||
QMK は、Unicode 入力を有効にし、キーマップに Unicode 文字を追加するための3つの異なる方法をサポートします。それぞれに柔軟性と使いやすさの点で長所と短所があります。あなたの使い方に最適なものを選んでください。
|
||||
|
||||
ほとんどのユーザには Basic Unicode で十分です。ただし、サポートされる文字の範囲が広い(絵文字、珍しい記号など)ことが必要な場合には、Unicode Map を使う必要があります。
|
||||
|
||||
<br>
|
||||
|
||||
### 1.1. Basic Unicode :id=basic-unicode
|
||||
|
||||
多少制限はありますが、最も使いやすい方法です。Unicode 文字をキーコードとしてキーマップ自体に格納するため、`0x7FFF` までのコードポイントのみをサポートします。これは、ほとんどの現代言語(東アジアを含む)の文字と記号を対象としますが、絵文字は対象外です。
|
||||
|
||||
以下を `rules.mk` に追加します:
|
||||
|
||||
```make
|
||||
UNICODE_ENABLE = yes
|
||||
```
|
||||
|
||||
次に、`UC(c)` キーコードをキーマップに追加します。ここで、_c_ は目的の文字のコードポイントです (できれば16進数で最大4桁の長さが望ましいです)。例えば、`UC(0x40B)` は [Ћ](https://unicode-table.com/en/040B/) を出力し、`UC(0x30C4)` は [ツ](https://unicode-table.com/en/30C4) を出力します。
|
||||
|
||||
<br>
|
||||
|
||||
### 1.2. Unicode Map :id=unicode-map
|
||||
|
||||
このメソッドは、標準の文字の範囲に加えて、絵文字、古代文字、珍しい記号なども対象にしています。実際、可能な全てのコードポイント(`0x10FFFF`まで)がサポートされています。Unicode 文字は独立のマッピングテーブルに格納されています。キーマップファイルに `unicode_map` 配列を維持する必要があります。これには最大 16384 エントリを含めることができます。
|
||||
|
||||
以下を `rules.mk` に追加します:
|
||||
|
||||
```make
|
||||
UNICODEMAP_ENABLE = yes
|
||||
```
|
||||
|
||||
次に、`X(i)` キーコードをキーマップに追加します。ここで _i_ はマッピングテーブル内の目的の文字のインデックスです。これは数値にできますが、インデックスを列挙型に保持し、名前でアクセスすることをお勧めします。
|
||||
|
||||
```c
|
||||
enum unicode_names {
|
||||
BANG,
|
||||
IRONY,
|
||||
SNEK
|
||||
};
|
||||
|
||||
const uint32_t PROGMEM unicode_map[] = {
|
||||
[BANG] = 0x203D, // ‽
|
||||
[IRONY] = 0x2E2E, // ⸮
|
||||
[SNEK] = 0x1F40D, // 🐍
|
||||
};
|
||||
```
|
||||
|
||||
そして、キーマップで `X(BANG)`、`X(SNEK)` などを使うことができます。
|
||||
|
||||
#### 小文字と大文字
|
||||
|
||||
文字は å や Å のような小文字と大文字のペアで提供されることがあります。これらの文字を入力しやすくするために、キーマップで `XP(i, j)` を使うことができます。ここで、_i_ および _j_ はそれぞれ小文字と大文字のマッピングテーブルのインデックスです。キーを押した時に、シフトを押したままか Caps Lock をオンにしている場合は、2番目(大文字)の文字が挿入されます; そうでなければ最初(小文字)バージョンが出力されます。
|
||||
|
||||
これは特殊文字がある国際レイアウトのためのキーマップを作成している時に最も役立ちます。別々のキーに文字の小文字および大文字バージョンを置く代わりに、`XP()` を使ってそれら両方を同じキーに持つことができます。これは Unicode キーを通常のアルファベットと混ぜるのに役立ちます。
|
||||
|
||||
キーコードのサイズの制約により、_i_ と _j_ はそれぞれ `unicode_map` の最初の128文字のうち1つだけを参照できます。別の言い方をすると、0 ≤ _i_ ≤ 127 かつ 0 ≤ _j_ ≤ 127 です。これはほとんどのユースケースで十分ですが、インデックス計算をカスタマイズしたい場合は、[`unicodemap_index()`](https://github.com/qmk/qmk_firmware/blob/71f640d47ee12c862c798e1f56392853c7b1c1a8/quantum/process_keycode/process_unicodemap.c#L36) 関数をオーバーライドすることができます。これにより、例えば Shift/Caps の代わりに Ctrl をチェックすることもできます。
|
||||
|
||||
<br>
|
||||
|
||||
### 1.3. UCIS :id=ucis
|
||||
|
||||
この方法も全ての可能なコードポイントをサポートします。Unicode Map の方法と同様に、キーマップファイル内にマッピングテーブルを保持する必要があります。ただし、この機能のための組み込みのキーコードはありません — この機能を起動するカスタムキーコードあるいは関数を作成する必要があります。
|
||||
|
||||
以下を `rules.mk` に追加します:
|
||||
|
||||
```make
|
||||
UCIS_ENABLE = yes
|
||||
```
|
||||
|
||||
次に、キーマップファイルでこのようにテーブルを定義します:
|
||||
|
||||
```c
|
||||
const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE(
|
||||
UCIS_SYM("poop", 0x1F4A9), // 💩
|
||||
UCIS_SYM("rofl", 0x1F923), // 🤣
|
||||
UCIS_SYM("cuba", 0x1F1E8, 0x1F1FA), // 🇨🇺
|
||||
UCIS_SYM("look", 0x0CA0, 0x005F, 0x0CA0), // ಠ_ಠ
|
||||
);
|
||||
```
|
||||
|
||||
デフォルトでは、各テーブルエントリの長さは、最大3コードポイントです。この番号は `#define UCIS_MAX_CODE_POINTS n` を `config.h` ファイルに追加することで変更できます。
|
||||
|
||||
UCIS 入力を使うには、`qk_ucis_start()` を呼び出します。次に、文字のニーモニック ("rofl" など) を入力し、Space か Enter か Esc を押します。QMK は "rofl" テキストを消去し、笑っている絵文字を挿入するはずです。
|
||||
|
||||
#### カスタマイズ
|
||||
|
||||
この機能をカスタマイズするためにキーマップで定義できる幾つかの関数があります。
|
||||
|
||||
* `void qk_ucis_start_user(void)` – これは "start" 関数を呼び出す時に実行され、フィードバックを提供するために使うことができます。デフォルトでは、キーボードの絵文字を入力します。
|
||||
* `void qk_ucis_success(uint8_t symbol_index)` – これは入力が何かに一致して完了した時に実行されます。デフォルトでは何もしません。
|
||||
* `void qk_ucis_symbol_fallback (void)` – これは入力が何にも一致しない時に実行されます。デフォルトでは、入力を Unicode コードとして試そうとします。
|
||||
|
||||
[`process_ucis.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c) でこれらの関数のデフォルトの実装を見つけることができます。
|
||||
|
||||
|
||||
## 2. Input モード :id=input-modes
|
||||
|
||||
QMK での Unicode の入力は、マクロのように、OS への一連の文字列を入力することで動作します。残念ながら、これが行われる方法はプラットフォームによって異なります。特に各プラットフォームでは Unicode 入力を引き起こすために、異なるキーの組み合わせが必要です。従って、対応する入力モードが QMK で設定されなければなりません。
|
||||
|
||||
以下の入力モードが利用可能です:
|
||||
|
||||
* **`UC_MAC`**: macOS の組み込み Unicode 16進数入力。`0x10FFFF` までのコードポイント(全ての利用可能なコードポイント)をサポートします。
|
||||
|
||||
有効にするには、_システム環境設定 > キーボード > 入力ソース_ に移動し、(_その他_ の下の) _Unicode 16進数入力_ をリストに追加し、次にメニューバーの入力ドロップダウンからそれをアクティブにします。
|
||||
デフォルトでは、このモードは Unicode 入力のために左 Option キー (`KC_LALT`) を使いますが、これは他のキーで [`UNICODE_KEY_MAC`](#input-key-configuration) を定義することで変更できます。
|
||||
|
||||
!> _Unicode 16進数入力_ 入力ソースの使用は、Option + 左矢印および Option + 右矢印 のような、幾つかの Option ベースのショートカットを無効にするかもしれません。
|
||||
|
||||
!> `UC_OSX` は `UC_MAC` の非推奨のエイリアスで、QMK の将来のバージョンで削除されます。全ての新しいキーマップは、`UC_MAC` を使うべきです。
|
||||
|
||||
* **`UC_LNX`**: Linux の組み込み IBus Unicode 入力。`0x10FFFF` までのコードポイント(全ての利用可能なコードポイント)をサポートします。
|
||||
|
||||
デフォルトで有効になっていて、IBus が有効になったディストリビューションのほとんどどれでも動作します。IBus が無い場合、このモードは GTK アプリ下で動作しますが、他の場所ではほとんど動作しません。
|
||||
デフォルトでは、このモードは Unicode 入力を開始するために Ctrl+Shift+U (`LCTL(LSFT(KC_U))`) を使いますが、これは他のキーコードで [`UNICODE_KEY_LNX`](#input-key-configuration) を定義することで変更できます。これは、Ctrl+Shift+U の挙動が Ctrl+Shift+E に統合された IBus バージョン 1.5.15 以上を必要とするかもしれません。
|
||||
|
||||
* **`UC_WIN`**: _(非推奨)_ Windows の組み込み16進数テンキー Unicode 入力。`0xFFFF` までのコードポイントをサポートします。
|
||||
|
||||
有効にするには、`HKEY_CURRENT_USER\Control Panel\Input Method` の下に、`EnableHexNumpad` という名前の `REG_SZ` 型のレジストリキーを作成し、その値を `1` に設定します。これは、管理者権限でコマンドラインプロンプトから `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` を実行することでできます。その後再起動します。
|
||||
信頼性と互換性の問題から、このモードはお勧めできません; 代わりに `UC_WINC` モードを使ってください。
|
||||
|
||||
* **`UC_BSD`**: _(未実装)_ BSD での Unicode 入力。現時点では実装されていません。BSD ユーザでサポートを追加したい場合は、[GitHub で issue を開いて](https://github.com/qmk/qmk_firmware/issues)ください。
|
||||
|
||||
* **`UC_WINC`**: [WinCompose](https://github.com/samhocevar/wincompose) を使った Windows Unicode 入力。v0.9.0 の時点で、`0x10FFFF` までのコードポイント(全ての利用可能なコードポイント)をサポートします。
|
||||
|
||||
有効にするには、[最新のリリース](https://github.com/samhocevar/wincompose/releases/latest)をインストールします。インストールすると、起動時に WinCompose が自動的に実行されます。このモードはアプリがサポートする全てのバージョンの Windows で確実に動作します。
|
||||
デフォルトでは、このモードは Compose キーとして右 Alt (`KC_RALT`) を使いますが、これは WinCompose 設定と他のキーで [`UNICODE_KEY_WINC`](#input-key-configuration) を定義することで変更できます。
|
||||
|
||||
|
||||
## 3. 入力モードの設定 :id=setting-the-input-mode
|
||||
|
||||
目的の入力モードを設定するには、以下の定義を `config.h` に追加します:
|
||||
|
||||
```c
|
||||
#define UNICODE_SELECTED_MODES UC_LNX
|
||||
```
|
||||
|
||||
この例では、キーボードのデフォルトの入力モードを `UC_LNX` に設定します。これは、`UC_MAC` か `UC_WINC` か[上記](#input-modes)に列挙されている他のモードのいずれかに置き換えることができます。手動で別のモード([下記](#keycodes)を見てください)に切り替えない限り、キーボードは起動時に選択したモードを自動的に使います。
|
||||
|
||||
複数の入力モードを選択することもできます。これにより、`UC_MOD`/`UC_RMOD` キーコードを使ってそれらを簡単に切り替えることができます。
|
||||
|
||||
```c
|
||||
#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX, UC_WINC
|
||||
```
|
||||
|
||||
値はカンマで区切られていることに注意してください。キーボードは最後に使われた入力モードを記憶し、次の電源投入時にそれを使い続けます。`config.h` に `#define UNICODE_CYCLE_PERSIST false` を追加することで、これを無効にして常にリストの最初のモードで開始するように強制できます。
|
||||
|
||||
#### キーコード
|
||||
|
||||
以下のキーコードを使って、いつでも入力モードを切り替えることができます。これらをキーマップに追加すると、`UNICODE_SELECTED_MODES` に列挙されていないモードを含む特定の入力モードに素早く切り替えることができます。
|
||||
|
||||
| キーコード |エイリアス | 入力モード | 説明 |
|
||||
|------------------------|-----------|--------------|--------------------------------------------------------------------|
|
||||
| `UNICODE_MODE_FORWARD` | `UC_MOD` | リストの次へ | 選択したモードを切り替えます。Shift が押された場合は逆方向 |
|
||||
| `UNICODE_MODE_REVERSE` | `UC_RMOD` | リストの前へ | 逆方向に選択したモードを切り替えます。Shift が押された場合は順方向 |
|
||||
| `UNICODE_MODE_MAC` | `UC_M_MA` | `UC_MAC` | macOS 入力に切り替え |
|
||||
| `UNICODE_MODE_LNX` | `UC_M_LN` | `UC_LNX` | Linux 入力に切り替え |
|
||||
| `UNICODE_MODE_WIN` | `UC_M_WI` | `UC_WIN` | Windows 入力に切り替え |
|
||||
| `UNICODE_MODE_BSD` | `UC_M_BS` | `UC_BSD` | BSD 入力に切り替え _(未実装)_ |
|
||||
| `UNICODE_MODE_WINC` | `UC_M_WC` | `UC_WINC` | WinCompose を使う Windows 入力に切り替え |
|
||||
|
||||
コード内で `set_unicode_input_mode(x)` を呼び出すことで、入力モードを切り替えることもできます。ここで、_x_ は上記の入力モード定数のいずれか (例えば、`UC_LNX`) です。
|
||||
|
||||
?> `matrix_init_user()` または同様の関数の中で `set_unicode_input_mode()` を呼び出すよりも、`UNICODE_SELECTED_MODES` を使うほうが望ましいです。Unicode システムとの統合性が高く、EEPROM への不要な書き込みを回避できるという利点があるからです。
|
||||
|
||||
#### オーディオフィードバック
|
||||
|
||||
キーボードで[オーディオ機能](ja/feature_audio.md)を有効にした場合、上記のキーを押したときにメロディーを再生するように設定できます。そのようにして、入力モードを切り替えた時になんらかのオーディオフィードバックを得ることができます。
|
||||
|
||||
例えば、`config.h` ファイルに下記の定義を追加することができます:
|
||||
|
||||
```c
|
||||
#define UNICODE_SONG_MAC AUDIO_ON_SOUND
|
||||
#define UNICODE_SONG_LNX UNICODE_LINUX
|
||||
#define UNICODE_SONG_BSD TERMINAL_SOUND
|
||||
#define UNICODE_SONG_WIN UNICODE_WINDOWS
|
||||
#define UNICODE_SONG_WINC UNICODE_WINDOWS
|
||||
```
|
||||
|
||||
|
||||
## 追加のカスタマイズ
|
||||
|
||||
Unicode は大規模で多目的な機能のため、システムでより適切に動作するようにカスタマイズできるオプションが幾つかあります。
|
||||
|
||||
### 入力関数の開始と終了
|
||||
|
||||
プラットフォームで Unicode 入力を開始および終了する機能は、ローカルで上書きできます。可能な用途には、デフォルトキーを使用しない場合の入力モードの挙動のカスタマイズ、あるいは Unicode 入力への視覚/音声フィードバックの追加があります。
|
||||
|
||||
* `void unicode_input_start(void)` – これはプラットフォームに Unicode 入力モードの入力を指示する初期シーケンスを送信します。例えば、Windows では左 Alt キーの後に Num+ を押したままにし、Linux では `UNICODE_KEY_LNX` の組み合わせ(デフォルト: Ctrl+Shift+U) を押します。
|
||||
* `void unicode_input_finish(void)` – これは、例えば Space を押すか Alt キーを放すなどして、Unicode 入力モードを終了するために呼ばれます。
|
||||
|
||||
[`process_unicode_common.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode_common.c) でこれらの関数のデフォルトの実装を見つけることができます。
|
||||
|
||||
### 入力キーの設定
|
||||
|
||||
`config.h` に対応する定義を追加することで、macOS、Linux、WinCompose で Unicode 入力を引き起こすために使われるキーをカスタマイズできます。デフォルト値はプラットフォームのデフォルト設定に一致するため、Unicode 入力が動作しない、あるいは(例えば左あるいは右 Alt を解放するために)異なるキーを使いたい場合以外はこれを変更する必要はありません。
|
||||
|
||||
| 定義 | 型 | 既定値 | 例 |
|
||||
|--------------------|------------|--------------------|---------------------------------------------|
|
||||
| `UNICODE_KEY_MAC` | `uint8_t` | `KC_LALT` | `#define UNICODE_KEY_MAC KC_RALT` |
|
||||
| `UNICODE_KEY_LNX` | `uint16_t` | `LCTL(LSFT(KC_U))` | `#define UNICODE_KEY_LNX LCTL(LSFT(KC_E))` |
|
||||
| `UNICODE_KEY_WINC` | `uint8_t` | `KC_RALT` | `#define UNICODE_KEY_WINC KC_RGUI` |
|
||||
|
||||
|
||||
## Unicode 文字列の送信
|
||||
|
||||
QMK は、Unicode 入力をプログラムでホストに送信できるようにする幾つかの関数を提供します:
|
||||
|
||||
### `send_unicode_string()`
|
||||
|
||||
この関数は、`send_string()` によく似ていますが、UTF-8 文字を直接入力できます。選択された入力モードでもサポートされている場合は、全てのコードポイントをサポートします。`keymap.c` ファイルが UTF-8 エンコーディングを使ってフォーマットされていることを確認してください。
|
||||
|
||||
```c
|
||||
send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
|
||||
```
|
||||
|
||||
使用例には、[Macros](ja/feature_macros.md) で説明されているように、キーが押された時に Unicode 文字列を送信することが含まれます。
|
||||
|
||||
### `send_unicode_hex_string()`
|
||||
|
||||
`send_unicode_string()` に似ていますが、文字は Unicode コードポイントで表され、16進数で記述され、空白で区切られています。例えば、上記のちゃぶ台返しは以下で表されます:
|
||||
|
||||
```c
|
||||
send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
|
||||
```
|
||||
|
||||
[このサイト](https://r12a.github.io/app-conversion/)で結果を "Hex/UTF-32" で受け取ることで、Unicode 文字列をこの形式に簡単に変換できます。
|
||||
|
||||
|
||||
## 追加の言語サポート
|
||||
|
||||
`quantum/keymap_extras` には、様々な言語ファイルがあります — これらは Colemak または BÉPO のような代替レイアウトのファイルと同じように動作します。これらの言語ヘッダのいずれかを `#include` すると、その言語/国のレイアウトに固有のキーコードにアクセスできます。このようなキーコードは、2文字の国/言語コードの後に、アンダースコアとキーが対応する4文字の略語が続くことで定義されます。例えば、キーマップに `keymap_french.h` を含め、`FR_UGRV` を使うと、ネイティブのフランス語 AZERTY レイアウトを使うシステムで入力すると、`ù` が出力されます。
|
||||
|
||||
マシンで使うプライマリシステムレイアウトが US ANSI と異なる場合、これらの言語固有のキーコードを使うと、QMK キーマップが実際に画面に出力されるものとより一致するようになります。ただし、これらのキーコードは、内部の対応するデフォルトの US キーコードのエイリアスに過ぎず、キーボードで使われる HID プロトコル自体は本質的に US ANSI に基づいていることに注意してください。
|
||||
|
||||
|
||||
## Windows での国際文字
|
||||
|
||||
### AutoHotkey
|
||||
|
||||
この方法はキーボード自体で Unicode サポートを必要としませんが、代わりにバックグラウンドで [AutoHotkey](https://autohotkey.com) が実行されていることを当てにします。
|
||||
|
||||
最初にプログラムで使われていないモディファイアの組み合わせを選択する必要があります。
|
||||
Ctrl+Alt+Win はあまり広く使われていないため、これに最適なはずです。
|
||||
mod-tab コンボ `LCAG_T` 用に定義されたマクロがあります。
|
||||
この mod-tab マクロをキーボードのキーに追加します。例えば: `LCAG_T(KC_TAB)`。
|
||||
これにより、キーを押してすぐ放すとキーはタブキーのように振る舞いますが、他のキーと一緒に使うとモディファイアに変わります。
|
||||
|
||||
AutoHotkey のデフォルトのスクリプトで、カスタムホットキーを定義できます。
|
||||
|
||||
<^<!<#a::Send, ä
|
||||
<^<!<#<+a::Send, Ä
|
||||
|
||||
上のホットキーは、CtrlAltGui と CtrlAltGuiShift + 文字 a の組み合わせです。
|
||||
この組み合わせが押されると、AutoHotkey は `Send, ` の右側にあるテキストを挿入します。
|
||||
|
||||
### 米国インターナショナル
|
||||
|
||||
システム上で米国インターナショナルレイアウトを有効にすると、文字にアクセントをつけるために区切り文字を使います。例えば、"\`a" は à になります。
|
||||
これを有効にする方法は[ここ](https://support.microsoft.com/en-us/help/17424/windows-change-keyboard-layout)で見つかります。
|
@@ -110,10 +110,6 @@ make コマンド自体にもいくつかの追加オプションがあります
|
||||
|
||||
C6 ピン(抽象化が必要)でオーディオ出力できます。詳細は[オーディオページ](ja/feature_audio.md)を見てください。
|
||||
|
||||
`FAUXCLICKY_ENABLE`
|
||||
|
||||
クリック音のあるスイッチをエミュレートするためにブザーを使います。Cherry社製の青軸スイッチの安っぽい模倣です。デフォルトでは、`AUDIO_ENABLE` と同じように C6 ピンを使います。
|
||||
|
||||
`VARIABLE_TRACE`
|
||||
|
||||
これを使って変数の値の変更をデバッグします。詳細についてはユニットテストのページの[変数のトレース](ja/unit_testing.md#tracing-variables)のセクションを見てください。
|
||||
|
@@ -2,8 +2,8 @@
|
||||
|
||||
<!---
|
||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||
original document: 0.10.33:docs/hardware_avr.md
|
||||
git diff 0.10.33 HEAD -- docs/hardware_avr.md | cat
|
||||
original document: 0.12.41:docs/hardware_avr.md
|
||||
git diff 0.12.41 HEAD -- docs/hardware_avr.md | cat
|
||||
-->
|
||||
|
||||
このページでは QMK における AVR マイコンのサポートについて説明します。AVR マイコンには、Atmel 社製の atmega32u4、atmega32u2、at90usb1286 やその他のマイコンを含みます。AVR マイコンは、簡単に動かせるよう設計された8ビットの MCU です。キーボードでよく使用される AVR マイコンには USB 機能や大きなキーボードマトリックスのためのたくさんの GPIO を搭載しています。これらは、現在、キーボードで使われる最も一般的な MCU です。
|
||||
@@ -83,7 +83,7 @@ or open the directory in your favourite text editor.
|
||||
#define PRODUCT my_awesome_keyboard
|
||||
```
|
||||
|
||||
?> Windows や macOS では、`MANUFACTURER` と `PRODUCT` が USBデバイスのリストに表示されます。Linux 上の `lsusb` では、代わりにデフォルトで [USB ID Repository](http://www.linux-usb.org/usb-ids.html) によって維持されているリストからこれらを取得します。`lsusb -v` を使用するとデバイスから示された値を表示します。また、接続したときのカーネルログにも表示されます。
|
||||
?> Windows や macOS では、`MANUFACTURER` と `PRODUCT` が USBデバイスのリストに表示されます。Linux 上の `lsusb` では、代わりに [USB ID Repository](http://www.linux-usb.org/usb-ids.html) によって維持されているリストの値を優先します。デフォルトでは、リストに `VENDOR_ID` / `PRODUCT_ID` を含まない場合にのみ、`MANUFACTURER` と `PRODUCT` を使います。`sudo lsusb -v` を使用するとデバイスから示された値を表示します。また、接続したときのカーネルログにも表示されます。
|
||||
|
||||
### キーボードマトリックスの設定
|
||||
|
||||
|
574
docs/ja/keycodes.md
Normal file
574
docs/ja/keycodes.md
Normal file
@@ -0,0 +1,574 @@
|
||||
# キーコードの概要
|
||||
|
||||
<!---
|
||||
original document: 0.11.64:docs/keycodes.md
|
||||
git diff 0.11.64 HEAD -- docs/keycodes.md | cat
|
||||
-->
|
||||
|
||||
[キーマップ](ja/keymap.md) を定義するときは、それぞれのキーに有効な定義が必要です。このページは、QMK で使えるキーコードに相当するシンボルについて記述しています。
|
||||
|
||||
このページは参照のみです。それぞれのキーの種類毎のリンク先のページに、それぞれのキーの機能についてもっと詳細に記載しています。
|
||||
|
||||
## 基本的なキーコード :id=basic-keycodes
|
||||
|
||||
[基本的なキーコード](ja/keycodes_basic.md) も見てください。
|
||||
|
||||
?> 訳注: 以下の説明は、OS のキーボード配列の設定が「US」の場合のものです。OS のキーボード配列の設定が「JIS」の場合、一部のキーは下の表と異なる文字が入力されます。例えば、`KC_LBRC` は、OS のキーボード配列の設定が US であれば「`[` または `{`」が入力されますが、JIS の場合「`@` または <code>`</code>」が入力されます。
|
||||
?> これは、OS がキーボードから送信されたキーコードを解釈する際に、キーボード配列の設定によって対応する文字を変えるためです。もし、OS のキーボード配列の設定を JIS にする場合、`#include "keymap_jp.h"` を `keymap.c` に追加すると`JP_AT` のような JIS キーボードのキーキャップに対応したキーを指定できます。
|
||||
|
||||
|キー |エイリアス |説明 |Windows |macOS |Linux<sup>1</sup>|
|
||||
|-----------------------|------------------------------|-----------------------------------------|-------------|-------------|-----------------|
|
||||
|`KC_NO` |`XXXXXXX` |このキーを無視します (何もしません) 。 |*N/A* |*N/A* |*N/A* |
|
||||
|`KC_TRANSPARENT` |`KC_TRNS`, `_______` | 次に低いレイヤーの非透過キーを使う |*N/A* |*N/A* |*N/A* |
|
||||
|`KC_A` | |`a` と `A` |✔ |✔ |✔ |
|
||||
|`KC_B` | |`b` と `B` |✔ |✔ |✔ |
|
||||
|`KC_C` | |`c` と `C` |✔ |✔ |✔ |
|
||||
|`KC_D` | |`d` と `D` |✔ |✔ |✔ |
|
||||
|`KC_E` | |`e` と `E` |✔ |✔ |✔ |
|
||||
|`KC_F` | |`f` と `F` |✔ |✔ |✔ |
|
||||
|`KC_G` | |`g` と `G` |✔ |✔ |✔ |
|
||||
|`KC_H` | |`h` と `H` |✔ |✔ |✔ |
|
||||
|`KC_I` | |`i` と `I` |✔ |✔ |✔ |
|
||||
|`KC_J` | |`j` と `J` |✔ |✔ |✔ |
|
||||
|`KC_K` | |`k` と `K` |✔ |✔ |✔ |
|
||||
|`KC_L` | |`l` と `L` |✔ |✔ |✔ |
|
||||
|`KC_M` | |`m` と `M` |✔ |✔ |✔ |
|
||||
|`KC_N` | |`n` と `N` |✔ |✔ |✔ |
|
||||
|`KC_O` | |`o` と `O` |✔ |✔ |✔ |
|
||||
|`KC_P` | |`p` と `P` |✔ |✔ |✔ |
|
||||
|`KC_Q` | |`q` と `Q` |✔ |✔ |✔ |
|
||||
|`KC_R` | |`r` と `R` |✔ |✔ |✔ |
|
||||
|`KC_S` | |`s` と `S` |✔ |✔ |✔ |
|
||||
|`KC_T` | |`t` と `T` |✔ |✔ |✔ |
|
||||
|`KC_U` | |`u` と `U` |✔ |✔ |✔ |
|
||||
|`KC_V` | |`v` と `V` |✔ |✔ |✔ |
|
||||
|`KC_W` | |`w` と `W` |✔ |✔ |✔ |
|
||||
|`KC_X` | |`x` と `X` |✔ |✔ |✔ |
|
||||
|`KC_Y` | |`y` と `Y` |✔ |✔ |✔ |
|
||||
|`KC_Z` | |`z` と `Z` |✔ |✔ |✔ |
|
||||
|`KC_1` | |`1` と `!` |✔ |✔ |✔ |
|
||||
|`KC_2` | |`2` と `@` |✔ |✔ |✔ |
|
||||
|`KC_3` | |`3` と `#` |✔ |✔ |✔ |
|
||||
|`KC_4` | |`4` と `$` |✔ |✔ |✔ |
|
||||
|`KC_5` | |`5` と `%` |✔ |✔ |✔ |
|
||||
|`KC_6` | |`6` と `^` |✔ |✔ |✔ |
|
||||
|`KC_7` | |`7` と `&` |✔ |✔ |✔ |
|
||||
|`KC_8` | |`8` と `*` |✔ |✔ |✔ |
|
||||
|`KC_9` | |`9` と `(` |✔ |✔ |✔ |
|
||||
|`KC_0` | |`0` と `)` |✔ |✔ |✔ |
|
||||
|`KC_ENTER` |`KC_ENT` |Return (Enter) |✔ |✔ |✔ |
|
||||
|`KC_ESCAPE` |`KC_ESC` |Escape |✔ |✔ |✔ |
|
||||
|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) |✔ |✔ |✔ |
|
||||
|`KC_TAB` | |Tab |✔ |✔ |✔ |
|
||||
|`KC_SPACE` |`KC_SPC` |Spacebar |✔ |✔ |✔ |
|
||||
|`KC_MINUS` |`KC_MINS` |`-` と `_` |✔ |✔ |✔ |
|
||||
|`KC_EQUAL` |`KC_EQL` |`=` と `+` |✔ |✔ |✔ |
|
||||
|`KC_LBRACKET` |`KC_LBRC` |`[` と `{` |✔ |✔ |✔ |
|
||||
|`KC_RBRACKET` |`KC_RBRC` |`]` と `}` |✔ |✔ |✔ |
|
||||
|`KC_BSLASH` |`KC_BSLS` |`\` と `\|` |✔ |✔ |✔ |
|
||||
|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` と `~` |✔ |✔ |✔ |
|
||||
|`KC_SCOLON` |`KC_SCLN` |`;` と `:` |✔ |✔ |✔ |
|
||||
|`KC_QUOTE` |`KC_QUOT` |`'` と `"` |✔ |✔ |✔ |
|
||||
|`KC_GRAVE` |`KC_GRV`, `KC_ZKHK` |<code>`</code> と `~`, JIS 全角/半角 |✔ |✔ |✔ |
|
||||
|`KC_COMMA` |`KC_COMM` |`,` と `<` |✔ |✔ |✔ |
|
||||
|`KC_DOT` | |`.` と `>` |✔ |✔ |✔ |
|
||||
|`KC_SLASH` |`KC_SLSH` |`/` と `?` |✔ |✔ |✔ |
|
||||
|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS` |Caps Lock |✔ |✔ |✔ |
|
||||
|`KC_F1` | |F1 |✔ |✔ |✔ |
|
||||
|`KC_F2` | |F2 |✔ |✔ |✔ |
|
||||
|`KC_F3` | |F3 |✔ |✔ |✔ |
|
||||
|`KC_F4` | |F4 |✔ |✔ |✔ |
|
||||
|`KC_F5` | |F5 |✔ |✔ |✔ |
|
||||
|`KC_F6` | |F6 |✔ |✔ |✔ |
|
||||
|`KC_F7` | |F7 |✔ |✔ |✔ |
|
||||
|`KC_F8` | |F8 |✔ |✔ |✔ |
|
||||
|`KC_F9` | |F9 |✔ |✔ |✔ |
|
||||
|`KC_F10` | |F10 |✔ |✔ |✔ |
|
||||
|`KC_F11` | |F11 |✔ |✔ |✔ |
|
||||
|`KC_F12` | |F12 |✔ |✔ |✔ |
|
||||
|`KC_PSCREEN` |`KC_PSCR` |Print Screen |✔ |✔<sup>2</sup>|✔ |
|
||||
|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD` |Scroll Lock, 画面の明るさダウン (macOS) |✔ |✔<sup>2</sup>|✔ |
|
||||
|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, 画面の明るさアップ (macOS) |✔ |✔<sup>2</sup>|✔ |
|
||||
|`KC_INSERT` |`KC_INS` |Insert |✔ | |✔ |
|
||||
|`KC_HOME` | |Home |✔ |✔ |✔ |
|
||||
|`KC_PGUP` | |Page Up |✔ |✔ |✔ |
|
||||
|`KC_DELETE` |`KC_DEL` |Forward Delete |✔ |✔ |✔ |
|
||||
|`KC_END` | |End |✔ |✔ |✔ |
|
||||
|`KC_PGDOWN` |`KC_PGDN` |Page Down |✔ |✔ |✔ |
|
||||
|`KC_RIGHT` |`KC_RGHT` |右矢印 |✔ |✔ |✔ |
|
||||
|`KC_LEFT` | |左矢印 |✔ |✔ |✔ |
|
||||
|`KC_DOWN` | |下矢印 |✔ |✔ |✔ |
|
||||
|`KC_UP` | |上矢印 |✔ |✔ |✔ |
|
||||
|`KC_NUMLOCK` |`KC_NLCK` |テンキー Num Lock と Clear |✔ |✔ |✔ |
|
||||
|`KC_KP_SLASH` |`KC_PSLS` |テンキー `/` |✔ |✔ |✔ |
|
||||
|`KC_KP_ASTERISK` |`KC_PAST` |テンキー `*` |✔ |✔ |✔ |
|
||||
|`KC_KP_MINUS` |`KC_PMNS` |テンキー `-` |✔ |✔ |✔ |
|
||||
|`KC_KP_PLUS` |`KC_PPLS` |テンキー `+` |✔ |✔ |✔ |
|
||||
|`KC_KP_ENTER` |`KC_PENT` |テンキー Enter |✔ |✔ |✔ |
|
||||
|`KC_KP_1` |`KC_P1` |テンキー `1` と End |✔ |✔ |✔ |
|
||||
|`KC_KP_2` |`KC_P2` |テンキー `2` と下矢印 |✔ |✔ |✔ |
|
||||
|`KC_KP_3` |`KC_P3` |テンキー `3` と Page Down |✔ |✔ |✔ |
|
||||
|`KC_KP_4` |`KC_P4` |テンキー `4` と左矢印 |✔ |✔ |✔ |
|
||||
|`KC_KP_5` |`KC_P5` |テンキー `5` |✔ |✔ |✔ |
|
||||
|`KC_KP_6` |`KC_P6` |テンキー `6` と右矢印 |✔ |✔ |✔ |
|
||||
|`KC_KP_7` |`KC_P7` |テンキー `7` と Home |✔ |✔ |✔ |
|
||||
|`KC_KP_8` |`KC_P8` |テンキー `8` と上矢印 |✔ |✔ |✔ |
|
||||
|`KC_KP_9` |`KC_P9` |テンキー `9` と Page Up |✔ |✔ |✔ |
|
||||
|`KC_KP_0` |`KC_P0` |テンキー `0` と Insert |✔ |✔ |✔ |
|
||||
|`KC_KP_DOT` |`KC_PDOT` |テンキー `.` と Delete |✔ |✔ |✔ |
|
||||
|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` と `\|` |✔ |✔ |✔ |
|
||||
|`KC_APPLICATION` |`KC_APP` |アプリケーションキー (Windows コンテキストメニューキー) |✔ | |✔ |
|
||||
|`KC_POWER` | |システム電源 | |✔<sup>3</sup>|✔ |
|
||||
|`KC_KP_EQUAL` |`KC_PEQL` |テンキー `=` |✔ |✔ |✔ |
|
||||
|`KC_F13` | |F13 |✔ |✔ |✔ |
|
||||
|`KC_F14` | |F14 |✔ |✔ |✔ |
|
||||
|`KC_F15` | |F15 |✔ |✔ |✔ |
|
||||
|`KC_F16` | |F16 |✔ |✔ |✔ |
|
||||
|`KC_F17` | |F17 |✔ |✔ |✔ |
|
||||
|`KC_F18` | |F18 |✔ |✔ |✔ |
|
||||
|`KC_F19` | |F19 |✔ |✔ |✔ |
|
||||
|`KC_F20` | |F20 |✔ | |✔ |
|
||||
|`KC_F21` | |F21 |✔ | |✔ |
|
||||
|`KC_F22` | |F22 |✔ | |✔ |
|
||||
|`KC_F23` | |F23 |✔ | |✔ |
|
||||
|`KC_F24` | |F24 |✔ | |✔ |
|
||||
|`KC_EXECUTE` |`KC_EXEC` |Execute | | |✔ |
|
||||
|`KC_HELP` | |Help | | |✔ |
|
||||
|`KC_MENU` | |Menu | | |✔ |
|
||||
|`KC_SELECT` |`KC_SLCT` |Select | | |✔ |
|
||||
|`KC_STOP` | |Stop | | |✔ |
|
||||
|`KC_AGAIN` |`KC_AGIN` |Again | | |✔ |
|
||||
|`KC_UNDO` | |アンドゥ | | |✔ |
|
||||
|`KC_CUT` | |カット | | |✔ |
|
||||
|`KC_COPY` | |コピー | | |✔ |
|
||||
|`KC_PASTE` |`KC_PSTE` |ペースト | | |✔ |
|
||||
|`KC_FIND` | |検索 | | |✔ |
|
||||
|`KC__MUTE` | |ミュート | |✔ |✔ |
|
||||
|`KC__VOLUP` | |音量アップ | |✔ |✔ |
|
||||
|`KC__VOLDOWN` | |音量ダウン | |✔ |✔ |
|
||||
|`KC_LOCKING_CAPS` |`KC_LCAP` |Caps Lock のロック |✔ |✔ | |
|
||||
|`KC_LOCKING_NUM` |`KC_LNUM` |Num Lock のロック |✔ |✔ | |
|
||||
|`KC_LOCKING_SCROLL` |`KC_LSCR` |Scroll Lock のロック |✔ |✔ | |
|
||||
|`KC_KP_COMMA` |`KC_PCMM` |テンキー `,` | | |✔ |
|
||||
|`KC_KP_EQUAL_AS400` | |AS/400 キーボードのテンキー `=` | | | |
|
||||
|`KC_INT1` |`KC_RO` |JIS `\` と `_` |✔ | |✔ |
|
||||
|`KC_INT2` |`KC_KANA` |JIS カタカナ/ひらがな |✔ | |✔ |
|
||||
|`KC_INT3` |`KC_JYEN` |JIS `¥` と `\|` |✔ | |✔ |
|
||||
|`KC_INT4` |`KC_HENK` |JIS 変換 |✔ | |✔ |
|
||||
|`KC_INT5` |`KC_MHEN` |JIS 無変換 |✔ | |✔ |
|
||||
|`KC_INT6` | |JIS テンキー `,` | | |✔ |
|
||||
|`KC_INT7` | |International 7 | | | |
|
||||
|`KC_INT8` | |International 8 | | | |
|
||||
|`KC_INT9` | |International 9 | | | |
|
||||
|`KC_LANG1` |`KC_HAEN` |ハングル/英語 | | |✔ |
|
||||
|`KC_LANG2` |`KC_HANJ` |韓文漢字 | | |✔ |
|
||||
|`KC_LANG3` | |JIS カタカナ | | |✔ |
|
||||
|`KC_LANG4` | |JIS ひらがな | | |✔ |
|
||||
|`KC_LANG5` | |JIS 全角/半角 | | |✔ |
|
||||
|`KC_LANG6` | |Language 6 | | | |
|
||||
|`KC_LANG7` | |Language 7 | | | |
|
||||
|`KC_LANG8` | |Language 8 | | | |
|
||||
|`KC_LANG9` | |Language 9 | | | |
|
||||
|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | | | |
|
||||
|`KC_SYSREQ` | |SysReq/Attention | | | |
|
||||
|`KC_CANCEL` | |Cancel | | | |
|
||||
|`KC_CLEAR` |`KC_CLR` |Clear | | |✔ |
|
||||
|`KC_PRIOR` | |Prior | | | |
|
||||
|`KC_RETURN` | |Return | | | |
|
||||
|`KC_SEPARATOR` | |Separator | | | |
|
||||
|`KC_OUT` | |Out | | | |
|
||||
|`KC_OPER` | |Oper | | | |
|
||||
|`KC_CLEAR_AGAIN` | |Clear/Again | | | |
|
||||
|`KC_CRSEL` | |CrSel/Props | | | |
|
||||
|`KC_EXSEL` | |ExSel | | | |
|
||||
|`KC_LCTRL` |`KC_LCTL` |左 Control |✔ |✔ |✔ |
|
||||
|`KC_LSHIFT` |`KC_LSFT` |左 Shift |✔ |✔ |✔ |
|
||||
|`KC_LALT` |`KC_LOPT` |左 Alt (Option) |✔ |✔ |✔ |
|
||||
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN` |左 GUI (Windows/Command/Meta key) |✔ |✔ |✔ |
|
||||
|`KC_RCTRL` |`KC_RCTL` |右 Control |✔ |✔ |✔ |
|
||||
|`KC_RSHIFT` |`KC_RSFT` |右 Shift |✔ |✔ |✔ |
|
||||
|`KC_RALT` |`KC_ROPT`, `KC_ALGR` |右 Alt (Option/AltGr) |✔ |✔ |✔ |
|
||||
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN` |右 GUI (Windows/Command/Meta key) |✔ |✔ |✔ |
|
||||
|`KC_SYSTEM_POWER` |`KC_PWR` |システム電源オフ |✔ |✔<sup>3</sup>|✔ |
|
||||
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |システムスリープ |✔ |✔<sup>3</sup>|✔ |
|
||||
|`KC_SYSTEM_WAKE` |`KC_WAKE` |システムスリープ解除 | |✔<sup>3</sup>|✔ |
|
||||
|`KC_AUDIO_MUTE` |`KC_MUTE` |ミュート |✔ |✔ |✔ |
|
||||
|`KC_AUDIO_VOL_UP` |`KC_VOLU` |音量アップ |✔ |✔<sup>4</sup>|✔ |
|
||||
|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |音量ダウン |✔ |✔<sup>4</sup>|✔ |
|
||||
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |次の曲へ |✔ |✔<sup>5</sup>|✔ |
|
||||
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |前の曲へ |✔ |✔<sup>5</sup>|✔ |
|
||||
|`KC_MEDIA_STOP` |`KC_MSTP` |再生停止 |✔ | |✔ |
|
||||
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |再生/一時停止 |✔ |✔ |✔ |
|
||||
|`KC_MEDIA_SELECT` |`KC_MSEL` |Media Player 起動 |✔ | |✔ |
|
||||
|`KC_MEDIA_EJECT` |`KC_EJCT` |イジェクト | |✔ |✔ |
|
||||
|`KC_MAIL` | |メール起動 |✔ | |✔ |
|
||||
|`KC_CALCULATOR` |`KC_CALC` |電卓起動 |✔ | |✔ |
|
||||
|`KC_MY_COMPUTER` |`KC_MYCM` |マイコンピュータを開く |✔ | |✔ |
|
||||
|`KC_WWW_SEARCH` |`KC_WSCH` |ブラウザ検索 |✔ | |✔ |
|
||||
|`KC_WWW_HOME` |`KC_WHOM` |ブラウザホーム画面 |✔ | |✔ |
|
||||
|`KC_WWW_BACK` |`KC_WBAK` |ブラウザ戻る |✔ | |✔ |
|
||||
|`KC_WWW_FORWARD` |`KC_WFWD` |ブラウザ進む |✔ | |✔ |
|
||||
|`KC_WWW_STOP` |`KC_WSTP` |ブラウザ読み込み中止 |✔ | |✔ |
|
||||
|`KC_WWW_REFRESH` |`KC_WREF` |ブラウザ再読み込み |✔ | |✔ |
|
||||
|`KC_WWW_FAVORITES` |`KC_WFAV` |ブラウザお気に入り |✔ | |✔ |
|
||||
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |次の曲へ |✔ |✔<sup>5</sup>|✔ |
|
||||
|`KC_MEDIA_REWIND` |`KC_MRWD` |前の曲へ |✔<sup>6</sup>|✔<sup>5</sup>|✔ |
|
||||
|`KC_BRIGHTNESS_UP` |`KC_BRIU` |画面の明るさアップ |✔ |✔ |✔ |
|
||||
|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |画面の明るさダウン |✔ |✔ |✔ |
|
||||
|
||||
<sup>1. Linux カーネル HID ドライバは [ほぼ全てのキーコード](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c) を識別しますが、デフォルトの関連付けは デスクトップ環境/ウィンドウマネージャによって決まります。</sup><br/>
|
||||
<sup>2. F13-F15 として取り扱われます。</sup><br/>
|
||||
<sup>3. 約3秒間押していると、プロンプトが表示されます。</sup><br/>
|
||||
<sup>4. Shift と Option を押していると、ボリュームレベルの細かいコントロールが可能になります。</sup><br/>
|
||||
<sup>5. iTunes では、タップすると1曲全体がスキップされます。押していると曲の中で早送り/巻き戻しになります。</sup><br/>
|
||||
<sup>6. Windows Media Player は巻き戻しキーを識別しませんが、VLC では早送り/巻き戻しキーで再生速度が変更されます。</sup>
|
||||
|
||||
## Quantum キーコード :id=quantum-keycodes
|
||||
|
||||
[Quantum キーコード](ja/quantum_keycodes.md#qmk-keycodes) も見てください。
|
||||
|
||||
|キー |エイリアス |説明 |
|
||||
|--------------|-----------|---------------------------------------------------------|
|
||||
|`RESET` | |ファームウエア書き込みのためにキーボードをブートローダーモードにします |
|
||||
|`DEBUG` | |デバッグモードを切り替えます |
|
||||
|`EEPROM_RESET`|`EEP_RST` |キーボードの EEPROM (不揮発メモリ) を再初期化します |
|
||||
|
||||
## オーディオキー :id=audio-keys
|
||||
|
||||
[オーディオ](ja/feature_audio.md) も見てください。
|
||||
|
||||
|キー |エイリアス |説明 |
|
||||
|----------------|------------|---------------------------------------|
|
||||
|`AU_ON` | |オーディオモードオン |
|
||||
|`AU_OFF` | |オーディオモードオフ |
|
||||
|`AU_TOG` | |オーディオモードを切り替えます |
|
||||
|`CLICKY_TOGGLE` |`CK_TOGG` |オーディオクリックモードを切り替えます |
|
||||
|`CLICKY_UP` |`CK_UP` |クリック音の周波数を増やします |
|
||||
|`CLICKY_DOWN` |`CK_DOWN` |クリック音の周波数を減らします |
|
||||
|`CLICKY_RESET` |`CK_RST` |周波数をデフォルトに再設定します |
|
||||
|`MU_ON` | |音楽モードをオンにします |
|
||||
|`MU_OFF` | |音楽モードをオフにします |
|
||||
|`MU_TOG` | |音楽モードを切り替えます |
|
||||
|`MU_MOD` | |音楽モードを循環します |
|
||||
|
||||
## バックライト :id=backlighting
|
||||
|
||||
[バックライト](ja/feature_backlight.md) も見てください。
|
||||
|
||||
|キー |説明 |
|
||||
|---------|-------------------------------------|
|
||||
|`BL_TOGG`|バックライトをオンあるいはオフにする |
|
||||
|`BL_STEP`|バックライトレベルを循環する |
|
||||
|`BL_ON` |バックライトを最大輝度にセットする |
|
||||
|`BL_OFF` |バックライトをオフにする |
|
||||
|`BL_INC` |バックライトのレベルを上げる |
|
||||
|`BL_DEC` |バックライトのレベルを下げる |
|
||||
|`BL_BRTG`|バックライトの明滅動作を切り替える |
|
||||
|
||||
## ブートマジック :id=bootmagic
|
||||
|
||||
[ブートマジック](ja/feature_bootmagic.md) も見てください。
|
||||
|
||||
| キー | エイリアス| 説明 |
|
||||
|------------------------------------|-----------|-------------------------------------------------------|
|
||||
| `MAGIC_SWAP_CONTROL_CAPSLOCK` | `CL_SWAP` | Caps Lock と左 Control の入れ替え |
|
||||
| `MAGIC_UNSWAP_CONTROL_CAPSLOCK` | `CL_NORM` | Caps Lock と左 Control の入れ替えの解除 |
|
||||
| `MAGIC_CAPSLOCK_TO_CONTROL` | `CL_CTRL` | Caps Lock を Control として扱う |
|
||||
| `MAGIC_UNCAPSLOCK_TO_CONTROL` | `CL_CAPS` | Caps Lock を Control として扱うことを止める |
|
||||
| `MAGIC_SWAP_LCTL_LGUI` | `LCG_SWP` | 左 Control と GUI の入れ替え |
|
||||
| `MAGIC_UNSWAP_LCTL_LGUI` | `LCG_NRM` | 左 Control と GUI の入れ替えを解除 |
|
||||
| `MAGIC_SWAP_RCTL_RGUI` | `RCG_SWP` | 右 Control と GUI の入れ替え |
|
||||
| `MAGIC_UNSWAP_RCTL_RGUI` | `RCG_NRM` | 右 Control と GUI の入れ替えを解除 |
|
||||
| `MAGIC_SWAP_CTL_GUI` | `CG_SWAP` | 両側の Control と GUI の入れ替え |
|
||||
| `MAGIC_UNSWAP_CTL_GUI` | `CG_NORM` | 両側の Control と GUI の入れ替えを解除 |
|
||||
| `MAGIC_TOGGLE_CTL_GUI` | `CG_TOGG` | 両側の Control と GUI の入れ替えの切り替え |
|
||||
| `MAGIC_SWAP_LALT_LGUI` | `LAG_SWP` | 左 Alt と GUI の入れ替え |
|
||||
| `MAGIC_UNSWAP_LALT_LGUI` | `LAG_NRM` | 左 Alt と GUI の入れ替えを解除 |
|
||||
| `MAGIC_SWAP_RALT_RGUI` | `RAG_SWP` | 右 Alt と GUI の入れ替え |
|
||||
| `MAGIC_UNSWAP_RALT_RGUI` | `RAG_NRM` | 右 Alt と GUI の入れ替えを解除 |
|
||||
| `MAGIC_SWAP_ALT_GUI` | `AG_SWAP` | 両側の Alt と GUI の入れ替え |
|
||||
| `MAGIC_UNSWAP_ALT_GUI` | `AG_NORM` | 両側の Alt と GUI の入れ替えを解除 |
|
||||
| `MAGIC_TOGGLE_ALT_GUI` | `AG_TOGG` | 両側の Alt と GUI の入れ替えの切り替え |
|
||||
| `MAGIC_NO_GUI` | `GUI_OFF` | GUI キーを無効にする |
|
||||
| `MAGIC_UNNO_GUI` | `GUI_ON` | GUI キーを有効にする |
|
||||
| `MAGIC_SWAP_GRAVE_ESC` | `GE_SWAP` | <code>`</code> とエスケープの入れ替え |
|
||||
| `MAGIC_UNSWAP_GRAVE_ESC` | `GE_NORM` | <code>`</code> とエスケープの入れ替えを解除 |
|
||||
| `MAGIC_SWAP_BACKSLASH_BACKSPACE` | `BS_SWAP` | `\` と Backspace を入れ替え |
|
||||
| `MAGIC_UNSWAP_BACKSLASH_BACKSPACE` | `BS_NORM` | `\` と Backspace の入れ替えを解除する |
|
||||
| `MAGIC_HOST_NKRO` | `NK_ON` | N キーロールオーバーを有効にする |
|
||||
| `MAGIC_UNHOST_NKRO` | `NK_OFF` | N キーロールオーバーを無効にする |
|
||||
| `MAGIC_TOGGLE_NKRO` | `NK_TOGG` | N キーロールオーバーの有効・無効を切り替え |
|
||||
| `MAGIC_EE_HANDS_LEFT` | `EH_LEFT` | 分割キーボードのマスター側を左手に設定(`EE_HANDS` 用) |
|
||||
| `MAGIC_EE_HANDS_RIGHT` | `EH_RGHT` | 分割キーボードのマスター側を右手に設定(`EE_HANDS` 用) |
|
||||
|
||||
## Bluetooth :id=bluetooth
|
||||
|
||||
[Bluetooth](ja/feature_bluetooth.md) も見てください。
|
||||
|
||||
|
||||
|キー |説明 |
|
||||
|----------|--------------------------------------|
|
||||
|`OUT_AUTO`|USB と Bluetooth を自動的に切り替える |
|
||||
|`OUT_USB` |USB のみ |
|
||||
|`OUT_BT` |Bluetooth のみ |
|
||||
|
||||
## 動的マクロ :id=dynamic-macros
|
||||
|
||||
[動的マクロ](ja/feature_dynamic_macros.md) も見てください。
|
||||
|
||||
|キー |エイリアス |説明 |
|
||||
|-----------------|---------|-------------------------------------|
|
||||
|`DYN_REC_START1` |`DM_REC1`|マクロ 1 の記録を開始します |
|
||||
|`DYN_REC_START2` |`DM_REC2`|マクロ 2 の記録を開始します |
|
||||
|`DYN_MACRO_PLAY1`|`DM_PLY1`|マクロ 1 を再生します |
|
||||
|`DYN_MACRO_PLAY2`|`DM_PLY2`|マクロ 2 を再生します |
|
||||
|`DYN_REC_STOP` |`DM_RSTP`|現在記録中のマクロの記録を終了します |
|
||||
|
||||
## グレイブエスケープ :id=grave-escape
|
||||
|
||||
[グレイブエスケープ](ja/feature_grave_esc.md) も見てください。
|
||||
|
||||
|キー |エイリアス |説明 |
|
||||
|-----------|---------|------------------------------------------------------------------|
|
||||
|`GRAVE_ESC`|`KC_GESC`|押された場合に Escape。Shift あるいは GUI が押されたままの場合は <code>`</code>|
|
||||
|
||||
## キーロック :id=key-lock
|
||||
|
||||
[キーロック](ja/feature_key_lock.md) も見てください。
|
||||
|
||||
|キー |説明 |
|
||||
|---------|--------------------------------------------------|
|
||||
|`KC_LOCK`|キーが再び押されるまで次のキーを押したままにします |
|
||||
|
||||
## レイヤー切り替え :id=layer-switching
|
||||
|
||||
[レイヤー切り替え](ja/feature_layers.md#switching-and-toggling-layers) も見てください。
|
||||
|
||||
|キー |説明 |
|
||||
|----------------|--------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|`DF(layer)` |指定されたレイヤーを基本 (デフォルト) レイヤーに設定する |
|
||||
|`MO(layer)` |キーを押したら一時的に `layer` を切り替える。(切り替え先のレイヤーには `KC_TRNS` が必要です) |
|
||||
|`OSL(layer)` |次のキーが押されるまで、一時的にレイヤーをアクティブにします。詳細は [ワンショットキー](ja/one_shot_keys.md) のとおり。 |
|
||||
|`LM(layer, mod)`|`mod` がアクティブな状態で (MO のように) 一時的にレイヤーをアクティブにします。ここでは、`mod` は mods_bit のことです。Mod については [こちら](ja/mod_tap.md) で見ることができます。実装例: `LM(LAYER_1, MOD_LALT)` |
|
||||
|`LT(layer, kc)` |押していると `layer` をオンにし、タップすると `kc` になります。 |
|
||||
|`TG(layer)` |`layer` のオン・オフを切り替え |
|
||||
|`TO(layer)` |`layer` をオンにして、デフォルトレイヤーを除く他のレイヤーをオフにします。 |
|
||||
|`TT(layer)` |複数回タップしない限り `MO` のように動作し、複数回タップすると `layer` をオンにトグルします。 |
|
||||
|
||||
## リーダーキー :id=leader-key
|
||||
|
||||
[リーダーキー](ja/feature_leader_key.md) も見てください。
|
||||
|
||||
|キー |説明 |
|
||||
|---------|-------------------------------|
|
||||
|`KC_LEAD`|リーダーキーのシーケンスを開始 |
|
||||
|
||||
## マウスキー :id=mouse-keys
|
||||
|
||||
[マウスキー](ja/feature_mouse_keys.md) も見てください。
|
||||
|
||||
|キー |エイリアス |説明 |
|
||||
|----------------|---------|-------------------------|
|
||||
|`KC_MS_UP` |`KC_MS_U`|マウスカーソルを上に移動 |
|
||||
|`KC_MS_DOWN` |`KC_MS_D`|マウスカーソルを下に移動 |
|
||||
|`KC_MS_LEFT` |`KC_MS_L`|マウスカーソルを左に移動 |
|
||||
|`KC_MS_RIGHT` |`KC_MS_R`|マウスカーソルを右に移動 |
|
||||
|`KC_MS_BTN1` |`KC_BTN1`|ボタン1を押す |
|
||||
|`KC_MS_BTN2` |`KC_BTN2`|ボタン2を押す |
|
||||
|`KC_MS_BTN3` |`KC_BTN3`|ボタン3を押す |
|
||||
|`KC_MS_BTN4` |`KC_BTN4`|ボタン4を押す |
|
||||
|`KC_MS_BTN5` |`KC_BTN5`|ボタン5を押す |
|
||||
|`KC_MS_WH_UP` |`KC_WH_U`|ホイールを向こう側に回転 |
|
||||
|`KC_MS_WH_DOWN` |`KC_WH_D`|ホイールを手前側に回転 |
|
||||
|`KC_MS_WH_LEFT` |`KC_WH_L`|ホイールを左に倒す |
|
||||
|`KC_MS_WH_RIGHT`|`KC_WH_R`|ホイールを右に倒す |
|
||||
|`KC_MS_ACCEL0` |`KC_ACL0`|速度を0に設定 |
|
||||
|`KC_MS_ACCEL1` |`KC_ACL1`|速度を1に設定 |
|
||||
|`KC_MS_ACCEL2` |`KC_ACL2`|速度を2に設定 |
|
||||
|
||||
## 修飾キー :id=modifiers
|
||||
|
||||
[修飾キー](ja/feature_advanced_keycodes.md#modifier-keys) も見てください。
|
||||
|
||||
| キー | エイリアス | 説明 |
|
||||
|------------|---------------------------------|---------------------------------------------------------------|
|
||||
| `LCTL(kc)` | `C(kc)` | 左 Control を押しながら `kc` を押します。 |
|
||||
| `LSFT(kc)` | `S(kc)` | 左 Shift を押しながら `kc` を押します。 |
|
||||
| `LALT(kc)` | `A(kc)`, `LOPT(kc)` | 左 Alt を押しながら `kc`を押します。 |
|
||||
| `LGUI(kc)` | `G(kc)`, `LCMD(kc)`, `LWIN(kc)` | 左 GUI を押しながら `kc` を押します。 |
|
||||
| `RCTL(kc)` | | 右 Control を押しながら `kc` を押します。 |
|
||||
| `RSFT(kc)` | | 右 Shift を押しながら `kc` を押します。 |
|
||||
| `RALT(kc)` | `ROPT(kc)`, `ALGR(kc)` | 右 Alt (AltGr) を押しながら `kc` を押します。 |
|
||||
| `RGUI(kc)` | `RCMD(kc)`, `LWIN(kc)` | 右 GUI を押しながら `kc` を押します。 |
|
||||
| `SGUI(kc)` | `SCMD(kc)`, `SWIN(kc)` | 左 Shift と GUI を押しながら `kc` を押します。 |
|
||||
| `LCA(kc)` | | 左 Control と Alt を押しながら `kc` を押します。 |
|
||||
| `LSA(kc)` | | 左 Shift と Alt を押しながら `kc` を押します。 |
|
||||
| `RSA(kc)` |`SAGR(kc)` | 右 Shift と Alt (AltGr) を押しながら `kc` を押します。 |
|
||||
| `RCS(kc)` | | 右 Control と Shift を押しながら `kc` を押します。 |
|
||||
| `LCAG(kc)` | | 左 Control、Alt、GUI を押しながら `kc` を押します。 |
|
||||
| `MEH(kc)` | | 左 Control、Shift、Alt を押しながら `kc` を押します。 |
|
||||
| `HYPR(kc)` | | 左 Control、Shift、Alt、GUI を押しながら `kc` を押します。 |
|
||||
| `KC_MEH` | | 左 Control、Shift、Alt |
|
||||
| `KC_HYPR` | | 左 Control、Shift、Alt、GUI |
|
||||
|
||||
|
||||
## モッドタップキー :id=mod-tap-keys
|
||||
|
||||
[モッドタップキー](ja/mod_tap.md) も見てください。
|
||||
|
||||
|キー |エイリアス | 説明 |
|
||||
|--------------|-------------------------------------------------------------------|------------------------------------------------------------------------|
|
||||
| `MT(mod, kc)`| |押したままの場合は `mod` 、タップした場合は `kc` |
|
||||
| `LCTL_T(kc)` | `CTL_T(kc)` | 押したままの場合は左 Control、タップした場合は `kc` |
|
||||
| `LSFT_T(kc)` | `SFT_T(kc)` | 押したままの場合は左 Shift、タップした場合は `kc` |
|
||||
| `LALT_T(kc)` | `LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` | 押したままの場合は左 Alt、タップした場合は `kc` |
|
||||
| `LGUI_T(kc)` | `LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)` | 押したままの場合は左 GUI、タップした場合は `kc` |
|
||||
| `RCTL_T(kc)` | | 押したままの場合は右 Control、タップした場合は `kc` |
|
||||
| `RSFT_T(kc)` | | 押したままの場合は右 Shift、タップした場合は `kc` |
|
||||
| `RALT_T(kc)` | `ROPT_T(kc)`, `ALGR_T(kc)` | 押したままの場合は右 Alt (AltGr) 、タップした場合は `kc` |
|
||||
| `RGUI_T(kc)` | `RCMD_T(kc)`, `RWIN_T(kc)` | 押したままの場合は右 GUI、タップした場合は `kc` |
|
||||
| `SGUI_T(kc)` | `SCMD_T(kc)`, `SWIN_T(kc)` | 押したままの場合は左 Shift と GUI、タップした場合は `kc` |
|
||||
| `LCA_T(kc)` | | 押したままの場合は左 Control と Alt、タップした場合は `kc` |
|
||||
| `LSA_T(kc)` | | 押したままの場合は左 Shift と Alt、タップした場合は `kc` |
|
||||
| `RSA_T(kc)` |`SAGR_T(kc)` | 押したままの場合は右 Shift と Alt (AltGr) 、タップした場合は `kc` |
|
||||
| `RCS_T(kc)` | | 押したままの場合は右 Control と Shift、タップした場合は `kc` |
|
||||
| `LCAG_T(kc)` | | 押したままの場合は左 Control、Alt、GUI、タップした場合は `kc` |
|
||||
| `RCAG_T(kc)` | | 押したままの場合は右 Control、Alt、GUI、タップした場合は `kc` |
|
||||
| `C_S_T(kc)` | | 押したままの場合は左 Control と Shift、タップした場合は `kc` |
|
||||
| `MEH_T(kc)` | | 押したままの場合は左 Control、Shift、Alt、タップした場合は `kc` |
|
||||
| `HYPR_T(kc)` | `ALL_T(kc)` | 押したままの場合は左 Control、Shift、Alt、GUI、タップした場合は `kc` - より詳しくは[ここ](https://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)を見てください |
|
||||
|
||||
## RGB ライト :id=rgb-lighting
|
||||
|
||||
[RGB ライト](ja/feature_rgblight.md) も見てください。
|
||||
|
||||
|キー |エイリアス|説明 |
|
||||
|-------------------|----------|---------------------------------------------------------------------|
|
||||
|`RGB_TOG` | |RGB ライトのオン・オフを切り替え |
|
||||
|`RGB_MODE_FORWARD` |`RGB_MOD` |RGB モードを順送りで変更し、Shift を押していると逆順で変更します。 |
|
||||
|`RGB_MODE_REVERSE` |`RGB_RMOD`|RGB モードを逆順で変更し、Shift を押していると順送りで変更します。 |
|
||||
|`RGB_HUI` | |色相 (HUE) を増加させ、Shift を押していると減少させます。 |
|
||||
|`RGB_HUD` | |色相 (HUE) を減少させ、Shift を押していると増加させます。 |
|
||||
|`RGB_SAI` | |彩度 (SAT) を増加させ、Shift を押していると減少させます。 |
|
||||
|`RGB_SAD` | |彩度 (SAT) を減少させ、Shift を押していると増加させます。 |
|
||||
|`RGB_VAI` | |明度 (VAL/brightness) を増加させ、Shift を押していると減少させます。 |
|
||||
|`RGB_VAD` | |明度 (VAL/brightness) を減少させ、Shift を押していると増加させます。 |
|
||||
|`RGB_MODE_PLAIN` |`RGB_M_P `|静止(動き無し) モードに固定します |
|
||||
|`RGB_MODE_BREATHE` |`RGB_M_B` |明滅アニメーションモード |
|
||||
|`RGB_MODE_RAINBOW` |`RGB_M_R` |レインボーアニメーションモード |
|
||||
|`RGB_MODE_SWIRL` |`RGB_M_SW`|渦巻アニメーションモード |
|
||||
|`RGB_MODE_SNAKE` |`RGB_M_SN`|スネークアニメーションモード |
|
||||
|`RGB_MODE_KNIGHT` |`RGB_M_K` |「ナイトライダー」アニメーションモード |
|
||||
|`RGB_MODE_XMAS` |`RGB_M_X` |クリスマスアニメーションモード |
|
||||
|`RGB_MODE_GRADIENT`|`RGB_M_G` |固定階調アニメーションモード |
|
||||
|`RGB_MODE_RGBTEST` |`RGB_M_T` |赤、緑、青のテストアニメーションモード |
|
||||
|
||||
## RGB マトリックスライト :id=rgb-matrix-lighting
|
||||
|
||||
[RGB マトリックスライト](ja/feature_rgb_matrix.md) も見てください。
|
||||
|
||||
|キー |エイリアス|説明 |
|
||||
|-------------------|----------|--------------------------------------------------------------------------------------------------------|
|
||||
|`RGB_TOG` | |RGB ライトのオン・オフを切り替え |
|
||||
|`RGB_MODE_FORWARD` |`RGB_MOD` |RGB モードを順送りで変更し、Shift を押していると逆順で変更します。 |
|
||||
|`RGB_MODE_REVERSE` |`RGB_RMOD`|RGB モードを逆順で変更し、Shift を押していると順送りで変更します。 |
|
||||
|`RGB_HUI` | |色相 (HUE) を増加させ、Shift を押していると減少させます。 |
|
||||
|`RGB_HUD` | |色相 (HUE) を減少させ、Shift を押していると増加させます。 |
|
||||
|`RGB_SAI` | |彩度 (SAT) を増加させ、Shift を押していると減少させます。 |
|
||||
|`RGB_SAD` | |彩度 (SAT) を減少させ、Shift を押していると増加させます。 |
|
||||
|`RGB_VAI` | |明度 (VAL/brightness) を増加させ、Shift を押していると減少させます。 |
|
||||
|`RGB_VAD` | |明度 (VAL/brightness) を減少させ、Shift を押していると増加させます。 |
|
||||
|`RGB_SPI` | |エフェクトのスピード (EEPROM はまだサポートしていません) を増加させ、Shift を押していると減少させます。 |
|
||||
|`RGB_SPD` | |エフェクトのスピード (EEPROM はまだサポートしていません) を減少させ、Shift を押していると増加させます。 |
|
||||
|
||||
## 感熱式プリンタ :id=thermal-printer
|
||||
|
||||
[感熱式プリンタ](ja/feature_thermal_printer.md) も見てください。
|
||||
|
||||
|キー |説明 |
|
||||
|-----------|---------------------------------|
|
||||
|`PRINT_ON` |ユーザが入力した全ての印刷を開始 |
|
||||
|`PRINT_OFF`|ユーザが入力した全ての印刷を停止 |
|
||||
|
||||
## US ANSI シフト済シンボル :id=us-ansi-shifted-symbols
|
||||
|
||||
[US ANSI シフト済シンボル](ja/keycodes_us_ansi_shifted.md) も見てください。
|
||||
|
||||
|キー |エイリアス |説明|
|
||||
|------------------------|-------------------|-----------|
|
||||
|`KC_TILDE` |`KC_TILD` |`~` |
|
||||
|`KC_EXCLAIM` |`KC_EXLM` |`!` |
|
||||
|`KC_AT` | |`@` |
|
||||
|`KC_HASH` | |`#` |
|
||||
|`KC_DOLLAR` |`KC_DLR` |`$` |
|
||||
|`KC_PERCENT` |`KC_PERC` |`%` |
|
||||
|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` |
|
||||
|`KC_AMPERSAND` |`KC_AMPR` |`&` |
|
||||
|`KC_ASTERISK` |`KC_ASTR` |`*` |
|
||||
|`KC_LEFT_PAREN` |`KC_LPRN` |`(` |
|
||||
|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` |
|
||||
|`KC_UNDERSCORE` |`KC_UNDS` |`_` |
|
||||
|`KC_PLUS` | |`+` |
|
||||
|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` |
|
||||
|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` |
|
||||
|`KC_PIPE` | |`\|` |
|
||||
|`KC_COLON` |`KC_COLN` |`:` |
|
||||
|`KC_DOUBLE_QUOTE` |`KC_DQUO`, `KC_DQT`|`"` |
|
||||
|`KC_LEFT_ANGLE_BRACKET` |`KC_LABK`, `KC_LT` |`<` |
|
||||
|`KC_RIGHT_ANGLE_BRACKET`|`KC_RABK`, `KC_GT` |`>` |
|
||||
|`KC_QUESTION` |`KC_QUES` |`?` |
|
||||
|
||||
## ワンショットキー :id=one-shot-keys
|
||||
|
||||
[ワンショットキー](ja/one_shot_keys.md) も見てください。
|
||||
|
||||
|キー |説明 |
|
||||
|------------|--------------------------------|
|
||||
|`OSM(mod)` | 次のキーが押されるまで、`mod` を押したままにします |
|
||||
|`OSL(layer)`| 次のキーが押されるまで、一時的にレイヤーをアクティブにします |
|
||||
|
||||
## Space Cadet :id=space-cadet
|
||||
|
||||
[Space Cadet](ja/feature_space_cadet.md) も見てください。
|
||||
|
||||
|キー |説明 |
|
||||
|-----------|-------------------------------------------|
|
||||
|`KC_LCPO` |押したままの場合は左 Control、タップした場合は `(` |
|
||||
|`KC_RCPC` |押したままの場合は右 Control、タップした場合は `)` |
|
||||
|`KC_LSPO` |押したままの場合は左 Shift、タップした場合は `(`、 |
|
||||
|`KC_RSPC` |押したままの場合は右 Shift、タップした場合は `)`、 |
|
||||
|`KC_LAPO` |押したままの場合は左 Alt、タップした場合は `(`、 |
|
||||
|`KC_RAPC` |押したままの場合は右 Alt、タップした場合は `)`、 |
|
||||
|`KC_SFTENT`|押したままの場合は右 Shift、タップした場合は Enter |
|
||||
|
||||
## スワップハンド :id=swap-hands
|
||||
|
||||
[スワップハンド](ja/feature_swap_hands.md) も見てください。
|
||||
|
||||
|キー |説明 |
|
||||
|-------------|----------------------------------------------------------------------------------|
|
||||
| `SH_T(key)` | タップで `key` を送信する。押している時に一時的に入れ替え。 |
|
||||
| `SH_ON` | 入れ替えをオンにして、そのままにする。 |
|
||||
| `SH_OFF` | 入れ替えをオフにして、そのままにする。既知の状態に戻るのに適しています。 |
|
||||
| `SH_MON` | 押すとスワップハンドし、放すと通常に戻る (一時的)。 |
|
||||
| `SH_MOFF` | 一時的に入れ替えをオフする。 |
|
||||
| `SH_TG` | キーを押すたびにオンとオフを切り替える。 |
|
||||
| `SH_TT` | タップで切り替える。押している時に一時的に切り替える。 |
|
||||
| `SH_OS` | ワンショットスワップハンド: 押している時あるいは次のキーを押すまで切り替える。 |
|
||||
|
||||
## ユニコードサポート :id=unicode-support
|
||||
|
||||
[ユニコードサポート](ja/feature_unicode.md) も見てください。
|
||||
|
||||
|キー |エイリアス |説明 |
|
||||
|----------------------|-----------|----------------------------------------------------------------------|
|
||||
|`UC(c)` | |コードポイント `c` のユニコードを送信 |
|
||||
|`X(i)` | |`unicode_map` のインデックス `i` のユニコードを送信 |
|
||||
|`XP(i, j)` | |Shift/Capsが有効なら、インデックス `i` または `j` のユニコードを送信 |
|
||||
|`UNICODE_MODE_FORWARD`|`UC_MOD` |ユニコード入力方式を順送りで選択 |
|
||||
|`UNICODE_MODE_REVERSE`|`UC_RMOD` |ユニコード入力方式を逆順で選択 |
|
||||
|`UNICODE_MODE_OSX` |`UC_M_OS` |ユニコード入力方式を macOS 方式に切り替え |
|
||||
|`UNICODE_MODE_LNX` |`UC_M_LN` |ユニコード入力方式を Linux 方式に切り替え |
|
||||
|`UNICODE_MODE_WIN` |`UC_M_WI` |ユニコード入力方式を Windows 方式に切り替え |
|
||||
|`UNICODE_MODE_BSD` |`UC_M_BS` |ユニコード入力方式を BSD 方式に切り替え (実装されていません) |
|
||||
|`UNICODE_MODE_WINC` |`UC_M_WC` |ユニコード入力方式を WinCompose を使う Windows 方式に切り替え |
|
@@ -1,8 +1,8 @@
|
||||
# モッドタップ
|
||||
|
||||
<!---
|
||||
original document: 0.9.34:docs/mod_tap.md
|
||||
git diff 0.9.34 HEAD -- docs/mod_tap.md | cat
|
||||
original document: 0.10.36:docs/mod_tap.md
|
||||
git diff 0.10.36 HEAD -- docs/mod_tap.md | cat
|
||||
-->
|
||||
|
||||
モッドタップキー `MT(mod, kc)` は、押したままの時にモディファイアのように機能し、タップされた時に通常のキーのように振舞います。別の言い方をすると、タップした時に Escape を送信しますが、押したままの時に Control あるいは Shift キーとして機能するキーを持つことができます。
|
||||
@@ -32,23 +32,26 @@ MT(MOD_LCTL | MOD_LSFT, KC_ESC)
|
||||
|
||||
便利なように、QMK はキーマップで一般的な組み合わせをよりコンパクトにするためのモッドタップショートカットを含んでいます:
|
||||
|
||||
| キー | エイリアス | 説明 |
|
||||
|--------------|-----------------------------|-------------------------------------------------------------|
|
||||
| `LCTL_T(kc)` | `CTL_T(kc)` | 押したままの場合は左 Control、タップした場合は `kc` |
|
||||
| `LSFT_T(kc)` | `SFT_T(kc)` | 押したままの場合は左 Shift、タップした場合は `kc` |
|
||||
| `LALT_T(kc)` | `LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` | 押したままの場合は左 Alt、タップした場合は `kc` |
|
||||
| `LGUI_T(kc)` | `LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)` | 押したままの場合は左 GUI、タップした場合は `kc` |
|
||||
| `RCTL_T(kc)` | | 押したままの場合は右 Control、タップした場合は `kc` |
|
||||
| `RSFT_T(kc)` | | 押したままの場合は右 Shift、タップした場合は `kc` |
|
||||
| `RALT_T(kc)` | `ROPT_T(kc)`, `ALGR_T(kc)` | 押したままの場合は右 Alt、タップした場合は `kc` |
|
||||
| `RGUI_T(kc)` | `RCMD_T(kc)`, `RWIN_T(kc)` | 押したままの場合は右 GUI、タップした場合は `kc` |
|
||||
| `SGUI_T(kc)` | `SCMD_T(kc)`, `SWIN_T(kc)` | 押したままの場合は左 Shift と左 GUI、タップした場合は `kc` |
|
||||
| `LCA_T(kc)` | | 押したままの場合は左 Control と左 Alt、タップした場合は `kc` |
|
||||
| `LCAG_T(kc)` | | 押したままの場合は左 Control、左 Alt と左 GUI、タップした場合は `kc` |
|
||||
| `RCAG_T(kc)` | | 押したままの場合は右 Control、右 Alt と右 GUI、タップした場合は `kc` |
|
||||
| `C_S_T(kc)` | | 押したままの場合は左 Control と左 Shift、タップした場合は `kc` |
|
||||
| `MEH_T(kc)` | | 押したままの場合は左 Control、左 Shift と左 Alt、タップした場合は `kc` |
|
||||
| `HYPR_T(kc)` | `ALL_T(kc)` | 押したままの場合は左 Control、左 Shift、左 Alt と左 GUI、タップした場合は `kc` - より詳しくは[ここ](https://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)を見てください |
|
||||
| キー | エイリアス | 説明 |
|
||||
| ------------ | ----------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| `LCTL_T(kc)` | `CTL_T(kc)` | 押したままの場合は左 Control、タップした場合は `kc` |
|
||||
| `LSFT_T(kc)` | `SFT_T(kc)` | 押したままの場合は左 Shift、タップした場合は `kc` |
|
||||
| `LALT_T(kc)` | `LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` | 押したままの場合は左 Alt、タップした場合は `kc` |
|
||||
| `LGUI_T(kc)` | `LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)` | 押したままの場合は左 GUI、タップした場合は `kc` |
|
||||
| `RCTL_T(kc)` | | 押したままの場合は右 Control、タップした場合は `kc` |
|
||||
| `RSFT_T(kc)` | | 押したままの場合は右 Shift、タップした場合は `kc` |
|
||||
| `RALT_T(kc)` | `ROPT_T(kc)`, `ALGR_T(kc)` | 押したままの場合は右 Alt、タップした場合は `kc` |
|
||||
| `RGUI_T(kc)` | `RCMD_T(kc)`, `RWIN_T(kc)` | 押したままの場合は右 GUI、タップした場合は `kc` |
|
||||
| `SGUI_T(kc)` | `SCMD_T(kc)`, `SWIN_T(kc)` | 押したままの場合は左 Shift と左 GUI、タップした場合は `kc` |
|
||||
| `LCA_T(kc)` | | 押したままの場合は左 Control と左 Alt、タップした場合は `kc` |
|
||||
| `LSA_T(kc)` | | 押したままの場合は左 Shift と Alt、タップした場合は `kc` |
|
||||
| `RSA_T(kc)` | `SAGR_T(kc)` | 押したままの場合は右 Shift と Alt (AltGr)、タップした場合は `kc` |
|
||||
| `RCS_T(kc)` | | 押したままの場合は右 Control と Shift、タップした場合は `kc` |
|
||||
| `LCAG_T(kc)` | | 押したままの場合は左 Control、左 Alt と左 GUI、タップした場合は `kc` |
|
||||
| `RCAG_T(kc)` | | 押したままの場合は右 Control、右 Alt と右 GUI、タップした場合は `kc` |
|
||||
| `C_S_T(kc)` | | 押したままの場合は左 Control と左 Shift、タップした場合は `kc` |
|
||||
| `MEH_T(kc)` | | 押したままの場合は左 Control、左 Shift と左 Alt、タップした場合は `kc` |
|
||||
| `HYPR_T(kc)` | `ALL_T(kc)` | 押したままの場合は左 Control、左 Shift、左 Alt と左 GUI、タップした場合は `kc` - より詳しくは[ここ](https://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)を見てください |
|
||||
|
||||
## 注意事項
|
||||
|
||||
@@ -57,3 +60,7 @@ MT(MOD_LCTL | MOD_LSFT, KC_ESC)
|
||||
さらに、Windows でリモートデスクトップ接続を使う場合に、問題が発生する場合があります。これらのコードはシフトを非常に高速に送信するため、リモートデスクトップはコードを見逃すかもしれません。
|
||||
|
||||
これを修正するには、リモートデスクトップ接続を開き、「オプションの表示」を開き、「ローカル リソース」タブを開きます。キーボードセクションで、ドロップダウンを「このコンピューター」に変更します。これにより問題が修正され、キャラクタが正しく動作するようになります。
|
||||
|
||||
## 他のリソース
|
||||
|
||||
モッドタップの動作を調整する追加フラグについては、[タップホールド設定オプション](ja/tap_hold.md)を参照してください。
|
||||
|
@@ -2,13 +2,13 @@
|
||||
|
||||
<!---
|
||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||
original document: 0.9.0:docs/newbs_building_firmware_configurator.md
|
||||
git diff 0.9.0 HEAD -- docs/newbs_building_firmware_configurator.md | cat
|
||||
original document: 0.12.45:docs/newbs_building_firmware_configurator.md
|
||||
git diff 0.12.45 HEAD -- docs/newbs_building_firmware_configurator.md | cat
|
||||
-->
|
||||
|
||||
[](https://config.qmk.fm/)
|
||||
|
||||
[QMK Configurator](https://config.qmk.fm) は、QMKファームウェアの hex ファイルを生成するオンライングラフィカルユーザーインターフェイスです。
|
||||
[QMK Configurator](https://config.qmk.fm) は、QMKファームウェアの `.hex` や `.bin` ファイルを生成するオンライングラフィカルユーザーインターフェイスです。
|
||||
|
||||
[ビデオチュートリアル](https://www.youtube.com/watch?v=-imgglzDMdY) を見てください。
|
||||
多くの人は、それが自分のキーボードのプログラミングを始めるのに十分な情報であることに気づくでしょう。
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# ワンショットキー
|
||||
|
||||
<!---
|
||||
original document: 0.9.34:docs/one_shot_keys.md
|
||||
git diff 0.9.34 HEAD -- docs/one_shot_keys.md | cat
|
||||
original document: 0.12.41:docs/one_shot_keys.md
|
||||
git diff 0.12.41 HEAD -- docs/one_shot_keys.md | cat
|
||||
-->
|
||||
|
||||
ワンショットキーは次のキーが押されるまでアクティブのままになり、そのあと放されるキーです。これにより一度に1つ以上のキーを押すことなく、キーボードの組み合わせを入力することができます。これらのキーは通常「スティッキーキー」あるいは「デッドキー」と呼ばれます。
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
ワンショットレイヤーについては、キーを押した時に `set_oneshot_layer(LAYER, ONESHOT_START)` を呼び出し、キーを放した時に `clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED)` を呼び出す必要があります。ワンショットをキャンセルする場合は、`reset_oneshot_layer()` を呼び出してください。
|
||||
|
||||
ワンショットモッドについては、設定するためには `set_oneshot_mods(MOD)` を呼び出し、キャンセルするためには `clear_oneshot_mods()` を呼び出す必要があります。
|
||||
ワンショットモッドについては、設定するためには `set_oneshot_mods(MOD_BIT(KC_*))` を呼び出し、キャンセルするためには `clear_oneshot_mods()` を呼び出す必要があります。
|
||||
|
||||
!> リモートデスクトップ接続で OSM 変換に問題がある場合は、設定を開いて「ローカル リソース」タブに移動し、キーボードセクションでドロップダウンを「このコンピューター」に変更することで修正することができます。これにより問題が修正され、OSM がリモートデスクトップ上で適切に動作するようになります。
|
||||
|
||||
|
@@ -51,6 +51,7 @@ Proton C には1つのオンボード LED(C13)しかなく、デフォルトで
|
||||
|
||||
```
|
||||
MCU = STM32F303
|
||||
BOARD = QMK_PROTON_C
|
||||
```
|
||||
|
||||
次の変数が存在する場合は削除します。
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# キーボードをより良くするための便利なコア関数のリスト
|
||||
|
||||
<!---
|
||||
original document: 0.10.33:docs/ref_functions.md
|
||||
git diff 0.10.33 HEAD -- docs/ref_functions.md | cat
|
||||
original document: 0.12.41:docs/ref_functions.md
|
||||
git diff 0.12.41 HEAD -- docs/ref_functions.md | cat
|
||||
-->
|
||||
|
||||
QMK には、信じられないほど便利な、またはあなたが望んでいた機能を少し追加する、隠された関数がたくさんあります。特定の機能に固有の関数はそれぞれの機能のページにあるため、ここには含まれていません。
|
||||
@@ -98,7 +98,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
|
||||
## EEPROM (永続ストレージ)の消去
|
||||
|
||||
オーディオ、RGB アンダーグロー、バックライト、キーの動作に問題がある場合は、EEPROM (永続的な設定のストレージ)をリセットすることができます。ブートマジックはこれを行う方法の1つですが、有効になっていない場合はカスタムマクロを使って行うことができます。
|
||||
オーディオ、RGB アンダーグロー、バックライト、キーの動作に問題がある場合は、EEPROM (永続的な設定のストレージ)をリセットすることができます。EEPROM を強制的にリセットするには、[`EEP_RST` キーコード](ja/quantum_keycodes.md)あるいは[ブートマジック](ja/feature_bootmagic.md)機能を使います。それらのいずれも選択肢にない場合は、カスタムマクロを使って行うことができます。
|
||||
|
||||
EEPROM を消去するには、関数またはマクロから `eeconfig_init()` を実行し、ほとんどの設定をデフォルトにリセットします。
|
||||
|
||||
|
@@ -147,7 +147,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* [`bool process_haptic(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/2cee371bf125a6ec541dd7c5a809573facc7c456/drivers/haptic/haptic.c#L216)
|
||||
* [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/card.c#L20)
|
||||
* [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/keymaps/default/keymap.c#L58)
|
||||
* [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/rgb_matrix.c#L139)
|
||||
* [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_midi.c#L81)
|
||||
* [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_audio.c#L19)
|
||||
* [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_steno.c#L160)
|
||||
|
@@ -516,6 +516,9 @@ See also: [One Shot Keys](one_shot_keys.md)
|
||||
|------------|----------------------------------|
|
||||
|`OSM(mod)` |Hold `mod` for one keypress |
|
||||
|`OSL(layer)`|Switch to `layer` for one keypress|
|
||||
|`OS_ON` |Turns One Shot keys on |
|
||||
|`OS_OFF` |Turns One Shot keys off |
|
||||
|`OS_TOGG` |Toggles One Shot keys status |
|
||||
|
||||
## Space Cadet :id=space-cadet
|
||||
|
||||
|
@@ -50,11 +50,13 @@ For convenience, QMK includes some Mod-Tap shortcuts to make common combinations
|
||||
|
||||
## Caveats
|
||||
|
||||
Unfortunately, these keycodes cannot be used in Mod-Taps or Layer-Taps, since any modifiers specified in the keycode are ignored.
|
||||
Currently, the `kc` argument of `MT()` is limited to the [Basic Keycode set](keycodes_basic.md), 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 3 bits are used for the function identifier, 1 bit for selecting right or left mods, and 4 bits to tell which mods are used, leaving only 8 bits for the keycode. Additionally, if at least one right-handed modifier is specified in a Mod-Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two - for example, Left Control and Right Shift would become Right Control and Right Shift.
|
||||
|
||||
Additionally, you may run into issues when using Remote Desktop Connection on Windows. Because these codes send shift very fast, Remote Desktop may miss the codes.
|
||||
Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
||||
|
||||
To fix this, open Remote Desktop Connection, click on "Show Options", open the the "Local Resources" tab. In the keyboard section, change the drop down to "On this Computer". This will fix the issue, and allow the characters to work correctly.
|
||||
You may also run into issues when using Remote Desktop Connection on Windows. Because these keycodes send key events faster than a human, Remote Desktop could miss them.
|
||||
To fix this, open Remote Desktop Connection, click on "Show Options", open the the "Local Resources" tab, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue, and allow the characters to work correctly.
|
||||
It can also be mitigated by increasing [`TAP_CODE_DELAY`](config_options.md#behaviors-that-can-be-configured).
|
||||
|
||||
## Other Resources
|
||||
|
||||
|
@@ -65,7 +65,7 @@ For example, the `planck/rev5` with a `default` keymap will have this filename:
|
||||
planck_rev5_default.hex
|
||||
```
|
||||
|
||||
Once you have located your firmware file drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored.
|
||||
Once you have located your firmware file, drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored.
|
||||
|
||||
### Flash Your Keyboard
|
||||
|
||||
|
@@ -70,6 +70,8 @@ Install the QMK CLI by running:
|
||||
|
||||
### ** Linux/WSL **
|
||||
|
||||
?> **Note for WSL users**: By default, the installation process will clone the QMK repository into your WSL home directory, but if you have cloned manually, ensure that it is located inside the WSL instance instead of the Windows filesystem (ie. not in `/mnt`), as accessing it is currently [extremely slow](https://github.com/microsoft/WSL/issues/4197).
|
||||
|
||||
#### Prerequisites
|
||||
|
||||
You will need to install Git and Python. It's very likely that you already have both, but if not, one of the following commands should install them:
|
||||
@@ -102,19 +104,13 @@ You can also try the `qmk-git` package from AUR:
|
||||
|
||||
### ** FreeBSD **
|
||||
|
||||
#### Prerequisites
|
||||
|
||||
You will need to install Git and Python. It's possible that you already have both, but if not, run the following commands to install them:
|
||||
|
||||
pkg install git python3
|
||||
|
||||
Make sure that `$HOME/.local/bin` is added to your `$PATH` so that locally installed Python packages are available.
|
||||
|
||||
#### Installation
|
||||
|
||||
Install the QMK CLI by running:
|
||||
Install the FreeBSD package for QMK CLI by running:
|
||||
|
||||
python3 -m pip install --user qmk
|
||||
pkg install -g "py*-qmk"
|
||||
|
||||
NOTE: remember to follow the instructions printed at the end of installation (use `pkg info -Dg "py*-qmk"` to show them again).
|
||||
|
||||
<!-- tabs:end -->
|
||||
|
||||
@@ -160,17 +156,11 @@ After installing QMK you can set it up with this command:
|
||||
|
||||
In most situations you will want to answer `y` to all of the prompts.
|
||||
|
||||
?>**Note on FreeBSD**:
|
||||
It is suggested to run `qmk setup` as a non-`root` user to start with, but this will likely identify packages that need to be installed to your
|
||||
base system using `pkg`. However the installation will probably fail when run as an unprivileged user.
|
||||
To manually install the base dependencies, run `./util/qmk_install.sh` either as `root`, or with `sudo`.
|
||||
Once that completes, re-run `qmk setup` to complete the setup and checks.
|
||||
|
||||
<!-- tabs:end -->
|
||||
|
||||
?> The qmk home folder can be specified at setup with `qmk setup -H <path>`, and modified afterwards using the [cli configuration](cli_configuration.md?id=single-key-example) and the variable `user.qmk_home`. For all available options run `qmk setup --help`.
|
||||
|
||||
?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create your own fork and use `qmk setup <github_username>/qmk_firmware` to clone your personal fork. If you don't know what that means you can safely ignore this message.
|
||||
?> If you already know how to use GitHub, [we recommend that you follow these instructions](getting_started_github.md) and use `qmk setup <github_username>/qmk_firmware` to clone your personal fork. If you don't know what that means you can safely ignore this message.
|
||||
|
||||
## 4. Test Your Build Environment
|
||||
|
||||
|
@@ -17,6 +17,9 @@ You can control the behavior of one shot keys by defining these in `config.h`:
|
||||
|
||||
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](mod_tap.md), not the `KC_*` codes.
|
||||
* `OSL(layer)` - momentary switch to *layer*.
|
||||
* `OS_ON` - Turns on One Shot keys.
|
||||
* `OS_OFF` - Turns off One Shot keys. OSM act as regular mod keys, OSL act like `MO`.
|
||||
* `ON_TOGG` - Toggles the one shot key status.
|
||||
|
||||
Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
|
||||
|
||||
|
@@ -50,7 +50,7 @@ This is the most important plugin as it will allow Eclipse to _understand_ AVR C
|
||||
### [ANSI Escape in Console](https://marketplace.eclipse.org/content/ansi-escape-console)
|
||||
This plugin is necessary to properly display the colored build output generated by the QMK makefile.
|
||||
|
||||
1. Open <kbd><kbd>Help</kbd> > <kbd>Eclipse Marketplace…</kbd></kbd>
|
||||
1. Open <kbd>Help</kbd> > <kbd>Eclipse Marketplace…</kbd>
|
||||
2. Search for _ANSI Escape in Console_
|
||||
3. Click the <samp>Install</samp> button of the plugin
|
||||
4. Follow the instructions and agree again with the security warning for unsigned content.
|
||||
@@ -59,7 +59,7 @@ Once both plugins are installed, restart Eclipse as prompted.
|
||||
|
||||
# Configure Eclipse for QMK
|
||||
## Importing the Project
|
||||
1. Click <kbd><kbd>File</kbd> > <kbd>New</kbd> > <kbd>Makefile Project with Existing Code</kbd></kbd>
|
||||
1. Click <kbd>File</kbd> > <kbd>New</kbd> > <kbd>Makefile Project with Existing Code</kbd>
|
||||
2. On the next screen:
|
||||
* Select the directory where you cloned the repository as _Existing Code Location_;
|
||||
* (Optional) Give a different name to the project¹, e.g. _QMK_ or _Quantum_;
|
||||
@@ -73,16 +73,18 @@ Once both plugins are installed, restart Eclipse as prompted.
|
||||
¹ There might be issues for importing the project with a custom name. If it does not work properly, try leaving the default project name (i.e. the name of the directory, probably `qmk_firmware`).
|
||||
|
||||
## Build Your Keyboard
|
||||
We will now configure a make target that cleans the project and builds the keymap of your choice.
|
||||
|
||||
1. On the right side of the screen, select the <kbd>Make Target</kbd> tab
|
||||
2. Expand the folder structure to the keyboard of your choice, e.g. `qmk_firmware/keyboards/ergodox`
|
||||
3. Right-click on the keyboard folder and select <kbd>New…</kbd> (or select the folder and click the <kbd>New Make Target</kbd> icon above the tree)
|
||||
4. Choose a name for your build target, e.g. _clean \<your keymap\>_
|
||||
5. Make Target: this is the arguments that you give to `make` when building from the command line. If your target name does not match these arguments, uncheck <kbd>Same as target name</kbd> and input the correct arguments, e.g. `clean <your keymap>`
|
||||
6. Leave the other options checked and click <kbd>OK</kbd>. Your make target will now appear under the selected keyboard.
|
||||
7. (Optional) Toggle the <kbd>Hide Empty Folders</kbd> icon button above the targets tree to only show your build target.
|
||||
8. Double-click the build target you created to trigger a build.
|
||||
9. Select the <kbd>Console</kbd> view at the bottom to view the running build.
|
||||
We will now change the default make target of the the project from `all` to the
|
||||
specific keyboard and keymap combination we are working on,
|
||||
e.g. `kinesis/kint36:stapelberg`. This way, project-wide actions like cleaning
|
||||
and building the project will complete quickly, instead of taking a long time or
|
||||
outright locking up Eclipse.
|
||||
|
||||
1. Focus an editor tab within the project
|
||||
2. Open the `Project` > `Properties` window, then select the `C/C++ Build` list
|
||||
entry and switch to the `Behavior` tab.
|
||||
3. Change the default `Make build target` text fields for all enabled builds
|
||||
from `all` to e.g. `kinesis/kint41:stapelberg`.
|
||||
4. Verify your setup works by selecting `Project` > `Clean...`.
|
||||
|
||||
[1]: https://en.wikipedia.org/wiki/Eclipse_(software)
|
||||
|
@@ -68,6 +68,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
|
||||
- bare minimum required code for a board to boot into QMK should be present
|
||||
- initialisation code for the matrix and critical devices
|
||||
- mirroring existing functionality of a commercial board (like custom keycodes and special animations etc.) should be handled through non-`default` keymaps
|
||||
- VIAL-related files or changes will not be accepted, as they are not used by QMK firmware (no VIAL-specific core code has been submitted or merged)
|
||||
- `keyboard.c`
|
||||
- empty `xxxx_xxxx_kb()` or other weak-defined default implemented functions removed
|
||||
- commented-out functions removed too
|
||||
@@ -94,6 +95,8 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
|
||||
- standard layouts preferred in these keymaps, if possible
|
||||
- submitters can have a personal (or bells-and-whistles) keymap showcasing capabilities in the same PR but it shouldn't be embedded in the 'default' keymap
|
||||
- submitters can also have a "manufacturer-matching" keymap that mirrors existing functionality of the commercial product, if porting an existing board
|
||||
- Do not include VIA json files in the PR. These do not belong in the QMK repository as they are not used by QMK firmware -- they belong in the [VIA Keyboard Repo](https://github.com/the-via/keyboards)
|
||||
|
||||
|
||||
Also, specific to ChibiOS:
|
||||
- **strong** preference to using existing ChibiOS board definitions.
|
||||
@@ -127,3 +130,9 @@ There are instructions on how to keep your fork updated here:
|
||||
|
||||
Thanks for contributing!
|
||||
```
|
||||
|
||||
## Review Process
|
||||
|
||||
In general, we want to see two (or more) approvals that are meaningful (e.g. that have inspected code) before a PR will be considered for merge. These reviews are not limited to collaborators -- any community member willing to put in the time is welcomed (and encouraged). The only difference is that your checkmark won't be green, and that's fine!
|
||||
|
||||
Additionally, PR reviews are something that is done in our free time. We are not paid nor compensated for the time we spend reviewing, as it is a labor of love. As such, this means that it can take time for us to get to your Pull Request. Things like family, or life can get in the way of us getting to PRs, and burnout is a serious concern. The QMK firmware repository averages 200 PRs opened and 200 PRs merged every month, so please have patience.
|
||||
|
@@ -44,6 +44,7 @@ To use the Proton C natively, without having to specify `CTPC=yes`, you need to
|
||||
|
||||
```
|
||||
MCU = STM32F303
|
||||
BOARD = QMK_PROTON_C
|
||||
```
|
||||
|
||||
Remove these variables if they exist:
|
||||
|
@@ -93,7 +93,7 @@ And to do so, add `reset_keyboard()` to your function or macro, and this will re
|
||||
|
||||
## Wiping the EEPROM (Persistent Storage)
|
||||
|
||||
If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). Bootmagic is one way to do this, but if that isn't enabled, then you can use a custom macro to do so.
|
||||
If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). To force an EEPROM reset, use the [`EEP_RST` keycode](quantum_keycodes.md) or [Bootmagic](feature_bootmagic.md) functionality. If neither of those are an option, then you can use a custom macro to do so.
|
||||
|
||||
To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset most of the settings to default.
|
||||
|
||||
|
@@ -19,8 +19,20 @@ The `info.json` file is a JSON formatted dictionary with the following keys avai
|
||||
* Width of the board in Key Units
|
||||
* `height`
|
||||
* Height of the board in Key Units
|
||||
* `debounce`
|
||||
* How many milliseconds (ms) to wait for debounce to happen. (Default: 5)
|
||||
* `diode_direction`
|
||||
* The direction diodes face. See [`DIRECT_PINS` in the hardware configuration](https://docs.qmk.fm/#/config_options?id=hardware-options) for more details.
|
||||
* `layout_aliases`
|
||||
* A dictionary containing layout aliases. The key is the alias and the value is a layout in `layouts` it maps to.
|
||||
* `layouts`
|
||||
* Physical Layout representations. See the next section for more detail.
|
||||
* Physical Layout representations. See the [Layout Format](#layout_format) section for more detail.
|
||||
* `matrix_pins`
|
||||
* Configure the pins corresponding to columns and rows, or direct pins. See [Matrix Pins](#matrix_pins) for more detail.
|
||||
* `rgblight`
|
||||
* Configure the [RGB Lighting feature](feature_rgblight.md). See the [RGB Lighting](#rgb_lighting) section for more detail.
|
||||
* `usb`
|
||||
* Configure USB VID, PID, and other parameters. See [USB](#USB) for more detail.
|
||||
|
||||
### Layout Format
|
||||
|
||||
@@ -49,25 +61,129 @@ All key positions and rotations are specified in relation to the top-left corner
|
||||
* The width of the key, in Key Units. Ignored if `ks` is provided. Default: `1`
|
||||
* `h`
|
||||
* The height of the key, in Key Units. Ignored if `ks` is provided. Default: `1`
|
||||
* `r`
|
||||
* How many degrees clockwise to rotate the key.
|
||||
* `rx`
|
||||
* The absolute position of the point to rotate the key around in the horizontal axis. Default: `x`
|
||||
* `ry`
|
||||
* The absolute position of the point to rotate the key around in the vertical axis. Default: `y`
|
||||
* `ks`
|
||||
* Key Shape: define a polygon by providing a list of points, in Key Units.
|
||||
* **Important**: These are relative to the top-left of the key, not absolute.
|
||||
* Example ISO Enter: `[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]`
|
||||
* `label`
|
||||
* What to name this position in the matrix.
|
||||
* This should usually be the same name as what is silkscreened on the PCB at this location.
|
||||
* This should usually correspond to the keycode for the first layer of the default keymap.
|
||||
* `matrix`
|
||||
* A 2 item list describing the row and column location for this key.
|
||||
|
||||
## How is the Metadata Exposed?
|
||||
### Matrix Pins
|
||||
|
||||
This metadata is primarily used in two ways:
|
||||
Currently QMK supports connecting switches either directly to GPIO pins or via a switch matrix. At this time you can not combine these, they are mutually exclusive.
|
||||
|
||||
* To allow web-based configurators to dynamically generate UI
|
||||
* To support the new `make keyboard:keymap:qmk` target, which bundles this metadata up with the firmware to allow QMK Toolbox to be smarter.
|
||||
#### Switch Matrix
|
||||
|
||||
Configurator authors can see the [QMK Compiler](https://docs.api.qmk.fm/using-the-api) docs for more information on using the JSON API.
|
||||
Most keyboards use a switch matrix to connect keyswitches to the MCU. You can define your pin columns and rows to configure your switch matrix. When defining switch matrices you should also define your `diode_direction`.
|
||||
|
||||
Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"diode_direction": "COL2ROW",
|
||||
"matrix_pins": {
|
||||
"cols": ["F4", "E6", "B1", "D2"],
|
||||
"rows": ["B0", "D3", "D5", "D4", "D6"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Direct Pins
|
||||
|
||||
Direct pins are when you connect one side of the switch to GND and the other side to a GPIO pin on your MCU. No diode is required, but there is a 1:1 mapping between switches and pins.
|
||||
|
||||
When specifying direct pins you need to arrange them in nested arrays. The outer array consists of rows, while the inner array is a text string corresponding to a pin. You can use `null` to indicate an empty spot in the matrix.
|
||||
|
||||
Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"matrix_pins": {
|
||||
"direct": [
|
||||
["A10", "A9"],
|
||||
["A0", "B8"],
|
||||
[null, "B11"],
|
||||
["B9", "A8"],
|
||||
["A7", "B1"],
|
||||
[null, "B2"]
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### RGB Lighting
|
||||
|
||||
This section controls the legacy WS2812 support in QMK. This should not be confused with the RGB Matrix feature, which can be used to control both WS2812 and ISSI RGB LEDs.
|
||||
|
||||
The following items can be set. Not every value is required.
|
||||
|
||||
* `led_count`
|
||||
* The number of LEDs in your strip
|
||||
* `pin`
|
||||
* The GPIO pin that your LED strip is connected to
|
||||
* `animations`
|
||||
* A dictionary that lists enabled and disabled animations. See [RGB Light Animations](#rgb_light_animations) below.
|
||||
* `sleep`
|
||||
* Set to `true` to enable lighting during host sleep
|
||||
* `split`
|
||||
* Set to `true` to enable synchronization functionality between split halves
|
||||
* `split_count`
|
||||
* For split keyboards, the number of LEDs on each side
|
||||
* `max_brightness`
|
||||
* (0-255) What the maxmimum brightness (value) level is
|
||||
* `hue_steps`
|
||||
* How many steps of adjustment to have for hue
|
||||
* `saturation_steps`
|
||||
* How many steps of adjustment to have for saturation
|
||||
* `brightness_steps`
|
||||
* How many steps of adjustment to have for brightness (value)
|
||||
|
||||
Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"rgblight": {
|
||||
"led_count": 4,
|
||||
"pin": "F6",
|
||||
"hue_steps": 10,
|
||||
"saturation_steps": 17,
|
||||
"brightness_steps": 17,
|
||||
"animations": {
|
||||
"all": true
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### RGB Light Animations
|
||||
|
||||
The following animations can be enabled:
|
||||
|
||||
| Key | Description |
|
||||
|-----|-------------|
|
||||
| `all` | Enable all additional animation modes. |
|
||||
| `alternating` | Enable alternating animation mode. |
|
||||
| `breathing` | Enable breathing animation mode. |
|
||||
| `christmas` | Enable christmas animation mode. |
|
||||
| `knight` | Enable knight animation mode. |
|
||||
| `rainbow_mood` | Enable rainbow mood animation mode. |
|
||||
| `rainbow_swirl` | Enable rainbow swirl animation mode. |
|
||||
| `rgb_test` | Enable RGB test animation mode. |
|
||||
| `snake` | Enable snake animation mode. |
|
||||
| `static_gradient` | Enable static gradient mode. |
|
||||
| `twinkle` | Enable twinkle animation mode. |
|
||||
|
||||
### USB
|
||||
|
||||
Every USB keyboard needs to have its USB parmaters defined. At a minimum you need to set vid, pid, and device version.
|
||||
|
||||
Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"usb": {
|
||||
"vid": "0xC1ED",
|
||||
"pid": "0x23B0",
|
||||
"device_ver": "0x0001"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@@ -18,7 +18,9 @@ To use these, simply `#include` the corresponding [header file](https://github.c
|
||||
|Dutch (Belgium) |`keymap_belgian.h` |
|
||||
|English (Ireland) |`keymap_irish.h` |
|
||||
|English (UK) |`keymap_uk.h` |
|
||||
|English (US Extended) |`keymap_us_extended.h` |
|
||||
|English (US International) |`keymap_us_international.h` |
|
||||
|English (US International, Linux)|`keymap_us_international_linux.h`|
|
||||
|Estonian |`keymap_estonian.h` |
|
||||
|Finnish |`keymap_finnish.h` |
|
||||
|French |`keymap_french.h` |
|
||||
|
@@ -3,16 +3,18 @@ This driver powers the [Split Keyboard](feature_split_keyboard.md) feature.
|
||||
|
||||
?> Serial in this context should be read as **sending information one bit at a time**, rather than implementing UART/USART/RS485/RS232 standards.
|
||||
|
||||
All drivers in this category have the following characteristics:
|
||||
* Provides data and signaling over a single conductor
|
||||
* Limited to single master, single slave
|
||||
Drivers in this category have the following characteristics:
|
||||
* bit bang and USART Half-duplex provide data and signaling over a single conductor
|
||||
* USART Full-duplex provide data and signaling over two conductors
|
||||
* They are all limited to single master and single slave communication scheme
|
||||
|
||||
## Supported Driver Types
|
||||
|
||||
| | AVR | ARM |
|
||||
|-------------------|--------------------|--------------------|
|
||||
| ----------------- | ------------------ | ------------------ |
|
||||
| bit bang | :heavy_check_mark: | :heavy_check_mark: |
|
||||
| USART Half-duplex | | :heavy_check_mark: |
|
||||
| USART Full-duplex | | :heavy_check_mark: |
|
||||
|
||||
## Driver configuration
|
||||
|
||||
@@ -42,7 +44,7 @@ Configure the driver via your config.h:
|
||||
Along with the generic options above, you must also turn on the `PAL_USE_CALLBACKS` feature in your halconf.h.
|
||||
|
||||
### USART Half-duplex
|
||||
Targeting STM32 boards where communication is offloaded to a USART hardware device. The advantage is that this provides fast and accurate timings. `SOFT_SERIAL_PIN` for this driver is the configured USART TX pin. **The TX pin must have appropriate pull-up resistors**. To configure it, add this to your rules.mk:
|
||||
Targeting STM32 boards where communication is offloaded to a USART hardware device. The advantage over bitbang is that this provides fast and accurate timings. `SERIAL_PIN_TX` for this driver is the configured USART TX pin. As this Pin is configured 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). To configure it, add this to your rules.mk:
|
||||
|
||||
```make
|
||||
SERIAL_DRIVER = usart
|
||||
@@ -50,7 +52,8 @@ SERIAL_DRIVER = usart
|
||||
|
||||
Configure the hardware via your config.h:
|
||||
```c
|
||||
#define SOFT_SERIAL_PIN B6 // USART TX pin
|
||||
#define SOFT_SERIAL_PIN B6 // USART TX pin
|
||||
//#define USART1_REMAP // Remap USART TX and RX pins on STM32F103 MCUs, see table below.
|
||||
#define SELECT_SOFT_SERIAL_SPEED 1 // or 0, 2, 3, 4, 5
|
||||
// 0: about 460800 baud
|
||||
// 1: about 230400 baud (default)
|
||||
@@ -58,8 +61,9 @@ Configure the hardware via your config.h:
|
||||
// 3: about 57600 baud
|
||||
// 4: about 38400 baud
|
||||
// 5: about 19200 baud
|
||||
#define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1
|
||||
#define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1
|
||||
#define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
|
||||
#define SERIAL_USART_TIMEOUT 100 // USART driver timeout. default 100
|
||||
```
|
||||
|
||||
You must also enable the ChibiOS `SERIAL` feature:
|
||||
@@ -67,3 +71,140 @@ You must also enable the ChibiOS `SERIAL` feature:
|
||||
* In your board's mcuconf.h: `#define STM32_SERIAL_USE_USARTn TRUE` (where 'n' matches the peripheral number of your selected USART on the MCU)
|
||||
|
||||
Do note that the configuration required is for the `SERIAL` peripheral, not the `UART` peripheral.
|
||||
|
||||
### USART Full-duplex
|
||||
Targeting STM32 boards where communication is offloaded to a USART hardware device. The advantage over bitbang is that this provides fast and accurate timings. USART Full-Duplex requires two conductors **without** pull-up resistors instead of one conductor with a pull-up resistor unlike the Half-duplex driver, but it is more efficent as it uses DMA transfers, which can result in even faster transmission speeds.
|
||||
|
||||
#### Pin configuration
|
||||
|
||||
`SERIAL_USART_TX_PIN` is the USART `TX` pin, `SERIAL_USART_RX_PIN` is the USART `RX` pin. No external pull-up resistors are needed as the `TX` pin operates in push-pull mode. To use this driver the usart peripherals `TX` and `RX` pins must be configured with the correct Alternate-functions. If you are using a Proton-C everything is already setup, same is true for STM32F103 MCUs. For MCUs which are using a modern flexible GPIO configuration you have to specify these by setting `SERIAL_USART_TX_PAL_MODE` and `SERIAL_USART_RX_PAL_MODE`. Refeer to the corresponding datasheets of your MCU or find those settings in the table below.
|
||||
|
||||
#### Connecting the halves and Pin Swap
|
||||
Please note that `TX` of the master half has to be connected with the `RX` pin of the slave half and `RX` of the master half has to be connected with the `TX` pin of the slave half! Usually this pin swap has to be done outside of the MCU e.g. with cables or on the pcb. Some MCUs like the STM32F303 used on the Proton-C allow this pin swap directly inside the MCU, this feature can be enabled using `#define SERIAL_USART_PIN_SWAP` in your config.h.
|
||||
|
||||
#### Setup
|
||||
To use the driver, add this to your rules.mk:
|
||||
|
||||
```make
|
||||
SERIAL_DRIVER = usart_duplex
|
||||
```
|
||||
|
||||
Next configure the hardware via your config.h:
|
||||
|
||||
```c
|
||||
#define SERIAL_USART_TX_PIN B6 // USART TX pin
|
||||
#define SERIAL_USART_RX_PIN B7 // USART RX pin
|
||||
//#define USART1_REMAP // Remap USART TX and RX pins on STM32F103 MCUs, see table below.
|
||||
//#define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve.
|
||||
// Check if this feature is necessary with your keyboard design and available on the mcu.
|
||||
#define SELECT_SOFT_SERIAL_SPEED 1 // or 0, 2, 3, 4, 5
|
||||
// 0: 460800 baud
|
||||
// 1: 230400 baud (default)
|
||||
// 2: 115200 baud
|
||||
// 3: 57600 baud
|
||||
// 4: 38400 baud
|
||||
// 5: 19200 baud
|
||||
#define SERIAL_USART_DRIVER UARTD1 // USART driver of TX and RX pin. default: UARTD1
|
||||
#define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
|
||||
#define SERIAL_USART_RX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
|
||||
#define SERIAL_USART_TIMEOUT 100 // USART driver timeout. default 100
|
||||
```
|
||||
|
||||
You must also enable the ChibiOS `UART` with blocking api feature:
|
||||
* In your board's halconf.h: `#define HAL_USE_UART TRUE` and `#define UART_USE_WAIT TRUE`
|
||||
* In your board's mcuconf.h: `#define STM32_UART_USE_USARTn TRUE` (where 'n' matches the peripheral number of your selected USART on the MCU)
|
||||
|
||||
Do note that the configuration required is for the `UART` peripheral, not the `SERIAL` peripheral.
|
||||
|
||||
#### Pins for USART Peripherals with Alternate Functions for selected STM32 MCUs
|
||||
|
||||
##### STM32F303 / Proton-C [Datasheet](https://www.st.com/resource/en/datasheet/stm32f303cc.pdf)
|
||||
|
||||
Pin Swap available: :heavy_check_mark:
|
||||
|
||||
| Pin | Function | Mode |
|
||||
| ---------- | -------- | ---- |
|
||||
| **USART1** | | |
|
||||
| PA9 | TX | AF7 |
|
||||
| PA10 | RX | AF7 |
|
||||
| PB6 | TX | AF7 |
|
||||
| PB7 | RX | AF7 |
|
||||
| PC4 | TX | AF7 |
|
||||
| PC5 | RX | AF7 |
|
||||
| PE0 | TX | AF7 |
|
||||
| PE1 | RX | AF7 |
|
||||
| **USART2** | | |
|
||||
| PA2 | TX | AF7 |
|
||||
| PA3 | RX | AF7 |
|
||||
| PA14 | TX | AF7 |
|
||||
| PA15 | RX | AF7 |
|
||||
| PB3 | TX | AF7 |
|
||||
| PB4 | RX | AF7 |
|
||||
| PD5 | TX | AF7 |
|
||||
| PD6 | RX | AF7 |
|
||||
| **USART3** | | |
|
||||
| PB10 | TX | AF7 |
|
||||
| PB11 | RX | AF7 |
|
||||
| PC10 | TX | AF7 |
|
||||
| PC11 | RX | AF7 |
|
||||
| PD8 | TX | AF7 |
|
||||
| PD9 | RX | AF7 |
|
||||
|
||||
##### STM32F072 [Datasheet](https://www.st.com/resource/en/datasheet/stm32f072c8.pdf)
|
||||
|
||||
Pin Swap available: :heavy_check_mark:
|
||||
|
||||
| Pin | Function | Mode |
|
||||
| ------ | -------- | ---- |
|
||||
| USART1 | | |
|
||||
| PA9 | TX | AF1 |
|
||||
| PA10 | RX | AF1 |
|
||||
| PB6 | TX | AF0 |
|
||||
| PB7 | RX | AF0 |
|
||||
| USART2 | | |
|
||||
| PA2 | TX | AF1 |
|
||||
| PA3 | RX | AF1 |
|
||||
| PA14 | TX | AF1 |
|
||||
| PA15 | RX | AF1 |
|
||||
| USART3 | | |
|
||||
| PB10 | TX | AF4 |
|
||||
| PB11 | RX | AF4 |
|
||||
| PC4 | TX | AF1 |
|
||||
| PC5 | RX | AF1 |
|
||||
| PC10 | TX | AF1 |
|
||||
| PC11 | RX | AF1 |
|
||||
| PD8 | TX | AF0 |
|
||||
| PD9 | RX | AF0 |
|
||||
| USART4 | | |
|
||||
| PA0 | TX | AF4 |
|
||||
| PA1 | RX | AF4 |
|
||||
|
||||
##### STM32F103 Medium Density (C8-CB) [Datasheet](https://www.st.com/resource/en/datasheet/stm32f103c8.pdf)
|
||||
|
||||
Pin Swap available: N/A
|
||||
|
||||
TX Pin is always Alternate Function Push-Pull, RX Pin is always regular input pin for any USART peripheral. **For STM32F103 no additional Alternate Function configuration is necessary. QMK is already configured.**
|
||||
|
||||
Pin remapping:
|
||||
|
||||
The pins of USART Peripherals use default Pins that can be remapped to use other pins using the AFIO registers. Default pins are marked **bold**. Add the appropriate defines to your config.h file.
|
||||
|
||||
| Pin | Function | Mode | USART_REMAP |
|
||||
| ---------- | -------- | ---- | ------------------- |
|
||||
| **USART1** | | | |
|
||||
| **PA9** | TX | AFPP | |
|
||||
| **PA10** | RX | IN | |
|
||||
| PB6 | TX | AFPP | USART1_REMAP |
|
||||
| PB7 | RX | IN | USART1_REMAP |
|
||||
| **USART2** | | | |
|
||||
| **PA2** | TX | AFPP | |
|
||||
| **PA3** | RX | IN | |
|
||||
| PD5 | TX | AFPP | USART2_REMAP |
|
||||
| PD6 | RX | IN | USART2_REMAP |
|
||||
| **USART3** | | | |
|
||||
| **PB10** | TX | AFPP | |
|
||||
| **PB11** | RX | IN | |
|
||||
| PC10 | TX | AFPP | USART3_PARTIALREMAP |
|
||||
| PC11 | RX | IN | USART3_PARTIALREMAP |
|
||||
| PD8 | TX | AFPP | USART3_FULLREMAP |
|
||||
| PD9 | RX | IN | USART3_FULLREMAP |
|
||||
|
@@ -6,12 +6,12 @@ The SPI Master drivers used in QMK have a set of common functions to allow porta
|
||||
|
||||
No special setup is required - just connect the `SS`, `SCK`, `MOSI` and `MISO` pins of your SPI devices to the matching pins on the MCU:
|
||||
|
||||
|MCU |`SS`|`SCK`|`MOSI`|`MISO`|
|
||||
|---------------|----|-----|------|------|
|
||||
|ATmega16/32U2/4|`B0`|`B1` |`B2` |`B3` |
|
||||
|AT90USB64/128 |`B0`|`B1` |`B2` |`B3` |
|
||||
|ATmega32A |`B4`|`B7` |`B5` |`B6` |
|
||||
|ATmega328/P |`B2`|`B5` |`B3` |`B4` |
|
||||
|MCU |`SS`|`SCK`|`MOSI`|`MISO`|
|
||||
|-----------------|----|-----|------|------|
|
||||
|ATmega16/32U2/4 |`B0`|`B1` |`B2` |`B3` |
|
||||
|AT90USB64/128/162|`B0`|`B1` |`B2` |`B3` |
|
||||
|ATmega32A |`B4`|`B7` |`B5` |`B6` |
|
||||
|ATmega328/P |`B2`|`B5` |`B3` |`B4` |
|
||||
|
||||
You may use more than one slave select pin, not just the `SS` pin. This is useful when you have multiple devices connected and need to communicate with them individually.
|
||||
`SPI_SS_PIN` can be passed to `spi_start()` to refer to `SS`.
|
||||
|
@@ -87,7 +87,7 @@ To enable this setting, add this to your `config.h`:
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
```
|
||||
|
||||
Similar to Permissive Hold, this alters how the firmware processes inputs for fast typists. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the tapping function for both keys. This may not be desirable for rolling combo keys.
|
||||
Similar to Permissive Hold, this alters how the firmware processes inputs for fast typists. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the Mod plus the normal key, even if pressed within the `TAPPING_TERM`. This may not be desirable for rolling combo keys, or for fast typists who have a Mod Tap on a frequently used key (`RCTL_T(KC_QUOT)`, for example).
|
||||
|
||||
Setting `Ignore Mod Tap Interrupt` requires holding both keys for the `TAPPING_TERM` to trigger the hold function (the mod).
|
||||
|
||||
@@ -98,7 +98,7 @@ For Instance:
|
||||
- `SFT_T(KC_A)` Up
|
||||
- `KC_X` Up
|
||||
|
||||
Normally, this would send `X` (`SHIFT`+`x`). With `Ignore Mod Tap Interrupt` enabled, holding both keys are required for the `TAPPING_TERM` to register the hold action. A quick tap will output `ax` in this case, while a hold on both will still output `X` (`SHIFT`+`x`).
|
||||
Normally, this would send a capital `X` (`SHIFT`+`x`), or, Mod + key. With `Ignore Mod Tap Interrupt` enabled, holding both keys are required for the `TAPPING_TERM` to register the hold action. A quick tap will output `ax` in this case, while a hold on both will still output capital `X` (`SHIFT`+`x`).
|
||||
|
||||
|
||||
?> __Note__: This only concerns modifiers and not layer switching keys.
|
||||
|
90
docs/uart_driver.md
Normal file
90
docs/uart_driver.md
Normal file
@@ -0,0 +1,90 @@
|
||||
# UART Driver
|
||||
|
||||
The UART drivers used in QMK have a set of common functions to allow portability between MCUs.
|
||||
|
||||
Currently, this driver does not support enabling hardware flow control (the `RTS` and `CTS` pins) if available, but may do so in future.
|
||||
|
||||
## AVR Configuration
|
||||
|
||||
No special setup is required - just connect the `RX` and `TX` pins of your UART device to the opposite pins on the MCU:
|
||||
|
||||
|MCU |`TX`|`RX`|`CTS`|`RTS`|
|
||||
|-------------|----|----|-----|-----|
|
||||
|ATmega16/32U2|`D3`|`D2`|`D7` |`D6` |
|
||||
|ATmega16/32U4|`D3`|`D2`|`D5` |`B7` |
|
||||
|AT90USB64/128|`D3`|`D2`|*n/a*|*n/a*|
|
||||
|ATmega32A |`D1`|`D0`|*n/a*|*n/a*|
|
||||
|ATmega328/P |`D1`|`D0`|*n/a*|*n/a*|
|
||||
|
||||
## ChibiOS/ARM Configuration
|
||||
|
||||
You'll need to determine which pins can be used for UART -- as an example, STM32 parts generally have multiple UART peripherals, labeled USART1, USART2, USART3 etc.
|
||||
|
||||
To enable UART, modify your board's `halconf.h` to enable the serial driver:
|
||||
|
||||
```c
|
||||
#define HAL_USE_SERIAL TRUE
|
||||
```
|
||||
|
||||
Then, modify your board's `mcuconf.h` to enable the peripheral you've chosen, for example:
|
||||
|
||||
```c
|
||||
#undef STM32_SERIAL_USE_USART2
|
||||
#define STM32_SERIAL_USE_USART2 TRUE
|
||||
```
|
||||
|
||||
Configuration-wise, you'll need to set up the peripheral as per your MCU's datasheet -- the defaults match the pins for a Proton-C, i.e. STM32F303.
|
||||
|
||||
|`config.h` override |Description |Default Value|
|
||||
|--------------------------|---------------------------------------------------------------|-------------|
|
||||
|`#define SERIAL_DRIVER` |USART peripheral to use - USART1 -> `SD1`, USART2 -> `SD2` etc.|`SD1` |
|
||||
|`#define SD1_TX_PIN` |The pin to use for TX |`A9` |
|
||||
|`#define SD1_TX_PAL_MODE` |The alternate function mode for TX |`7` |
|
||||
|`#define SD1_RX_PIN` |The pin to use for RX |`A10` |
|
||||
|`#define SD1_RX_PAL_MODE` |The alternate function mode for RX |`7` |
|
||||
|`#define SD1_CTS_PIN` |The pin to use for CTS |`A11` |
|
||||
|`#define SD1_CTS_PAL_MODE`|The alternate function mode for CTS |`7` |
|
||||
|`#define SD1_RTS_PIN` |The pin to use for RTS |`A12` |
|
||||
|`#define SD1_RTS_PAL_MODE`|The alternate function mode for RTS |`7` |
|
||||
|
||||
## Functions
|
||||
|
||||
### `void uart_init(uint32_t baud)`
|
||||
|
||||
Initialize the UART driver. This function must be called only once, before any of the below functions can be called.
|
||||
|
||||
#### Arguments
|
||||
|
||||
- `uint32_t baud`
|
||||
The baud rate to transmit and receive at. This may depend on the device you are communicating with. Common values are 1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200.
|
||||
|
||||
---
|
||||
|
||||
### `void uart_putchar(uint8_t c)`
|
||||
|
||||
Transmit a single byte.
|
||||
|
||||
#### Arguments
|
||||
|
||||
- `uint8_t c`
|
||||
The byte (character) to send, from 0 to 255.
|
||||
|
||||
---
|
||||
|
||||
### `uint8_t uart_getchar(void)`
|
||||
|
||||
Receive a single byte.
|
||||
|
||||
#### Return Value
|
||||
|
||||
The byte read from the receive buffer.
|
||||
|
||||
---
|
||||
|
||||
### `bool uart_available(void)`
|
||||
|
||||
Return whether the receive buffer contains data. Call this function to determine if `uart_getchar()` will return meaningful data.
|
||||
|
||||
#### Return Value
|
||||
|
||||
`true` if the receive buffer length is non-zero.
|
@@ -142,7 +142,6 @@ The `process_record()` function itself is deceptively simple, but hidden within
|
||||
* [`bool process_haptic(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/2cee371bf125a6ec541dd7c5a809573facc7c456/drivers/haptic/haptic.c#L216)
|
||||
* [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/card.c#L20)
|
||||
* [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/keymaps/default/keymap.c#L58)
|
||||
* [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/rgb_matrix.c#L139)
|
||||
* [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_midi.c#L81)
|
||||
* [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_audio.c#L19)
|
||||
* [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_steno.c#L160)
|
||||
|
@@ -72,20 +72,41 @@ WS2812_DRIVER = spi
|
||||
Configure the hardware via your config.h:
|
||||
```c
|
||||
#define WS2812_SPI SPID1 // default: SPID1
|
||||
#define WS2812_SPI_MOSI_PAL_MODE 5 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
|
||||
#define WS2812_SPI_MOSI_PAL_MODE 5 // MOSI pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
|
||||
#define WS2812_SPI_SCK_PIN B3 // Required for F072, may be for others -- SCK pin, see the respective datasheet for the appropriate values for your MCU. default: unspecified
|
||||
#define WS2812_SPI_SCK_PAL_MODE 5 // SCK pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
|
||||
```
|
||||
|
||||
You must also turn on the SPI feature in your halconf.h and mcuconf.h
|
||||
|
||||
#### Circular Buffer Mode
|
||||
Some boards may flicker while in the normal buffer mode. To fix this issue, circular buffer mode may be used to rectify the issue.
|
||||
|
||||
By default, the circular buffer mode is disabled.
|
||||
|
||||
To enable this alternative buffer mode, place this into your `config.h` file:
|
||||
```c
|
||||
#define WS2812_SPI_USE_CIRCULAR_BUFFER
|
||||
```
|
||||
|
||||
#### Setting baudrate with divisor
|
||||
To adjust the baudrate at which the SPI peripheral is configured, users will need to derive the target baudrate from the clock tree provided by STM32CubeMX.
|
||||
|
||||
Only divisors of 2, 4, 8, 16, 32, 64, 128 and 256 are supported by hardware.
|
||||
|
||||
|Define |Default|Description |
|
||||
|--------------------|-------|-------------------------------------|
|
||||
|`WS2812_SPI_DIVISOR`|`16` |SPI source clock peripheral divisor |
|
||||
|
||||
#### Testing Notes
|
||||
|
||||
While not an exhaustive list, the following table provides the scenarios that have been partially validated:
|
||||
|
||||
| | SPI1 | SPI2 | SPI3 |
|
||||
|-|-|-|-|
|
||||
| f072 | ? | B15 :heavy_check_mark: | N/A |
|
||||
| f103 | A7 :heavy_check_mark: | B15 :heavy_check_mark: | N/A |
|
||||
| f303 | A7 :heavy_check_mark: B5 :heavy_check_mark: | B15 :heavy_check_mark: | B5 :heavy_check_mark: |
|
||||
| | SPI1 | SPI2 | SPI3 |
|
||||
|------|---------------------------------------------|-----------------------------------------|-----------------------|
|
||||
| f072 | ? | B15 :heavy_check_mark: (needs SCK: B13) | N/A |
|
||||
| f103 | A7 :heavy_check_mark: | B15 :heavy_check_mark: | N/A |
|
||||
| f303 | A7 :heavy_check_mark: B5 :heavy_check_mark: | B15 :heavy_check_mark: | B5 :heavy_check_mark: |
|
||||
|
||||
*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.*
|
||||
|
||||
@@ -102,11 +123,14 @@ Configure the hardware via your config.h:
|
||||
#define WS2812_PWM_DRIVER PWMD2 // default: PWMD2
|
||||
#define WS2812_PWM_CHANNEL 2 // default: 2
|
||||
#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
|
||||
//#define WS2812_PWM_COMPLEMENTARY_OUTPUT // Define for a complementary timer output (TIMx_CHyN); omit for a normal timer output (TIMx_CHy).
|
||||
#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
|
||||
#define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
|
||||
#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU.
|
||||
```
|
||||
|
||||
Note that using a complementary timer output (TIMx_CHyN) is possible only for advanced-control timers (TIM1, TIM8, TIM20 on STM32), and the `STM32_PWM_USE_ADVANCED` option in mcuconf.h must be set to `TRUE`. Complementary outputs of general-purpose timers are not supported due to ChibiOS limitations.
|
||||
|
||||
You must also turn on the PWM feature in your halconf.h and mcuconf.h
|
||||
|
||||
#### Testing Notes
|
||||
|
151
drivers/apa102/apa102.c
Normal file
151
drivers/apa102/apa102.c
Normal file
@@ -0,0 +1,151 @@
|
||||
/* Copyright 2020 Aldehir Rojas
|
||||
* Copyright 2017 Mikkel (Duckle29)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "apa102.h"
|
||||
#include "quantum.h"
|
||||
|
||||
#ifndef APA102_NOPS
|
||||
# if defined(__AVR__)
|
||||
# define APA102_NOPS 0 // AVR at 16 MHz already spends 62.5 ns per clock, so no extra delay is needed
|
||||
# elif defined(PROTOCOL_CHIBIOS)
|
||||
|
||||
# include "hal.h"
|
||||
# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX)
|
||||
# define APA102_NOPS (100 / (1000000000L / (STM32_SYSCLK / 4))) // This calculates how many loops of 4 nops to run to delay 100 ns
|
||||
# else
|
||||
# error("APA102_NOPS configuration required")
|
||||
# define APA102_NOPS 0 // this just pleases the compile so the above error is easier to spot
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define io_wait \
|
||||
do { \
|
||||
for (int i = 0; i < APA102_NOPS; i++) { \
|
||||
__asm__ volatile("nop\n\t" \
|
||||
"nop\n\t" \
|
||||
"nop\n\t" \
|
||||
"nop\n\t"); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define APA102_SEND_BIT(byte, bit) \
|
||||
do { \
|
||||
writePin(RGB_DI_PIN, (byte >> bit) & 1); \
|
||||
io_wait; \
|
||||
writePinHigh(RGB_CI_PIN); \
|
||||
io_wait; \
|
||||
writePinLow(RGB_CI_PIN); \
|
||||
io_wait; \
|
||||
} while (0)
|
||||
|
||||
uint8_t apa102_led_brightness = APA102_DEFAULT_BRIGHTNESS;
|
||||
|
||||
void static apa102_start_frame(void);
|
||||
void static apa102_end_frame(uint16_t num_leds);
|
||||
|
||||
void static apa102_send_frame(uint8_t red, uint8_t green, uint8_t blue, uint8_t brightness);
|
||||
void static apa102_send_byte(uint8_t byte);
|
||||
|
||||
void apa102_setleds(LED_TYPE *start_led, uint16_t num_leds) {
|
||||
LED_TYPE *end = start_led + num_leds;
|
||||
|
||||
apa102_start_frame();
|
||||
for (LED_TYPE *led = start_led; led < end; led++) {
|
||||
apa102_send_frame(led->r, led->g, led->b, apa102_led_brightness);
|
||||
}
|
||||
apa102_end_frame(num_leds);
|
||||
}
|
||||
|
||||
// Overwrite the default rgblight_call_driver to use apa102 driver
|
||||
void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { apa102_setleds(start_led, num_leds); }
|
||||
|
||||
void static apa102_init(void) {
|
||||
setPinOutput(RGB_DI_PIN);
|
||||
setPinOutput(RGB_CI_PIN);
|
||||
|
||||
writePinLow(RGB_DI_PIN);
|
||||
writePinLow(RGB_CI_PIN);
|
||||
}
|
||||
|
||||
void apa102_set_brightness(uint8_t brightness) {
|
||||
if (brightness > APA102_MAX_BRIGHTNESS) {
|
||||
apa102_led_brightness = APA102_MAX_BRIGHTNESS;
|
||||
} else if (brightness < 0) {
|
||||
apa102_led_brightness = 0;
|
||||
} else {
|
||||
apa102_led_brightness = brightness;
|
||||
}
|
||||
}
|
||||
|
||||
void static apa102_send_frame(uint8_t red, uint8_t green, uint8_t blue, uint8_t brightness) {
|
||||
apa102_send_byte(0b11100000 | brightness);
|
||||
apa102_send_byte(blue);
|
||||
apa102_send_byte(green);
|
||||
apa102_send_byte(red);
|
||||
}
|
||||
|
||||
void static apa102_start_frame(void) {
|
||||
apa102_init();
|
||||
for (uint16_t i = 0; i < 4; i++) {
|
||||
apa102_send_byte(0);
|
||||
}
|
||||
}
|
||||
|
||||
void static apa102_end_frame(uint16_t num_leds) {
|
||||
// This function has been taken from: https://github.com/pololu/apa102-arduino/blob/master/APA102.h
|
||||
// and adapted. The code is MIT licensed. I think thats compatible?
|
||||
//
|
||||
// The data stream seen by the last LED in the chain will be delayed by
|
||||
// (count - 1) clock edges, because each LED before it inverts the clock
|
||||
// line and delays the data by one clock edge. Therefore, to make sure
|
||||
// the last LED actually receives the data we wrote, the number of extra
|
||||
// edges we send at the end of the frame must be at least (count - 1).
|
||||
//
|
||||
// Assuming we only want to send these edges in groups of size K, the
|
||||
// C/C++ expression for the minimum number of groups to send is:
|
||||
//
|
||||
// ((count - 1) + (K - 1)) / K
|
||||
//
|
||||
// The C/C++ expression above is just (count - 1) divided by K,
|
||||
// rounded up to the nearest whole number if there is a remainder.
|
||||
//
|
||||
// We set K to 16 and use the formula above as the number of frame-end
|
||||
// bytes to transfer. Each byte has 16 clock edges.
|
||||
//
|
||||
// We are ignoring the specification for the end frame in the APA102
|
||||
// datasheet, which says to send 0xFF four times, because it does not work
|
||||
// when you have 66 LEDs or more, and also it results in unwanted white
|
||||
// pixels if you try to update fewer LEDs than are on your LED strip.
|
||||
uint16_t iterations = (num_leds + 14) / 16;
|
||||
for (uint16_t i = 0; i < iterations; i++) {
|
||||
apa102_send_byte(0);
|
||||
}
|
||||
|
||||
apa102_init();
|
||||
}
|
||||
|
||||
void static apa102_send_byte(uint8_t byte) {
|
||||
APA102_SEND_BIT(byte, 7);
|
||||
APA102_SEND_BIT(byte, 6);
|
||||
APA102_SEND_BIT(byte, 5);
|
||||
APA102_SEND_BIT(byte, 4);
|
||||
APA102_SEND_BIT(byte, 3);
|
||||
APA102_SEND_BIT(byte, 2);
|
||||
APA102_SEND_BIT(byte, 1);
|
||||
APA102_SEND_BIT(byte, 0);
|
||||
}
|
41
drivers/apa102/apa102.h
Normal file
41
drivers/apa102/apa102.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/* Copyright 2020 Aldehir Rojas
|
||||
* Copyright 2017 Mikkel (Duckle29)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "color.h"
|
||||
|
||||
#ifndef APA102_DEFAULT_BRIGHTNESS
|
||||
# define APA102_DEFAULT_BRIGHTNESS 31
|
||||
#endif
|
||||
|
||||
#define APA102_MAX_BRIGHTNESS 31
|
||||
|
||||
extern uint8_t apa102_led_brightness;
|
||||
|
||||
/* User Interface
|
||||
*
|
||||
* Input:
|
||||
* start_led: An array of GRB data describing the LED colors
|
||||
* num_leds: The number of LEDs to write
|
||||
*
|
||||
* The functions will perform the following actions:
|
||||
* - Set the data-out pin as output
|
||||
* - Send out the LED data
|
||||
*/
|
||||
void apa102_setleds(LED_TYPE *start_led, uint16_t num_leds);
|
||||
void apa102_set_brightness(uint8_t brightness);
|
@@ -1,96 +0,0 @@
|
||||
/*
|
||||
* APA102 lib V1.0a
|
||||
*
|
||||
* Controls APA102 RGB-LEDs
|
||||
* Author: Mikkel (Duckle29 on GitHub)
|
||||
*
|
||||
* Dec 22th, 2017 v1.0a Initial Version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "apa102.h"
|
||||
#include <avr/interrupt.h>
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
#include "debug.h"
|
||||
|
||||
// Setleds for standard RGB
|
||||
void inline apa102_setleds(LED_TYPE *ledarray, uint16_t leds) { apa102_setleds_pin(ledarray, leds, _BV(RGB_DI_PIN & 0xF), _BV(RGB_CLK_PIN & 0xF)); }
|
||||
|
||||
void static inline apa102_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask_DI, uint8_t pinmask_CLK) {
|
||||
setPinOutput(RGB_DI_PIN);
|
||||
setPinOutput(RGB_CLK_PIN);
|
||||
|
||||
apa102_send_array((uint8_t *)ledarray, leds)
|
||||
}
|
||||
|
||||
void apa102_send_array(uint8_t *data, uint16_t leds) { // Data is struct of 3 bytes. RGB - leds is number of leds in data
|
||||
apa102_start_frame();
|
||||
while (leds--) {
|
||||
apa102_send_frame(0xFF000000 | (data->b << 16) | (data->g << 8) | data->r);
|
||||
data++;
|
||||
}
|
||||
apa102_end_frame(leds);
|
||||
}
|
||||
|
||||
void apa102_send_frame(uint32_t frame) {
|
||||
for (uint32_t i = 0xFF; i > 0;) {
|
||||
apa102_send_byte(frame & i);
|
||||
i = i << 8;
|
||||
}
|
||||
}
|
||||
|
||||
void apa102_start_frame() { apa102_send_frame(0); }
|
||||
|
||||
void apa102_end_frame(uint16_t leds) {
|
||||
// This function has been taken from: https://github.com/pololu/apa102-arduino/blob/master/APA102.h
|
||||
// and adapted. The code is MIT licensed. I think thats compatible?
|
||||
|
||||
// We need to send some more bytes to ensure that all the LEDs in the
|
||||
// chain see their new color and start displaying it.
|
||||
//
|
||||
// The data stream seen by the last LED in the chain will be delayed by
|
||||
// (count - 1) clock edges, because each LED before it inverts the clock
|
||||
// line and delays the data by one clock edge. Therefore, to make sure
|
||||
// the last LED actually receives the data we wrote, the number of extra
|
||||
// edges we send at the end of the frame must be at least (count - 1).
|
||||
// For the APA102C, that is sufficient.
|
||||
//
|
||||
// The SK9822 only updates after it sees 32 zero bits followed by one more
|
||||
// rising edge. To avoid having the update time depend on the color of
|
||||
// the last LED, we send a dummy 0xFF byte. (Unfortunately, this means
|
||||
// that partial updates of the beginning of an LED strip are not possible;
|
||||
// the LED after the last one you are trying to update will be black.)
|
||||
// After that, to ensure that the last LED in the chain sees 32 zero bits
|
||||
// and a rising edge, we need to send at least 65 + (count - 1) edges. It
|
||||
// is sufficent and simpler to just send (5 + count/16) bytes of zeros.
|
||||
//
|
||||
// We are ignoring the specification for the end frame in the APA102/SK9822
|
||||
// datasheets because it does not actually ensure that all the LEDs will
|
||||
// start displaying their new colors right away.
|
||||
|
||||
apa102_send_byte(0xFF);
|
||||
for (uint16_t i = 0; i < 5 + leds / 16; i++) {
|
||||
apa102_send_byte(0);
|
||||
}
|
||||
}
|
||||
|
||||
void apa102_send_byte(uint8_t byte) {
|
||||
uint8_t i;
|
||||
for (i = 0; i < 8; i++) {
|
||||
writePin(RGB_DI_PIN, !!(byte & (1 << (7 - i))));
|
||||
writePinHigh(RGB_CLK_PIN);
|
||||
}
|
||||
}
|
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* light weight WS2812 lib include
|
||||
*
|
||||
* Version 2.3 - Nev 29th 2015
|
||||
* Author: Tim (cpldcpu@gmail.com)
|
||||
*
|
||||
* Please do not change this file! All configuration is handled in "ws2812_config.h"
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <avr/interrupt.h>
|
||||
|
||||
#include "color.h"
|
||||
|
||||
/* User Interface
|
||||
*
|
||||
* Input:
|
||||
* ledarray: An array of GRB data describing the LED colors
|
||||
* number_of_leds: The number of LEDs to write
|
||||
* pinmask (optional): Bitmask describing the output bin. e.g. _BV(PB0)
|
||||
*
|
||||
* The functions will perform the following actions:
|
||||
* - Set the data-out pin as output
|
||||
* - Send out the LED data
|
||||
* - Wait 50<35>s to reset the LEDs
|
||||
*/
|
||||
|
||||
void apa102_setleds(LED_TYPE *ledarray, uint16_t number_of_leds);
|
||||
void apa102_setleds_pin(LED_TYPE *ledarray, uint16_t number_of_leds, uint8_t pinmask);
|
||||
void apa102_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds);
|
@@ -20,7 +20,7 @@
|
||||
|
||||
#ifdef SOFT_SERIAL_PIN
|
||||
|
||||
# if !(defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
|
||||
# if !(defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB162__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
|
||||
# error serial.c is not supported for the currently selected MCU
|
||||
# endif
|
||||
// if using ATmega32U4/2, AT90USBxxx I2C, can not use PD0 and PD1 in soft serial.
|
||||
@@ -52,8 +52,8 @@
|
||||
# define EICRx EICRA
|
||||
# endif
|
||||
|
||||
// ATmegaxxU2 specific config
|
||||
# if defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__)
|
||||
// ATmegaxxU2/AT90USB162 specific config
|
||||
# if defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_AT90USB162__)
|
||||
// PD4(INT5), PD6(INT6), PD7(INT7), PC7(INT4)
|
||||
# if SOFT_SERIAL_PIN == D4
|
||||
# define EIMSK_BIT _BV(INT5)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user