mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-06 06:54:58 +00:00
Compare commits
1030 Commits
0.6.366
...
encoder_ma
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9e64d5f6c2 | ||
![]() |
f183af14ad | ||
![]() |
455a0c5978 | ||
![]() |
674fcc474c | ||
![]() |
b1c2bf071b | ||
![]() |
e258b10d71 | ||
![]() |
b47c10bf6f | ||
![]() |
3817ff7cc0 | ||
![]() |
606813b72d | ||
![]() |
64b7cfe735 | ||
![]() |
908aede957 | ||
![]() |
cb3b5563e4 | ||
![]() |
d624690135 | ||
![]() |
f164016566 | ||
![]() |
0e6f78547e | ||
![]() |
476f556613 | ||
![]() |
e0e26957d4 | ||
![]() |
afc5cb7f0a | ||
![]() |
e48fdebe5a | ||
![]() |
1b06ea0c86 | ||
![]() |
c7a8cab883 | ||
![]() |
947e61eaeb | ||
![]() |
a096453259 | ||
![]() |
e376aa284d | ||
![]() |
4fef3b23e4 | ||
![]() |
f19c8b2d5d | ||
![]() |
8ab7f1f39e | ||
![]() |
917ab71c52 | ||
![]() |
6d7c6d4fd6 | ||
![]() |
8bc90ee20c | ||
![]() |
1971f22285 | ||
![]() |
24cf6dc7f4 | ||
![]() |
84ac03bbab | ||
![]() |
5777177cec | ||
![]() |
92be2439ec | ||
![]() |
d5316e9714 | ||
![]() |
85688f926a | ||
![]() |
40de65eac4 | ||
![]() |
5d34e70cf7 | ||
![]() |
006ec86786 | ||
![]() |
19f73483d8 | ||
![]() |
50202bc222 | ||
![]() |
a30ccc025e | ||
![]() |
d03303ab74 | ||
![]() |
ad5ead24c3 | ||
![]() |
b2a6329376 | ||
![]() |
3fd919c536 | ||
![]() |
0f30a4d2ca | ||
![]() |
32fdf4805a | ||
![]() |
581a8fa058 | ||
![]() |
23048798dd | ||
![]() |
e8453bbc12 | ||
![]() |
71d64c85d6 | ||
![]() |
323635da06 | ||
![]() |
e96cac0814 | ||
![]() |
335dd0271e | ||
![]() |
a5a31a5fc0 | ||
![]() |
4da9d2ef6f | ||
![]() |
9160405d39 | ||
![]() |
23f89ff7cf | ||
![]() |
e264f0151d | ||
![]() |
b62ee65c6d | ||
![]() |
68cf2725aa | ||
![]() |
6d95082cbf | ||
![]() |
6799937a3c | ||
![]() |
51bf3ba3e6 | ||
![]() |
c8fd015618 | ||
![]() |
737bca8e51 | ||
![]() |
d99f6e95e1 | ||
![]() |
e214f2826e | ||
![]() |
d60b193932 | ||
![]() |
454c99d128 | ||
![]() |
f87908228a | ||
![]() |
2ee961c9e8 | ||
![]() |
c44aff5f18 | ||
![]() |
4b47abc737 | ||
![]() |
0ab8edb523 | ||
![]() |
80ded60cad | ||
![]() |
f033d8113d | ||
![]() |
267be40793 | ||
![]() |
af03c5f7fa | ||
![]() |
165020a670 | ||
![]() |
97b8ade1aa | ||
![]() |
1533483bb2 | ||
![]() |
3dbf08b655 | ||
![]() |
bc073b817a | ||
![]() |
233a1e9bcd | ||
![]() |
a41066beed | ||
![]() |
a4c008fe90 | ||
![]() |
4c90277236 | ||
![]() |
3d53ea439c | ||
![]() |
f64d9b0621 | ||
![]() |
8baed70ed1 | ||
![]() |
9bfacc7c76 | ||
![]() |
c26faed2b6 | ||
![]() |
b23f6011c3 | ||
![]() |
1b1e0977e0 | ||
![]() |
d263579781 | ||
![]() |
5c1b7fb502 | ||
![]() |
5b311965f8 | ||
![]() |
22cc56bc97 | ||
![]() |
de5cadd636 | ||
![]() |
f66b2b1f27 | ||
![]() |
5dc91ddc60 | ||
![]() |
550435c1c9 | ||
![]() |
abfd6ed961 | ||
![]() |
e3a21348c3 | ||
![]() |
7662ee71f0 | ||
![]() |
881f27b461 | ||
![]() |
81f36ab74d | ||
![]() |
7677e8adde | ||
![]() |
162dd3fe19 | ||
![]() |
9b07098dbd | ||
![]() |
f360c27f93 | ||
![]() |
2fc3494fd9 | ||
![]() |
63f4806d7a | ||
![]() |
4522519079 | ||
![]() |
feb116c4f3 | ||
![]() |
5a3aefed8d | ||
![]() |
eac6ccff98 | ||
![]() |
2ac4197b73 | ||
![]() |
cc5edb9eeb | ||
![]() |
e1de0d74a6 | ||
![]() |
6560dffc05 | ||
![]() |
e796d7b49e | ||
![]() |
2e7cd98c06 | ||
![]() |
a48468590a | ||
![]() |
23178d73fc | ||
![]() |
bb43010170 | ||
![]() |
7becbfb44a | ||
![]() |
076d8babbb | ||
![]() |
c54d2cbe02 | ||
![]() |
e47ab6a575 | ||
![]() |
22aa2ce6b2 | ||
![]() |
76378d74f5 | ||
![]() |
64c075ed2c | ||
![]() |
094aa7c24b | ||
![]() |
918f13a4ac | ||
![]() |
5156a7e05c | ||
![]() |
ed1bf3afa2 | ||
![]() |
528ddb7987 | ||
![]() |
da3ff89fac | ||
![]() |
e58343596a | ||
![]() |
4e23c700f1 | ||
![]() |
531ff70e0d | ||
![]() |
3cb216f381 | ||
![]() |
23cac6a606 | ||
![]() |
1f2ad80c16 | ||
![]() |
db3d4a92ae | ||
![]() |
8da25dd6e3 | ||
![]() |
8991d9ab3a | ||
![]() |
1c07d4e7ef | ||
![]() |
0ea4e86175 | ||
![]() |
4335b97a07 | ||
![]() |
89fe8d2d87 | ||
![]() |
9fe7b406cb | ||
![]() |
19584b92c5 | ||
![]() |
2707652c98 | ||
![]() |
e7d95701bf | ||
![]() |
5e43f87956 | ||
![]() |
d00326ecb3 | ||
![]() |
49fdd386b2 | ||
![]() |
e2ec5790b7 | ||
![]() |
8fe15fa17a | ||
![]() |
403c139b34 | ||
![]() |
dc5876a8e6 | ||
![]() |
93767540e1 | ||
![]() |
5bb3fe7a35 | ||
![]() |
3e22af92ee | ||
![]() |
2c51d14223 | ||
![]() |
6bed239486 | ||
![]() |
c2709a7ca4 | ||
![]() |
26fe4e44d5 | ||
![]() |
b5b057ad95 | ||
![]() |
f04e58dad6 | ||
![]() |
d9b056486b | ||
![]() |
2881f53dd4 | ||
![]() |
d0ef139749 | ||
![]() |
60cd12f8a4 | ||
![]() |
c73d6f6ac8 | ||
![]() |
f73f71db9c | ||
![]() |
345d3cc046 | ||
![]() |
78f01eef2e | ||
![]() |
f3f7f941dc | ||
![]() |
60267fe2ca | ||
![]() |
18a0e6fedc | ||
![]() |
8cf1491d04 | ||
![]() |
c23581d985 | ||
![]() |
03c132b331 | ||
![]() |
3e20697a33 | ||
![]() |
b91874454d | ||
![]() |
e02383fa1f | ||
![]() |
e8b65d0170 | ||
![]() |
19b60c273a | ||
![]() |
dbce3f648b | ||
![]() |
38aefaf78e | ||
![]() |
60b2a9a5ea | ||
![]() |
537623c9db | ||
![]() |
ec053c8283 | ||
![]() |
c5ffd182c8 | ||
![]() |
93bce83255 | ||
![]() |
b0b433f3cf | ||
![]() |
3e6f7bc6bf | ||
![]() |
f166a22c98 | ||
![]() |
41b9be560d | ||
![]() |
4f01c8623f | ||
![]() |
9067dc817a | ||
![]() |
afb93b7f48 | ||
![]() |
99f5d6c56d | ||
![]() |
de386e5972 | ||
![]() |
482ec79e59 | ||
![]() |
fa8359fa1a | ||
![]() |
0c5b3826d1 | ||
![]() |
da5b4ec733 | ||
![]() |
68072e931a | ||
![]() |
c7b28bffc1 | ||
![]() |
c47fa31a00 | ||
![]() |
edf8552970 | ||
![]() |
ab3fba2cdf | ||
![]() |
c6c7aec85d | ||
![]() |
8c1b8cf3a3 | ||
![]() |
cffe671a61 | ||
![]() |
f418efcaf5 | ||
![]() |
714cf021a4 | ||
![]() |
5d41db6308 | ||
![]() |
20a16d29fe | ||
![]() |
17794e0b25 | ||
![]() |
92cb0b6f2f | ||
![]() |
9496d11b06 | ||
![]() |
0f7be8b458 | ||
![]() |
178ceba735 | ||
![]() |
d143ddc062 | ||
![]() |
b3d41d9d6d | ||
![]() |
e6d8a6111b | ||
![]() |
297a7fe0d1 | ||
![]() |
ff854565ce | ||
![]() |
2a948e7771 | ||
![]() |
983c93fe81 | ||
![]() |
dccafb64e6 | ||
![]() |
475f832b0f | ||
![]() |
a76a79b827 | ||
![]() |
f8e4f7ea80 | ||
![]() |
0850a8cb63 | ||
![]() |
c61d7d7cb0 | ||
![]() |
eac4ce972d | ||
![]() |
00abe5d8ed | ||
![]() |
0f9e2659c9 | ||
![]() |
acec007dfa | ||
![]() |
6c37798aac | ||
![]() |
df9388fb8a | ||
![]() |
460da06ce4 | ||
![]() |
494fc51812 | ||
![]() |
ad8dbd5ca5 | ||
![]() |
237147ca23 | ||
![]() |
37b6a2abbd | ||
![]() |
efb7f3cc3a | ||
![]() |
61b5d0e0c5 | ||
![]() |
8eb0aefb60 | ||
![]() |
ced8c554e6 | ||
![]() |
e41feddf57 | ||
![]() |
d569f08771 | ||
![]() |
2f49cae9bc | ||
![]() |
29d7f9b163 | ||
![]() |
e05b32d894 | ||
![]() |
0e96068d23 | ||
![]() |
42bf60751e | ||
![]() |
fd19795879 | ||
![]() |
f069e9fc09 | ||
![]() |
63a0b1241d | ||
![]() |
75c9747787 | ||
![]() |
2df3799e3d | ||
![]() |
ea96c4b787 | ||
![]() |
7f65323e10 | ||
![]() |
3642a82d37 | ||
![]() |
c7d0262be7 | ||
![]() |
de4a47f1cc | ||
![]() |
beb4a12c9d | ||
![]() |
59000f491f | ||
![]() |
44c5be0a3e | ||
![]() |
f34299efd7 | ||
![]() |
911b8915cc | ||
![]() |
7a5a2591eb | ||
![]() |
7142b60405 | ||
![]() |
095b88bca5 | ||
![]() |
46c49ae4e6 | ||
![]() |
e5aa28455e | ||
![]() |
6f5f943bb9 | ||
![]() |
7d8dea30a4 | ||
![]() |
37c2996137 | ||
![]() |
54503168c9 | ||
![]() |
23186d32a3 | ||
![]() |
12cdcd5e10 | ||
![]() |
86d59f1034 | ||
![]() |
c427023b31 | ||
![]() |
2493eecc7b | ||
![]() |
bb3569dce3 | ||
![]() |
b364a40e60 | ||
![]() |
d137fdea78 | ||
![]() |
ab48ffd5c5 | ||
![]() |
32b2486c6b | ||
![]() |
55432d0d91 | ||
![]() |
59af2cbe64 | ||
![]() |
7c1bb9decf | ||
![]() |
140c08e521 | ||
![]() |
a9c1a5a873 | ||
![]() |
3b4b54f6ed | ||
![]() |
9c280089aa | ||
![]() |
38a0a6a092 | ||
![]() |
8294a0de2c | ||
![]() |
65c4b6cff1 | ||
![]() |
9508b3f333 | ||
![]() |
6c871408df | ||
![]() |
265d8abee1 | ||
![]() |
d13e0b5cfc | ||
![]() |
a4581e6620 | ||
![]() |
0cbe1eb433 | ||
![]() |
969dd8be56 | ||
![]() |
1620066475 | ||
![]() |
b4161ac190 | ||
![]() |
b9de27161a | ||
![]() |
ad3e4d6c13 | ||
![]() |
251b4fb79d | ||
![]() |
68dbf92d9e | ||
![]() |
595232ec98 | ||
![]() |
2e521b509c | ||
![]() |
00225b77e5 | ||
![]() |
9dae7f7d85 | ||
![]() |
a88b6db682 | ||
![]() |
22a7e71fb3 | ||
![]() |
88908888b8 | ||
![]() |
99e58eab0f | ||
![]() |
d2f87df7f4 | ||
![]() |
ff118bce6a | ||
![]() |
02f77e7215 | ||
![]() |
44fd317a87 | ||
![]() |
0728c0fa4e | ||
![]() |
d90038eb9c | ||
![]() |
e88f80a891 | ||
![]() |
79a6c6eda5 | ||
![]() |
490a13a02e | ||
![]() |
0d94730da0 | ||
![]() |
91bd2117df | ||
![]() |
c21281c593 | ||
![]() |
6ca29f2b9b | ||
![]() |
16366dd23d | ||
![]() |
18690ddaea | ||
![]() |
1013ae2d34 | ||
![]() |
deb6fa6a87 | ||
![]() |
533d6d6a46 | ||
![]() |
c7eede2249 | ||
![]() |
5b7a5b2a76 | ||
![]() |
4d339b7b5d | ||
![]() |
736bdc7e97 | ||
![]() |
fc5fb2fc15 | ||
![]() |
ac8f8a8914 | ||
![]() |
7ffed07310 | ||
![]() |
f8bf1d1b16 | ||
![]() |
f0ad3fc68a | ||
![]() |
98599173d7 | ||
![]() |
12812fa6a4 | ||
![]() |
6d191635d0 | ||
![]() |
df5b2d204b | ||
![]() |
7372ce6afd | ||
![]() |
fa71c4c91e | ||
![]() |
e6a6b1f122 | ||
![]() |
c522009816 | ||
![]() |
5c324ee104 | ||
![]() |
d633cf3ccb | ||
![]() |
55bae0a5b4 | ||
![]() |
dab4967f1b | ||
![]() |
9f46606dff | ||
![]() |
f2ea65db6b | ||
![]() |
0e153781f0 | ||
![]() |
27b3f3141b | ||
![]() |
d653e55461 | ||
![]() |
05d0e8c09e | ||
![]() |
19e85a503c | ||
![]() |
5095a999b7 | ||
![]() |
bf558e42fd | ||
![]() |
3fae3076ce | ||
![]() |
4c4ee4a26b | ||
![]() |
f59d076898 | ||
![]() |
d12c024dde | ||
![]() |
2d688ad14e | ||
![]() |
1784d1bfac | ||
![]() |
9547774962 | ||
![]() |
d076234fd1 | ||
![]() |
19a85015c2 | ||
![]() |
a2b855febb | ||
![]() |
bbc5156781 | ||
![]() |
42977d25fc | ||
![]() |
edc8283572 | ||
![]() |
b7ddf64b54 | ||
![]() |
9340b70b7e | ||
![]() |
733ec614d8 | ||
![]() |
075495a792 | ||
![]() |
feb1742061 | ||
![]() |
2e9a096c46 | ||
![]() |
06de8fd106 | ||
![]() |
8de164e036 | ||
![]() |
d217307747 | ||
![]() |
1061c024d8 | ||
![]() |
ddb69d4d39 | ||
![]() |
b624f32f94 | ||
![]() |
61af76a10d | ||
![]() |
39baa5e80d | ||
![]() |
cf4575b94a | ||
![]() |
75ee8df19e | ||
![]() |
3619678b10 | ||
![]() |
267a85c885 | ||
![]() |
7ff57644e1 | ||
![]() |
beb320a5c6 | ||
![]() |
5a2a650730 | ||
![]() |
691be16b23 | ||
![]() |
210da974a0 | ||
![]() |
554e4bf25c | ||
![]() |
9e20478e6b | ||
![]() |
51ee244906 | ||
![]() |
ac16726895 | ||
![]() |
21df614a8e | ||
![]() |
c27aa60c50 | ||
![]() |
931e9bdbe4 | ||
![]() |
5ef7367e6c | ||
![]() |
5c6c556933 | ||
![]() |
d2ce12d15d | ||
![]() |
bc86eb2233 | ||
![]() |
f2d9f912b1 | ||
![]() |
0b89809ac4 | ||
![]() |
957070a6b5 | ||
![]() |
f22c5c17b6 | ||
![]() |
c289a4cb20 | ||
![]() |
cbe1af47de | ||
![]() |
f6da00b85d | ||
![]() |
43b0309970 | ||
![]() |
caab1d0303 | ||
![]() |
e243afe23e | ||
![]() |
c9c33978ce | ||
![]() |
2c8d8be718 | ||
![]() |
70329b4fbb | ||
![]() |
2ef6bbbf5f | ||
![]() |
51bcadf38c | ||
![]() |
fb7c65dc34 | ||
![]() |
064d9da93e | ||
![]() |
e0f91f37c4 | ||
![]() |
ae44ec9820 | ||
![]() |
1c805b3d00 | ||
![]() |
a20e6aa022 | ||
![]() |
b5ee6c200c | ||
![]() |
8a2e328a33 | ||
![]() |
129e4d1b2f | ||
![]() |
fcf87370a8 | ||
![]() |
63b96c34ce | ||
![]() |
94efa18c28 | ||
![]() |
1c5b0cbbeb | ||
![]() |
b62e160a89 | ||
![]() |
d534c72a54 | ||
![]() |
6a79b05cf0 | ||
![]() |
f2c179de58 | ||
![]() |
977c316eb1 | ||
![]() |
367eac2229 | ||
![]() |
5fca6c0120 | ||
![]() |
42f2ad96a3 | ||
![]() |
a0f248c20e | ||
![]() |
9bb4e63a11 | ||
![]() |
4003d077ce | ||
![]() |
91ee6a1dbb | ||
![]() |
92f9b6c3bd | ||
![]() |
ddaf37ffa9 | ||
![]() |
683605a9dc | ||
![]() |
c178bbf2e5 | ||
![]() |
802c575506 | ||
![]() |
848f3713ad | ||
![]() |
0c03811d6a | ||
![]() |
36dd261d06 | ||
![]() |
61b5914a80 | ||
![]() |
9813a6f950 | ||
![]() |
fadb69e203 | ||
![]() |
ee8d9bd40a | ||
![]() |
d578aaefcd | ||
![]() |
75b28225db | ||
![]() |
5d23fb1e3a | ||
![]() |
d14ef52b80 | ||
![]() |
41482e02a6 | ||
![]() |
547fbe769c | ||
![]() |
5004562441 | ||
![]() |
0ec0d29e9f | ||
![]() |
d8d2a09674 | ||
![]() |
576b138c6e | ||
![]() |
38ad0d2673 | ||
![]() |
ed65881565 | ||
![]() |
b93e1309e5 | ||
![]() |
9114d6ebe9 | ||
![]() |
c0e6734d3f | ||
![]() |
406f03bb0c | ||
![]() |
405dea01be | ||
![]() |
2f6c068e0d | ||
![]() |
2a534e87ac | ||
![]() |
f3e73965f0 | ||
![]() |
b4c03070de | ||
![]() |
4d72aa428f | ||
![]() |
57540af102 | ||
![]() |
2c0c25d014 | ||
![]() |
8479dd65d4 | ||
![]() |
3cb28bbe42 | ||
![]() |
74d7d232e3 | ||
![]() |
340c3abc28 | ||
![]() |
009d45d4d7 | ||
![]() |
59d3b37130 | ||
![]() |
a6701c28d2 | ||
![]() |
98b237a21b | ||
![]() |
07bdc8f4b7 | ||
![]() |
ae934c389e | ||
![]() |
6b27ebefc6 | ||
![]() |
f54e47c79d | ||
![]() |
9587fac72a | ||
![]() |
e5831d79c0 | ||
![]() |
d967d3a6b5 | ||
![]() |
620fcf12e8 | ||
![]() |
cacfaedb81 | ||
![]() |
209b6baaa8 | ||
![]() |
7f8922ae7b | ||
![]() |
72f382fc02 | ||
![]() |
430c37024e | ||
![]() |
f644db042c | ||
![]() |
465acd4d09 | ||
![]() |
9ae874e0c3 | ||
![]() |
0261bf3e30 | ||
![]() |
586bd92ea7 | ||
![]() |
d68d510473 | ||
![]() |
ac20e7e3f2 | ||
![]() |
a2d61d76fa | ||
![]() |
17eea779df | ||
![]() |
f1cebc9d9d | ||
![]() |
9609ae60a6 | ||
![]() |
2a9856dff0 | ||
![]() |
b567785345 | ||
![]() |
9177c6fedd | ||
![]() |
13493d3a78 | ||
![]() |
2f3807682d | ||
![]() |
4c4850f32a | ||
![]() |
48cc61b188 | ||
![]() |
45950bb3b6 | ||
![]() |
a8427447bc | ||
![]() |
046fb11259 | ||
![]() |
77a1c75cf6 | ||
![]() |
5cf7dbedd2 | ||
![]() |
f2e0d38f17 | ||
![]() |
c57994f09e | ||
![]() |
43f388166f | ||
![]() |
de107eb14e | ||
![]() |
d5ab675251 | ||
![]() |
a699fd3d04 | ||
![]() |
207ebc42a9 | ||
![]() |
b28f1e6a29 | ||
![]() |
c806103f41 | ||
![]() |
eafd38e2a1 | ||
![]() |
e5bc50c03e | ||
![]() |
1c5079a33c | ||
![]() |
c9424eb8d7 | ||
![]() |
bbdc82dd36 | ||
![]() |
ec3954577c | ||
![]() |
48067c530c | ||
![]() |
57958ce88e | ||
![]() |
dd6330b07c | ||
![]() |
cd7bc03134 | ||
![]() |
22a8992d1b | ||
![]() |
2367e3e1fd | ||
![]() |
0bd03150e5 | ||
![]() |
feddc496ee | ||
![]() |
abb65857ff | ||
![]() |
36d3902504 | ||
![]() |
f204ed67f2 | ||
![]() |
f3acaff65b | ||
![]() |
20c0533c4c | ||
![]() |
a747953dfa | ||
![]() |
1ab008eabd | ||
![]() |
0a7222b703 | ||
![]() |
4381dea621 | ||
![]() |
827f8ce1bc | ||
![]() |
207fde997f | ||
![]() |
b1691ba696 | ||
![]() |
7ec583e5ef | ||
![]() |
c966da89da | ||
![]() |
8060e52946 | ||
![]() |
2e8cdb126e | ||
![]() |
3261c408e4 | ||
![]() |
d41961c9ed | ||
![]() |
840b9090a0 | ||
![]() |
40b0ddd425 | ||
![]() |
17ff9cf554 | ||
![]() |
d3ebf903c9 | ||
![]() |
f1c89280d5 | ||
![]() |
4602361095 | ||
![]() |
28f53462d0 | ||
![]() |
4532caf5f2 | ||
![]() |
e08e6c11e3 | ||
![]() |
bffbb4b42d | ||
![]() |
d686c0ea43 | ||
![]() |
b3cdc7ef70 | ||
![]() |
cf2ffadbcd | ||
![]() |
0da743d80b | ||
![]() |
7afae46ea6 | ||
![]() |
c644299820 | ||
![]() |
a2e91ebec9 | ||
![]() |
a40dbf94e8 | ||
![]() |
1c0a7ad6c2 | ||
![]() |
6b1db7da23 | ||
![]() |
001a6c24ae | ||
![]() |
b1fc3f35c6 | ||
![]() |
e040028f1b | ||
![]() |
d417b0cc7d | ||
![]() |
b12b26946d | ||
![]() |
918fb7f8da | ||
![]() |
455f15528c | ||
![]() |
00c6892b3f | ||
![]() |
171f7c561b | ||
![]() |
5b4187ad1b | ||
![]() |
d5b01bd34b | ||
![]() |
1650ba00f1 | ||
![]() |
f9d47ebe2f | ||
![]() |
3895b4b868 | ||
![]() |
a8647f0d27 | ||
![]() |
6c7d173ad7 | ||
![]() |
65906f679d | ||
![]() |
6af77551c6 | ||
![]() |
4747d974aa | ||
![]() |
e5d2cb8f98 | ||
![]() |
f6c7e11426 | ||
![]() |
97a3f806c4 | ||
![]() |
c44fc68297 | ||
![]() |
5fa0a274ea | ||
![]() |
4e375aa1f5 | ||
![]() |
f859375284 | ||
![]() |
f6651424a0 | ||
![]() |
29e9caa82b | ||
![]() |
a32f7e1a25 | ||
![]() |
e2dfb787da | ||
![]() |
72df7b4c19 | ||
![]() |
1209fb8643 | ||
![]() |
ba42a5ae68 | ||
![]() |
09f5767072 | ||
![]() |
ed6a872911 | ||
![]() |
311d625c56 | ||
![]() |
a71c461d03 | ||
![]() |
a5ecf14608 | ||
![]() |
26bbf6a66a | ||
![]() |
f14629ed1c | ||
![]() |
2a231457bd | ||
![]() |
0f95c0865c | ||
![]() |
3538955778 | ||
![]() |
7d557a0514 | ||
![]() |
a25dd58bc5 | ||
![]() |
7ba82cb5b7 | ||
![]() |
a200f194d1 | ||
![]() |
b2fb0ceeef | ||
![]() |
ff0cb0cf9d | ||
![]() |
cbcf888dc0 | ||
![]() |
d8253b83e8 | ||
![]() |
0a03f7cff7 | ||
![]() |
21fc6be41b | ||
![]() |
989c2094f8 | ||
![]() |
fd48f687b1 | ||
![]() |
f8e4921491 | ||
![]() |
66b63f66a9 | ||
![]() |
77a7e3c91f | ||
![]() |
b8c5efa555 | ||
![]() |
4211252117 | ||
![]() |
0694decfa1 | ||
![]() |
da1f05fbc1 | ||
![]() |
cf215487ba | ||
![]() |
e717dcaa09 | ||
![]() |
38fdf7a2d2 | ||
![]() |
663ca6ba9d | ||
![]() |
37d2f6dc2a | ||
![]() |
475d2c0c30 | ||
![]() |
2121de9192 | ||
![]() |
901edea927 | ||
![]() |
8e348c427d | ||
![]() |
2bbbfc6154 | ||
![]() |
ecf0612cc8 | ||
![]() |
676633e1f3 | ||
![]() |
e6420f0bd8 | ||
![]() |
3ee062222a | ||
![]() |
3dd2905b7b | ||
![]() |
607f6f5c16 | ||
![]() |
ffff0f03cb | ||
![]() |
721b3546f6 | ||
![]() |
05a97482e6 | ||
![]() |
c69060465e | ||
![]() |
37be1cb513 | ||
![]() |
207e50c534 | ||
![]() |
6cccc22be9 | ||
![]() |
3184303037 | ||
![]() |
d780c2729b | ||
![]() |
220873dfeb | ||
![]() |
8b1cdd1e3d | ||
![]() |
dfebfecd48 | ||
![]() |
95b2364e5a | ||
![]() |
6e6d079dd2 | ||
![]() |
06ba968759 | ||
![]() |
7579518613 | ||
![]() |
d16db69367 | ||
![]() |
a07da6e245 | ||
![]() |
dd1790c1b3 | ||
![]() |
44f3c614c2 | ||
![]() |
853f5231d3 | ||
![]() |
da86484027 | ||
![]() |
05990c9bda | ||
![]() |
509a34fbab | ||
![]() |
cbf76a1290 | ||
![]() |
78b9922fc4 | ||
![]() |
9eb48deb44 | ||
![]() |
bbd3e05335 | ||
![]() |
8fb10edf97 | ||
![]() |
f268993760 | ||
![]() |
c0c8b2e50d | ||
![]() |
d32ce9c746 | ||
![]() |
5c381b34ea | ||
![]() |
b7cdd06820 | ||
![]() |
308275909d | ||
![]() |
adda4e137e | ||
![]() |
8b58c67bbb | ||
![]() |
8f3dabbf3f | ||
![]() |
c45b751b14 | ||
![]() |
58641572cb | ||
![]() |
c93954899e | ||
![]() |
7095ae10f7 | ||
![]() |
aa587a5abb | ||
![]() |
2c41b69d3e | ||
![]() |
7ab99528d8 | ||
![]() |
57d389823b | ||
![]() |
8be3c6f058 | ||
![]() |
64aef1f4c9 | ||
![]() |
c1c0cf73ce | ||
![]() |
c257444509 | ||
![]() |
c87851fcd5 | ||
![]() |
86e0420b42 | ||
![]() |
8638b78819 | ||
![]() |
fb6e5fd426 | ||
![]() |
e4b91cffea | ||
![]() |
064bdf7b6c | ||
![]() |
b802c0c8df | ||
![]() |
8c1900a658 | ||
![]() |
49699294b6 | ||
![]() |
d4ff836d64 | ||
![]() |
2a56b61a28 | ||
![]() |
01fb06af6c | ||
![]() |
be2c346edf | ||
![]() |
4be1dfcee4 | ||
![]() |
3483c51f62 | ||
![]() |
8fd3f42281 | ||
![]() |
2636464b85 | ||
![]() |
5b776cfc2d | ||
![]() |
48b5903677 | ||
![]() |
1a2a54c326 | ||
![]() |
0a2894fc99 | ||
![]() |
80a40807e3 | ||
![]() |
1cdaedbedf | ||
![]() |
cd59fe78be | ||
![]() |
1a442f9989 | ||
![]() |
3915c8eb00 | ||
![]() |
90b10f2e7c | ||
![]() |
1c75385d76 | ||
![]() |
7f23ad72c5 | ||
![]() |
af34c548f9 | ||
![]() |
b36bb58b76 | ||
![]() |
e15417eca8 | ||
![]() |
317b809564 | ||
![]() |
67e0c951af | ||
![]() |
db0c179552 | ||
![]() |
9639f44f48 | ||
![]() |
8af3fe0c7d | ||
![]() |
810c8db770 | ||
![]() |
5f0ab5a24b | ||
![]() |
a825bbf5ea | ||
![]() |
4a43a947bd | ||
![]() |
628e08c606 | ||
![]() |
2d15961855 | ||
![]() |
d5f0327b97 | ||
![]() |
70285f5ed9 | ||
![]() |
875ae08692 | ||
![]() |
7f65844f75 | ||
![]() |
6bdcbfb25a | ||
![]() |
c6850bad74 | ||
![]() |
83754c1146 | ||
![]() |
9058c93bc1 | ||
![]() |
e58b82e7ca | ||
![]() |
53a81fc2f6 | ||
![]() |
fff526cb00 | ||
![]() |
5f69ca47ff | ||
![]() |
d34b71f008 | ||
![]() |
1cd26607bd | ||
![]() |
03ce37052f | ||
![]() |
61b884d865 | ||
![]() |
f4840139a2 | ||
![]() |
29824f3cf7 | ||
![]() |
5343eaf89a | ||
![]() |
e6a81133dd | ||
![]() |
b92387b749 | ||
![]() |
2558466d78 | ||
![]() |
332fc7e814 | ||
![]() |
1d11c62df6 | ||
![]() |
bba5c09b23 | ||
![]() |
105c90bd1c | ||
![]() |
f664ed9254 | ||
![]() |
8c22d641ee | ||
![]() |
d0c29f25c9 | ||
![]() |
c3c61dc76e | ||
![]() |
8ac9048803 | ||
![]() |
a03ece6aff | ||
![]() |
09968ba035 | ||
![]() |
54ac80d4a5 | ||
![]() |
f6e2716dfb | ||
![]() |
2cb32328b6 | ||
![]() |
2a71bc9fde | ||
![]() |
e86298fbe2 | ||
![]() |
c70016eee5 | ||
![]() |
e495574670 | ||
![]() |
44f4338688 | ||
![]() |
983613c88d | ||
![]() |
29c7fa6efc | ||
![]() |
de29da973a | ||
![]() |
872480dde2 | ||
![]() |
06975aa0dd | ||
![]() |
faaaa134fd | ||
![]() |
fe6b8edd58 | ||
![]() |
834a8d1da1 | ||
![]() |
91b0c75045 | ||
![]() |
4f2f2271cd | ||
![]() |
de968eb310 | ||
![]() |
b2f7915994 | ||
![]() |
a63e2abc9c | ||
![]() |
e0a0d80bd3 | ||
![]() |
e7711b3b66 | ||
![]() |
661a9154ae | ||
![]() |
0dc0be7302 | ||
![]() |
91849853ba | ||
![]() |
a8958c5e53 | ||
![]() |
7ddf3c28f4 | ||
![]() |
a678f4a206 | ||
![]() |
32952d8624 | ||
![]() |
28539fd67f | ||
![]() |
1a9173cafc | ||
![]() |
4a8e62d30e | ||
![]() |
2c8149aa55 | ||
![]() |
5971b663cb | ||
![]() |
6766c5315e | ||
![]() |
0744af97af | ||
![]() |
3449000f42 | ||
![]() |
155be34a1d | ||
![]() |
4f788c2ae9 | ||
![]() |
02b3fadbac | ||
![]() |
912b6a5916 | ||
![]() |
67105b2a21 | ||
![]() |
0874502757 | ||
![]() |
d9ebd5cde6 | ||
![]() |
c393d3afde | ||
![]() |
8eb5022af5 | ||
![]() |
016a258301 | ||
![]() |
9f5733b595 | ||
![]() |
d3317a8a66 | ||
![]() |
f9c0936cea | ||
![]() |
dabd73b769 | ||
![]() |
2a1f6389c2 | ||
![]() |
9cc5841a91 | ||
![]() |
ba6b3fc1b5 | ||
![]() |
6693d16362 | ||
![]() |
6241cf977e | ||
![]() |
b877596096 | ||
![]() |
3fd34daf14 | ||
![]() |
88966767ee | ||
![]() |
3ef425423a | ||
![]() |
2f7a57a6de | ||
![]() |
786ee9c7be | ||
![]() |
4d97f35230 | ||
![]() |
2ca840d0b8 | ||
![]() |
a1a7a84831 | ||
![]() |
d16056e60a | ||
![]() |
287767bba1 | ||
![]() |
38d3b7aa45 | ||
![]() |
bd1cfcd593 | ||
![]() |
03bc8e71e6 | ||
![]() |
6d6646de04 | ||
![]() |
70a7b84dab | ||
![]() |
a31c2ac03e | ||
![]() |
4d46489a2a | ||
![]() |
ff6a57c3c3 | ||
![]() |
7a7e3848c7 | ||
![]() |
b0532c433e | ||
![]() |
5aa4420f59 | ||
![]() |
a23c3396a9 | ||
![]() |
6c7c178cd2 | ||
![]() |
df73a81db8 | ||
![]() |
2f961265a1 | ||
![]() |
0d12627f0b | ||
![]() |
7fbb253f88 | ||
![]() |
fe8c2209ca | ||
![]() |
1a55d84224 | ||
![]() |
1da8ad8668 | ||
![]() |
4f1537b879 | ||
![]() |
a1e2d51712 | ||
![]() |
362bfc5b15 | ||
![]() |
83afae31ed | ||
![]() |
a37e44b2d7 | ||
![]() |
f7caca51f6 | ||
![]() |
701a1d9435 | ||
![]() |
36f427f40c | ||
![]() |
03e53dc8a2 | ||
![]() |
73715bacc2 | ||
![]() |
fcb5653411 | ||
![]() |
d31c54c8af | ||
![]() |
c97315dc5a | ||
![]() |
dcb274b286 | ||
![]() |
894010786c | ||
![]() |
eb756916c2 | ||
![]() |
02787ac07f | ||
![]() |
fc3965ef70 | ||
![]() |
fdd8c5c50c | ||
![]() |
419f2c3f40 | ||
![]() |
a0d5f0722f | ||
![]() |
68501261c3 | ||
![]() |
0aece4ddab | ||
![]() |
d93c53fc62 | ||
![]() |
5904933a3f | ||
![]() |
57f5cd3ca7 | ||
![]() |
843c67d805 | ||
![]() |
566b8c57b1 | ||
![]() |
cd826e39d2 | ||
![]() |
228e7145c0 | ||
![]() |
1435a2ca61 | ||
![]() |
c9a7161d93 | ||
![]() |
e7af23788f | ||
![]() |
e8372692c5 | ||
![]() |
b479eff940 | ||
![]() |
6b8be98555 | ||
![]() |
2a8fd58232 | ||
![]() |
2ce3c5548a | ||
![]() |
d67eb20aed | ||
![]() |
11c7cd47ae | ||
![]() |
e0ecc53f4e | ||
![]() |
26203401a1 | ||
![]() |
5e7b929717 | ||
![]() |
56930a0174 | ||
![]() |
5c7b37bbbd | ||
![]() |
270b39b2eb | ||
![]() |
a0d6c5a113 | ||
![]() |
f11fde9bf5 | ||
![]() |
0099bbf9a6 | ||
![]() |
ba26736d7e | ||
![]() |
89e9785d7a | ||
![]() |
356521864e | ||
![]() |
ebfc39cc50 | ||
![]() |
bcfc24fd13 | ||
![]() |
05e2baaa49 | ||
![]() |
ed08787aaa | ||
![]() |
2a6cb04876 | ||
![]() |
6689f900fc | ||
![]() |
f520316124 | ||
![]() |
667b927004 | ||
![]() |
db7c3b9220 | ||
![]() |
6af0c1e129 | ||
![]() |
42a6bd2fd4 | ||
![]() |
ed6d5d5b7b | ||
![]() |
f06910f5bf | ||
![]() |
d85110b6ec | ||
![]() |
00d1d7828c | ||
![]() |
90a45aac6e | ||
![]() |
d0c9ad6433 | ||
![]() |
7a0174f871 | ||
![]() |
b34d2c73fa | ||
![]() |
8be32e98d8 | ||
![]() |
49464be645 | ||
![]() |
9c7818582d | ||
![]() |
48b01446ba | ||
![]() |
5a8e387b77 | ||
![]() |
63ddad86a9 | ||
![]() |
1a28906a3d | ||
![]() |
a8af694d26 | ||
![]() |
b541369c45 | ||
![]() |
fc06975fa3 | ||
![]() |
6764bb0157 | ||
![]() |
670a9b7f83 | ||
![]() |
acd3e79add | ||
![]() |
8680c50d07 | ||
![]() |
8bcefc92d0 | ||
![]() |
547eb55553 | ||
![]() |
7209266ea1 | ||
![]() |
4ed474b66a | ||
![]() |
3220b24819 | ||
![]() |
fd0ba01d68 | ||
![]() |
7c0f2ae6d1 | ||
![]() |
93a97ec6e5 | ||
![]() |
b68d8fe82e | ||
![]() |
4cdb86c730 | ||
![]() |
e8b27a965d | ||
![]() |
9b46fabe08 | ||
![]() |
8e3cbe030c | ||
![]() |
7e1d28673f | ||
![]() |
94f104cb6c | ||
![]() |
0db65190c2 | ||
![]() |
2b78840ef7 | ||
![]() |
b32ad8b90c | ||
![]() |
831d765b52 | ||
![]() |
8d46bb9cab | ||
![]() |
c6184d2e7e | ||
![]() |
ec302295b6 | ||
![]() |
f542c0589b | ||
![]() |
d53cbd2dc6 | ||
![]() |
5c4707eafc | ||
![]() |
819364ea23 | ||
![]() |
b9c38cfec8 | ||
![]() |
d591ab6263 | ||
![]() |
7871a465d3 | ||
![]() |
fd23a0e909 | ||
![]() |
62ba66d618 | ||
![]() |
febaf9dec4 | ||
![]() |
6464dfc91d | ||
![]() |
d3f3da5112 | ||
![]() |
7dcf9237d5 | ||
![]() |
bce391a663 | ||
![]() |
2835a70749 | ||
![]() |
94c4b6bd74 | ||
![]() |
f5b9690ec7 | ||
![]() |
16f367348a | ||
![]() |
aa65cd7a90 | ||
![]() |
86532fa8d3 | ||
![]() |
0f0062b492 | ||
![]() |
9d5b4ec975 | ||
![]() |
e52930df24 | ||
![]() |
60eae7335b |
@@ -13,7 +13,7 @@ BinPackParameters: 'true'
|
||||
ColumnLimit: '1000'
|
||||
IndentCaseLabels: 'true'
|
||||
IndentPPDirectives: AfterHash
|
||||
IndentWidth: '2'
|
||||
IndentWidth: '4'
|
||||
MaxEmptyLinesToKeep: '1'
|
||||
PointerAlignment: Right
|
||||
SortIncludes: 'false'
|
||||
|
@@ -16,12 +16,18 @@ insert_final_newline = true
|
||||
trim_trailing_whitespace = false
|
||||
indent_size = 4
|
||||
|
||||
[{qmk,*.py}]
|
||||
charset = utf-8
|
||||
max_line_length = 200
|
||||
|
||||
# Make these match what we have in .gitattributes
|
||||
[*.mk]
|
||||
end_of_line = lf
|
||||
indent_style = tab
|
||||
|
||||
[Makefile]
|
||||
end_of_line = lf
|
||||
indent_style = tab
|
||||
|
||||
[*.sh]
|
||||
end_of_line = lf
|
||||
|
7
.gitignore
vendored
7
.gitignore
vendored
@@ -25,7 +25,7 @@ quantum/version.h
|
||||
CMakeLists.txt
|
||||
cmake-build-debug
|
||||
doxygen/
|
||||
.DS_STORE
|
||||
.DS_Store
|
||||
/util/wsl_downloaded
|
||||
/util/win_downloaded
|
||||
/keyboards/*/Makefile
|
||||
@@ -60,8 +60,8 @@ util/Win_Check_Output.txt
|
||||
|
||||
# ignore image files
|
||||
*.png
|
||||
*.jpg
|
||||
*.gif
|
||||
*.jpg
|
||||
|
||||
# Do not ignore MiniDox left/right hand eeprom files
|
||||
!keyboards/minidox/*.eep
|
||||
@@ -70,3 +70,6 @@ util/Win_Check_Output.txt
|
||||
secrets.tar
|
||||
id_rsa_*
|
||||
/.vs
|
||||
|
||||
# python things
|
||||
__pycache__
|
||||
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -11,3 +11,6 @@
|
||||
[submodule "lib/googletest"]
|
||||
path = lib/googletest
|
||||
url = https://github.com/google/googletest
|
||||
[submodule "lib/lufa"]
|
||||
path = lib/lufa
|
||||
url = https://github.com/qmk/lufa
|
||||
|
27
.travis.yml
27
.travis.yml
@@ -1,6 +1,5 @@
|
||||
os: linux
|
||||
dist: trusty
|
||||
sudo: required
|
||||
group: edge
|
||||
language: c
|
||||
branches:
|
||||
@@ -11,35 +10,23 @@ env:
|
||||
global:
|
||||
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
|
||||
- MAKEFLAGS="-j3 --output-sync"
|
||||
before_install:
|
||||
- wget http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||
# Need DFU > .5 for dfu-suffix
|
||||
- sudo add-apt-repository --yes ppa:tormodvolden/ppa
|
||||
- sudo apt-get update -qq
|
||||
services:
|
||||
- docker
|
||||
install:
|
||||
- tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||
- export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
|
||||
- npm install -g moxygen
|
||||
- sudo apt-get -y --force-yes install dfu-util
|
||||
before_script:
|
||||
- avr-gcc --version
|
||||
script:
|
||||
- git rev-parse --short HEAD
|
||||
- bash util/travis_test.sh
|
||||
- bash util/travis_build.sh
|
||||
- bash util/travis_docs.sh
|
||||
- git rev-parse --short HEAD
|
||||
- bash util/travis_test.sh
|
||||
- bash util/travis_build.sh
|
||||
- bash util/travis_docs.sh
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- dfu-programmer
|
||||
- pandoc
|
||||
- gcc-arm-none-eabi
|
||||
- binutils-arm-none-eabi
|
||||
- libnewlib-arm-none-eabi
|
||||
- diffutils
|
||||
- dos2unix
|
||||
- doxygen
|
||||
after_success:
|
||||
after_script:
|
||||
bash util/travis_compiled_push.sh
|
||||
notifications:
|
||||
webhooks:
|
||||
|
7
.vscode/extensions.json
vendored
7
.vscode/extensions.json
vendored
@@ -1,6 +1,11 @@
|
||||
// Suggested extensions
|
||||
{
|
||||
"recommendations": [
|
||||
"EditorConfig.EditorConfig"
|
||||
"EditorConfig.EditorConfig",
|
||||
"xaver.clang-format",
|
||||
"ms-vscode.cpptools",
|
||||
"bierner.github-markdown-preview",
|
||||
"donjayamanne.git-extension-pack",
|
||||
"CoenraadS.bracket-pair-colorizer-2"
|
||||
]
|
||||
}
|
||||
|
12
.vscode/settings.json
vendored
12
.vscode/settings.json
vendored
@@ -8,10 +8,12 @@
|
||||
"**/*.hex": true
|
||||
},
|
||||
"files.associations": {
|
||||
"*.h": "c",
|
||||
"*.c": "c",
|
||||
"*.cpp": "cpp",
|
||||
"*.hpp": "cpp",
|
||||
"xstddef": "c"
|
||||
"*.h": "c",
|
||||
"*.c": "c",
|
||||
"*.cpp": "cpp",
|
||||
"*.hpp": "cpp",
|
||||
"xstddef": "c",
|
||||
"type_traits": "c",
|
||||
"utility": "c"
|
||||
}
|
||||
}
|
||||
|
@@ -8,8 +8,17 @@ Our users, contributors, and collaborators are expected to treat each other with
|
||||
|
||||
* The use of sexualized language or imagery
|
||||
* Unwelcome advances, sexual or otherwise
|
||||
* Deliberate intimidation, stalking, or following
|
||||
* Insults or derogatory comments, or personal or political attacks
|
||||
* Publishing others’ private information without explicit permission
|
||||
* Sustained disruption of talks or other events
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
* Advocating for, or encouraging, any of the above behaviour
|
||||
|
||||
If someone is violating this Code of Conduct you may email hello@qmk.fm to bring your concern to the Members. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
# Reporting
|
||||
|
||||
If someone is violating this Code of Conduct, please email hello@qmk.fm or reach out to one of the Collaborators to bring it to our attention. All complaints will be reviewed and investigated.
|
||||
|
||||
QMK will seek to use the least punitive means available to resolve an issue. If the circumstances require asking an offender to leave, we will do that.
|
||||
|
||||
Reports will be taken and kept in strict confidence. You will not be required to confront an offender directly.
|
||||
|
26
Dockerfile
26
Dockerfile
@@ -1,29 +1,7 @@
|
||||
FROM debian:9
|
||||
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
avr-libc \
|
||||
avrdude \
|
||||
binutils-arm-none-eabi \
|
||||
binutils-avr \
|
||||
build-essential \
|
||||
dfu-programmer \
|
||||
dfu-util \
|
||||
gcc \
|
||||
gcc-arm-none-eabi \
|
||||
gcc-avr \
|
||||
git \
|
||||
libnewlib-arm-none-eabi \
|
||||
software-properties-common \
|
||||
unzip \
|
||||
wget \
|
||||
zip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV KEYBOARD=ergodox_ez
|
||||
ENV KEYMAP=default
|
||||
FROM qmkfm/base_container
|
||||
|
||||
VOLUME /qmk_firmware
|
||||
WORKDIR /qmk_firmware
|
||||
COPY . .
|
||||
|
||||
CMD make $KEYBOARD:$KEYMAP
|
||||
CMD make all:default
|
||||
|
23
Makefile
23
Makefile
@@ -20,7 +20,10 @@ endif
|
||||
override SILENT := false
|
||||
|
||||
ifndef SUB_IS_SILENT
|
||||
QMK_VERSION := $(shell git describe --abbrev=0 --tags 2>/dev/null)
|
||||
ifndef SKIP_GIT
|
||||
QMK_VERSION := $(shell git describe --abbrev=0 --tags 2>/dev/null)
|
||||
endif
|
||||
|
||||
ifneq ($(QMK_VERSION),)
|
||||
$(info QMK Firmware $(QMK_VERSION))
|
||||
endif
|
||||
@@ -94,6 +97,7 @@ $(eval $(call NEXT_PATH_ELEMENT))
|
||||
# endif
|
||||
|
||||
define GET_KEYBOARDS
|
||||
ifndef ALT_GET_KEYBOARDS
|
||||
All_RULES_MK := $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/rules.mk))
|
||||
All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/rules.mk))
|
||||
All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/rules.mk))
|
||||
@@ -105,6 +109,9 @@ define GET_KEYBOARDS
|
||||
KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/*/keymaps/*/rules.mk))
|
||||
|
||||
KEYBOARDS := $$(sort $$(filter-out $$(KEYMAPS_MK), $$(All_RULES_MK)))
|
||||
else
|
||||
KEYBOARDS := $(shell find keyboards/ -type f -iname "rules.mk" | grep -v keymaps | sed 's!keyboards/\(.*\)/rules.mk!\1!' | sort | uniq)
|
||||
endif
|
||||
endef
|
||||
|
||||
$(eval $(call GET_KEYBOARDS))
|
||||
@@ -364,6 +371,9 @@ define PARSE_KEYBOARD
|
||||
# The same if all was specified
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true)
|
||||
$$(eval $$(call PARSE_ALL_KEYMAPS))
|
||||
# List all keymaps for the given keyboard
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,list-keymaps),true)
|
||||
$$(eval $$(call LIST_ALL_KEYMAPS))
|
||||
# Try to match the specified keyamp with the list of known keymaps
|
||||
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYMAPS)),true)
|
||||
$$(eval $$(call PARSE_KEYMAP,$$(MATCHED_ITEM)))
|
||||
@@ -400,6 +410,16 @@ endef
|
||||
# endif
|
||||
# endef
|
||||
|
||||
# Prints a list of all known keymaps for the given keyboard
|
||||
define LIST_ALL_KEYMAPS
|
||||
COMMAND_true_LIST_KEYMAPS := \
|
||||
printf "$$(KEYMAPS)\n";
|
||||
COMMAND_false_LIST_KEYMAPS := \
|
||||
printf "$$(MSG_AVAILABLE_KEYMAPS)\n"; \
|
||||
printf "$$(KEYMAPS)\n";
|
||||
COMMANDS += LIST_KEYMAPS
|
||||
endef
|
||||
|
||||
# $1 Keymap
|
||||
# This is the meat of compiling a keyboard, when entering this, everything is known
|
||||
# keyboard, subproject, and keymap
|
||||
@@ -541,6 +561,7 @@ ifndef SKIP_GIT
|
||||
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 1 --init lib/chibios; fi
|
||||
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 1 --init lib/chibios-contrib; fi
|
||||
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 1 --init lib/ugfx; fi
|
||||
if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 1 --init lib/lufa; fi
|
||||
git submodule status --recursive 2>/dev/null | \
|
||||
while IFS= read -r x; do \
|
||||
case "$$x" in \
|
||||
|
33
Vagrantfile
vendored
33
Vagrantfile
vendored
@@ -7,6 +7,8 @@ Vagrant.configure(2) do |config|
|
||||
|
||||
# VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
|
||||
config.vm.box = "generic/debian9"
|
||||
|
||||
config.vm.synced_folder '.', '/vagrant'
|
||||
|
||||
# This section allows you to customize the Virtualbox VM
|
||||
# settings, ie showing the GUI or upping the memory
|
||||
@@ -50,26 +52,37 @@ Vagrant.configure(2) do |config|
|
||||
end
|
||||
|
||||
# Docker provider pulls from hub.docker.com respecting docker.image if
|
||||
# config.vm.box is nil. Note that this bind-mounts from the current dir to
|
||||
# config.vm.box is nil. In this case, we adhoc build util/vagrant/Dockerfile.
|
||||
# Note that this bind-mounts from the current dir to
|
||||
# /vagrant in the guest, so unless your UID is 1000 to match vagrant in the
|
||||
# image, you'll need to: chmod -R a+rw .
|
||||
config.vm.provider "docker" do |docker, override|
|
||||
override.vm.box = nil
|
||||
docker.image = "jesselang/debian-vagrant:stretch"
|
||||
docker.build_dir = "util/vagrant"
|
||||
docker.has_ssh = true
|
||||
end
|
||||
|
||||
# This script ensures the required packages for AVR programming are installed
|
||||
# It also ensures the system always gets the latest updates when powered on
|
||||
# If this causes issues you can run a 'vagrant destroy' and then
|
||||
# add a # before ,run: (or change "always" to "once") and run 'vagrant up' to get a working
|
||||
# non-updated box and then attempt to troubleshoot or open a Github issue
|
||||
config.vm.provision "shell", inline: "/bin/sh -c 'yes | /vagrant/util/qmk_install.sh'", run: "always"
|
||||
# Unless we are running the docker container directly
|
||||
# 1. run container detached on vm
|
||||
# 2. attach on 'vagrant ssh'
|
||||
["virtualbox", "vmware_workstation", "vmware_fusion"].each do |type|
|
||||
config.vm.provider type do |virt, override|
|
||||
override.vm.provision "docker" do |d|
|
||||
d.run "qmkfm/base_container",
|
||||
cmd: "tail -f /dev/null",
|
||||
args: "--privileged -v /dev:/dev -v '/vagrant:/vagrant'"
|
||||
end
|
||||
|
||||
override.vm.provision "shell", inline: <<-SHELL
|
||||
echo 'docker restart qmkfm-base_container && exec docker exec -it qmkfm-base_container /bin/bash -l' >> ~vagrant/.bashrc
|
||||
SHELL
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.post_up_message = <<-EOT
|
||||
|
||||
Log into the VM using 'vagrant ssh'. QMK directory synchronized with host is
|
||||
located at /vagrant
|
||||
Log into the environment using 'vagrant ssh'. QMK directory synchronized with
|
||||
host is located at /vagrant
|
||||
To compile the .hex files use make command inside this directory, e.g.
|
||||
cd /vagrant
|
||||
make <keyboard>:default
|
||||
|
83
bin/qmk
Executable file
83
bin/qmk
Executable file
@@ -0,0 +1,83 @@
|
||||
#!/usr/bin/env python3
|
||||
"""CLI wrapper for running QMK commands.
|
||||
"""
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from importlib.util import find_spec
|
||||
from time import strftime
|
||||
|
||||
# Add the QMK python libs to our path
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
qmk_dir = os.path.abspath(os.path.join(script_dir, '..'))
|
||||
python_lib_dir = os.path.abspath(os.path.join(qmk_dir, 'lib', 'python'))
|
||||
sys.path.append(python_lib_dir)
|
||||
|
||||
# Make sure our modules have been setup
|
||||
with open(os.path.join(qmk_dir, 'requirements.txt'), 'r') as fd:
|
||||
for line in fd.readlines():
|
||||
line = line.strip().replace('<', '=').replace('>', '=')
|
||||
|
||||
if line[0] == '#':
|
||||
continue
|
||||
|
||||
if '#' in line:
|
||||
line = line.split('#')[0]
|
||||
|
||||
module = line.split('=')[0] if '=' in line else line
|
||||
if not find_spec(module):
|
||||
print('Could not find module %s!', module)
|
||||
print('Please run `pip3 install -r requirements.txt` to install the python dependencies.')
|
||||
exit(255)
|
||||
|
||||
# Figure out our version
|
||||
# TODO(skullydazed/anyone): Find a method that doesn't involve git. This is slow in docker and on windows.
|
||||
command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags']
|
||||
result = subprocess.run(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
if result.returncode == 0:
|
||||
os.environ['QMK_VERSION'] = result.stdout.strip()
|
||||
else:
|
||||
os.environ['QMK_VERSION'] = 'nogit-' + strftime('%Y-%m-%d-%H:%M:%S') + '-dirty'
|
||||
|
||||
# Setup the CLI
|
||||
import milc
|
||||
|
||||
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
||||
|
||||
|
||||
@milc.cli.entrypoint('QMK Helper Script')
|
||||
def qmk_main(cli):
|
||||
"""The function that gets run when no subcommand is provided.
|
||||
"""
|
||||
cli.print_help()
|
||||
|
||||
|
||||
def main():
|
||||
"""Setup our environment and then call the CLI entrypoint.
|
||||
"""
|
||||
# Change to the root of our checkout
|
||||
os.environ['ORIG_CWD'] = os.getcwd()
|
||||
os.chdir(qmk_dir)
|
||||
|
||||
# Import the subcommands
|
||||
import qmk.cli
|
||||
|
||||
# Execute
|
||||
return_code = milc.cli()
|
||||
|
||||
if return_code is False:
|
||||
exit(1)
|
||||
|
||||
elif return_code is not True and isinstance(return_code, int):
|
||||
if return_code < 0 or return_code > 255:
|
||||
milc.cli.log.error('Invalid return_code: %d', return_code)
|
||||
exit(255)
|
||||
|
||||
exit(return_code)
|
||||
|
||||
exit(0)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@@ -19,12 +19,14 @@
|
||||
#
|
||||
# Sets the bootloader defined in the keyboard's/keymap's rules.mk
|
||||
# Current options:
|
||||
# atmel-dfu
|
||||
# lufa-dfu
|
||||
# qmk-dfu
|
||||
# halfkay
|
||||
# caterina
|
||||
# bootloadHID
|
||||
#
|
||||
# halfkay PJRC Teensy
|
||||
# caterina Pro Micro (Sparkfun/generic)
|
||||
# atmel-dfu Atmel factory DFU
|
||||
# lufa-dfu LUFA DFU
|
||||
# qmk-dfu QMK DFU (LUFA + blinkenlight)
|
||||
# bootloadHID HIDBootFlash compatible (ATmega32A)
|
||||
# USBasp USBaspLoader (ATmega328P)
|
||||
#
|
||||
# BOOTLOADER_SIZE can still be defined manually, but it's recommended
|
||||
# you add any possible configuration to this list
|
||||
@@ -32,40 +34,40 @@
|
||||
ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
|
||||
OPT_DEFS += -DBOOTLOADER_DFU
|
||||
ifeq ($(strip $(MCU)), atmega32u4)
|
||||
BOOTLOADER_SIZE = 4096
|
||||
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifeq ($(strip $(MCU)), at90usb1286)
|
||||
BOOTLOADER_SIZE = 8192
|
||||
BOOTLOADER_SIZE = 8192
|
||||
endif
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_LUFA_DFU
|
||||
OPT_DEFS += -DBOOTLOADER_DFU
|
||||
ifeq ($(strip $(MCU)), atmega32u4)
|
||||
BOOTLOADER_SIZE = 4096
|
||||
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifeq ($(strip $(MCU)), at90usb1286)
|
||||
BOOTLOADER_SIZE = 8192
|
||||
BOOTLOADER_SIZE = 8192
|
||||
endif
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_QMK_DFU
|
||||
OPT_DEFS += -DBOOTLOADER_DFU
|
||||
ifeq ($(strip $(MCU)), atmega32u4)
|
||||
BOOTLOADER_SIZE = 4096
|
||||
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifeq ($(strip $(MCU)), at90usb1286)
|
||||
BOOTLOADER_SIZE = 8192
|
||||
BOOTLOADER_SIZE = 8192
|
||||
endif
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), halfkay)
|
||||
OPT_DEFS += -DBOOTLOADER_HALFKAY
|
||||
ifeq ($(strip $(MCU)), atmega32u4)
|
||||
BOOTLOADER_SIZE = 512
|
||||
BOOTLOADER_SIZE = 512
|
||||
endif
|
||||
ifeq ($(strip $(MCU)), at90usb1286)
|
||||
BOOTLOADER_SIZE = 1024
|
||||
BOOTLOADER_SIZE = 1024
|
||||
endif
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), caterina)
|
||||
@@ -76,6 +78,10 @@ ifeq ($(strip $(BOOTLOADER)), bootloadHID)
|
||||
OPT_DEFS += -DBOOTLOADER_BOOTLOADHID
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), USBasp)
|
||||
OPT_DEFS += -DBOOTLOADER_USBASP
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
|
||||
ifdef BOOTLOADER_SIZE
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE))
|
||||
|
27
build_json.mk
Normal file
27
build_json.mk
Normal file
@@ -0,0 +1,27 @@
|
||||
# Look for a json keymap file
|
||||
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.json)","")
|
||||
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
|
||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_5)/keymap.json
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.json)","")
|
||||
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
|
||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_4)/keymap.json
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.json)","")
|
||||
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
|
||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_3)/keymap.json
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.json)","")
|
||||
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
|
||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_2)/keymap.json
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
|
||||
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
|
||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
||||
endif
|
||||
|
||||
# Generate the keymap.c
|
||||
ifneq ("$(KEYMAP_JSON)","")
|
||||
_ = $(shell test -e $(KEYMAP_C) || bin/qmk json-keymap $(KEYMAP_JSON) -o $(KEYMAP_C))
|
||||
endif
|
@@ -98,31 +98,38 @@ 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)
|
||||
|
||||
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_5)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_4)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_3)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_2)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_1)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
||||
else ifneq ($(LAYOUTS),)
|
||||
include build_layout.mk
|
||||
else
|
||||
$(error Could not find keymap)
|
||||
# this state should never be reached
|
||||
# Check for keymap.json first, so we can regenerate keymap.c
|
||||
include build_json.mk
|
||||
|
||||
ifeq ("$(wildcard $(KEYMAP_PATH))", "")
|
||||
# Look through the possible keymap folders until we find a matching keymap.c
|
||||
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_5)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_4)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_3)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_2)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_1)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
||||
else ifneq ($(LAYOUTS),)
|
||||
# If we haven't found a keymap yet fall back to community layouts
|
||||
include build_layout.mk
|
||||
else
|
||||
$(error Could not find keymap)
|
||||
# this state should never be reached
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CTPC)), yes)
|
||||
@@ -313,7 +320,6 @@ ifneq ("$(wildcard $(USER_PATH)/config.h)","")
|
||||
CONFIG_H += $(USER_PATH)/config.h
|
||||
endif
|
||||
|
||||
|
||||
# Object files directory
|
||||
# To put object files in current directory, use a dot (.), do NOT make
|
||||
# this an empty or blank macro!
|
||||
@@ -323,7 +329,7 @@ ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
|
||||
CONFIG_H += $(KEYMAP_PATH)/config.h
|
||||
endif
|
||||
|
||||
# # project specific files
|
||||
# project specific files
|
||||
SRC += $(KEYBOARD_SRC) \
|
||||
$(KEYMAP_C) \
|
||||
$(QUANTUM_SRC)
|
||||
@@ -392,6 +398,7 @@ $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
|
||||
all: build check-size
|
||||
build: elf cpfirmware
|
||||
check-size: build
|
||||
objs-size: build
|
||||
|
||||
include show_options.mk
|
||||
include $(TMK_PATH)/rules.mk
|
||||
|
@@ -112,7 +112,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
|
||||
else
|
||||
SRC += ws2812.c
|
||||
WS2812_DRIVER_REQUIRED = yes
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -133,7 +133,7 @@ ifeq ($(strip $(LED_MATRIX_ENABLE)), IS31FL3731)
|
||||
OPT_DEFS += -DIS31FL3731
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3731-simple.c
|
||||
SRC += i2c_master.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
RGB_MATRIX_ENABLE ?= no
|
||||
@@ -157,26 +157,26 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731)
|
||||
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3731.c
|
||||
SRC += i2c_master.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3733)
|
||||
OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3733.c
|
||||
SRC += i2c_master.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737)
|
||||
OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3737.c
|
||||
SRC += i2c_master.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812)
|
||||
OPT_DEFS += -DWS2812
|
||||
SRC += ws2812.c
|
||||
WS2812_DRIVER_REQUIRED = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
|
||||
@@ -229,13 +229,57 @@ ifeq ($(strip $(LCD_ENABLE)), yes)
|
||||
CIE1931_CURVE = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
||||
# backward compat
|
||||
ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
|
||||
BACKLIGHT_ENABLE = custom
|
||||
endif
|
||||
|
||||
VALID_BACKLIGHT_TYPES := yes custom
|
||||
|
||||
BACKLIGHT_ENABLE ?= no
|
||||
ifneq ($(strip $(BACKLIGHT_ENABLE)), no)
|
||||
ifeq ($(filter $(BACKLIGHT_ENABLE),$(VALID_BACKLIGHT_TYPES)),)
|
||||
$(error BACKLIGHT_ENABLE="$(BACKLIGHT_ENABLE)" is not a valid backlight type)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||
CIE1931_CURVE = yes
|
||||
endif
|
||||
ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
|
||||
|
||||
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/backlight
|
||||
SRC += $(QUANTUM_DIR)/backlight/backlight.c
|
||||
OPT_DEFS += -DBACKLIGHT_ENABLE
|
||||
|
||||
ifeq ($(strip $(BACKLIGHT_ENABLE)), custom)
|
||||
OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),AVR)
|
||||
SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c
|
||||
else
|
||||
SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c
|
||||
endif
|
||||
endif
|
||||
|
||||
VALID_WS2812_DRIVER_TYPES := bitbang pwm spi i2c
|
||||
|
||||
WS2812_DRIVER ?= bitbang
|
||||
ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
|
||||
ifeq ($(filter $(WS2812_DRIVER),$(VALID_WS2812_DRIVER_TYPES)),)
|
||||
$(error WS2812_DRIVER="$(WS2812_DRIVER)" is not a valid WS2812 driver)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(WS2812_DRIVER)), bitbang)
|
||||
SRC += ws2812.c
|
||||
else
|
||||
SRC += ws2812_$(strip $(WS2812_DRIVER)).c
|
||||
endif
|
||||
|
||||
# add extra deps
|
||||
ifeq ($(strip $(WS2812_DRIVER)), i2c)
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CIE1931_CURVE)), yes)
|
||||
@@ -267,20 +311,21 @@ ifeq ($(strip $(ENCODER_ENABLE)), yes)
|
||||
OPT_DEFS += -DENCODER_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L)
|
||||
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
||||
SRC += haptic.c
|
||||
HAPTIC_ENABLE ?= no
|
||||
ifneq ($(strip $(HAPTIC_ENABLE)),no)
|
||||
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
||||
SRC += haptic.c
|
||||
OPT_DEFS += -DHAPTIC_ENABLE
|
||||
endif
|
||||
|
||||
ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), )
|
||||
SRC += DRV2605L.c
|
||||
SRC += i2c_master.c
|
||||
OPT_DEFS += -DHAPTIC_ENABLE
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
OPT_DEFS += -DDRV2605L
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(HAPTIC_ENABLE)), SOLENOID)
|
||||
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
||||
SRC += haptic.c
|
||||
ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), )
|
||||
SRC += solenoid.c
|
||||
OPT_DEFS += -DHAPTIC_ENABLE
|
||||
OPT_DEFS += -DSOLENOID_ENABLE
|
||||
endif
|
||||
|
||||
@@ -358,3 +403,9 @@ ifeq ($(strip $(SPACE_CADET_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_space_cadet.c
|
||||
OPT_DEFS += -DSPACE_CADET_ENABLE
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/dip_switch.c
|
||||
OPT_DEFS += -DDIP_SWITCH_ENABLE
|
||||
endif
|
||||
|
53
docs/ChangeLog/20190830.md
Normal file
53
docs/ChangeLog/20190830.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# QMK Breaking Change - 2019 Aug 30
|
||||
|
||||
Four times a year QMK runs a process for merging Breaking Changes. A Breaking Change is any change which modifies how QMK behaves in a way that is incompatible or potentially dangerous. We limit these changes to 4 times per year so that users can have confidence that updating their QMK tree will not break their keymaps.
|
||||
|
||||
This document marks the inaugural Breaking Change merge. A list of changes follows.
|
||||
|
||||
## Core code formatting with clang-format
|
||||
|
||||
* All core files (`drivers/`, `quantum/`, `tests/`, and `tmk_core/`) have been formatted with clang-format
|
||||
* A travis process to reformat PR's on merge has been instituted
|
||||
* You can use the new CLI command `qmk cformat` to format before submitting your PR if you wish.
|
||||
|
||||
## LUFA USB descriptor cleanup
|
||||
|
||||
* Some code cleanups related to the USB HID descriptors on AVR keyboards, to make them easier to read and understand
|
||||
* More information: see https://github.com/qmk/qmk_firmware/pull/4871
|
||||
* No behaviour changes anticipated and no keymaps modified
|
||||
|
||||
## Migrating `ACTION_LAYER_MOMENTARY()` entries in `fn_actions` to `MO()` keycodes
|
||||
|
||||
* `fn_actions` is deprecated, and its functionality has been superseded by direct keycodes and `process_record_user()`
|
||||
* The end result of removing this obsolete feature should result in a decent reduction in firmware size and code complexity
|
||||
* All keymaps affected are recommended to switch away from `fn_actions` in favour of the [custom keycode](https://docs.qmk.fm/#/custom_quantum_functions) and [macro](https://docs.qmk.fm/#/feature_macros) features
|
||||
|
||||
## Update Atreus to current code conventions
|
||||
|
||||
* Duplicate include guards have bypassed the expected header processing behavior
|
||||
* All keymaps affected are recommended to remove duplication of `<keyboard>/config.h` to `<keyboard>/keymaps/<user>/config.h` and only provide overrides at the keymap level
|
||||
|
||||
## Backport changes to keymap language files from ZSA fork
|
||||
|
||||
* Fixes an issue in the `keymap_br_abnt2.h` file that includes the wrong source (`keymap_common.h` instead of `keymap.h`)
|
||||
* Updates the `keymap_swedish.h` file to be specific to swedish, and not just "nordic" in general.
|
||||
* Any keymaps using this will need to remove `NO_*` and replace it with `SE_*`.
|
||||
|
||||
## Update repo to use LUFA as a git submodule
|
||||
|
||||
* `/lib/LUFA` removed from the repo
|
||||
* LUFA set as a submodule, pointing to qmk/lufa
|
||||
* This should allow more flexibility with LUFA, and allow us to keep the sub-module up to date, a lot more easily. It was ~2 years out of date with no easy path to fix that. This prevents that from being an issue in the future
|
||||
|
||||
## Migrating `ACTION_BACKLIGHT_*()` entries in `fn_actions` to `BL_` keycodes
|
||||
|
||||
* `fn_actions` is deprecated, and its functionality has been superseded by direct keycodes and `process_record_user()`
|
||||
* All keymaps using these actions have had the relevant `KC_FN*` keys replaced with the equivalent `BL_*` keys
|
||||
* If you currently use `KC_FN*` you will need to replace `fn_actions` with the [custom keycode](https://docs.qmk.fm/#/custom_quantum_functions) and [macro](https://docs.qmk.fm/#/feature_macros) features
|
||||
|
||||
## Remove `KC_DELT` alias in favor of `KC_DEL`
|
||||
|
||||
* `KC_DELT` was a redundant, undocumented alias for `KC_DELETE`
|
||||
* It has been removed and all its uses replaced with the more common `KC_DEL` alias
|
||||
* Around 90 keymaps (mostly for ErgoDox boards) have been modified as a result
|
||||
|
@@ -1,4 +0,0 @@
|
||||
# Languages
|
||||
|
||||
* [English](/)
|
||||
* [Chinese](zh/)
|
5
docs/_langs.md
Normal file
5
docs/_langs.md
Normal file
@@ -0,0 +1,5 @@
|
||||
- Translations
|
||||
- [:uk: English](/)
|
||||
- [:cn: 中文](/zh-cn/)
|
||||
- [:fr: Français](/fr-fr/)
|
||||
- [:ru: Русский](/ru-ru/)
|
@@ -8,15 +8,21 @@
|
||||
|
||||
* [QMK Basics](README.md)
|
||||
* [QMK Introduction](getting_started_introduction.md)
|
||||
* [QMK CLI](cli.md)
|
||||
* [QMK CLI Config](cli_configuration.md)
|
||||
* [Contributing to QMK](contributing.md)
|
||||
* [How to Use Github](getting_started_github.md)
|
||||
* [Getting Help](getting_started_getting_help.md)
|
||||
|
||||
* [Breaking Changes](breaking_changes.md)
|
||||
* [2019 Aug 30](ChangeLog/20190830.md)
|
||||
|
||||
* [FAQ](faq.md)
|
||||
* [General FAQ](faq_general.md)
|
||||
* [Build/Compile QMK](faq_build.md)
|
||||
* [Debugging/Troubleshooting QMK](faq_debug.md)
|
||||
* [Keymap](faq_keymap.md)
|
||||
* [Driver Installation with Zadig](driver_installation_zadig.md)
|
||||
|
||||
* Detailed Guides
|
||||
* [Install Build Tools](getting_started_build_tools.md)
|
||||
@@ -34,6 +40,8 @@
|
||||
* [Keyboard Guidelines](hardware_keyboard_guidelines.md)
|
||||
* [Config Options](config_options.md)
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Coding Conventions - C](coding_conventions_c.md)
|
||||
* [Coding Conventions - Python](coding_conventions_python.md)
|
||||
* [Documentation Best Practices](documentation_best_practices.md)
|
||||
* [Documentation Templates](documentation_templates.md)
|
||||
* [Glossary](reference_glossary.md)
|
||||
@@ -41,6 +49,7 @@
|
||||
* [Useful Functions](ref_functions.md)
|
||||
* [Configurator Support](reference_configurator_support.md)
|
||||
* [info.json Format](reference_info_json.md)
|
||||
* [Python CLI Development](cli_development.md)
|
||||
|
||||
* [Features](features.md)
|
||||
* [Basic Keycodes](keycodes_basic.md)
|
||||
@@ -52,24 +61,29 @@
|
||||
* [Backlight](feature_backlight.md)
|
||||
* [Bluetooth](feature_bluetooth.md)
|
||||
* [Bootmagic](feature_bootmagic.md)
|
||||
* [Combos](feature_combo)
|
||||
* [Combos](feature_combo.md)
|
||||
* [Command](feature_command.md)
|
||||
* [Debounce API](feature_debounce_type.md)
|
||||
* [DIP Switch](feature_dip_switch.md)
|
||||
* [Dynamic Macros](feature_dynamic_macros.md)
|
||||
* [Encoders](feature_encoders.md)
|
||||
* [Grave Escape](feature_grave_esc.md)
|
||||
* [Haptic Feedback](feature_haptic_feedback.md)
|
||||
* [HD44780 LCD Controller](feature_hd44780.md)
|
||||
* [Key Lock](feature_key_lock.md)
|
||||
* [Layouts](feature_layouts.md)
|
||||
* [Leader Key](feature_leader_key.md)
|
||||
* [LED Matrix](feature_led_matrix.md)
|
||||
* [Macros](feature_macros.md)
|
||||
* [Mouse Keys](feature_mouse_keys.md)
|
||||
* [OLED Driver](feature_oled_driver)
|
||||
* [OLED Driver](feature_oled_driver.md)
|
||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||
* [Pointing Device](feature_pointing_device.md)
|
||||
* [PS/2 Mouse](feature_ps2_mouse.md)
|
||||
* [RGB Lighting](feature_rgblight.md)
|
||||
* [RGB Matrix](feature_rgb_matrix.md)
|
||||
* [Space Cadet](feature_space_cadet.md)
|
||||
* [Split Keyboard](feature_split_keyboard.md)
|
||||
* [Stenography](feature_stenography.md)
|
||||
* [Swap Hands](feature_swap_hands.md)
|
||||
* [Tap Dance](feature_tap_dance.md)
|
||||
@@ -84,6 +98,7 @@
|
||||
* [ISP Flashing Guide](isp_flashing_guide.md)
|
||||
* [ARM Debugging Guide](arm_debugging.md)
|
||||
* [I2C Driver](i2c_driver.md)
|
||||
* [WS2812 Driver](ws2812_driver.md)
|
||||
* [GPIO Controls](internals_gpio_control.md)
|
||||
* [Proton C Conversion](proton_c_conversion.md)
|
||||
|
||||
@@ -95,6 +110,7 @@
|
||||
* [Using Eclipse with QMK](other_eclipse.md)
|
||||
* [Using VSCode with QMK](other_vscode.md)
|
||||
* [Support](support.md)
|
||||
* [How to add translations](translating.md)
|
||||
|
||||
* QMK Internals (In Progress)
|
||||
* [Defines](internals_defines.md)
|
||||
|
@@ -6,15 +6,15 @@ This guide is catered towards advance users and assumes you can compile an ARM c
|
||||
|
||||
## Installing the software
|
||||
|
||||
The main objective here is to get the MCU Eclipse IDE correcly installed on our machine. The necesarry instructions are derived from [this](https://gnu-mcu-eclipse.github.io/install/) install guide.
|
||||
The main objective here is to get the MCU Eclipse IDE correctly installed on our machine. The necessary instructions are derived from [this](https://gnu-mcu-eclipse.github.io/install/) install guide.
|
||||
|
||||
### The xPack Manager
|
||||
|
||||
This tool is a software package manager and it is used to help us get the necesarry depencencies.
|
||||
This tool is a software package manager and it is used to help us get the necessary dependencies.
|
||||
|
||||
XPM runs using Node.js so grab that form [here](https://nodejs.org/en/). After installation, open a terminal and type `npm -v`. A reply with the version number means that the instalation was successful.
|
||||
XPM runs using Node.js so grab that from [here](https://nodejs.org/en/). After installation, open a terminal and type `npm -v`. A reply with the version number means that the installation was successful.
|
||||
|
||||
XPM instalation instructions can be found [here](https://www.npmjs.com/package/xpm) and are OS specific. Entering `xpm --version` to your terminal should return the software version.
|
||||
XPM installation instructions can be found [here](https://www.npmjs.com/package/xpm) and are OS specific. Entering `xpm --version` to your terminal should return the software version.
|
||||
|
||||
### The ARM Toolchain
|
||||
|
||||
@@ -26,10 +26,10 @@ If you are using windows you need to install this!
|
||||
|
||||
`xpm install --global @gnu-mcu-eclipse/windows-build-tools`
|
||||
|
||||
### Programer/Debugger Drivers
|
||||
### Programmer/Debugger Drivers
|
||||
|
||||
Now its the time to install your programer's drivers. This tutorial was made using an ST-Link v2 which you can get from almost anywhere.
|
||||
If you have an ST-Link the drivers can be found [here](https://www.st.com/en/development-tools/stsw-link009.html) otherwise consult the manufuturer of your tool.
|
||||
Now it's time to install your programmer's drivers. This tutorial was made using an ST-Link v2 which you can get from almost anywhere.
|
||||
If you have an ST-Link the drivers can be found [here](https://www.st.com/en/development-tools/stsw-link009.html) otherwise consult the manufacturer of your tool.
|
||||
|
||||
### OpenOCD
|
||||
|
||||
@@ -84,4 +84,4 @@ Reset your keyboard.
|
||||
Press the bug icon and if all goes well you should soon find yourself in the debug perspective. Here the program counter will pause at the beginning of the main function and way for you to press Play. Most of the features of all debuggers work on ARM MCUs but for exact details google is your friend!
|
||||
|
||||
|
||||
Happy debugging!
|
||||
Happy debugging!
|
||||
|
107
docs/breaking_changes.md
Normal file
107
docs/breaking_changes.md
Normal file
@@ -0,0 +1,107 @@
|
||||
# Breaking Changes
|
||||
|
||||
This document describes QMK's Breaking Change process. A Breaking Change is any change which modifies how QMK behaves in a way that in incompatible or potentially dangerous. We limit these changes so that users can have confidence that updating their QMK tree will not break their keymaps.
|
||||
|
||||
The breaking change period is when we will merge PR's that change QMK in dangerous or unexpected ways. There is a built-in period of testing so we are confident that any problems caused are rare or unable to be predicted.
|
||||
|
||||
## What has been included in past Breaking Changes?
|
||||
|
||||
* [2019 Aug 30](ChangeLog/20190830.md)
|
||||
|
||||
## When is the next Breaking Change?
|
||||
|
||||
The next Breaking Change is scheduled for Nov 29.
|
||||
|
||||
### Important Dates
|
||||
|
||||
* [x] 2019 Sep 21 - `future` is created. It will be rebased weekly.
|
||||
* [ ] 2019 Nov 01 - `future` closed to new PR's.
|
||||
* [ ] 2019 Nov 01 - Call for testers.
|
||||
* [ ] 2019 Nov 27 - `master` is locked, no PR's merged.
|
||||
* [ ] 2019 Nov 29 - Merge `future` to `master`.
|
||||
* [ ] 2019 Nov 30 - `master` is unlocked. PR's can be merged again.
|
||||
|
||||
## What changes will be included?
|
||||
|
||||
To see a list of breaking change candidates you can look at the [`breaking_change` label](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+label%3Abreaking_change+is%3Apr). New changes might be added between now and when `future` is closed, and a PR with that label applied is not guaranteed to be merged.
|
||||
|
||||
If you want your breaking change to be included in this round you need to create a PR with the `breaking_change` label and have it accepted before `future` closes. After `future` closes no new breaking changes will be accepted.
|
||||
|
||||
Criteria for acceptance:
|
||||
|
||||
* PR is complete and ready to merge
|
||||
* PR has a ChangeLog
|
||||
|
||||
# Checklists
|
||||
|
||||
This section documents various processes we use when running the Breaking Changes process.
|
||||
|
||||
## Rebase `future` from `master`
|
||||
|
||||
This is run every Friday while `future` is open.
|
||||
|
||||
Process:
|
||||
|
||||
```
|
||||
cd qmk_firmware
|
||||
git checkout master
|
||||
git pull --ff-only
|
||||
git checkout future
|
||||
git rebase master
|
||||
git push --force
|
||||
```
|
||||
|
||||
## Creating the `future` branch
|
||||
|
||||
This happens immediately after the previous `future` branch is merged.
|
||||
|
||||
* `qmk_firmware` git commands
|
||||
* [ ] `git checkout master`
|
||||
* [ ] `git pull --ff-only`
|
||||
* [ ] `git checkout -b future`
|
||||
* [ ] Edit `readme.md`
|
||||
* [ ] Add a big notice at the top that this is a testing branch.
|
||||
* [ ] Include a link to this document
|
||||
* [ ] `git commit -m 'Branch point for <DATE> Breaking Change'`
|
||||
* [ ] `git tag breakpoint_<YYYY>_<MM>_<DD>`
|
||||
* [ ] `git tag <next_version>` # Prevent the breakpoint tag from confusing version incrementing
|
||||
* [ ] `git push origin future`
|
||||
* [ ] `git push --tags`
|
||||
|
||||
## 4 Weeks Before Merge
|
||||
|
||||
* `future` is now closed to new PR's, only fixes for current PR's may be merged
|
||||
* Post call for testers
|
||||
* [ ] Discord
|
||||
* [ ] GitHub PR
|
||||
* [ ] https://reddit.com/r/olkb
|
||||
|
||||
## 1 Week Before Merge
|
||||
|
||||
* Announce that master will be closed from <2 Days Before> to <Day of Merge>
|
||||
* [ ] Discord
|
||||
* [ ] GitHub PR
|
||||
* [ ] https://reddit.com/r/olkb
|
||||
|
||||
## 2 Days Before Merge
|
||||
|
||||
* Announce that master is closed for 2 days
|
||||
* [ ] Discord
|
||||
* [ ] GitHub PR
|
||||
* [ ] https://reddit.com/r/olkb
|
||||
|
||||
## Day Of Merge
|
||||
|
||||
* `qmk_firmware` git commands
|
||||
* [ ] `git checkout future`
|
||||
* [ ] `git pull --ff-only`
|
||||
* [ ] `git rebase origin/master`
|
||||
* [ ] Edit `readme.md`
|
||||
* [ ] Remove the notes about `future`
|
||||
* [ ] Roll up the ChangeLog into one file.
|
||||
* [ ] `git commit -m 'Merge point for <DATE> Breaking Change'`
|
||||
* [ ] `git push origin future`
|
||||
* Github Actions
|
||||
* [ ] Create a PR for `future`
|
||||
* [ ] Make sure travis comes back clean
|
||||
* [ ] Merge `future` PR
|
176
docs/cli.md
Normal file
176
docs/cli.md
Normal file
@@ -0,0 +1,176 @@
|
||||
# QMK CLI
|
||||
|
||||
This page describes how to setup and use the QMK CLI.
|
||||
|
||||
# Overview
|
||||
|
||||
The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to simplify and streamline tasks such as obtaining and compiling the QMK firmware, creating keymaps, and more.
|
||||
|
||||
* [Global CLI](#global-cli)
|
||||
* [Local CLI](#local-cli)
|
||||
* [CLI Commands](#cli-commands)
|
||||
|
||||
# Requirements
|
||||
|
||||
The CLI requires Python 3.5 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt).
|
||||
|
||||
# Global CLI
|
||||
|
||||
QMK provides an installable CLI that can be used to setup your QMK build environment, work with QMK, and which makes working with multiple copies of `qmk_firmware` easier. We recommend installing and updating this periodically.
|
||||
|
||||
## Install Using Homebrew (macOS, some Linux)
|
||||
|
||||
If you have installed [Homebrew](https://brew.sh) you can tap and install QMK:
|
||||
|
||||
```
|
||||
brew tap qmk/qmk
|
||||
brew install qmk
|
||||
export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
|
||||
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
|
||||
```
|
||||
|
||||
## Install Using easy_install or pip
|
||||
|
||||
If your system is not listed above you can install QMK manually. First ensure that you have python 3.5 (or later) installed and have installed pip. Then install QMK with this command:
|
||||
|
||||
```
|
||||
pip3 install qmk
|
||||
export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
|
||||
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
|
||||
```
|
||||
|
||||
## Packaging For Other Operating Systems
|
||||
|
||||
We are looking for people to create and maintain a `qmk` package for more operating systems. If you would like to create a package for your OS please follow these guidelines:
|
||||
|
||||
* Follow best practices for your OS when they conflict with these guidelines
|
||||
* Document why in a comment when you do deviate
|
||||
* Install using a virtualenv
|
||||
* Instruct the user to set the environment variable `QMK_HOME` to have the firmware source checked out somewhere other than `~/qmk_firmware`.
|
||||
|
||||
# Local CLI
|
||||
|
||||
If you do not want to use the global CLI there is a local CLI bundled with `qmk_firmware`. You can find it in `qmk_firmware/bin/qmk`. You can run the `qmk` command from any directory and it will always operate on that copy of `qmk_firmware`.
|
||||
|
||||
**Example**:
|
||||
|
||||
```
|
||||
$ ~/qmk_firmware/bin/qmk hello
|
||||
Ψ Hello, World!
|
||||
```
|
||||
|
||||
## Local CLI Limitations
|
||||
|
||||
There are some limitations to the local CLI compared to the global CLI:
|
||||
|
||||
* The local CLI does not support `qmk setup` or `qmk clone`
|
||||
* The local CLI always operates on the same `qmk_firmware` tree, even if you have multiple repositories cloned.
|
||||
* The local CLI does not run in a virtualenv, so it's possible that dependencies will conflict
|
||||
|
||||
# CLI Commands
|
||||
|
||||
## `qmk cformat`
|
||||
|
||||
This command formats C code using clang-format. Run it with no arguments to format all core code, or pass filenames on the command line to run it on specific files.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk cformat [file1] [file2] [...] [fileN]
|
||||
```
|
||||
|
||||
## `qmk compile`
|
||||
|
||||
This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm> or compile keymaps in the repo.
|
||||
|
||||
**Usage for Configurator Exports**:
|
||||
|
||||
```
|
||||
qmk compile <configuratorExport.json>
|
||||
```
|
||||
|
||||
**Usage for Keymaps**:
|
||||
|
||||
```
|
||||
qmk compile -kb <keyboard_name> -km <keymap_name>
|
||||
```
|
||||
|
||||
## `qmk config`
|
||||
|
||||
This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md).
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
||||
```
|
||||
|
||||
## `qmk docs`
|
||||
|
||||
This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk docs [-p PORT]
|
||||
```
|
||||
|
||||
## `qmk doctor`
|
||||
|
||||
This command examines your environment and alerts you to potential build or flash problems.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk doctor
|
||||
```
|
||||
|
||||
## `qmk json-keymap`
|
||||
|
||||
Creates a keymap.c from a QMK Configurator export.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk json-keymap [-o OUTPUT] filename
|
||||
```
|
||||
|
||||
## `qmk list-keyboards`
|
||||
|
||||
This command lists all the keyboards currently defined in `qmk_firmware`
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk list-keyboards
|
||||
```
|
||||
|
||||
## `qmk new-keymap`
|
||||
|
||||
This command creates a new keymap based on a keyboard's existing default keymap.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
||||
```
|
||||
|
||||
## `qmk pyformat`
|
||||
|
||||
This command formats python code in `qmk_firmware`.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk pyformat
|
||||
```
|
||||
|
||||
## `qmk pytest`
|
||||
|
||||
This command runs the python test suite. If you make changes to python code you should ensure this runs successfully.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk pytest
|
||||
```
|
121
docs/cli_configuration.md
Normal file
121
docs/cli_configuration.md
Normal file
@@ -0,0 +1,121 @@
|
||||
# QMK CLI Configuration
|
||||
|
||||
This document explains how `qmk config` works.
|
||||
|
||||
# Introduction
|
||||
|
||||
Configuration for QMK CLI is a key/value system. Each key consists of a subcommand and an argument name separated by a period. This allows for a straightforward and direct translation between config keys and the arguments they set.
|
||||
|
||||
## Simple Example
|
||||
|
||||
As an example let's look at the command `qmk compile --keyboard clueboard/66/rev4 --keymap default`.
|
||||
|
||||
There are two command line arguments that could be read from configuration instead:
|
||||
|
||||
* `compile.keyboard`
|
||||
* `compile.keymap`
|
||||
|
||||
Let's set these now:
|
||||
|
||||
```
|
||||
$ qmk config compile.keyboard=clueboard/66/rev4 compile.keymap=default
|
||||
compile.keyboard: None -> clueboard/66/rev4
|
||||
compile.keymap: None -> default
|
||||
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||
```
|
||||
|
||||
Now I can run `qmk compile` without specifying my keyboard and keymap each time.
|
||||
|
||||
## Setting User Defaults
|
||||
|
||||
Sometimes you want to share a setting between multiple commands. For example, multiple commands take the argument `--keyboard`. Rather than setting this value for every command you can set a user value which will be used by any command that takes that argument.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
$ qmk config user.keyboard=clueboard/66/rev4 user.keymap=default
|
||||
user.keyboard: None -> clueboard/66/rev4
|
||||
user.keymap: None -> default
|
||||
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||
```
|
||||
|
||||
# CLI Documentation (`qmk config`)
|
||||
|
||||
The `qmk config` command is used to interact with the underlying configuration. When run with no argument it shows the current configuration. When arguments are supplied they are assumed to be configuration tokens, which are strings containing no spaces with the following form:
|
||||
|
||||
<subcommand|general|default>[.<key>][=<value>]
|
||||
|
||||
## Setting Configuration Values
|
||||
|
||||
You can set configuration values by putting an equal sign (=) into your config key. The key must always be the full `<section>.<key>` form.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
$ qmk config default.keymap=default
|
||||
default.keymap: None -> default
|
||||
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||
```
|
||||
|
||||
## Reading Configuration Values
|
||||
|
||||
You can read configuration values for the entire configuration, a single key, or for an entire section. You can also specify multiple keys to display more than one value.
|
||||
|
||||
### Entire Configuration Example
|
||||
|
||||
qmk config
|
||||
|
||||
### Whole Section Example
|
||||
|
||||
qmk config compile
|
||||
|
||||
### Single Key Example
|
||||
|
||||
qmk config compile.keyboard
|
||||
|
||||
### Multiple Keys Example
|
||||
|
||||
qmk config user compile.keyboard compile.keymap
|
||||
|
||||
## Deleting Configuration Values
|
||||
|
||||
You can delete a configuration value by setting it to the special string `None`.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
$ qmk config default.keymap=None
|
||||
default.keymap: default -> None
|
||||
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||
```
|
||||
|
||||
## Multiple Operations
|
||||
|
||||
You can combine multiple read and write operations into a single command. They will be executed and displayed in order:
|
||||
|
||||
```
|
||||
$ qmk config compile default.keymap=default compile.keymap=None
|
||||
compile.keymap=skully
|
||||
compile.keyboard=clueboard/66_hotswap/gen1
|
||||
default.keymap: None -> default
|
||||
compile.keymap: skully -> None
|
||||
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||
```
|
||||
|
||||
# User Configuration Options
|
||||
|
||||
| Key | Default Value | Description |
|
||||
|-----|---------------|-------------|
|
||||
| user.keyboard | None | The keyboard path (Example: `clueboard/66/rev4`) |
|
||||
| user.keymap | None | The keymap name (Example: `default`) |
|
||||
| user.name | None | The user's github username. |
|
||||
|
||||
# All Configuration Options
|
||||
|
||||
| Key | Default Value | Description |
|
||||
|-----|---------------|-------------|
|
||||
| compile.keyboard | None | The keyboard path (Example: `clueboard/66/rev4`) |
|
||||
| compile.keymap | None | The keymap name (Example: `default`) |
|
||||
| hello.name | None | The name to greet when run. |
|
||||
| new_keyboard.keyboard | None | The keyboard path (Example: `clueboard/66/rev4`) |
|
||||
| new_keyboard.keymap | None | The keymap name (Example: `default`) |
|
175
docs/cli_development.md
Normal file
175
docs/cli_development.md
Normal file
@@ -0,0 +1,175 @@
|
||||
# QMK CLI Development
|
||||
|
||||
This document has useful information for developers wishing to write new `qmk` subcommands.
|
||||
|
||||
# Overview
|
||||
|
||||
The QMK CLI operates using the subcommand pattern made famous by git. The main `qmk` script is simply there to setup the environment and pick the correct entrypoint to run. Each subcommand is a self-contained module with an entrypoint (decorated by `@cli.subcommand()`) that performs some action and returns a shell returncode, or None.
|
||||
|
||||
# Subcommands
|
||||
|
||||
[MILC](https://github.com/clueboard/milc) is the CLI framework `qmk` uses to handle argument parsing, configuration, logging, and many other features. It lets you focus on writing your tool without wasting your time writing glue code.
|
||||
|
||||
Subcommands in the local CLI are always found in `qmk_firmware/lib/python/qmk/cli`.
|
||||
|
||||
Let's start by looking at an example subcommand. This is `lib/python/qmk/cli/hello.py`:
|
||||
|
||||
```python
|
||||
"""QMK Python Hello World
|
||||
|
||||
This is an example QMK CLI script.
|
||||
"""
|
||||
from milc import cli
|
||||
|
||||
|
||||
@cli.argument('-n', '--name', default='World', help='Name to greet.')
|
||||
@cli.subcommand('QMK Hello World.')
|
||||
def hello(cli):
|
||||
"""Log a friendly greeting.
|
||||
"""
|
||||
cli.log.info('Hello, %s!', cli.config.hello.name)
|
||||
```
|
||||
|
||||
First we import the `cli` object from `milc`. This is how we interact with the user and control the script's behavior. We use `@cli.argument()` to define a command line flag, `--name`. This also creates a configuration variable named `hello.name` (and the corresponding `user.name`) which the user can set so they don't have to specify the argument. The `cli.subcommand()` decorator designates this function as a subcommand. The name of the subcommand will be taken from the name of the function.
|
||||
|
||||
Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator.
|
||||
|
||||
# User Interaction
|
||||
|
||||
MILC and the QMK CLI have several nice tools for interacting with the user. Using these standard tools will allow you to colorize your text for easier interactions, and allow the user to control when and how that information is displayed and stored.
|
||||
|
||||
## Printing Text
|
||||
|
||||
There are two main methods for outputting text in a subcommand- `cli.log` and `cli.echo()`. They operate in similar ways but you should prefer to use `cli.log.info()` for most general purpose printing.
|
||||
|
||||
You can use special tokens to colorize your text, to make it easier to understand the output of your program. See [Colorizing Text](#colorizing-text) below.
|
||||
|
||||
Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.5/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example.
|
||||
|
||||
You should never use the format operator (`%`) directly, always pass values as arguments.
|
||||
|
||||
### Logging (`cli.log`)
|
||||
|
||||
The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong.
|
||||
|
||||
The default log level is `INFO`. If the user runs `qmk -v <subcommand>` the default log level will be set to `DEBUG`.
|
||||
|
||||
| Function | Emoji |
|
||||
|----------|-------|
|
||||
| cli.log.critical | `{bg_red}{fg_white}¬_¬{style_reset_all}` |
|
||||
| cli.log.error | `{fg_red}☒{style_reset_all}` |
|
||||
| cli.log.warning | `{fg_yellow}⚠{style_reset_all}` |
|
||||
| cli.log.info | `{fg_blue}Ψ{style_reset_all}` |
|
||||
| cli.log.debug | `{fg_cyan}☐{style_reset_all}` |
|
||||
| cli.log.notset | `{style_reset_all}¯\\_(o_o)_/¯` |
|
||||
|
||||
### Printing (`cli.echo`)
|
||||
|
||||
Sometimes you simply need to print text outside of the log system. This is appropriate if you are outputting fixed data or writing out something that should never be logged. Most of the time you should prefer `cli.log.info()` over `cli.echo`.
|
||||
|
||||
### Colorizing Text
|
||||
|
||||
You can colorize the output of your text by including color tokens within text. Use color to highlight, not to convey information. Remember that the user can disable color, and your subcommand should still be usable if they do.
|
||||
|
||||
You should generally avoid setting the background color, unless it's integral to what you are doing. Remember that users have a lot of preferences when it comes to their terminal color, so you should pick colors that work well against both black and white backgrounds.
|
||||
|
||||
Colors prefixed with 'fg' will affect the foreground (text) color. Colors prefixed with 'bg' will affect the background color.
|
||||
|
||||
| Color | Background | Extended Background | Foreground | Extended Foreground|
|
||||
|-------|------------|---------------------|------------|--------------------|
|
||||
| Black | {bg_black} | {bg_lightblack_ex} | {fg_black} | {fg_lightblack_ex} |
|
||||
| Blue | {bg_blue} | {bg_lightblue_ex} | {fg_blue} | {fg_lightblue_ex} |
|
||||
| Cyan | {bg_cyan} | {bg_lightcyan_ex} | {fg_cyan} | {fg_lightcyan_ex} |
|
||||
| Green | {bg_green} | {bg_lightgreen_ex} | {fg_green} | {fg_lightgreen_ex} |
|
||||
| Magenta | {bg_magenta} | {bg_lightmagenta_ex} | {fg_magenta} | {fg_lightmagenta_ex} |
|
||||
| Red | {bg_red} | {bg_lightred_ex} | {fg_red} | {fg_lightred_ex} |
|
||||
| White | {bg_white} | {bg_lightwhite_ex} | {fg_white} | {fg_lightwhite_ex} |
|
||||
| Yellow | {bg_yellow} | {bg_lightyellow_ex} | {fg_yellow} | {fg_lightyellow_ex} |
|
||||
|
||||
There are also control sequences that can be used to change the behavior of
|
||||
ANSI output:
|
||||
|
||||
| Control Sequences | Description |
|
||||
|-------------------|-------------|
|
||||
| {style_bright} | Make the text brighter |
|
||||
| {style_dim} | Make the text dimmer |
|
||||
| {style_normal} | Make the text normal (neither `{style_bright}` nor `{style_dim}`) |
|
||||
| {style_reset_all} | Reset all text attributes to default. (This is automatically added to the end of every string.) |
|
||||
| {bg_reset} | Reset the background color to the user's default |
|
||||
| {fg_reset} | Reset the foreground color to the user's default |
|
||||
|
||||
# Arguments and Configuration
|
||||
|
||||
QMK handles the details of argument parsing and configuration for you. When you add a new argument it is automatically incorporated into the config tree based on your subcommand's name and the long name of the argument. You can access this configuration in `cli.config`, using either attribute-style access (`cli.config.<subcommand>.<argument>`) or dictionary-style access (`cli.config['<subcommand>']['<argument>']`).
|
||||
|
||||
Under the hood QMK uses [ConfigParser](https://docs.python.org/3/library/configparser.html) to store configurations. This gives us an easy and straightforward way to represent the configuration in a human-editable way. We have wrapped access to this configuration to provide some nicities that ConfigParser does not normally have.
|
||||
|
||||
## Reading Configuration Values
|
||||
|
||||
You can interact with `cli.config` in all the ways you'd normally expect. For example the `qmk compile` command gets the keyboard name from `cli.config.compile.keyboard`. It does not need to know whether that value came from the command line, an environment variable, or the configuration file.
|
||||
|
||||
Iteration is also supported:
|
||||
|
||||
```
|
||||
for section in cli.config:
|
||||
for key in cli.config[section]:
|
||||
cli.log.info('%s.%s: %s', section, key, cli.config[section][key])
|
||||
```
|
||||
|
||||
## Setting Configuration Values
|
||||
|
||||
You can set configuration values in the usual ways.
|
||||
|
||||
Dictionary style:
|
||||
|
||||
```
|
||||
cli.config['<section>']['<key>'] = <value>
|
||||
```
|
||||
|
||||
Attribute style:
|
||||
|
||||
```
|
||||
cli.config.<section>.<key> = <value>
|
||||
```
|
||||
|
||||
## Deleting Configuration Values
|
||||
|
||||
You can delete configuration values in the usual ways.
|
||||
|
||||
Dictionary style:
|
||||
|
||||
```
|
||||
del(cli.config['<section>']['<key>'])
|
||||
```
|
||||
|
||||
Attribute style:
|
||||
|
||||
```
|
||||
del(cli.config.<section>.<key>)
|
||||
```
|
||||
|
||||
## Writing The Configuration File
|
||||
|
||||
The configuration is not written out when it is changed. Most commands do not need to do this. We prefer to have the user change their configuration deliberitely using `qmk config`.
|
||||
|
||||
You can use `cli.save_config()` to write out the configuration.
|
||||
|
||||
## Excluding Arguments From Configuration
|
||||
|
||||
Some arguments should not be propagated to the configuration file. These can be excluded by adding `arg_only=True` when creating the argument.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
@cli.argument('-o', '--output', arg_only=True, help='File to write to')
|
||||
@cli.argument('filename', arg_only=True, help='Configurator JSON file')
|
||||
@cli.subcommand('Create a keymap.c from a QMK Configurator export.')
|
||||
def json_keymap(cli):
|
||||
pass
|
||||
```
|
||||
|
||||
You will only be able to access these arguments using `cli.args`. For example:
|
||||
|
||||
```
|
||||
cli.log.info('Reading from %s and writing to %s', cli.args.filename, cli.args.output)
|
||||
```
|
58
docs/coding_conventions_c.md
Normal file
58
docs/coding_conventions_c.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Coding Conventions (C)
|
||||
|
||||
Most of our style is pretty easy to pick up on, but right now it's not entirely consistent. You should match the style of the code surrounding your change, but if that code is inconsistent or unclear use the following guidelines:
|
||||
|
||||
* We indent using four (4) spaces (soft tabs)
|
||||
* We use a modified One True Brace Style
|
||||
* Opening Brace: At the end of the same line as the statement that opens the block
|
||||
* Closing Brace: Lined up with the first character of the statement that opens the block
|
||||
* Else If: Place the closing brace at the beginning of the line and the next opening brace at the end of the same line.
|
||||
* Optional Braces: Always include optional braces.
|
||||
* Good: if (condition) { return false; }
|
||||
* Bad: if (condition) return false;
|
||||
* We encourage use of C style comments: `/* */`
|
||||
* Think of them as a story describing the feature
|
||||
* Use them liberally to explain why particular decisions were made.
|
||||
* Do not write obvious comments
|
||||
* If you not sure if a comment is obvious, go ahead and include it.
|
||||
* In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns.
|
||||
* We use `#pragma once` at the start of header files rather than old-style include guards (`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`)
|
||||
* We accept both forms of preprocessor if's: `#ifdef DEFINED` and `#if defined(DEFINED)`
|
||||
* If you are not sure which to prefer use the `#if defined(DEFINED)` form.
|
||||
* Do not change existing code from one style to the other, except when moving to a multiple condition `#if`.
|
||||
* Do not put whitespace between `#` and `if`.
|
||||
* When deciding how (or if) to indent directives keep these points in mind:
|
||||
* Readability is more important than consistency.
|
||||
* Follow the file's existing style. If the file is mixed follow the style that makes sense for the section you are modifying.
|
||||
* When choosing to indent you can follow the indention level of the surrounding C code, or preprocessor directives can have their own indent level. Choose the style that best communicates the intent of your code.
|
||||
|
||||
Here is an example for easy reference:
|
||||
|
||||
```c
|
||||
/* Enums for foo */
|
||||
enum foo_state {
|
||||
FOO_BAR,
|
||||
FOO_BAZ,
|
||||
};
|
||||
|
||||
/* Returns a value */
|
||||
int foo(void) {
|
||||
if (some_condition) {
|
||||
return FOO_BAR;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
# Auto-formatting with clang-format
|
||||
|
||||
[Clang-format](https://clang.llvm.org/docs/ClangFormat.html) is part of LLVM and can automatically format your code for you, because ain't nobody got time to do it manually. We supply a configuration file for it that applies most of the coding conventions listed above. It will only change whitespace and newlines, so you will still have to remember to include optional braces yourself.
|
||||
|
||||
Use the [full LLVM installer](http://llvm.org/builds/) to get clang-format on Windows, or use `sudo apt install clang-format` on Ubuntu.
|
||||
|
||||
If you run it from the command-line, pass `-style=file` as an option and it will automatically find the .clang-format configuration file in the QMK root directory.
|
||||
|
||||
If you use VSCode, the standard C/C++ plugin supports clang-format, alternatively there is a [separate extension](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat) for it.
|
||||
|
||||
Some things (like LAYOUT macros) are destroyed by clang-format, so either don't run it on those files, or wrap the sensitive code in `// clang-format off` and `// clang-format on`.
|
314
docs/coding_conventions_python.md
Normal file
314
docs/coding_conventions_python.md
Normal file
@@ -0,0 +1,314 @@
|
||||
# Coding Conventions (Python)
|
||||
|
||||
Most of our style follows PEP8 with some local modifications to make things less nit-picky.
|
||||
|
||||
* We target Python 3.5 for compatability with all supported platforms.
|
||||
* We indent using four (4) spaces (soft tabs)
|
||||
* We encourage liberal use of comments
|
||||
* Think of them as a story describing the feature
|
||||
* Use them liberally to explain why particular decisions were made.
|
||||
* Do not write obvious comments
|
||||
* If you not sure if a comment is obvious, go ahead and include it.
|
||||
* We require useful docstrings for all functions.
|
||||
* In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns.
|
||||
* Some of our practices conflict with the wider python community to make our codebase more approachable to non-pythonistas.
|
||||
|
||||
# YAPF
|
||||
|
||||
You can use [yapf](https://github.com/google/yapf) to style your code. We provide a config in [setup.cfg](setup.cfg).
|
||||
|
||||
# Imports
|
||||
|
||||
We don't have a hard and fast rule for when to use `import ...` vs `from ... import ...`. Understandability and maintainability is our ultimate goal.
|
||||
|
||||
Generally we prefer to import specific function and class names from a module to keep code shorter and easier to understand. Sometimes this results in a name that is ambiguous, and in such cases we prefer to import the module instead. You should avoid using the "as" keyword when importing, unless you are importing a compatability module.
|
||||
|
||||
Imports should be one line per module. We group import statements together using the standard python rules- system, 3rd party, local.
|
||||
|
||||
Do not use `from foo import *`. Supply a list of objects you want to import instead, or import the whole module.
|
||||
|
||||
## Import Examples
|
||||
|
||||
Good:
|
||||
|
||||
```
|
||||
from qmk import effects
|
||||
|
||||
effects.echo()
|
||||
```
|
||||
|
||||
Bad:
|
||||
|
||||
```
|
||||
from qmk.effects import echo
|
||||
|
||||
echo() # It's unclear where echo comes from
|
||||
```
|
||||
|
||||
Good:
|
||||
|
||||
```
|
||||
from qmk.keymap import compile_firmware
|
||||
|
||||
compile_firmware()
|
||||
```
|
||||
|
||||
OK, but the above is better:
|
||||
|
||||
```
|
||||
import qmk.keymap
|
||||
|
||||
qmk.keymap.compile_firmware()
|
||||
```
|
||||
|
||||
# Statements
|
||||
|
||||
One statement per line.
|
||||
|
||||
Even when allowed (EG `if foo: bar`) we do not combine 2 statements onto a single line.
|
||||
|
||||
# Naming
|
||||
|
||||
`module_name`, `package_name`, `ClassName`, `method_name`, `ExceptionName`, `function_name`, `GLOBAL_CONSTANT_NAME`, `global_var_name`, `instance_var_name`, `function_parameter_name`, `local_var_name`.
|
||||
|
||||
Function names, variable names, and filenames should be descriptive; eschew abbreviation. In particular, do not use abbreviations that are ambiguous or unfamiliar to readers outside your project, and do not abbreviate by deleting letters within a word.
|
||||
|
||||
Always use a .py filename extension. Never use dashes.
|
||||
|
||||
## Names to Avoid
|
||||
|
||||
* single character names except for counters or iterators. You may use "e" as an exception identifier in try/except statements.
|
||||
* dashes (-) in any package/module name
|
||||
* __double_leading_and_trailing_underscore__ names (reserved by Python)
|
||||
|
||||
# Docstrings
|
||||
|
||||
To maintain consistency with our docstrings we've set out the following guidelines.
|
||||
|
||||
* Use markdown formatting
|
||||
* Always use triple-dquote docstrings with at least one linebreak: `"""\n"""`
|
||||
* First line is a short (< 70 char) description of what the function does
|
||||
* If you need more in your docstring leave a blank line between the description and the rest.
|
||||
* Start indented lines at the same indent level as the opening triple-dquote
|
||||
* Document all function arguments using the format described below
|
||||
* If present, Args:, Returns:, and Raises: should be the last three things in the docstring, separated by a blank line each.
|
||||
|
||||
## Simple docstring example
|
||||
|
||||
```
|
||||
def my_awesome_function():
|
||||
"""Return the number of seconds since 1970 Jan 1 00:00 UTC.
|
||||
"""
|
||||
return int(time.time())
|
||||
```
|
||||
|
||||
## Complex docstring example
|
||||
|
||||
```
|
||||
def my_awesome_function():
|
||||
"""Return the number of seconds since 1970 Jan 1 00:00 UTC.
|
||||
|
||||
This function always returns an integer number of seconds.
|
||||
"""
|
||||
return int(time.time())
|
||||
```
|
||||
|
||||
## Function arguments docstring example
|
||||
|
||||
```
|
||||
def my_awesome_function(start=None, offset=0):
|
||||
"""Return the number of seconds since 1970 Jan 1 00:00 UTC.
|
||||
|
||||
This function always returns an integer number of seconds.
|
||||
|
||||
|
||||
Args:
|
||||
start
|
||||
The time to start at instead of 1970 Jan 1 00:00 UTC
|
||||
|
||||
offset
|
||||
Return an answer that has this number of seconds subtracted first
|
||||
|
||||
Returns:
|
||||
An integer describing a number of seconds.
|
||||
|
||||
Raises:
|
||||
ValueError
|
||||
When `start` or `offset` are not positive numbers
|
||||
"""
|
||||
if start < 0 or offset < 0:
|
||||
raise ValueError('start and offset must be positive numbers.')
|
||||
|
||||
if not start:
|
||||
start = time.time()
|
||||
|
||||
return int(start - offset)
|
||||
```
|
||||
|
||||
# Exceptions
|
||||
|
||||
Exceptions are used to handle exceptional situations. They should not be used for flow control. This is a break from the python norm of "ask for forgiveness." If you are catching an exception it should be to handle a situation that is unusual.
|
||||
|
||||
If you use a catch-all exception for any reason you must log the exception and stacktrace using cli.log.
|
||||
|
||||
Make your try/except blocks as short as possible. If you need a lot of try statements you may need to restructure your code.
|
||||
|
||||
# Tuples
|
||||
|
||||
When defining one-item tuples always include a trailing comma so that it is obvious you are using a tuple. Do not rely on implicit one-item tuple unpacking. Better still use a list which is unambiguous.
|
||||
|
||||
This is particularly important when using the printf-style format strings that are commonly used.
|
||||
|
||||
# Lists and Dictionaries
|
||||
|
||||
We have configured YAPF to differentiate between sequence styles with a trailing comma. When a trailing comma is omitted YAPF will format the sequence as a single line. When a trailing comma is included YAPF will format the sequence with one item per line.
|
||||
|
||||
You should generally prefer to keep short definition on a single line. Break out to multiple lines sooner rather than later to aid readability and maintainability.
|
||||
|
||||
# Parentheses
|
||||
|
||||
Avoid excessive parentheses, but do use parentheses to make code easier to understand. Do not use them in return statements unless you are explicitly returning a tuple, or it is part of a math expression.
|
||||
|
||||
# Format Strings
|
||||
|
||||
We generally prefer printf-style format strings. Example:
|
||||
|
||||
```
|
||||
name = 'World'
|
||||
print('Hello, %s!' % (name,))
|
||||
```
|
||||
|
||||
This style is used by the logging module, which we make use of extensively, and we have adopted it in other places for consistency. It is also more familiar to C programmers, who are a big part of our casual audience.
|
||||
|
||||
Our included CLI module has support for using these without using the percent (%) operator. Look at `cli.echo()` and the various `cli.log` functions (EG, `cli.log.info()`) for more details.
|
||||
|
||||
# Comprehensions & Generator Expressions
|
||||
|
||||
We encourage the liberal use of comprehensions and generators, but do not let them get too complex. If you need complexity fall back to a for loop that is easier to understand.
|
||||
|
||||
# Lambdas
|
||||
|
||||
OK to use but probably should be avoided. With comprehensions and generators the need for lambdas is not as strong as it once was.
|
||||
|
||||
# Conditional Expressions
|
||||
|
||||
OK in variable assignment, but otherwise should be avoided.
|
||||
|
||||
Conditional expressions are if statements that are in line with code. For example:
|
||||
|
||||
```
|
||||
x = 1 if cond else 2
|
||||
```
|
||||
|
||||
It's generally not a good idea to use these as function arguments, sequence items, etc. It's too easy to overlook.
|
||||
|
||||
# Default Argument Values
|
||||
|
||||
Encouraged, but values must be immutable objects.
|
||||
|
||||
When specifying default values in argument lists always be careful to specify objects that can't be modified in place. If you use a mutable object the changes you make will persist between calls, which is usually not what you want. Even if that is what you intend to do it is confusing for others and will hinder understanding.
|
||||
|
||||
Bad:
|
||||
|
||||
```
|
||||
def my_func(foo={}):
|
||||
pass
|
||||
```
|
||||
|
||||
Good:
|
||||
|
||||
```
|
||||
def my_func(foo=None):
|
||||
if not foo:
|
||||
foo = {}
|
||||
```
|
||||
|
||||
# Properties
|
||||
|
||||
Always use properties instead of getter and setter functions.
|
||||
|
||||
```
|
||||
class Foo(object):
|
||||
def __init__(self):
|
||||
self._bar = None
|
||||
|
||||
@property
|
||||
def bar(self):
|
||||
return self._bar
|
||||
|
||||
@bar.setter
|
||||
def bar(self, bar):
|
||||
self._bar = bar
|
||||
```
|
||||
|
||||
# True/False Evaluations
|
||||
|
||||
You should generally prefer the implicit True/False evaluation in if statements, rather than checking equivalency.
|
||||
|
||||
Bad:
|
||||
|
||||
```
|
||||
if foo == True:
|
||||
pass
|
||||
|
||||
if bar == False:
|
||||
pass
|
||||
```
|
||||
|
||||
Good:
|
||||
|
||||
```
|
||||
if foo:
|
||||
pass
|
||||
|
||||
if not bar:
|
||||
pass
|
||||
```
|
||||
|
||||
# Decorators
|
||||
|
||||
Use when appropriate. Try to avoid too much magic unless it helps with understanding.
|
||||
|
||||
# Threading and Multiprocessing
|
||||
|
||||
Should be avoided. If you need this you will have to make a strong case before we merge your code.
|
||||
|
||||
# Power Features
|
||||
|
||||
Python is an extremely flexible language and gives you many fancy features such as custom metaclasses, access to bytecode, on-the-fly compilation, dynamic inheritance, object reparenting, import hacks, reflection, modification of system internals, etc.
|
||||
|
||||
Don't use these.
|
||||
|
||||
Performance is not a critical concern for us, and code understandability is. We want our codebase to be approachable by someone who only has a day or two to play with it. These features generally come with a cost to easy understanding, and we would prefer to have code that can be readily understood over faster or more compact code.
|
||||
|
||||
Note that some standard library modules use these techniques and it is ok to make use of those modules. But please keep readability and understandability in mind when using them.
|
||||
|
||||
# Type Annotated Code
|
||||
|
||||
For now we are not using any type annotation system, and would prefer that code remain unannotated. We may revisit this in the future.
|
||||
|
||||
# Function length
|
||||
|
||||
Prefer small and focused functions.
|
||||
|
||||
We recognize that long functions are sometimes appropriate, so no hard limit is placed on function length. If a function exceeds about 40 lines, think about whether it can be broken up without harming the structure of the program.
|
||||
|
||||
Even if your long function works perfectly now, someone modifying it in a few months may add new behavior. This could result in bugs that are hard to find. Keeping your functions short and simple makes it easier for other people to read and modify your code.
|
||||
|
||||
You could find long and complicated functions when working with some code. Do not be intimidated by modifying existing code: if working with such a function proves to be difficult, you find that errors are hard to debug, or you want to use a piece of it in several different contexts, consider breaking up the function into smaller and more manageable pieces.
|
||||
|
||||
# FIXMEs
|
||||
|
||||
It is OK to leave FIXMEs in code. Why? Encouraging people to at least document parts of code that need to be thought out more (or that are confusing) is better than leaving this code undocumented.
|
||||
|
||||
All FIXMEs should be formatted like:
|
||||
|
||||
```
|
||||
FIXME(username): Revisit this code when the frob feature is done.
|
||||
```
|
||||
|
||||
...where username is your GitHub username.
|
||||
|
||||
# Unit Tests
|
||||
|
||||
These are good. We should have some one day.
|
@@ -76,25 +76,27 @@ This is a C header file that is one of the first things included, and will persi
|
||||
* `#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)
|
||||
* `#define BACKLIGHT_PIN B7`
|
||||
* pin of the backlight - B5, B6, B7 use PWM, others use softPWM
|
||||
* pin of the backlight
|
||||
* `#define BACKLIGHT_LEVELS 3`
|
||||
* number of levels your backlight will have (maximum 15 excluding off)
|
||||
* `#define BACKLIGHT_BREATHING`
|
||||
* enables backlight breathing (only works with backlight pins B5, B6 and B7)
|
||||
* enables backlight breathing
|
||||
* `#define BREATHING_PERIOD 6`
|
||||
* the length of one backlight "breath" in seconds
|
||||
* `#define DEBOUNCING_DELAY 5`
|
||||
* `#define DEBOUNCE 5`
|
||||
* the delay when reading the value of the pin (5 is default)
|
||||
* `#define LOCKING_SUPPORT_ENABLE`
|
||||
* mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
|
||||
* `#define LOCKING_RESYNC_ENABLE`
|
||||
* tries to keep switch state consistent with keyboard LED state
|
||||
* `#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))`
|
||||
* `#define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)`
|
||||
* key combination that allows the use of magic commands (useful for debugging)
|
||||
* `#define USB_MAX_POWER_CONSUMPTION`
|
||||
* `#define USB_MAX_POWER_CONSUMPTION 500`
|
||||
* sets the maximum power (in mA) over USB for the device (default: 500)
|
||||
* `#define SCL_CLOCK 100000L`
|
||||
* sets the SCL_CLOCK speed for split keyboards. The default is `100000L` but some boards can be set to `400000L`.
|
||||
* `#define USB_POLLING_INTERVAL_MS 10`
|
||||
* sets the USB polling rate in milliseconds for the keyboard, mouse, and shared (NKRO/media keys) interfaces
|
||||
* `#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`.
|
||||
|
||||
## Features That Can Be Disabled
|
||||
|
||||
@@ -171,6 +173,8 @@ If you define these options you will enable the associated feature, which may in
|
||||
* how long for the Combo keys to be detected. Defaults to `TAPPING_TERM` if not defined.
|
||||
* `#define TAP_CODE_DELAY 100`
|
||||
* Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds.
|
||||
* `#define TAP_HOLD_CAPS_DELAY 80`
|
||||
* Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPSLOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher.
|
||||
|
||||
## RGB Light Configuration
|
||||
|
||||
@@ -220,6 +224,7 @@ There are a few different ways to set handedness for split keyboards (listed in
|
||||
2. Set `EE_HANDS` and flash `eeprom-lefthand.eep`/`eeprom-righthand.eep` to each half
|
||||
* For boards with DFU bootloader you can use `:dfu-split-left`/`:dfu-split-right` to flash these EEPROM files
|
||||
* For boards with Caterina bootloader (like stock Pro Micros), use `:avrdude-split-left`/`:avrdude-split-right`
|
||||
* For boards with ARM DFU bootloader (like Proton C), use `:dfu-util-split-left`/`:dfu-util-split-right`
|
||||
3. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default)
|
||||
4. Default: The side that is plugged into the USB port is the master half and is assumed to be the left half. The slave side is the right half
|
||||
|
||||
@@ -246,6 +251,9 @@ There are a few different ways to set handedness for split keyboards (listed in
|
||||
* `#define MATRIX_COL_PINS_RIGHT { <col pins> }`
|
||||
* If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns.
|
||||
|
||||
* `#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
|
||||
* If you want to specify a different direct pinout for the right half than the left half, you can define `DIRECT_PINS_RIGHT`. Currently, the size of `DIRECT_PINS` must be the same as `DIRECT_PINS_RIGHT`.
|
||||
|
||||
* `#define RGBLED_SPLIT { 6, 6 }`
|
||||
* See [RGB Light Configuration](#rgb-light-configuration)
|
||||
|
||||
@@ -259,6 +267,14 @@ There are a few different ways to set handedness for split keyboards (listed in
|
||||
* 4: about 26kbps
|
||||
* 5: about 20kbps
|
||||
|
||||
* `#define SPLIT_USB_DETECT`
|
||||
* Detect (with timeout) USB connection when delegating master/slave
|
||||
* Default behavior for ARM
|
||||
* Required for AVR Teensy
|
||||
|
||||
* `#define SPLIT_USB_TIMEOUT 2500`
|
||||
* Maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`
|
||||
|
||||
# The `rules.mk` File
|
||||
|
||||
This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features.
|
||||
@@ -287,19 +303,20 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i
|
||||
* `halfkay`
|
||||
* `caterina`
|
||||
* `bootloadHID`
|
||||
* `USBasp`
|
||||
|
||||
## Feature Options
|
||||
|
||||
Use these to enable or disable building certain features. The more you have enabled the bigger your firmware will be, and you run the risk of building a firmware too large for your MCU.
|
||||
|
||||
* `BOOTMAGIC_ENABLE`
|
||||
* Virtual DIP switch configuration(+1000)
|
||||
* Virtual DIP switch configuration
|
||||
* `MOUSEKEY_ENABLE`
|
||||
* Mouse keys(+4700)
|
||||
* Mouse keys
|
||||
* `EXTRAKEY_ENABLE`
|
||||
* Audio control and System control(+450)
|
||||
* Audio control and System control
|
||||
* `CONSOLE_ENABLE`
|
||||
* Console for debug(+400)
|
||||
* Console for debug
|
||||
* `COMMAND_ENABLE`
|
||||
* Commands for debug and configuration
|
||||
* `COMBO_ENABLE`
|
||||
@@ -331,7 +348,7 @@ Use these to enable or disable building certain features. The more you have enab
|
||||
* `NO_USB_STARTUP_CHECK`
|
||||
* Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master.
|
||||
* `LINK_TIME_OPTIMIZATION_ENABLE`
|
||||
= Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION`
|
||||
= Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION`
|
||||
|
||||
## USB Endpoint Limitations
|
||||
|
||||
|
@@ -54,72 +54,20 @@ Never made an open source contribution before? Wondering how contributions work
|
||||
|
||||
# Coding Conventions
|
||||
|
||||
Most of our style is pretty easy to pick up on, but right now it's not entirely consistent. You should match the style of the code surrounding your change, but if that code is inconsistent or unclear use the following guidelines:
|
||||
Most of our style is pretty easy to pick up on. If you are familiar with either C or Python you should not have too much trouble with our local styles.
|
||||
|
||||
* We indent using four (4) spaces (soft tabs)
|
||||
* We use a modified One True Brace Style
|
||||
* Opening Brace: At the end of the same line as the statement that opens the block
|
||||
* Closing Brace: Lined up with the first character of the statement that opens the block
|
||||
* Else If: Place the closing brace at the beginning of the line and the next opening brace at the end of the same line.
|
||||
* Optional Braces: Always include optional braces.
|
||||
* Good: if (condition) { return false; }
|
||||
* Bad: if (condition) return false;
|
||||
* We encourage use of C style comments: `/* */`
|
||||
* Think of them as a story describing the feature
|
||||
* Use them liberally to explain why particular decisions were made.
|
||||
* Do not write obvious comments
|
||||
* If you not sure if a comment is obvious, go ahead and include it.
|
||||
* In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns.
|
||||
* We use `#pragma once` at the start of header files rather than old-style include guards (`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`)
|
||||
* We accept both forms of preprocessor if's: `#ifdef DEFINED` and `#if defined(DEFINED)`
|
||||
* If you are not sure which to prefer use the `#if defined(DEFINED)` form.
|
||||
* Do not change existing code from one style to the other, except when moving to a multiple condition `#if`.
|
||||
* Do not put whitespace between `#` and `if`.
|
||||
* When deciding how (or if) to indent directives keep these points in mind:
|
||||
* Readability is more important than consistency.
|
||||
* Follow the file's existing style. If the file is mixed follow the style that makes sense for the section you are modifying.
|
||||
* When choosing to indent you can follow the indention level of the surrounding C code, or preprocessor directives can have their own indent level. Choose the style that best communicates the intent of your code.
|
||||
|
||||
Here is an example for easy reference:
|
||||
|
||||
```c
|
||||
/* Enums for foo */
|
||||
enum foo_state {
|
||||
FOO_BAR,
|
||||
FOO_BAZ,
|
||||
};
|
||||
|
||||
/* Returns a value */
|
||||
int foo(void) {
|
||||
if (some_condition) {
|
||||
return FOO_BAR;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
# Auto-formatting with clang-format
|
||||
|
||||
[Clang-format](https://clang.llvm.org/docs/ClangFormat.html) is part of LLVM and can automatically format your code for you, because ain't nobody got time to do it manually. We supply a configuration file for it that applies most of the coding conventions listed above. It will only change whitespace and newlines, so you will still have to remember to include optional braces yourself.
|
||||
|
||||
Use the [full LLVM installer](http://llvm.org/builds/) to get clang-format on Windows, or use `sudo apt install clang-format` on Ubuntu.
|
||||
|
||||
If you run it from the command-line, pass `-style=file` as an option and it will automatically find the .clang-format configuration file in the QMK root directory.
|
||||
|
||||
If you use VSCode, the standard C/C++ plugin supports clang-format, alternatively there is a [separate extension](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat) for it.
|
||||
|
||||
Some things (like LAYOUT macros) are destroyed by clang-format, so either don't run it on those files, or wrap the sensitive code in `// clang-format off` and `// clang-format on`.
|
||||
* [Coding Conventions - C](coding_conventions_c.md)
|
||||
* [Coding Conventions - Python](coding_conventions_python.md)
|
||||
|
||||
# General Guidelines
|
||||
|
||||
We have a few different types of changes in QMK, each requiring a different level of rigor. We'd like you to keep the following guidelines in mind no matter what type of change you're making.
|
||||
|
||||
* Separate PR's into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature.
|
||||
* Separate PRs into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature.
|
||||
* Check for unnecessary whitespace with `git diff --check` before committing.
|
||||
* Make sure your code change actually compiles.
|
||||
* Keymaps: Make sure that `make keyboard:your_new_keymap` does not return an error
|
||||
* Keyboards: Make sure that `make keyboard:all` does not return any errors
|
||||
* Keymaps: Make sure that `make keyboard:your_new_keymap` does not return any errors.
|
||||
* Keyboards: Make sure that `make keyboard:all` does not return any errors.
|
||||
* Core: Make sure that `make all` does not return any errors.
|
||||
* Make sure commit messages are understandable on their own. You should put a short description (no more than 70 characters) on the first line, the second line should be empty, and on the 3rd and later lines you should describe your commit in detail, if required. Example:
|
||||
|
||||
@@ -131,6 +79,8 @@ The kerpleplork was intermittently failing with error code 23. The root cause wa
|
||||
Limited experimentation on the devices I have available shows that 7 is high enough to avoid confusing the kerpleplork, but I'd like to get some feedback from people with ARM devices to be sure.
|
||||
```
|
||||
|
||||
!> **IMPORTANT:** If you would like to contribute a bugfix or improvement to user code, such as non-default keymaps, userspace and layouts, be sure to tag the original submitter of the code in your PR. Many users, regardless of skill level with Git and GitHub, may be confused or frustrated at their code being modified without their knowledge.
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation is one of the easiest ways to get started contributing to QMK. Finding places where the documentation is wrong or incomplete and fixing those is easy! We also very badly need someone to edit our documentation, so if you have editing skills but aren't sure where or how to jump in please [reach out for help](#where-can-i-go-for-help)!
|
||||
|
@@ -267,7 +267,7 @@ You should use this function if you need custom matrix scanning code. It can als
|
||||
|
||||
If the board supports it, it can be "idled", by stopping a number of functions. A good example of this is RGB lights or backlights. This can save on power consumption, or may be better behavior for your keyboard.
|
||||
|
||||
This is controlled by two functions: `suspend_power_down_*` and `suspend_wakeup_init_*`, which are called when the system is board is idled and when it wakes up, respectively.
|
||||
This is controlled by two functions: `suspend_power_down_*` and `suspend_wakeup_init_*`, which are called when the system board is idled and when it wakes up, respectively.
|
||||
|
||||
|
||||
### Example suspend_power_down_user() and suspend_wakeup_init_user() Implementation
|
||||
@@ -297,8 +297,8 @@ This runs code every time that the layers get changed. This can be useful for l
|
||||
This example shows how to set the [RGB Underglow](feature_rgblight.md) lights based on the layer, using the Planck as an example
|
||||
|
||||
```c
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
switch (biton32(state)) {
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
switch (get_highest_layer(state)) {
|
||||
case _RAISE:
|
||||
rgblight_setrgb (0x00, 0x00, 0xFF);
|
||||
break;
|
||||
@@ -320,8 +320,8 @@ uint32_t layer_state_set_user(uint32_t state) {
|
||||
```
|
||||
### `layer_state_set_*` Function Documentation
|
||||
|
||||
* Keyboard/Revision: `uint32_t layer_state_set_kb(uint32_t state)`
|
||||
* Keymap: `uint32_t layer_state_set_user(uint32_t state)`
|
||||
* Keyboard/Revision: `layer_state_t layer_state_set_kb(layer_state_t state)`
|
||||
* Keymap: `layer_state_t layer_state_set_user(layer_state_t state)`
|
||||
|
||||
|
||||
The `state` is the bitmask of the active layers, as explained in the [Keymap Overview](keymap.md#keymap-layer-status)
|
||||
@@ -377,8 +377,8 @@ void keyboard_post_init_user(void) {
|
||||
The above function will use the EEPROM config immediately after reading it, to set the default layer's RGB color. The "raw" value of it is converted in a usable structure based on the "union" that you created above.
|
||||
|
||||
```c
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
switch (biton32(state)) {
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
switch (get_highest_layer(state)) {
|
||||
case _RAISE:
|
||||
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_magenta(); rgblight_mode_noeeprom(1); }
|
||||
break;
|
||||
|
169
docs/de/cli.md
Normal file
169
docs/de/cli.md
Normal file
@@ -0,0 +1,169 @@
|
||||
# QMK CLI (Kommandozeile)
|
||||
|
||||
Diese Seite beschreibt die Einrichtung und den Umgang mit dem QMK CLI (Kommandozeile).
|
||||
|
||||
# Übersicht
|
||||
|
||||
Die QMK CLI vereinfacht das Zusammenbauen und Arbeiten mit QMK Tastaturen. Hier findest Du wichtige Befehle, um beispielsweise das Herunterladen und Kompilieren der QMK Firmware oder das Erstellen von Tastaturbelegungen (und vieles mehr) zu erleichtern.
|
||||
|
||||
* [Globale CLI](#globale-cli)
|
||||
* [Lokale CLI](#lokale-cli)
|
||||
* [CLI-Befehle](#cli-befehle)
|
||||
|
||||
# System-Anforderungen
|
||||
|
||||
Die CLI benötigt Python 3.5 oder höher. Außerdem ist es nötig, die Packages laut [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt) zu installieren.
|
||||
|
||||
# Globale CLI
|
||||
|
||||
QMK bietet ein installierbares CLI, das Du zum Einrichten Deiner QMK Build-Umgebung verwenden kannst. Dieses ermöglicht Dir das Arbeiten mit QMK, und erleichtert das Arbeiten mit mehreren Kopien der `qmk_firmware`. Wir empfehlen, dieses CLI zu installieren und regelmäßig upzudaten.
|
||||
|
||||
## Installation mit Homebrew (macOS, manche Linux)
|
||||
|
||||
Solltest Du [Homebrew](https://brew.sh) installiert haben, kannst Du QMK per tap installieren:
|
||||
|
||||
```
|
||||
brew tap qmk/qmk
|
||||
brew install qmk
|
||||
export QMK_HOME='~/qmk_firmware' # Optional: setzt den Installationsort für `qmk_firmware`
|
||||
qmk setup # Dies klont `qmk/qmk_firmware` und richtet optional auch Deine Build-Umgebung ein
|
||||
```
|
||||
|
||||
## Installation mit easy_install oder pip
|
||||
|
||||
Falls Du kein Homebrew hast, kannst Du QMK auch manuell installieren. Zuerst musst Du sicherstellen, dass Python 3.5 (oder höher) und pip installiert ist. Dann installiere QMK mit diesem Befehl:
|
||||
|
||||
```
|
||||
pip3 install qmk
|
||||
export QMK_HOME='~/qmk_firmware' # Optional: setzt den Installationsort für `qmk_firmware`
|
||||
qmk setup # Dies klont `qmk/qmk_firmware` und richtet optional auch Deine Build-Umgebung ein
|
||||
```
|
||||
## Installation mit git Repo
|
||||
|
||||
`git clone https://github.com/qmk/qmk_cli.git && cd qmk_cli && python3 setup.py install`
|
||||
|
||||
## Packaging für andere Betriebssysteme
|
||||
|
||||
Wir suchen nach Freiwilligen, die ein `qmk`-Package für weitere Betriebssysteme erstellen und pflegen. Falls Du ein Package für Dein OS erstellen möchtest, bitte befolge diese Richtlinien:
|
||||
|
||||
* Verwende "Best Practices" für Dein OS, sollten sie mit diesen Richtlinien in Konflikt stehen.
|
||||
* Dokumentiere den Grund in einem Kommentar, wenn Du abweichen musstest.
|
||||
* Installiere mit einem [virtualenv](https://virtualenv.pypa.io/en/latest/).
|
||||
* Weise den User an, die Umgebungs-Variable `QMK_HOME` zu setzen, um die Firmware-Quelle anders einzustellen als `~/qmk_firmware`.
|
||||
|
||||
# Lokale CLI
|
||||
|
||||
Wenn Du die globale CLI nicht verwenden möchtest, beinhaltet `qmk_firmware` auch eine lokale CLI. Du kannst sie hier finden: `qmk_firmware/bin/qmk`. Du kannst den `qmk`-Befehl aus irgendeinem Datei-Verzeichnis ausführen und es wird immer auf dieser Kopie von `qmk_firmware` arbeiten.
|
||||
|
||||
**Beispiel**:
|
||||
|
||||
```
|
||||
$ ~/qmk_firmware/bin/qmk hello
|
||||
Ψ Hello, World!
|
||||
```
|
||||
|
||||
## Einschränkungen der lokalen CLI
|
||||
|
||||
Hier ein Vergleich mit der globalen CLI:
|
||||
|
||||
* Die lokale CLI unterstützt kein `qmk setup` oder `qmk clone`.
|
||||
* Die lokale CLI arbeitet immer innerhalb der selben `qmk_firmware`-Verzeichnisstruktur, auch wenn Du mehrere Repositories geklont hast.
|
||||
* Die lokale CLI läuft nicht in einer virtualenv. Daher ist es möglich, dass Abhängigkeiten (dependencies) miteinander in Konflikt kommen/stehen.
|
||||
|
||||
# CLI-Befehle
|
||||
|
||||
## `qmk compile`
|
||||
|
||||
Dieser Befehl erlaubt es dir, die Firmware - aus egal welchem Datei-Verzeichnis - zu compilen. Du kannst JSON-Exporte von <https://config.qmk.fm> oder Keymaps in der Repo kompilen.
|
||||
|
||||
**Anwendung für Konfigurations-Exports**:
|
||||
|
||||
```
|
||||
qmk compile <configuratorExport.json>
|
||||
```
|
||||
|
||||
**Anwendung für Keymaps**:
|
||||
|
||||
```
|
||||
qmk compile -kb <keyboard_name> -km <keymap_name>
|
||||
```
|
||||
|
||||
## `qmk cformat`
|
||||
|
||||
Dieser Befehl formatiert C-Code im clang-Format. Benutze ihn ohne Argumente, um den core-Code zu formatieren, oder benutze Namen von Dateien in der CLI, um den Befehl auf bestimmte Dateien anzuwenden.
|
||||
|
||||
**Anwendung**:
|
||||
|
||||
```
|
||||
qmk cformat [file1] [file2] [...] [fileN]
|
||||
```
|
||||
|
||||
## `qmk config`
|
||||
|
||||
Dieser Befehl konfiguriert das Verhalten von QMK. Für die volle `qmk config`-Dokumentation gehe zu [CLI-Konfiguration](cli_configuration.md).
|
||||
|
||||
**Anwendung**:
|
||||
|
||||
```
|
||||
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
||||
```
|
||||
|
||||
## `qmk docs`
|
||||
|
||||
Dieser Befehl startet einen lokalen HTTP-Server, den Du zum Browsen oder Verbessern der Dokumentation verwenden kannst. Der Default-Port ist 8936.
|
||||
|
||||
**Anwendung**:
|
||||
|
||||
```
|
||||
qmk docs [-p PORT]
|
||||
```
|
||||
|
||||
## `qmk doctor`
|
||||
|
||||
Dieser Befehl untersucht Deine Umgebung und warnt Dich vor potentiellen Build- oder Flash-Problemen.
|
||||
|
||||
**Anwendung**:
|
||||
|
||||
```
|
||||
qmk doctor
|
||||
```
|
||||
|
||||
## `qmk list-keyboards`
|
||||
|
||||
Dieser Befehl listet alle zurzeit in `qmk_firmware` definierten Tastaturen/Keyboards auf.
|
||||
|
||||
**Anwendung**:
|
||||
|
||||
```
|
||||
qmk list-keyboards
|
||||
```
|
||||
|
||||
## `qmk new-keymap`
|
||||
|
||||
Dieser Befehl erstellt eine neue Keymap basierend auf einer existierenden Standard-Keymap eines bestimmten Keyboards.
|
||||
|
||||
**Anwendung**:
|
||||
|
||||
```
|
||||
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
||||
```
|
||||
|
||||
## `qmk pyformat`
|
||||
|
||||
Dieser Befehl formatiert Python-Code in `qmk_firmware`.
|
||||
|
||||
**Anwendung**:
|
||||
|
||||
```
|
||||
qmk pyformat
|
||||
```
|
||||
|
||||
## `qmk pytest`
|
||||
|
||||
Dieser Befehl führt die Python Test Suite aus. Wenn Du Python-Code veränderst, solltest Du sicherstellen, dass der Test erfolgreich ausgeführt wurde.
|
||||
|
||||
**Anwendung**:
|
||||
|
||||
```
|
||||
qmk pytest
|
||||
```
|
48
docs/driver_installation_zadig.md
Normal file
48
docs/driver_installation_zadig.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# Bootloader Driver Installation with Zadig
|
||||
|
||||
QMK presents itself to the host as a regular HID keyboard device, and as such requires no special drivers. However, in order to flash your keyboard on Windows, the bootloader device that appears when you reset the board often *does*.
|
||||
|
||||
There are two notable exceptions: the Caterina bootloader, usually seen on Pro Micros, and the HalfKay bootloader shipped with PJRC Teensys, appear as a serial port and a generic HID device respectively, and so do not require a driver.
|
||||
|
||||
We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with MSYS2 or WSL, the `qmk_install.sh` script will have asked if you want it to install the drivers for you.
|
||||
|
||||
## Installation
|
||||
|
||||
Put your keyboard into bootloader mode, either by hitting the `RESET` keycode (which may be on a different layer), or by pressing the reset switch that's usually located on the underside of the board. If your keyboard has neither, try holding Escape or Space+`B` as you plug it in (see the [Bootmagic](feature_bootmagic.md) docs for more details). Some boards use [Command](feature_command.md) instead of Bootmagic; in this case, you can enter bootloader mode by hitting Left Shift+Right Shift+`B` or Left Shift+Right Shift+Escape at any point while the keyboard is plugged in.
|
||||
Some keyboards may have specific instructions for entering the bootloader. For example, the [Bootmagic Lite](feature_bootmagic.md#bootmagic-lite) key (default: Escape) might be on a different key, e.g. Left Control; or the magic combination for Command (default: Left Shift+Right Shift) might require you to hold something else, e.g. Left Control+Right Control. Refer to the board's README file if you are unsure.
|
||||
|
||||
To put a device in bootloader mode with USBaspLoader, tap the `RESET` button while holding down the `BOOT` button.
|
||||
Alternatively, hold `BOOT` while inserting the USB cable.
|
||||
|
||||
Zadig will automatically detect the bootloader device. You may sometimes need to check **Options → List All Devices**.
|
||||
|
||||
- For keyboards with Atmel AVR MCUs, the bootloader will be named something similar to `ATm32U4DFU`, and have a Vendor ID of `03EB`.
|
||||
- USBasp bootloaders will appear as `USBasp`, with a VID/PID of `16C0:05DC`.
|
||||
- AVR keyboards flashed with the QMK-DFU bootloader will be named `<keyboard name> Bootloader` and will also have the VID `03EB`.
|
||||
- For most ARM keyboards, it will be called `STM32 BOOTLOADER`, and have a VID/PID of `0483:DF11`.
|
||||
|
||||
!> If Zadig lists one or more devices with the `HidUsb` driver, your keyboard is probably not in bootloader mode. The arrow will be colored orange and you will be asked to confirm modifying a system driver. **Do not** proceed if this is the case!
|
||||
|
||||
If the arrow appears green, select the driver, and click **Install Driver**. The `libusb-win32` driver will usually work for AVR, and `WinUSB` for ARM, but if you still cannot flash the board, try installing a different driver from the list. For flashing a USBaspLoader device via command line with msys2, the `libusbk` driver is recommended, otherwise `libusb-win32` will work fine if you are using QMK Toolbox for flashing.
|
||||
|
||||

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

|
||||
|
||||
Open the Device Manager and look for a device that looks like your keyboard.
|
||||
|
||||

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

|
||||
|
||||
Click **Action → Scan for hardware changes**. At this point, you should be able to type again. Double check in Zadig that the keyboard device(s) are using the `HidUsb` driver. If so, you're all done, and your board should be functional again!
|
||||
|
||||
?> A full reboot of your computer may sometimes be necessary at this point, to get Windows to pick up the new driver.
|
@@ -19,7 +19,11 @@ Note that running `make` with `sudo` is generally ***not*** a good idea, and you
|
||||
|
||||
### Linux `udev` Rules
|
||||
On Linux, you'll need proper privileges to access the MCU. You can either use
|
||||
`sudo` when flashing firmware, or place these files in `/etc/udev/rules.d/`.
|
||||
`sudo` when flashing firmware, or place these files in `/etc/udev/rules.d/`. Once added run the following:
|
||||
```console
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/50-atmel-dfu.rules:**
|
||||
```
|
||||
@@ -43,22 +47,39 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666"
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/55-catalina.rules:**
|
||||
```
|
||||
# ModemManager should ignore the following devices
|
||||
ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
```
|
||||
|
||||
**Note:** ModemManager filtering only works when not in strict mode, the following commands can update that settings:
|
||||
```console
|
||||
sudo sed -i 's/--filter-policy=strict/--filter-policy=default/' /lib/systemd/system/ModemManager.service
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart ModemManager
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/56-dfu-util.rules:**
|
||||
```
|
||||
# stm32duino
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", MODE:="0666"
|
||||
# Generic stm32
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666"
|
||||
```
|
||||
|
||||
### Serial device is not detected in bootloader mode on Linux
|
||||
Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as
|
||||
Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options.
|
||||
|
||||
## Unknown Device for DFU Bootloader
|
||||
|
||||
If you're using Windows to flash your keyboard, and you are running into issues, check the Device Manager. If you see an "Unknown Device" when the keyboard is in "bootloader mode", then you may have a driver issue.
|
||||
Issues encountered when flashing keyboards on Windows are most often due to having the wrong drivers installed for the bootloader, or none at all.
|
||||
|
||||
Re-running the installation script for MSYS2 may help (eg run `./util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue.
|
||||
|
||||
If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, find the device in question, and select the `WinUSB` option, and hit "Reinstall driver". Once you've done that, try flashing your board, again. If that doesn't work, try all of the options, until one works.
|
||||
|
||||
?> There isn't a best option for which driver should be used here. Some options work better on some systems than others. libUSB and WinUSB seem to be the best options here.
|
||||
|
||||
If the bootloader doesn't show up in the list for devices, you may need to enable the "List all devices" option in the `Options` menu, and then find the bootloader in question.
|
||||
Re-running the QMK installation script (`./util/qmk_install.sh` from the `qmk_firmware` directory in MSYS2 or WSL) or reinstalling the QMK Toolbox may fix the issue. Alternatively, you can download and run the [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer) package manually.
|
||||
|
||||
If that doesn't work, then you may need to download and run Zadig. See [Bootloader Driver Installation with Zadig](driver_installation_zadig.md) for more detailed information.
|
||||
|
||||
## WINAVR is Obsolete
|
||||
It is no longer recommended and may cause some problem.
|
||||
@@ -140,8 +161,8 @@ For now, you need to rollback avr-gcc to 7 in brew.
|
||||
|
||||
```
|
||||
brew uninstall --force avr-gcc
|
||||
brew install avr-gcc@7
|
||||
brew link --force avr-gcc@7
|
||||
brew install avr-gcc@8
|
||||
brew link --force avr-gcc@8
|
||||
```
|
||||
|
||||
### I just flashed my keyboard and it does nothing/keypresses don't register - it's also ARM (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019)
|
||||
|
@@ -87,6 +87,7 @@ Size after:
|
||||
- EEPROM has around a 100000 write cycle. You shouldn't rewrite the
|
||||
firmware repeatedly and continually; that'll burn the EEPROM
|
||||
eventually.
|
||||
|
||||
## NKRO Doesn't work
|
||||
First you have to compile firmware with this build option `NKRO_ENABLE` in **Makefile**.
|
||||
|
||||
@@ -183,22 +184,15 @@ Pressing any key during sleep should wake host.
|
||||
|
||||
Arduino Leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
|
||||
|
||||
## Enabling JTAG
|
||||
|
||||
## Using PF4-7 Pins of USB AVR?
|
||||
You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affected with this.
|
||||
By default, the JTAG debugging interface is disabled as soon as the keyboard starts up. JTAG-capable MCUs come from the factory with the `JTAGEN` fuse set, and it takes over certain pins of the MCU that the board may be using for the switch matrix, LEDs, etc.
|
||||
|
||||
If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.
|
||||
If you would like to keep JTAG enabled, just add the following to your `config.h`:
|
||||
|
||||
See this code.
|
||||
```c
|
||||
#define NO_JTAG_DISABLE
|
||||
```
|
||||
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
||||
MCUCR |= (1<<JTD);
|
||||
MCUCR |= (1<<JTD);
|
||||
```
|
||||
https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67
|
||||
|
||||
And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.
|
||||
|
||||
|
||||
## Adding LED Indicators of Lock Keys
|
||||
You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post.
|
||||
|
@@ -4,10 +4,6 @@
|
||||
|
||||
[QMK](https://github.com/qmk), short for Quantum Mechanical Keyboard, is a group of people building tools for custom keyboards. We started with the [QMK firmware](https://github.com/qmk/qmk_firmware), a heavily modified fork of [TMK](https://github.com/tmk/tmk_keyboard).
|
||||
|
||||
### Why the Name Quantum?
|
||||
|
||||
<!-- FIXME -->
|
||||
|
||||
## What Differences Are There Between QMK and TMK?
|
||||
|
||||
TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert](https://github.com/jackhumbert)'s fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK.
|
||||
|
@@ -95,13 +95,6 @@ Even worse, it is not recognized unless the keyboard's VID and PID match that of
|
||||
|
||||
See [this issue](https://github.com/qmk/qmk_firmware/issues/2179) for detailed information.
|
||||
|
||||
|
||||
## Media Control Keys in Mac OSX
|
||||
#### KC_MNXT and KC_MPRV Does Not Work on Mac
|
||||
Use `KC_MFFD`(`KC_MEDIA_FAST_FORWARD`) and `KC_MRWD`(`KC_MEDIA_REWIND`) instead of `KC_MNXT` and `KC_MPRV`.
|
||||
See https://github.com/tmk/tmk_keyboard/issues/195
|
||||
|
||||
|
||||
## Keys Supported in Mac OSX?
|
||||
You can know which keycodes are supported in OSX from this source code.
|
||||
|
||||
|
@@ -256,10 +256,10 @@ If you press a Mod Tap key, tap another key (press and release) and then release
|
||||
|
||||
For Instance:
|
||||
|
||||
- `SHFT_T(KC_A)` Down
|
||||
- `SFT_T(KC_A)` Down
|
||||
- `KC_X` Down
|
||||
- `KC_X` Up
|
||||
- `SHFT_T(KC_A)` Up
|
||||
- `SFT_T(KC_A)` Up
|
||||
|
||||
Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this will be registered as `ax` by the firmware and host system. With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would registered as `X` (`SHIFT`+`x`).
|
||||
|
||||
@@ -279,9 +279,9 @@ Setting `Ignore Mod Tap Interrupt` requires holding both keys for the `TAPPING_
|
||||
|
||||
For Instance:
|
||||
|
||||
- `SHFT_T(KC_A)` Down
|
||||
- `SFT_T(KC_A)` Down
|
||||
- `KC_X` Down
|
||||
- `SHFT_T(KC_A)` Up
|
||||
- `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`).
|
||||
@@ -303,11 +303,11 @@ When the user holds a key after tap, this repeats the tapped key rather to hold
|
||||
|
||||
Example:
|
||||
|
||||
- SHFT_T(KC_A) Down
|
||||
- SHFT_T(KC_A) Up
|
||||
- SHFT_T(KC_A) Down
|
||||
- SFT_T(KC_A) Down
|
||||
- SFT_T(KC_A) Up
|
||||
- SFT_T(KC_A) Down
|
||||
- wait more than tapping term...
|
||||
- SHFT_T(KC_A) Up
|
||||
- SFT_T(KC_A) Up
|
||||
|
||||
With default settings, `a` will be sent on the first release, then `a` will be sent on the second press allowing the computer to trigger its auto repeat function.
|
||||
|
||||
|
@@ -21,6 +21,8 @@ STARTUP_SONG // plays when the keyboard starts up (audio.c)
|
||||
GOODBYE_SONG // plays when you press the RESET key (quantum.c)
|
||||
AG_NORM_SONG // plays when you press AG_NORM (quantum.c)
|
||||
AG_SWAP_SONG // plays when you press AG_SWAP (quantum.c)
|
||||
CG_NORM_SONG // plays when you press CG_NORM (quantum.c)
|
||||
CG_SWAP_SONG // plays when you press CG_SWAP (quantum.c)
|
||||
MUSIC_ON_SONG // plays when music mode is activated (process_music.c)
|
||||
MUSIC_OFF_SONG // plays when music mode is deactivated (process_music.c)
|
||||
CHROMATIC_SONG // plays when the chromatic music mode is selected (process_music.c)
|
||||
@@ -175,8 +177,9 @@ 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_FACTOR` | 1.18921f| Sets the stepping of UP/DOWN key codes. |
|
||||
| `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. |
|
||||
|
||||
|
||||
|
||||
|
@@ -1,6 +1,8 @@
|
||||
# Backlighting
|
||||
|
||||
Many keyboards support backlit keys by way of individual LEDs placed through or underneath the keyswitches. QMK is able to control the brightness of these LEDs by switching them on and off rapidly in a certain ratio, a technique known as *Pulse Width Modulation*, or PWM. By altering the duty cycle of the PWM signal, it creates the illusion of dimming.
|
||||
Many keyboards support backlit keys by way of individual LEDs placed through or underneath the keyswitches. This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously install multiple different single coloured LEDs on a keyboard.
|
||||
|
||||
QMK is able to control the brightness of these LEDs by switching them on and off rapidly in a certain ratio, a technique known as *Pulse Width Modulation*, or PWM. By altering the duty cycle of the PWM signal, it creates the illusion of dimming.
|
||||
|
||||
The MCU can only supply so much current to its GPIO pins. Instead of powering the backlight directly from the MCU, the backlight pin is connected to a transistor or MOSFET that switches the power to the LEDs.
|
||||
|
||||
@@ -12,9 +14,8 @@ Most keyboards have backlighting enabled by default if they support it, but if i
|
||||
BACKLIGHT_ENABLE = yes
|
||||
```
|
||||
|
||||
You should then be able to use the keycodes below to change the backlight level.
|
||||
|
||||
## Keycodes
|
||||
Once enabled the following keycodes below can be used to change the backlight level.
|
||||
|
||||
|Key |Description |
|
||||
|---------|------------------------------------------|
|
||||
@@ -26,50 +27,60 @@ You should then be able to use the keycodes below to change the backlight level.
|
||||
|`BL_DEC` |Decrease the backlight level |
|
||||
|`BL_BRTG`|Toggle backlight breathing |
|
||||
|
||||
## Caveats
|
||||
## AVR driver
|
||||
|
||||
This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously use multiple different coloured LEDs on a keyboard.
|
||||
|
||||
Hardware PWM is only supported on certain pins of the MCU, so if the backlighting is not connected to one of them, a software PWM implementation triggered by hardware timer interrupts will be used.
|
||||
### Caveats
|
||||
|
||||
Hardware PWM is supported according to the following table:
|
||||
|
||||
| Backlight Pin | Hardware timer |
|
||||
|---------------|----------------|
|
||||
|`B5` | Timer 1 |
|
||||
|`B6` | Timer 1 |
|
||||
|`B7` | Timer 1 |
|
||||
|`C6` | Timer 3 |
|
||||
| other | Software PWM |
|
||||
|Backlight Pin|AT90USB64/128|ATmega16/32U4|ATmega16/32U2|ATmega32A|ATmega328P|
|
||||
|-------------|-------------|-------------|-------------|---------|----------|
|
||||
|`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 | |
|
||||
|
||||
The [audio feature](feature_audio.md) also uses hardware timers. Please refer to the following table to know what hardware timer the software PWM will use depending on the audio configuration:
|
||||
All other pins will use software PWM. If the [Audio](feature_audio.md) feature is disabled or only using one timer, the backlight PWM can be triggered by a hardware timer:
|
||||
|
||||
| Audio Pin(s) | Audio Timer | Software PWM Timer |
|
||||
|--------------|-------------|--------------------|
|
||||
| `C4` | Timer 3 | Timer 1 |
|
||||
| `C5` | Timer 3 | Timer 1 |
|
||||
| `C6` | Timer 3 | Timer 1 |
|
||||
| `B5` | Timer 1 | Timer 3 |
|
||||
| `B6` | Timer 1 | Timer 3 |
|
||||
| `B7` | Timer 1 | Timer 3 |
|
||||
| `Bx` & `Cx` | Timer 1 & 3 | None |
|
||||
|Audio Pin|Audio Timer|Software PWM Timer|
|
||||
|---------|-----------|------------------|
|
||||
|`C4` |Timer 3 |Timer 1 |
|
||||
|`C5` |Timer 3 |Timer 1 |
|
||||
|`C6` |Timer 3 |Timer 1 |
|
||||
|`B5` |Timer 1 |Timer 3 |
|
||||
|`B6` |Timer 1 |Timer 3 |
|
||||
|`B7` |Timer 1 |Timer 3 |
|
||||
|
||||
When all timers are in use for [audio](feature_audio.md), the backlight software PWM will not use a hardware timer, but instead will be triggered during the matrix scan. In this case the backlight doesn't support breathing and might show lighting artifacts (for instance flickering), because the PWM computation might not be called with enough timing precision.
|
||||
When both timers are in use for Audio, the backlight PWM will not use a hardware timer, but will instead be triggered during the matrix scan. In this case, breathing is not supported, and the backlight might flicker, because the PWM computation may not be called with enough timing precision.
|
||||
|
||||
## Configuration
|
||||
### AVR Configuration
|
||||
|
||||
To change the behaviour of the backlighting, `#define` these in your `config.h`:
|
||||
To change the behavior of the backlighting, `#define` these in your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|---------------------|-------------|-------------------------------------------------------------------------------------------------------------|
|
||||
|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this|
|
||||
|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information|
|
||||
|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 15 excluding off) |
|
||||
|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information |
|
||||
|`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 |
|
||||
|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported |
|
||||
|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds |
|
||||
|`BACKLIGHT_ON_STATE` |`0` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low |
|
||||
|
||||
## Multiple backlight pins
|
||||
### Backlight On State
|
||||
|
||||
Most backlight circuits are driven by an N-channel MOSFET or NPN transistor. This means that to turn the transistor *on* and light the LEDs, you must drive the backlight pin, connected to the gate or base, *high*.
|
||||
Sometimes, however, a P-channel MOSFET, or a PNP transistor is used. In this case, when the transistor is on, the pin is driven *low* instead.
|
||||
|
||||
This functionality is configured at the keyboard level with the `BACKLIGHT_ON_STATE` define.
|
||||
|
||||
### 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).
|
||||
In software PWM, it is possible to define multiple backlight pins. All those pins will be turned on and off at the same time during the PWM duty cycle.
|
||||
@@ -77,13 +88,13 @@ This feature allows to set for instance the Caps Lock LED (or any other controll
|
||||
|
||||
To activate multiple backlight pins, you need to add something like this to your user `config.h`:
|
||||
|
||||
~~~c
|
||||
```c
|
||||
#define BACKLIGHT_LED_COUNT 2
|
||||
#undef BACKLIGHT_PIN
|
||||
#define BACKLIGHT_PINS { F5, B2 }
|
||||
~~~
|
||||
```
|
||||
|
||||
## Hardware PWM Implementation
|
||||
### Hardware PWM Implementation
|
||||
|
||||
When using the supported pins for backlighting, QMK will use a hardware timer configured to output a PWM signal. This timer will count up to `ICRx` (by default `0xFFFF`) before resetting to 0.
|
||||
The desired brightness is calculated and stored in the `OCRxx` register. When the counter reaches this value, the backlight pin will go low, and is pulled high again when the counter resets.
|
||||
@@ -92,7 +103,7 @@ In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus th
|
||||
The breathing effect is achieved by registering an interrupt handler for `TIMER1_OVF_vect` that is called whenever the counter resets, roughly 244 times per second.
|
||||
In this handler, the value of an incrementing counter is mapped onto a precomputed brightness curve. To turn off breathing, the interrupt handler is simply disabled, and the brightness reset to the level stored in EEPROM.
|
||||
|
||||
## Software PWM Implementation
|
||||
### Software PWM Implementation
|
||||
|
||||
When `BACKLIGHT_PIN` is not set to a hardware backlight pin, QMK will use a hardware timer configured to trigger software interrupts. This time will count up to `ICRx` (by default `0xFFFF`) before resetting to 0.
|
||||
When resetting to 0, the CPU will fire an OVF (overflow) interrupt that will turn the LEDs on, starting the duty cycle.
|
||||
@@ -101,6 +112,29 @@ In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus th
|
||||
|
||||
The breathing effect is the same as in the hardware PWM implementation.
|
||||
|
||||
## ARM Driver
|
||||
|
||||
### Caveats
|
||||
|
||||
Currently only hardware PWM is supported, and does not provide automatic configuration.
|
||||
|
||||
?> STMF072 support is being investigated.
|
||||
|
||||
### ARM Configuration
|
||||
|
||||
To change the behavior of the backlighting, `#define` these in your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|------------------------|-------------|-------------------------------------------------------------------------------------------------------------|
|
||||
|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this|
|
||||
|`BACKLIGHT_PWM_DRIVER` |`PWMD4` |The PWM driver to use, see ST datasheets for pin to PWM timer mapping. Unless you are designing your own keyboard, you shouldn't need to change this|
|
||||
|`BACKLIGHT_PWM_CHANNEL` |`3` |The PWM channel to use, see ST datasheets for pin to PWM channel mapping. Unless you are designing your own keyboard, you shouldn't need to change this|
|
||||
|`BACKLIGHT_PAL_MODE` |`2` |The pin alternative function to use, see ST datasheets for pin AF mapping. Unless you are designing your own keyboard, you shouldn't need to change this|
|
||||
|`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 Functions
|
||||
|
||||
|Function |Description |
|
||||
@@ -111,7 +145,8 @@ The breathing effect is the same as in the hardware PWM implementation.
|
||||
|`backlight_step()` |Cycle through backlight levels |
|
||||
|`backlight_increase()` |Increase the backlight level |
|
||||
|`backlight_decrease()` |Decrease the backlight level |
|
||||
|`backlight_level(x)` |Sets the backlight level to specified level |
|
||||
|`backlight_level(x)` |Sets the backlight level, from 0 to |
|
||||
| |`BACKLIGHT_LEVELS` |
|
||||
|`get_backlight_level()` |Return the current backlight level |
|
||||
|`is_backlight_enabled()`|Return whether the backlight is currently on |
|
||||
|
||||
|
@@ -2,18 +2,18 @@
|
||||
|
||||
## Bluetooth Known Supported Hardware
|
||||
|
||||
Currently Bluetooth support is limited to AVR based chips. For Bluetooth 2.1 Qmk has support for RN-42 HID Firmware and Bluefruit EZ Key the later of which is not produced anymore. For more recent BLE protocols currently only the Adafruit Bluefruit SPI friend is directly supported. BLE is needed to connect to iOS devices. Note iOS does not support Mouse Input.
|
||||
Currently Bluetooth support is limited to AVR based chips. For Bluetooth 2.1, QMK has support for RN-42 modules and the Bluefruit EZ-Key, the latter of which is not produced anymore. For more recent BLE protocols, currently only the Adafruit Bluefruit SPI Friend is directly supported. BLE is needed to connect to iOS devices. Note iOS does not support mouse input.
|
||||
|
||||
|Board |Bluetooth Protocol |Connection Type |Rules.mk |Bluetooth Chip|
|
||||
|Board |Bluetooth Protocol |Connection Type |rules.mk |Bluetooth Chip|
|
||||
|----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------|
|
||||
|[Adafruit EzKey HID]("https://www.adafruit.com/product/1535") |Bluetooth Classic | UART | BLUETOOTH = AdafruitEZKey | |
|
||||
|Rover Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic | UART | BLUETOOTH = RN42 | RN-42 |
|
||||
|[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy | SPI | BLUETOOTH = AdafruitBLE | nRF5182 |
|
||||
|[Adafruit EZ-Key HID](https://www.adafruit.com/product/1535) |Bluetooth Classic | UART |`BLUETOOTH = AdafruitEZKey` | |
|
||||
|Roving Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic | UART |`BLUETOOTH = RN42` | RN-42 |
|
||||
|[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy | SPI |`BLUETOOTH = AdafruitBLE` | nRF51822 |
|
||||
|
||||
Not Supported Yet but possible:
|
||||
* [Bluefruit LE UART Friend](https://www.adafruit.com/product/2479). [Possible tmk implementation found in](https://github.com/tmk/tmk_keyboard/issues/514)
|
||||
* HC-05 boards flashed with RN-42 firmware. They apparently both use the CSR BC417 Chip. Flashing it with RN-42 firmware gives it HID capability.
|
||||
* [Sparkfun Bluetooth mate](https://www.sparkfun.com/products/14839)
|
||||
* Sparkfun Bluetooth Mate
|
||||
* HM-13 based boards
|
||||
|
||||
### Adafruit BLE SPI Friend
|
||||
|
@@ -34,6 +34,8 @@ Hold down the Bootmagic key (Space by default) and the desired hotkey while plug
|
||||
|`X` |Toggle key matrix debugging |
|
||||
|`K` |Toggle keyboard debugging |
|
||||
|`M` |Toggle mouse debugging |
|
||||
|`L` |Set "Left Hand" for EE_HANDS handedness |
|
||||
|`R` |Set "Right Hand" for EE_HANDS handedness |
|
||||
|Backspace |Clear the EEPROM |
|
||||
|Caps Lock |Toggle treating Caps Lock as Left Control |
|
||||
|Left Control |Toggle swapping Caps Lock and Left Control |
|
||||
@@ -64,8 +66,11 @@ Hold down the Bootmagic key (Space by default) and the desired hotkey while plug
|
||||
|`MAGIC_NO_GUI` | |Disable the GUI keys (useful when gaming) |
|
||||
|`MAGIC_UNNO_GUI` | |Enable the GUI keys |
|
||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides (for macOS)|
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Left Alt and Left GUI |
|
||||
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Left Alt and GUI swap |
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI |
|
||||
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap |
|
||||
|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Ctrl and GUI on both sides (for macOS)|
|
||||
|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Ctrl and GUI |
|
||||
|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Ctrl and GUI swap |
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace |
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Left Control and Caps Lock |
|
||||
@@ -76,6 +81,12 @@ Hold down the Bootmagic key (Space by default) and the desired hotkey while plug
|
||||
|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and Left GUI |
|
||||
|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and Right GUI |
|
||||
|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and Right GUI |
|
||||
|`MAGIC_SWAP_LCTL_LGUI` | |Swap Left Control and Left GUI |
|
||||
|`MAGIC_UNSWAP_LCTL_LGUI` | |Unswap Left Control and Left GUI |
|
||||
|`MAGIC_SWAP_RCTL_RGUI` | |Swap Right Control and Right GUI |
|
||||
|`MAGIC_UNSWAP_RCTL_RGUI` | |Unswap Right Control and Right GUI |
|
||||
|`MAGIC_EE_HANDS_LEFT` | |Set "Left Hand" for EE_HANDS handedness |
|
||||
|`MAGIC_EE_HANDS_RIGHT` | |Set "Right Hand" for EE_HANDS handedness |
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -91,6 +102,8 @@ If you would like to change the hotkey assignments for Bootmagic, `#define` thes
|
||||
|`BOOTMAGIC_KEY_DEBUG_MATRIX` |`KC_X` |Toggle matrix debugging |
|
||||
|`BOOTMAGIC_KEY_DEBUG_KEYBOARD` |`KC_K` |Toggle keyboard debugging |
|
||||
|`BOOTMAGIC_KEY_DEBUG_MOUSE` |`KC_M` |Toggle mouse debugging |
|
||||
|`BOOTMAGIC_KEY_EE_HANDS_LEFT` |`KC_L` |Set "Left Hand" for EE_HANDS handedness |
|
||||
|`BOOTMAGIC_KEY_EE_HANDS_RIGHT` |`KC_R` |Set "Right Hand" for EE_HANDS handedness |
|
||||
|`BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK` |`KC_LCTRL` |Swap Left Control and Caps Lock |
|
||||
|`BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL` |`KC_CAPSLOCK`|Toggle treating Caps Lock as Left Control |
|
||||
|`BOOTMAGIC_KEY_SWAP_LALT_LGUI` |`KC_LALT` |Toggle swapping Left Alt and Left GUI (for macOS) |
|
||||
@@ -140,7 +153,7 @@ To replace the function, all you need to do is add something like this to your c
|
||||
```c
|
||||
void bootmagic_lite(void) {
|
||||
matrix_scan();
|
||||
wait_ms(DEBOUNCING_DELAY * 2);
|
||||
wait_ms(DEBOUNCE * 2);
|
||||
matrix_scan();
|
||||
|
||||
if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
The Combo feature is a chording type solution for adding custom actions. It lets you hit multiple keys at once and produce a different effect. For instance, hitting `A` and `S` within the tapping term would hit `ESC` instead, or have it perform even more complex tasks.
|
||||
|
||||
To enable this feature, yu need to add `COMBO_ENABLE = yes` to your `rules.mk`.
|
||||
To enable this feature, you need to add `COMBO_ENABLE = yes` to your `rules.mk`.
|
||||
|
||||
Additionally, in your `config.h`, you'll need to specify the number of combos that you'll be using, by adding `#define COMBO_COUNT 1` (replacing 1 with the number that you're using).
|
||||
<!-- At this time, this is necessary -->
|
||||
@@ -29,6 +29,7 @@ enum combos {
|
||||
AB_ESC,
|
||||
JK_TAB
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END};
|
||||
const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
|
||||
|
||||
@@ -44,7 +45,7 @@ For a more complicated implementation, you can use the `process_combo_event` fun
|
||||
enum combo_events {
|
||||
ZC_COPY,
|
||||
XV_PASTE
|
||||
};
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END};
|
||||
const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END};
|
||||
@@ -58,19 +59,12 @@ void process_combo_event(uint8_t combo_index, bool pressed) {
|
||||
switch(combo_index) {
|
||||
case ZC_COPY:
|
||||
if (pressed) {
|
||||
register_code(KC_LCTL);
|
||||
register_code(KC_C);
|
||||
unregister_code(KC_C);
|
||||
unregister_code(KC_LCTL);
|
||||
tap_code16(LCTL(KC_C));
|
||||
}
|
||||
break;
|
||||
|
||||
case XV_PASTE:
|
||||
if (pressed) {
|
||||
register_code(KC_LCTL);
|
||||
register_code(KC_V);
|
||||
unregister_code(KC_V);
|
||||
unregister_code(KC_LCTL);
|
||||
tap_code16(LCTL(KC_V));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -86,3 +80,24 @@ If you're using long combos, or even longer combos, you may run into issues with
|
||||
In this case, you can add either `#define EXTRA_LONG_COMBOS` or `#define EXTRA_EXTRA_LONG_COMBOS` in your `config.h` file.
|
||||
|
||||
You may also be able to enable action keys by defining `COMBO_ALLOW_ACTION_KEYS`.
|
||||
|
||||
## Keycodes
|
||||
|
||||
You can enable, disable and toggle the Combo feature on the fly. This is useful if you need to disable them temporarily, such as for a game.
|
||||
|
||||
|Keycode |Description |
|
||||
|----------|---------------------------------|
|
||||
|`CMB_ON` |Turns on Combo feature |
|
||||
|`CMB_OFF` |Turns off Combo feature |
|
||||
|`CMB_TOG` |Toggles Combo feature on and off |
|
||||
|
||||
## User callbacks
|
||||
|
||||
In addition to the keycodes, there are a few functions that you can use to set the status, or check it:
|
||||
|
||||
|Function |Description |
|
||||
|-----------|--------------------------------------------------------------------|
|
||||
| `combo_enable()` | Enables the combo feature |
|
||||
| `combo_disable()` | Disables the combo feature, and clears the combo buffer |
|
||||
| `combo_toggle()` | Toggles the state of the combo feature |
|
||||
| `is_combo_enabled()` | Returns the status of the combo feature state (true or false) |
|
||||
|
@@ -16,36 +16,36 @@ To use Command, hold down the key combination defined by the `IS_COMMAND()` macr
|
||||
|
||||
If you would like to change the key assignments for Command, `#define` these in your `config.h` at either the keyboard or keymap level. All keycode assignments here must omit the `KC_` prefix.
|
||||
|
||||
|Define |Default |Description |
|
||||
|------------------------------------|---------------------------------------------------------------------------|------------------------------------------------|
|
||||
|`IS_COMMAND()` |<code>(get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))</code>|The key combination to activate Command |
|
||||
|`MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` |`true` |Set default layer with the Function row |
|
||||
|`MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` |`true` |Set default layer with the number keys |
|
||||
|`MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM`|`false` |Set default layer with `MAGIC_KEY_LAYER0..9` |
|
||||
|`MAGIC_KEY_DEBUG` |`D` |Toggle debugging over serial |
|
||||
|`MAGIC_KEY_DEBUG_MATRIX` |`X` |Toggle key matrix debugging |
|
||||
|`MAGIC_KEY_DEBUG_KBD` |`K` |Toggle keyboard debugging |
|
||||
|`MAGIC_KEY_DEBUG_MOUSE` |`M` |Toggle mouse debugging |
|
||||
|`MAGIC_KEY_CONSOLE` |`C` |Enable the Command console |
|
||||
|`MAGIC_KEY_VERSION` |`V` |Print the running QMK version to the console |
|
||||
|`MAGIC_KEY_STATUS` |`S` |Print the current keyboard status to the console|
|
||||
|`MAGIC_KEY_HELP` |`H` |Print Command help to the console |
|
||||
|`MAGIC_KEY_HELP_ALT` |`SLASH` |Print Command help to the console (alternate) |
|
||||
|`MAGIC_KEY_LAYER0` |`0` |Make layer 0 the default layer |
|
||||
|`MAGIC_KEY_LAYER0_ALT` |`GRAVE` |Make layer 0 the default layer (alternate) |
|
||||
|`MAGIC_KEY_LAYER1` |`1` |Make layer 1 the default layer |
|
||||
|`MAGIC_KEY_LAYER2` |`2` |Make layer 2 the default layer |
|
||||
|`MAGIC_KEY_LAYER3` |`3` |Make layer 3 the default layer |
|
||||
|`MAGIC_KEY_LAYER4` |`4` |Make layer 4 the default layer |
|
||||
|`MAGIC_KEY_LAYER5` |`5` |Make layer 5 the default layer |
|
||||
|`MAGIC_KEY_LAYER6` |`6` |Make layer 6 the default layer |
|
||||
|`MAGIC_KEY_LAYER7` |`7` |Make layer 7 the default layer |
|
||||
|`MAGIC_KEY_LAYER8` |`8` |Make layer 8 the default layer |
|
||||
|`MAGIC_KEY_LAYER9` |`9` |Make layer 9 the default layer |
|
||||
|`MAGIC_KEY_BOOTLOADER` |`B` |Jump to bootloader |
|
||||
|`MAGIC_KEY_BOOTLOADER_ALT` |`ESC` |Jump to bootloader (alternate) |
|
||||
|`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed |
|
||||
|`MAGIC_KEY_EEPROM` |`E` |Print stored EEPROM config to the console |
|
||||
|`MAGIC_KEY_EEPROM_CLEAR` |`BSPACE` |Clear the EEPROM |
|
||||
|`MAGIC_KEY_NKRO` |`N` |Toggle N-Key Rollover (NKRO) |
|
||||
|`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping |
|
||||
|Define |Default |Description |
|
||||
|------------------------------------|--------------------------------|------------------------------------------------|
|
||||
|`IS_COMMAND()` |`(get_mods() == MOD_MASK_SHIFT)`|The key combination to activate Command |
|
||||
|`MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` |`true` |Set default layer with the Function row |
|
||||
|`MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` |`true` |Set default layer with the number keys |
|
||||
|`MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM`|`false` |Set default layer with `MAGIC_KEY_LAYER0..9` |
|
||||
|`MAGIC_KEY_DEBUG` |`D` |Toggle debugging over serial |
|
||||
|`MAGIC_KEY_DEBUG_MATRIX` |`X` |Toggle key matrix debugging |
|
||||
|`MAGIC_KEY_DEBUG_KBD` |`K` |Toggle keyboard debugging |
|
||||
|`MAGIC_KEY_DEBUG_MOUSE` |`M` |Toggle mouse debugging |
|
||||
|`MAGIC_KEY_CONSOLE` |`C` |Enable the Command console |
|
||||
|`MAGIC_KEY_VERSION` |`V` |Print the running QMK version to the console |
|
||||
|`MAGIC_KEY_STATUS` |`S` |Print the current keyboard status to the console|
|
||||
|`MAGIC_KEY_HELP` |`H` |Print Command help to the console |
|
||||
|`MAGIC_KEY_HELP_ALT` |`SLASH` |Print Command help to the console (alternate) |
|
||||
|`MAGIC_KEY_LAYER0` |`0` |Make layer 0 the default layer |
|
||||
|`MAGIC_KEY_LAYER0_ALT` |`GRAVE` |Make layer 0 the default layer (alternate) |
|
||||
|`MAGIC_KEY_LAYER1` |`1` |Make layer 1 the default layer |
|
||||
|`MAGIC_KEY_LAYER2` |`2` |Make layer 2 the default layer |
|
||||
|`MAGIC_KEY_LAYER3` |`3` |Make layer 3 the default layer |
|
||||
|`MAGIC_KEY_LAYER4` |`4` |Make layer 4 the default layer |
|
||||
|`MAGIC_KEY_LAYER5` |`5` |Make layer 5 the default layer |
|
||||
|`MAGIC_KEY_LAYER6` |`6` |Make layer 6 the default layer |
|
||||
|`MAGIC_KEY_LAYER7` |`7` |Make layer 7 the default layer |
|
||||
|`MAGIC_KEY_LAYER8` |`8` |Make layer 8 the default layer |
|
||||
|`MAGIC_KEY_LAYER9` |`9` |Make layer 9 the default layer |
|
||||
|`MAGIC_KEY_BOOTLOADER` |`B` |Jump to bootloader |
|
||||
|`MAGIC_KEY_BOOTLOADER_ALT` |`ESC` |Jump to bootloader (alternate) |
|
||||
|`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed |
|
||||
|`MAGIC_KEY_EEPROM` |`E` |Print stored EEPROM config to the console |
|
||||
|`MAGIC_KEY_EEPROM_CLEAR` |`BSPACE` |Clear the EEPROM |
|
||||
|`MAGIC_KEY_NKRO` |`N` |Toggle N-Key Rollover (NKRO) |
|
||||
|`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping |
|
||||
|
90
docs/feature_dip_switch.md
Normal file
90
docs/feature_dip_switch.md
Normal file
@@ -0,0 +1,90 @@
|
||||
# DIP Switches
|
||||
|
||||
DIP switches are supported by adding this to your `rules.mk`:
|
||||
|
||||
DIP_SWITCH_ENABLE = yes
|
||||
|
||||
and this to your `config.h`:
|
||||
|
||||
```c
|
||||
#define DIP_SWITCH_PINS { B14, A15, A10, B9 }
|
||||
```
|
||||
|
||||
## Callbacks
|
||||
|
||||
The callback functions can be inserted into your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
void dip_switch_update_kb(uint8_t index, bool active) {
|
||||
dip_switch_update_user(index, active);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
or `keymap.c`:
|
||||
|
||||
```c
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if(active) { audio_on(); } else { audio_off(); }
|
||||
break;
|
||||
case 1:
|
||||
if(active) { clicky_on(); } else { clicky_off(); }
|
||||
break;
|
||||
case 2:
|
||||
if(active) { music_on(); } else { music_off(); }
|
||||
break;
|
||||
case 3:
|
||||
if (active) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(plover_song);
|
||||
#endif
|
||||
layer_on(_PLOVER);
|
||||
} else {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(plover_gb_song);
|
||||
#endif
|
||||
layer_off(_PLOVER);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Additionally, we support bit mask functions which allow for more complex handling.
|
||||
|
||||
|
||||
```c
|
||||
void dip_switch_update_mask_kb(uint32_t state) {
|
||||
dip_switch_update_mask_user(state);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
or `keymap.c`:
|
||||
|
||||
```c
|
||||
void dip_switch_update_mask_user(uint32_t state) {
|
||||
if (state & (1UL<<0) && state & (1UL<<1)) {
|
||||
layer_on(_ADJUST); // C on esc
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
if (state & (1UL<<0)) {
|
||||
layer_on(_TEST_A); // A on ESC
|
||||
} else {
|
||||
layer_off(_TEST_A);
|
||||
}
|
||||
if (state & (1UL<<1)) {
|
||||
layer_on(_TEST_B); // B on esc
|
||||
} else {
|
||||
layer_off(_TEST_B);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Hardware
|
||||
|
||||
One side of the DIP switch should be wired directly to the pin on the MCU, and the other side to ground. It should not matter which side is connected to which, as it should be functionally the same.
|
@@ -6,7 +6,6 @@ Basic encoders are supported by adding this to your `rules.mk`:
|
||||
|
||||
and this to your `config.h`:
|
||||
|
||||
#define NUMBER_OF_ENCODERS 1
|
||||
#define ENCODERS_PAD_A { B12 }
|
||||
#define ENCODERS_PAD_B { B13 }
|
||||
|
||||
@@ -21,6 +20,15 @@ Additionally, the resolution can be specified in the same file (the default & su
|
||||
|
||||
#define ENCODER_RESOLUTION 4
|
||||
|
||||
## Split Keyboards
|
||||
|
||||
If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout for the right half like this:
|
||||
|
||||
```c
|
||||
#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
|
||||
#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
|
||||
```
|
||||
|
||||
## Callbacks
|
||||
|
||||
The callback functions can be inserted into your `<keyboard>.c`:
|
||||
@@ -38,7 +46,7 @@ or `keymap.c`:
|
||||
} else {
|
||||
tap_code(KC_PGUP);
|
||||
}
|
||||
} else if (index == 1) { /* Second encoder
|
||||
} else if (index == 1) { /* Second encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_UP);
|
||||
} else {
|
||||
@@ -50,3 +58,11 @@ or `keymap.c`:
|
||||
## 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.
|
||||
|
||||
## Encoder matrix
|
||||
|
||||
You can also wire the C/common line through a diode (arrow towards the row) to each of the rows (or reading pin) in your matrix, and use as many encoders as you have rows (multiplied by the number of A/B lines you have hooked up). To do this, you can add this line to your `config.h` with all of the pins you use:
|
||||
|
||||
```c
|
||||
#define ENCODERS_PAD_C { encoder1c, encoder2c }
|
||||
```
|
@@ -29,6 +29,9 @@ Not all keycodes below will work depending on which haptic mechanism you have ch
|
||||
|`HPT_BUZ` | Toggle solenoid buzz on/off |
|
||||
|`HPT_MODI` | Go to next DRV2605L waveform |
|
||||
|`HPT_MODD` | Go to previous DRV2605L waveform |
|
||||
|`HPT_CONT` | Toggle continuous haptic mode on/off |
|
||||
|`HPT_CONI` | Increase DRV2605L continous haptic strength |
|
||||
|`HPT_COND` | Decrease DRV2605L continous haptic strength |
|
||||
|`HPT_DWLI` | Increase Solenoid dwell time |
|
||||
|`HPT_DWLD` | Decrease Solenoid dwell time |
|
||||
|
||||
@@ -145,3 +148,7 @@ If haptic feedback is enabled, the keyboard will vibrate to a specific sqeuence
|
||||
#define DRV_MODE_DEFAULT *sequence name or number*
|
||||
```
|
||||
This will set what sequence HPT_RST will set as the active mode. If not defined, mode will be set to 1 when HPT_RST is pressed.
|
||||
|
||||
### DRV2605L Continuous Haptic Mode
|
||||
|
||||
This mode sets continuous haptic feedback with the option to increase or decrease strength.
|
@@ -2,11 +2,12 @@
|
||||
|
||||
This is an integration of Peter Fleury's LCD library. This page will explain the basics. [For in depth documentation visit his page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
||||
|
||||
You can enable support for HD44780 Displays by setting the `HD44780_ENABLE` flag in your keyboards `rules.mk` to yes. This will use about 400 KB of extra space.
|
||||
You can enable support for HD44780 Displays by setting the `HD44780_ENABLE` flag in your keyboards `rules.mk` to yes.
|
||||
|
||||
## Configuration
|
||||
|
||||
You will need to configure the pins used by your display and its number of lines and collumn in your keyboards `config.h`.
|
||||
You will need to configure the pins used by your display, and its number of lines and columns in your keyboard's `config.h`.
|
||||
|
||||
|
||||
Uncomment the section labled HD44780 and change the parameters as needed.
|
||||
````
|
||||
@@ -25,7 +26,7 @@ Uncomment the section labled HD44780 and change the parameters as needed.
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
@@ -38,14 +39,14 @@ Uncomment the section labled HD44780 and change the parameters as needed.
|
||||
|
||||
Should you need to configure other properties you can copy them from `quantum/hd44780.h` and set them in your `config.h`
|
||||
|
||||
## Usage
|
||||
## Usage
|
||||
|
||||
To initialize your display call lcd_init() with one of these parameters:
|
||||
To initialize your display, call `lcd_init()` with one of these parameters:
|
||||
````
|
||||
LCD_DISP_OFF : display off
|
||||
LCD_DISP_ON : display on, cursor off
|
||||
LCD_DISP_ON_CURSOR : display on, cursor on
|
||||
LCD_DISP_ON_CURSOR_BLINK : display on, cursor on flashing
|
||||
LCD_DISP_ON_CURSOR_BLINK : display on, cursor on flashing
|
||||
````
|
||||
This is best done in your keyboards `matrix_init_kb` or your keymaps `matrix_init_user`.
|
||||
It is advised to clear the display before use.
|
||||
@@ -53,4 +54,4 @@ To do so call `lcd_clrsrc()`.
|
||||
|
||||
To now print something to your Display you first call `lcd_gotoxy(column, line)`. To go to the start of the first line you would call `lcd_gotoxy(0, 0)` and then print a string with `lcd_puts("example string")`.
|
||||
|
||||
There are more posible methods to control the display. [For in depth documentation please visit the linked page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
||||
There are more methods available to control the display. [For in depth documentation please visit the linked page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
||||
|
@@ -16,7 +16,7 @@ First, enable Key Lock by setting `KEY_LOCK_ENABLE = yes` in your `rules.mk`. Th
|
||||
|
||||
## Caveats
|
||||
|
||||
Key Lock is only able to hold standard action keys and [One Shot modifier](quantum_keycodes.md#one-shot-keys) keys (for example, if you have your Shift defined as `OSM(KC_LSFT)`).
|
||||
Key Lock is only able to hold standard action keys and [One Shot modifier](feature_advanced_keycodes.md#one-shot-keys) keys (for example, if you have your Shift defined as `OSM(KC_LSFT)`).
|
||||
This does not include any of the QMK special functions (except One Shot modifiers), or shifted versions of keys such as `KC_LPRN`. If it's in the [Basic Keycodes](keycodes_basic.md) list, it can be held.
|
||||
|
||||
Switching layers will not cancel the Key Lock.
|
||||
|
@@ -2,9 +2,19 @@
|
||||
|
||||
## OLED Supported Hardware
|
||||
|
||||
128x32 OLED modules using SSD1306 driver IC over I2C. Supported on AVR based keyboards. Possible but untested hardware includes ARM based keyboards and other sized OLED modules using SSD1306 over I2C, such as 128x64.
|
||||
OLED modules using SSD1306 or SH1106 driver ICs, communicating over I2C.
|
||||
Tested combinations:
|
||||
|
||||
!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses i2c to communication between sides this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this.
|
||||
| IC driver | Size | Keyboard Platform | Notes |
|
||||
|-----------|--------|-------------------|--------------------------|
|
||||
| SSD1306 | 128x32 | AVR | Primary support |
|
||||
| SSD1306 | 128x64 | AVR | Verified working |
|
||||
| SSD1306 | 128x32 | ARM | |
|
||||
| SH1106 | 128x64 | AVR | No rotation or scrolling |
|
||||
|
||||
Hardware configurations using ARM-based microcontrollers or different sizes of OLED modules may be compatible, but are untested.
|
||||
|
||||
!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses I2C to communicate between sides, this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this. In addition, the display timeout system to reduce OLED burn-in also uses split common to detect keypresses, so you will need to implement custom timeout logic for non-split common keyboards.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -21,7 +31,7 @@ This enables the feature and the `OLED_DRIVER_ENABLE` define. Then in your `keym
|
||||
void oled_task_user(void) {
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
switch (biton32(layer_state)) {
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("Default\n"), false);
|
||||
break;
|
||||
@@ -86,17 +96,19 @@ void oled_task_user(void) {
|
||||
|
||||
## Basic Configuration
|
||||
|
||||
|Define |Default |Description |
|
||||
|-----------------------|---------------|------------------------------------------------|
|
||||
|`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display |
|
||||
|`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts |
|
||||
|`OLED_FONT_START` |`0` |The starting characer index for custom fonts |
|
||||
|`OLED_FONT_END` |`224` |The ending characer index for custom fonts |
|
||||
|`OLED_FONT_WIDTH` |`6` |The font width |
|
||||
|`OLED_FONT_HEIGHT` |`8` |The font height (untested) |
|
||||
|`OLED_DISABLE_TIMEOUT` |*Not defined* |Disables the built in OLED timeout feature. Useful when implementing custom timeout rules.|
|
||||
|
||||
|
||||
| Define | Default | Description |
|
||||
|----------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OLED_DISPLAY_ADDRESS` | `0x3C` | The i2c address of the OLED Display |
|
||||
| `OLED_FONT_H` | `"glcdfont.c"` | The font code file to use for custom fonts |
|
||||
| `OLED_FONT_START` | `0` | The starting characer index for custom fonts |
|
||||
| `OLED_FONT_END` | `224` | The ending characer index for custom fonts |
|
||||
| `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_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. |
|
||||
| `OLED_COLUMN_OFFSET` | `0` | (SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC. |
|
||||
|
||||
## 128x64 & Custom sized OLED Displays
|
||||
|
||||
@@ -108,16 +120,19 @@ void oled_task_user(void) {
|
||||
|`OLED_DISPLAY_CUSTOM` |*Not defined* |Changes the display defines for use with custom displays.<br />Requires user to implement the below defines. |
|
||||
|`OLED_DISPLAY_WIDTH` |`128` |The width of the OLED display. |
|
||||
|`OLED_DISPLAY_HEIGHT` |`32` |The height of the OLED display. |
|
||||
|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br />`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`|
|
||||
|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering.|
|
||||
|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br />`(sizeof(OLED_BLOCK_TYPE) * 8)`|
|
||||
|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br />`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`|
|
||||
|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br />`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`. |
|
||||
|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering. |
|
||||
|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br />`(sizeof(OLED_BLOCK_TYPE) * 8)`. |
|
||||
|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br />`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`. |
|
||||
|`OLED_COM_PINS` |`COM_PINS_SEQ` |How the SSD1306 chip maps it's memory to display.<br />Options are `COM_PINS_SEQ`, `COM_PINS_ALT`, `COM_PINS_SEQ_LR`, & `COM_PINS_ALT_LR`. |
|
||||
|`OLED_SOURCE_MAP` |`{ 0, ... N }` |Precalculated source array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
|
||||
|`OLED_TARGET_MAP` |`{ 24, ... N }`|Precalculated target array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
|
||||
|
||||
|
||||
### 90 Degree Rotation - Technical Mumbo Jumbo
|
||||
|
||||
!> Rotation is unsupported on the SH1106.
|
||||
|
||||
```C
|
||||
// OLED Rotation enum values are flags
|
||||
typedef enum {
|
||||
@@ -249,6 +264,8 @@ uint8_t oled_max_chars(void);
|
||||
uint8_t oled_max_lines(void);
|
||||
```
|
||||
|
||||
!> Scrolling and rotation are unsupported on the SH1106.
|
||||
|
||||
## SSD1306.h driver conversion guide
|
||||
|
||||
|Old API |Recommended New API |
|
||||
|
@@ -149,7 +149,7 @@ In your keyboard config.h:
|
||||
|
||||
#### PS/2 Mouse Features
|
||||
|
||||
These enable settings supported by the PS/2 mouse protocol: http://www.computer-engineering.org/ps2mouse/
|
||||
These enable settings supported by the PS/2 mouse protocol.
|
||||
|
||||
```
|
||||
/* Use remote mode instead of the default stream mode (see link) */
|
||||
@@ -202,7 +202,7 @@ Note: you can also use `ps2_mouse_set_resolution` for the same effect (not suppo
|
||||
#### Scroll Button
|
||||
|
||||
If you're using a trackpoint, you will likely want to be able to use it for scrolling.
|
||||
Its possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving.
|
||||
It's possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving.
|
||||
To enable the feature, you must set a scroll button mask as follows:
|
||||
|
||||
```
|
||||
|
@@ -30,9 +30,11 @@ Configure the hardware via your `config.h`:
|
||||
#define DRIVER_COUNT 2
|
||||
#define DRIVER_1_LED_TOTAL 25
|
||||
#define DRIVER_2_LED_TOTAL 24
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
|
||||
#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 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`:
|
||||
@@ -40,11 +42,11 @@ 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
|
||||
* | | | | */
|
||||
* driver
|
||||
* | R location
|
||||
* | | G location
|
||||
* | | | B location
|
||||
* | | | | */
|
||||
{0, C1_3, C2_3, C3_3},
|
||||
....
|
||||
}
|
||||
@@ -91,11 +93,11 @@ 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
|
||||
* | | | | */
|
||||
* driver
|
||||
* | R location
|
||||
* | | G location
|
||||
* | | | B location
|
||||
* | | | | */
|
||||
{0, B_1, A_1, C_1},
|
||||
....
|
||||
}
|
||||
@@ -142,14 +144,16 @@ const led_config_t g_led_config = { {
|
||||
} };
|
||||
```
|
||||
|
||||
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 position on the keyboard. The first value, `x`, is between 0-224 (inclusive), and the second value, `y`, is between 0-64 (inclusive). This range is due to effect that calculate the center or halves 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:
|
||||
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:
|
||||
|
||||
```C
|
||||
x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION
|
||||
y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION
|
||||
```
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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 RGB_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.
|
||||
|
||||
`// 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.
|
||||
|
||||
@@ -192,16 +196,29 @@ enum rgb_matrix_effects {
|
||||
RGB_MATRIX_ALPHAS_MODS, // Static dual hue, speed is hue for secondary hue
|
||||
RGB_MATRIX_GRADIENT_UP_DOWN, // Static gradient top to bottom, speed controls how much gradient changes
|
||||
RGB_MATRIX_BREATHING, // Single hue brightness cycling animation
|
||||
RGB_MATRIX_BAND_SAT, // Single hue band fading saturation scrolling left to right
|
||||
RGB_MATRIX_BAND_VAL, // Single hue band fading brightness scrolling left to right
|
||||
RGB_MATRIX_BAND_PINWHEEL_SAT, // Single hue 3 blade spinning pinwheel fades saturation
|
||||
RGB_MATRIX_BAND_PINWHEEL_VAL, // Single hue 3 blade spinning pinwheel fades brightness
|
||||
RGB_MATRIX_BAND_SPIRAL_SAT, // Single hue spinning spiral fades saturation
|
||||
RGB_MATRIX_BAND_SPIRAL_VAL, // Single hue spinning spiral fades brightness
|
||||
RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient
|
||||
RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right
|
||||
RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom
|
||||
RGB_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in
|
||||
RGB_MATRIX_CYCLE_OUT_IN_DUAL, // Full dual gradients scrolling out to in
|
||||
RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right
|
||||
RGB_MATRIX_CYCLE_PINWHEEL, // Full gradient spinning pinwheel around center of keyboard
|
||||
RGB_MATRIX_CYCLE_SPIRAL, // Full gradient spinning spiral around center of keyboard
|
||||
RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
|
||||
RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard
|
||||
RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard
|
||||
RGB_MATRIX_RAINDROPS, // Randomly changes a single key's hue
|
||||
RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation
|
||||
#if define(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
|
||||
RGB_MATRIX_TYPING_HEATMAP, // How hot is your WPM!
|
||||
RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation
|
||||
#endif
|
||||
#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
|
||||
RGB_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit to hue & value then fades value out
|
||||
RGB_MATRIX_SOLID_REACTIVE, // Static single hue, pulses keys hit to shifted hue then fades to current hue
|
||||
@@ -228,15 +245,26 @@ 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_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` |
|
||||
|`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT` |Disables `RGB_MATRIX_BAND_PINWHEEL_SAT` |
|
||||
|`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL` |Disables `RGB_MATRIX_BAND_PINWHEEL_VAL` |
|
||||
|`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT` |Disables `RGB_MATRIX_BAND_SPIRAL_SAT` |
|
||||
|`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL` |Disables `RGB_MATRIX_BAND_SPIRAL_VAL` |
|
||||
|`#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_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_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_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` |
|
||||
@@ -346,6 +374,7 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
|
||||
#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
|
||||
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set
|
||||
```
|
||||
|
||||
## EEPROM storage
|
||||
|
@@ -37,9 +37,9 @@ QMK uses [Hue, Saturation, and Value](https://en.wikipedia.org/wiki/HSL_and_HSV)
|
||||
|
||||
<img src="gitbook/images/color-wheel.svg" alt="HSV Color Wheel" width="250"/>
|
||||
|
||||
Changing the **Hue** cycles around the circle.
|
||||
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.
|
||||
Changing the **Value** sets the overall brightness.
|
||||
Changing the **Hue** cycles around the circle.<br>
|
||||
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.<br>
|
||||
Changing the **Value** sets the overall brightness.<br>
|
||||
|
||||
## Keycodes
|
||||
|
||||
@@ -77,8 +77,7 @@ Your RGB lighting can be configured by placing these `#define`s in your `config.
|
||||
|`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|
|
||||
|
||||
## Animations
|
||||
|
||||
## Effects and Animations
|
||||
|
||||
Not only can this lighting be whatever color you want,
|
||||
if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a number of animation modes at your disposal:
|
||||
@@ -100,29 +99,54 @@ Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstrat
|
||||
|
||||
Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight.h` there is a contrast table between the old mode number and the current symbol.
|
||||
|
||||
The following options can be used to tweak the various animations:
|
||||
### Effect and Animation Toggles
|
||||
|
||||
Use these defines to add or remove animations from the firmware. When you are running low on flash space, it can be helpful to disable animations you are not using.
|
||||
|
||||
|Define |Default |Description |
|
||||
|------------------------------------|-------------|-------------------------------------------------------------------------------------|
|
||||
|`RGBLIGHT_ANIMATIONS` |*Not defined*|Enable all additional animation modes. |
|
||||
|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|Enable alternating animation mode. |
|
||||
|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|Enable breathing animation mode. |
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS` |*Not defined*|Enable christmas animation mode. |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT` |*Not defined*|Enable knight animation mode. |
|
||||
|`RGBLIGHT_EFFECT_RAINBOW_MOOD` |*Not defined*|Enable rainbow mood animation mode. |
|
||||
|`RGBLIGHT_EFFECT_RAINBOW_SWIRL` |*Not defined*|Enable rainbow swirl animation mode. |
|
||||
|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|Enable RGB test animation mode. |
|
||||
|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|Enable snake animation mode. |
|
||||
|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|Enable static gradient mode. |
|
||||
|
||||
### Effect and Animation Settings
|
||||
|
||||
The following options are used to tweak the various animations:
|
||||
|
||||
|Define |Default |Description |
|
||||
|------------------------------------|-------------|-------------------------------------------------------------------------------------|
|
||||
|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|If defined, enable breathing animation mode. |
|
||||
|`RGBLIGHT_EFFECT_RAINBOW_MOOD` |*Not defined*|If defined, enable rainbow mood animation mode. |
|
||||
|`RGBLIGHT_EFFECT_RAINBOW_SWIRL` |*Not defined*|If defined, enable rainbow swirl animation mode. |
|
||||
|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|If defined, enable snake animation mode. |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT` |*Not defined*|If defined, enable knight animation mode. |
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS` |*Not defined*|If defined, enable christmas animation mode. |
|
||||
|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|If defined, enable static gradient mode. |
|
||||
|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|If defined, enable RGB test animation mode. |
|
||||
|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|If defined, enable alternating animation mode. |
|
||||
|`RGBLIGHT_ANIMATIONS` |*Not defined*|If defined, enables all additional animation modes |
|
||||
|`RGBLIGHT_EFFECT_BREATHE_CENTER` |*Not defined*|If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 |
|
||||
|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 |
|
||||
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`1000` |How long to wait between light changes for the "Christmas" animation, in milliseconds|
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation |
|
||||
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`360` |Range adjustment for the rainbow swirl effect to get different swirls |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
|
||||
|`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 |
|
||||
|
||||
### Example Usage to Reduce Memory Footprint
|
||||
1. Remove `RGBLIGHT_ANIMATIONS` from `config.h`.
|
||||
1. Selectively add the animations you want to enable. The following would enable two animations and save about 4KiB:
|
||||
|
||||
```diff
|
||||
#undef RGBLED_NUM
|
||||
-#define RGBLIGHT_ANIMATIONS
|
||||
+#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
+#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
```
|
||||
|
||||
### Animation Speed
|
||||
|
||||
You can also modify the speeds that the different modes animate at:
|
||||
|
||||
@@ -152,44 +176,100 @@ const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
|
||||
|
||||
If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include:
|
||||
|
||||
|Function |Description |
|
||||
|--------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|`rgblight_enable()` |Turn LEDs on, based on their previous state |
|
||||
|`rgblight_enable_noeeprom()` |Turn LEDs on, based on their previous state (not written to EEPROM) |
|
||||
|`rgblight_disable()` |Turn LEDs off |
|
||||
|`rgblight_disable_noeeprom()` |Turn LEDs off (not written to EEPROM) |
|
||||
|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled |
|
||||
|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) |
|
||||
|`rgblight_setrgb(r, g, b)` |Set all LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_setrgb_at(r, g, b, led)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
|
||||
### Utility Functions
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------------------------------------------------------------|
|
||||
|`sethsv(hue, sat, val, ledbuf)` |Set ledbuf to the given HSV value |
|
||||
|`sethsv_raw(hue, sat, val, ledbuf)` |Set ledbuf to the given HSV value without RGBLIGHT_LIMIT_VAL check |
|
||||
|`setrgb(r, g, b, ledbuf)` |Set ledbuf to the given RGB value where `r`/`g`/`b` |
|
||||
|
||||
### Low level Functions
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------------------------------------|
|
||||
|`rgblight_set()` |Flash out led buffers to LEDs |
|
||||
|`rgblight_set_clipping_range(pos, num)` |Set clipping Range. see [Clipping Range](#clipping-range) |
|
||||
|
||||
Example:
|
||||
```c
|
||||
sethsv(HSV_WHITE, (LED_TYPE *)&led[0]); // led 0
|
||||
sethsv(HSV_RED, (LED_TYPE *)&led[1]); // led 1
|
||||
sethsv(HSV_GREEN, (LED_TYPE *)&led[2]); // led 2
|
||||
rgblight_set(); // Utility functions do not call rgblight_set() automatically, so they need to be called explicitly.
|
||||
```
|
||||
|
||||
### Effects and Animations Functions
|
||||
#### effect range setting
|
||||
|Function |Description |
|
||||
|--------------------------------------------|------------------|
|
||||
|`rgblight_set_effect_range(pos, num)` |Set Effects Range |
|
||||
|
||||
#### direct operation
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgblight_setrgb_at(r, g, b, index)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
|
||||
|`rgblight_sethsv_at(h, s, v, index)` |Set a single LED to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
|
||||
|`rgblight_setrgb_range(r, g, b, start, end)`|Set a continuous range of LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||
|`rgblight_setrgb_master(r, g, b)` |Set the LEDs on the master side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_setrgb_slave(r, g, b)` |Set the LEDs on the slave side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_sethsv(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 |
|
||||
|`rgblight_sethsv_noeeprom(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_sethsv_at(h, s, v, led)` |Set a single LED to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||
|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||
|`rgblight_sethsv_master(h, s, v)` |Set the LEDs on the master side to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_sethsv_slave(h, s, v)` |Set the LEDs on the slave side to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_toggle()` |Toggle all LEDs between on and off |
|
||||
|`rgblight_toggle_noeeprom()` |Toggle all LEDs between on and off (not written to EEPROM) |
|
||||
|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
|
||||
|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||
|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
|
||||
|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||
|`rgblight_increase_hue()` |Increase the hue for all LEDs. This wraps around at maximum hue |
|
||||
|`rgblight_increase_hue_noeeprom()` |Increase the hue for all LEDs. This wraps around at maximum hue (not written to EEPROM) |
|
||||
|`rgblight_decrease_hue()` |Decrease the hue for all LEDs. This wraps around at minimum hue |
|
||||
|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for all LEDs. This wraps around at minimum hue (not written to EEPROM) |
|
||||
|`rgblight_increase_sat()` |Increase the saturation for all LEDs. This wraps around at maximum saturation |
|
||||
|`rgblight_increase_sat_noeeprom()` |Increase the saturation for all LEDs. This wraps around at maximum saturation (not written to EEPROM) |
|
||||
|`rgblight_decrease_sat()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation |
|
||||
|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation (not written to EEPROM) |
|
||||
|`rgblight_increase_val()` |Increase the value for all LEDs. This wraps around at maximum value |
|
||||
|`rgblight_increase_val_noeeprom()` |Increase the value for all LEDs. This wraps around at maximum value (not written to EEPROM) |
|
||||
|`rgblight_decrease_val()` |Decrease the value for all LEDs. This wraps around at minimum value |
|
||||
|`rgblight_decrease_val_noeeprom()` |Decrease the value for all LEDs. This wraps around at minimum value (not written to EEPROM) |
|
||||
|`rgblight_set_clipping_range(pos, num)` |Set clipping Range |
|
||||
|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||
|`rgblight_setrgb(r, g, b)` |Set effect range LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_setrgb_master(r, g, b)` |Set the LEDs on the master side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_setrgb_slave(r, g, b)` |Set the LEDs on the slave side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_sethsv_master(h, s, v)` |Set the LEDs on the master side to the given HSV value, where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_sethsv_slave(h, s, v)` |Set the LEDs on the slave side to the given HSV value, where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||
|
||||
Example:
|
||||
```c
|
||||
rgblight_sethsv(HSV_WHITE, 0); // led 0
|
||||
rgblight_sethsv(HSV_RED, 1); // led 1
|
||||
rgblight_sethsv(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.
|
||||
```
|
||||
|
||||
#### effect mode change
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled |
|
||||
|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) |
|
||||
|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
|
||||
|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||
|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
|
||||
|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||
|
||||
#### effects mode disable/enable
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgblight_toggle()` |Toggle effect range LEDs between on and off |
|
||||
|`rgblight_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) |
|
||||
|`rgblight_enable()` |Turn effect range LEDs on, based on their previous state |
|
||||
|`rgblight_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) |
|
||||
|`rgblight_disable()` |Turn effect range LEDs off |
|
||||
|`rgblight_disable_noeeprom()` |Turn effect range LEDs off (not written to EEPROM) |
|
||||
|
||||
#### hue, sat, val change
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgblight_increase_hue()` |Increase the hue for effect range LEDs. This wraps around at maximum hue |
|
||||
|`rgblight_increase_hue_noeeprom()` |Increase the hue for effect range LEDs. This wraps around at maximum hue (not written to EEPROM) |
|
||||
|`rgblight_decrease_hue()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue |
|
||||
|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue (not written to EEPROM) |
|
||||
|`rgblight_increase_sat()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation |
|
||||
|`rgblight_increase_sat_noeeprom()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation (not written to EEPROM) |
|
||||
|`rgblight_decrease_sat()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation |
|
||||
|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation (not written to EEPROM) |
|
||||
|`rgblight_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value |
|
||||
|`rgblight_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) |
|
||||
|`rgblight_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value |
|
||||
|`rgblight_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) |
|
||||
|`rgblight_sethsv(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 |
|
||||
|`rgblight_sethsv_noeeprom(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||
|
||||
#### query
|
||||
|Function |Description |
|
||||
|-----------------------|-----------------|
|
||||
|`rgblight_get_mode()` |Get current mode |
|
||||
|`rgblight_get_hue()` |Get current hue |
|
||||
|`rgblight_get_sat()` |Get current sat |
|
||||
|`rgblight_get_val()` |Get current val |
|
||||
|
||||
## Colors
|
||||
|
||||
@@ -300,4 +380,6 @@ In addition to setting the Clipping Range, you can use `RGBLIGHT_LED_MAP` togeth
|
||||
```
|
||||
<img src="https://user-images.githubusercontent.com/2170248/55743747-119e4c00-5a6e-11e9-91e5-013203ffae8a.JPG" alt="clip mapped" width="70%"/>
|
||||
|
||||
## Hardware Modification
|
||||
|
||||
If your keyboard lacks onboard underglow LEDs, you may often be able to solder on an RGB LED strip yourself. You will need to find an unused pin to wire to the data pin of your LED strip. Some keyboards may break out unused pins from the MCU to make soldering easier. The other two pins, VCC and GND, must also be connected to the appropriate power pins.
|
||||
|
@@ -20,7 +20,7 @@ Firstly, in your keymap, do one of the following:
|
||||
|`KC_RCPC` |Right Control when held, `)` when tapped |
|
||||
|`KC_LAPO` |Left Alt when held, `(` when tapped |
|
||||
|`KC_RAPC` |Right Alt when held, `)` when tapped |
|
||||
|`KC_SFTENT`|Right Shift when held, `Enter` when tapped |
|
||||
|`KC_SFTENT`|Right Shift when held, Enter when tapped |
|
||||
|
||||
## Caveats
|
||||
|
||||
@@ -38,11 +38,12 @@ By default Space Cadet assumes a US ANSI layout, but if your layout uses differe
|
||||
|----------------|-------------------------------|---------------------------------------------------------------------------------|
|
||||
|`LSPO_KEYS` |`KC_LSFT, LSPO_MOD, LSPO_KEY` |Send `KC_LSFT` when held, the mod and key defined by `LSPO_MOD` and `LSPO_KEY`. |
|
||||
|`RSPC_KEYS` |`KC_RSFT, RSPC_MOD, RSPC_KEY` |Send `KC_RSFT` when held, the mod and key defined by `RSPC_MOD` and `RSPC_KEY`. |
|
||||
|`LCPO_KEYS` |`KC_LCTL, KC_LCTL, KC_9` |Send `KC_LCTL` when held, the mod `KC_LCTL` with the key `KC_9` when tapped. |
|
||||
|`RCPC_KEYS` |`KC_RCTL, KC_RCTL, KC_0` |Send `KC_RCTL` when held, the mod `KC_RCTL` with the key `KC_0` when tapped. |
|
||||
|`LAPO_KEYS` |`KC_LALT, KC_LALT, KC_9` |Send `KC_LALT` when held, the mod `KC_LALT` with the key `KC_9` when tapped. |
|
||||
|`RAPC_KEYS` |`KC_RALT, KC_RALT, KC_0` |Send `KC_RALT` when held, the mod `KC_RALT` with the key `KC_0` when tapped. |
|
||||
|`LCPO_KEYS` |`KC_LCTL, KC_LSFT, KC_9` |Send `KC_LCTL` when held, the mod `KC_LSFT` with the key `KC_9` when tapped. |
|
||||
|`RCPC_KEYS` |`KC_RCTL, KC_RSFT, KC_0` |Send `KC_RCTL` when held, the mod `KC_RSFT` with the key `KC_0` when tapped. |
|
||||
|`LAPO_KEYS` |`KC_LALT, KC_LSFT, KC_9` |Send `KC_LALT` when held, the mod `KC_LSFT` with the key `KC_9` when tapped. |
|
||||
|`RAPC_KEYS` |`KC_RALT, KC_RSFT, KC_0` |Send `KC_RALT` when held, the mod `KC_RSFT` with the key `KC_0` when tapped. |
|
||||
|`SFTENT_KEYS` |`KC_RSFT, KC_TRNS, SFTENT_KEY` |Send `KC_RSFT` when held, no mod with the key `SFTENT_KEY` when tapped. |
|
||||
|`SPACE_CADET_MODIFIER_CARRYOVER` |*Not defined* |Store current modifiers before the hold mod is pressed and use them with the tap mod and keycode. Useful for when you frequently release a modifier before triggering Space Cadet. |
|
||||
|
||||
|
||||
## Obsolete Configuration
|
||||
|
211
docs/feature_split_keyboard.md
Normal file
211
docs/feature_split_keyboard.md
Normal file
@@ -0,0 +1,211 @@
|
||||
# Split Keyboard
|
||||
|
||||
Many keyboards in the QMK Firmware repo are "split" keyboards. They use two controllers—one plugging into USB, and the second connected by a serial or an I<sup>2</sup>C connection over a TRRS or similar cable.
|
||||
|
||||
Split keyboards can have a lot of benefits, but there is some additional work needed to get them enabled.
|
||||
|
||||
QMK Firmware has a generic implementation that is usable by any board, as well as numerous board specific implementations.
|
||||
|
||||
For this, we will mostly be talking about the generic implementation used by the Let's Split and other keyboards.
|
||||
|
||||
!> ARM is not yet supported for Split Keyboards. Progress is being made, but we are not quite there, yet.
|
||||
|
||||
|
||||
## Hardware Configuration
|
||||
|
||||
This assumes that you're using two Pro Micro-compatible controllers, and are using TRRS jacks to connect to two halves.
|
||||
|
||||
### Required Hardware
|
||||
|
||||
Apart from diodes and key switches for the keyboard matrix in each half, you will need 2x TRRS sockets and 1x TRRS cable.
|
||||
|
||||
Alternatively, you can use any sort of cable and socket that has at least 3 wires.
|
||||
|
||||
If you want to use I<sup>2</sup>C to communicate between halves, you will need a cable with at least 4 wires and 2x 4.7kΩ pull-up resistors.
|
||||
|
||||
#### Considerations
|
||||
|
||||
The most commonly used connection is a TRRS cable and jacks. These provide 4 wires, making them very useful for split keyboards, and are easy to find.
|
||||
|
||||
However, since one of the wires carries VCC, this means that the boards are not hot pluggable. You should always disconnect the board from USB before unplugging and plugging in TRRS cables, or you can short the controller, or worse.
|
||||
|
||||
Another option is to use phone cables (as in, old school RJ-11/RJ-14 cables). Make sure that you use one that actually supports 4 wires/lanes.
|
||||
|
||||
However, USB cables, SATA cables, and even just 4 wires have been known to be used for communication between the controllers.
|
||||
|
||||
!> Using USB cables for communication between the controllers works just fine, but the connector could be mistaken for a normal USB connection and potentially short out the keyboard, depending on how it's wired. For this reason, they are not recommended for connecting split keyboards.
|
||||
|
||||
### Serial Wiring
|
||||
|
||||
The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and D0 (aka PDO or pin 3) between the two Pro Micros.
|
||||
|
||||
?> Note that the pin used here is actually set by `SOFT_SERIAL_PIN` below.
|
||||
|
||||

|
||||
|
||||
### I<sup>2</sup>C Wiring
|
||||
|
||||
The 4 wires of the TRRS cable need to connect GND, VCC, and SCL and SDA (aka PD0/pin 3 and PD1/pin 2, respectively) between the two Pro Micros.
|
||||
|
||||
The pull-up resistors may be placed on either half. If you wish to use the halves independently, it is also possible to use 4 resistors and have the pull-ups in both halves.
|
||||
|
||||

|
||||
|
||||
## Firmware Configuration
|
||||
|
||||
To enable the split keyboard feature, add the following to your `rules.mk`:
|
||||
|
||||
```make
|
||||
SPLIT_KEYBOARD = yes
|
||||
```
|
||||
|
||||
If you're using a custom transport (communication method), then you will also need to add:
|
||||
|
||||
```make
|
||||
SPLIT_TRANSPORT = custom
|
||||
```
|
||||
|
||||
### Setting Handedness
|
||||
|
||||
By default, the firmware does not know which side is which; it needs some help to determine that. There are several ways to do this, listed in order of precedence.
|
||||
|
||||
#### Handedness by Pin
|
||||
|
||||
You can configure the firmware to read a pin on the controller to determine handedness. To do this, add the following to your `config.h` file:
|
||||
|
||||
```c
|
||||
#define SPLIT_HAND_PIN B7
|
||||
```
|
||||
|
||||
This will read the specified pin. If it's high, then the controller assumes it is the left hand, and if it's low, it's assumed to be the right side.
|
||||
|
||||
#### 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.
|
||||
|
||||
|
||||
To enable this method, add the following to your `config.h` file:
|
||||
|
||||
```c
|
||||
#define EE_HANDS
|
||||
```
|
||||
|
||||
However, you'll have to flash the EEPROM files for the correct hand to each controller. You can do this manually, or there are targets for avrdude and dfu to do this, while flashing the firmware:
|
||||
|
||||
* `:avrdude-split-left`
|
||||
* `:avrdude-split-right`
|
||||
* `:dfu-split-left`
|
||||
* `:dfu-split-right`
|
||||
* `:dfu-util-split-left`
|
||||
* `:dfu-util-split-right`
|
||||
|
||||
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).
|
||||
|
||||
#### Handedness by `#define`
|
||||
|
||||
You can set the handedness at compile time. This is done by adding the following to your `config.h` file:
|
||||
|
||||
```c
|
||||
#define MASTER_RIGHT
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```c
|
||||
#define MASTER_LEFT
|
||||
```
|
||||
|
||||
If neither are defined, the handedness defaults to `MASTER_LEFT`.
|
||||
|
||||
|
||||
### Communication Options
|
||||
|
||||
Because not every split keyboard is identical, there are a number of additional options that can be configured in your `config.h` file.
|
||||
|
||||
```c
|
||||
#define USE_I2C
|
||||
```
|
||||
|
||||
This enables I<sup>2</sup>C support for split keyboards. This isn't strictly for communication, but can be used for OLED or other I<sup>2</sup>C-based devices.
|
||||
|
||||
```c
|
||||
#define SOFT_SERIAL_PIN D0
|
||||
```
|
||||
|
||||
This sets the pin to be used for serial communication. If you're not using serial, you shouldn't need to define this.
|
||||
|
||||
However, if you are using serial and I<sup>2</sup>C on the board, you will need to set this, and to something other than D0 and D1 (as these are used for I<sup>2</sup>C communication).
|
||||
|
||||
```c
|
||||
#define SELECT_SOFT_SERIAL_SPEED {#}`
|
||||
```
|
||||
|
||||
If you're having issues with serial communication, you can change this value, as it controls the communication speed for serial. The default is 1, and the possible values are:
|
||||
|
||||
* **`0`**: about 189kbps (Experimental only)
|
||||
* **`1`**: about 137kbps (default)
|
||||
* **`2`**: about 75kbps
|
||||
* **`3`**: about 39kbps
|
||||
* **`4`**: about 26kbps
|
||||
* **`5`**: about 20kbps
|
||||
|
||||
### Hardware Configuration Options
|
||||
|
||||
There are some settings that you may need to configure, based on how the hardware is set up.
|
||||
|
||||
```c
|
||||
#define MATRIX_ROW_PINS_RIGHT { <row pins> }
|
||||
#define MATRIX_COL_PINS_RIGHT { <col pins> }
|
||||
```
|
||||
|
||||
This allows you to specify a different set of pins for the matrix on the right side. This is useful if you have a board with differently-shaped halves that requires a different configuration (such as Keebio's Quefrency).
|
||||
|
||||
```c
|
||||
#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }
|
||||
```
|
||||
|
||||
This allows you to specify a different set of direct pins for the right side.
|
||||
|
||||
```c
|
||||
#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
|
||||
#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
|
||||
```
|
||||
|
||||
This allows you to specify a different set of encoder pins for the right side.
|
||||
|
||||
```c
|
||||
#define RGBLIGHT_SPLIT
|
||||
```
|
||||
|
||||
This option enables synchronization of the RGB Light modes between the controllers of the split keyboard. This is for keyboards that have RGB LEDs that are directly wired to the controller (that is, they are not using the "extra data" option on the TRRS cable).
|
||||
|
||||
```c
|
||||
#define RGBLED_SPLIT { 6, 6 }
|
||||
```
|
||||
|
||||
This sets how many LEDs are directly connected to each controller. The first number is the left side, and the second number is the right side.
|
||||
|
||||
?> This setting implies that `RGBLIGHT_SPLIT` is enabled, and will forcibly enable it, if it's not.
|
||||
|
||||
|
||||
```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).
|
||||
|
||||
?> This setting will stop the ability to demo using battery packs.
|
||||
|
||||
```c
|
||||
#define SPLIT_USB_TIMEOUT 2500
|
||||
```
|
||||
This sets the maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`.
|
||||
|
||||
## Additional Resources
|
||||
|
||||
Nicinabox has a [very nice and detailed guide](https://github.com/nicinabox/lets-split-guide) for the Let's Split keyboard, that covers most everything you need to know, including troubleshooting information.
|
||||
|
||||
However, the RGB Light section is out of date, as it was written long before the RGB Split code was added to QMK Firmware. Instead, wire each strip up directly to the controller.
|
||||
|
||||
<!-- I may port this information later, but for now ... it's very nice, and covers everything -->
|
@@ -1,40 +1,58 @@
|
||||
# Tap Dance: A Single Key Can Do 3, 5, or 100 Different Things
|
||||
|
||||
<!-- FIXME: Break this up into multiple sections -->
|
||||
|
||||
## Introduction
|
||||
Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. It's one of the nicest community-contributed features in the firmware, conceived and created by [algernon](https://github.com/algernon) in [#451](https://github.com/qmk/qmk_firmware/pull/451). Here's how algernon describes the feature:
|
||||
|
||||
With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter.
|
||||
|
||||
To make it clear how this is different from `ACTION_FUNCTION_TAP`, let's explore a certain setup! We want one key to send `Space` on single tap, but `Enter` on double-tap.
|
||||
## Explanatory Comparison with `ACTION_FUNCTION_TAP`
|
||||
`ACTION_FUNCTION_TAP` can offer similar functionality to Tap Dance, but it's worth noting some important differences. To do this, let's explore a certain setup! We want one key to send `Space` on single-tap, but `Enter` on double-tap.
|
||||
|
||||
With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be sent first. Thus, `SPC a` will result in `a SPC` being sent, if they are typed within `TAPPING_TERM`. With the tap dance feature, that'll come out as `SPC a`, correctly.
|
||||
With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be sent first. Thus, `SPC a` will result in `a SPC` being sent, if `SPC` and `a` are both typed within `TAPPING_TERM`. With the Tap Dance feature, that'll come out correctly as `SPC a` (even if both `SPC` and `a` are typed within the `TAPPING_TERM`.
|
||||
|
||||
The implementation hooks into two parts of the system, to achieve this: into `process_record_quantum()`, and the matrix scan. We need the latter to be able to time out a tap sequence even when a key is not being pressed, so `SPC` alone will time out and register after `TAPPING_TERM` time.
|
||||
To achieve this correct handling of interrupts, the implementation of Tap Dance hooks into two parts of the system: `process_record_quantum()`, and the matrix scan. These two parts are explained below, but for now the point to note is that we need the latter to be able to time out a tap sequence even when a key is not being pressed. That way, `SPC` alone will time out and register after `TAPPING_TERM` time.
|
||||
|
||||
But lets start with how to use it, first!
|
||||
## How to Use Tap Dance
|
||||
But enough of the generalities; lets look at how to actually use Tap Dance!
|
||||
|
||||
First, you will need `TAP_DANCE_ENABLE=yes` in your `rules.mk`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()`, takes a number, which will later be used as an index into the `tap_dance_actions` array.
|
||||
First, you will need `TAP_DANCE_ENABLE=yes` in your `rules.mk`, because the feature is disabled by default. This adds a little less than 1k to the firmware size.
|
||||
|
||||
This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are five possible options:
|
||||
Optionally, you might want to set a custom `TAPPING_TERM` time by adding something like this in you `config.h`:
|
||||
|
||||
```
|
||||
#define TAPPING_TERM 175
|
||||
```
|
||||
|
||||
The `TAPPING_TERM` time is the maximum time allowed between taps of your Tap Dance key, and is measured in milliseconds. For example, if you used the above `#define` statement and set up a Tap Dance key that sends `Space` on single-tap and `Enter` on double-tap, then this key will send `ENT` only if you tap this key twice in less than 175ms. If you tap the key, wait more than 175ms, and tap the key again you'll end up sending `SPC SPC` instead.
|
||||
|
||||
Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()` - takes a number, which will later be used as an index into the `tap_dance_actions` array.
|
||||
|
||||
After this, you'll want to use the `tap_dance_actions` array to specify what actions shall be taken when a tap-dance key is in action. Currently, there are five possible options:
|
||||
|
||||
* `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held.
|
||||
* `ACTION_TAP_DANCE_DUAL_ROLE(kc, layer)`: Sends the `kc` keycode when tapped once, or moves to `layer`. (this functions like the `TO` layer keycode).
|
||||
* `ACTION_TAP_DANCE_LAYER_MOVE(kc, layer)`: Sends the `kc` keycode when tapped once, or moves to `layer`. (this functions like the `TO` layer keycode).
|
||||
* This is the same as `ACTION_TAP_DANCE_DUAL_ROLE`, but renamed to something that is clearer about its functionality. Both names will work.
|
||||
* `ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer)`: Sends the `kc` keycode when tapped once, or toggles the state of `layer`. (this functions like the `TG` layer keycode).
|
||||
* `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action.
|
||||
* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function when the dance action finishes (like the previous option), and the last function when the tap dance action resets.
|
||||
* `ACTION_TAP_DANCE_FN_ADVANCED_TIME(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn, tap_specific_tapping_term)`: This functions identically to the `ACTION_TAP_DANCE_FN_ADVANCED` function, but uses a custom tapping term for it, instead of the predefined `TAPPING_TERM`.
|
||||
|
||||
The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise.
|
||||
The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise.
|
||||
|
||||
!> Keep in mind that only [basic keycodes](keycodes_basic.md) are supported here. Custom keycodes are not supported.
|
||||
|
||||
And that's the bulk of it!
|
||||
Similar to the first option, the second option is good for simple layer-switching cases.
|
||||
|
||||
And now, on to the explanation of how it works!
|
||||
For more complicated cases, use the third or fourth options (examples of each are listed below).
|
||||
|
||||
The main entry point is `process_tap_dance()`, called from `process_record_quantum()`, which is run for every keypress, and our handler gets to run early. This function checks whether the key pressed is a tap-dance key. If it is not, and a tap-dance was in action, we handle that first, and enqueue the newly pressed key. If it is a tap-dance key, then we check if it is the same as the already active one (if there's one active, that is). If it is not, we fire off the old one first, then register the new one. If it was the same, we increment the counter and the timer.
|
||||
Finally, the fifth option is particularly useful if your non-Tap-Dance keys start behaving weirdly after adding the code for your Tap Dance keys. The likely problem is that you changed the `TAPPING_TERM` time to make your Tap Dance keys easier for you to use, and that this has changed the way your other keys handle interrupts.
|
||||
|
||||
This means that you have `TAPPING_TERM` time to tap the key again, you do not have to input all the taps within that timeframe. This allows for longer tap counts, with minimal impact on responsiveness.
|
||||
## Implementation Details
|
||||
Well, that's the bulk of it! You should now be able to work through the examples below, and to develop your own Tap Dance functionality. But if you want a deeper understanding of what's going on behind the scenes, then read on for the explanation of how it all works!
|
||||
|
||||
The main entry point is `process_tap_dance()`, called from `process_record_quantum()`, which is run for every keypress, and our handler gets to run early. This function checks whether the key pressed is a tap-dance key. If it is not, and a tap-dance was in action, we handle that first, and enqueue the newly pressed key. If it is a tap-dance key, then we check if it is the same as the already active one (if there's one active, that is). If it is not, we fire off the old one first, then register the new one. If it was the same, we increment the counter and reset the timer.
|
||||
|
||||
This means that you have `TAPPING_TERM` time to tap the key again; you do not have to input all the taps within a single `TAPPING_TERM` timeframe. This allows for longer tap counts, with minimal impact on responsiveness.
|
||||
|
||||
Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-dance keys.
|
||||
|
||||
@@ -397,3 +415,106 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
```
|
||||
|
||||
Wrap each tapdance keycode in `TD()` when including it in your keymap, e.g. `TD(ALT_LP)`.
|
||||
|
||||
### Example 6: Using tap dance for momentary-layer-switch and layer-toggle keys
|
||||
|
||||
Tap Dance can be used to mimic MO(layer) and TG(layer) functionality. For this example, we will set up a key to function as `KC_QUOT` on single-tap, as `MO(_MY_LAYER)` on single-hold, and `TG(_MY_LAYER)` on double-tap.
|
||||
|
||||
The first step is to include the following code towards the beginning of your `keymap.c`:
|
||||
|
||||
```c
|
||||
typedef struct {
|
||||
bool is_press_action;
|
||||
int state;
|
||||
} tap;
|
||||
|
||||
//Define a type for as many tap dance states as you need
|
||||
enum {
|
||||
SINGLE_TAP = 1,
|
||||
SINGLE_HOLD = 2,
|
||||
DOUBLE_TAP = 3
|
||||
};
|
||||
|
||||
enum {
|
||||
QUOT_LAYR = 0 //Our custom tap dance key; add any other tap dance keys to this enum
|
||||
};
|
||||
|
||||
//Declare the functions to be used with your tap dance key(s)
|
||||
|
||||
//Function associated with all tap dances
|
||||
int 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);
|
||||
void ql_reset (qk_tap_dance_state_t *state, void *user_data);
|
||||
```
|
||||
|
||||
Towards the bottom of your `keymap.c`, include the following code:
|
||||
|
||||
```c
|
||||
//Determine the current tap dance state
|
||||
int 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;
|
||||
}
|
||||
|
||||
//Initialize tap structure associated with example tap dance key
|
||||
static tap ql_tap_state = {
|
||||
.is_press_action = true,
|
||||
.state = 0
|
||||
};
|
||||
|
||||
//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:
|
||||
tap_code(KC_QUOT);
|
||||
break;
|
||||
case SINGLE_HOLD:
|
||||
layer_on(_MY_LAYER);
|
||||
break;
|
||||
case DOUBLE_TAP:
|
||||
//check to see if the layer is already set
|
||||
if (layer_state_is(_MY_LAYER)) {
|
||||
//if already set, then switch it off
|
||||
layer_off(_MY_LAYER);
|
||||
} else {
|
||||
//if not already set, then switch the layer on
|
||||
layer_on(_MY_LAYER);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
layer_off(_MY_LAYER);
|
||||
}
|
||||
ql_tap_state.state = 0;
|
||||
}
|
||||
|
||||
//Associate our tap dance key with its functionality
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[QUOT_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275)
|
||||
};
|
||||
```
|
||||
|
||||
The above code is similar to that used in previous examples. The one point to note is that we need to be able to check which layers are active at any time so we can toggle them if needed. To do this we use the `layer_state_is( layer )` function which returns `true` if the given `layer` is active.
|
||||
|
||||
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 `case:SINGLE_HOLD` 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 `case:DOUBLE_TAP` 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.
|
||||
|
||||
Finally, to get this tap dance key working, be sure to include `TD(QUOT_LAYR)` in your `keymaps[]`.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Terminal
|
||||
|
||||
> This feature is currently *huge* at 4400 bytes, and should probably only be put on boards with a lot of memory, or for fun.
|
||||
> This feature is currently *huge*, and should probably only be put on boards with a lot of memory, or for fun.
|
||||
|
||||
The terminal feature is a command-line-like interface designed to communicate through a text editor with keystrokes. It's beneficial to turn off auto-indent features in your editor.
|
||||
|
||||
@@ -56,7 +56,7 @@ Outputs the last 5 commands entered
|
||||
1. help
|
||||
2. about
|
||||
3. keymap 0
|
||||
4. help
|
||||
4. help
|
||||
5. flush-buffer
|
||||
```
|
||||
|
||||
|
@@ -1,28 +1,44 @@
|
||||
# Unicode Support
|
||||
|
||||
There are three Unicode keymap definition methods available in QMK:
|
||||
Unicode characters can be input straight from your keyboard! There are some limitations, however.
|
||||
|
||||
## `UNICODE_ENABLE`
|
||||
QMK has three different methods for enabling Unicode input and defining keycodes:
|
||||
|
||||
Supports Unicode up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. The keycode function is `UC(c)` in the keymap, where _c_ is the code point's number (preferably hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`.
|
||||
## Basic Unicode
|
||||
|
||||
## `UNICODEMAP_ENABLE`
|
||||
This method supports Unicode code points up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji.
|
||||
|
||||
Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(i)`, where _i_ is an array index into the mapping table. The table may contain at most 16384 entries.
|
||||
Add the following to your `rules.mk`:
|
||||
|
||||
You may want to have an enum to make referencing easier. So, you could add something like this to your keymap file:
|
||||
```make
|
||||
UNICODE_ENABLE = yes
|
||||
```
|
||||
|
||||
Then add `UC(c)` keycodes to your keymap, where _c_ is the code point (preferably in hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`.
|
||||
|
||||
## Unicode Map
|
||||
|
||||
This method supports all possible code points (up to `0x10FFFF`); however, you need to maintain a separate mapping table in your keymap file, which may contain at most 16384 entries.
|
||||
|
||||
Add the following to your `rules.mk`:
|
||||
|
||||
```make
|
||||
UNICODEMAP_ENABLE = yes
|
||||
```
|
||||
|
||||
Then add `X(i)` keycodes to your keymap, where _i_ is an array index into the mapping table:
|
||||
|
||||
```c
|
||||
enum unicode_names {
|
||||
BANG,
|
||||
IRONY,
|
||||
SNEK,
|
||||
BANG,
|
||||
IRONY,
|
||||
SNEK
|
||||
};
|
||||
|
||||
const uint32_t PROGMEM unicode_map[] = {
|
||||
[BANG] = 0x203D, // ‽
|
||||
[IRONY] = 0x2E2E, // ⸮
|
||||
[SNEK] = 0x1F40D, // 🐍
|
||||
[BANG] = 0x203D, // ‽
|
||||
[IRONY] = 0x2E2E, // ⸮
|
||||
[SNEK] = 0x1F40D, // 🐍
|
||||
};
|
||||
```
|
||||
|
||||
@@ -30,27 +46,33 @@ Then you can use `X(BANG)`, `X(SNEK)` etc. in your keymap.
|
||||
|
||||
### Lower and Upper Case
|
||||
|
||||
Characters often come in lower and upper case pairs, for example: å, Å. To make inputting these characters easier, you can use `XP(i, j)` in your keymap, where _i_ and _j_ are the mapping table indices of the lower and upper case character, respectively. If you're holding down Shift or have Caps Lock turned on when you press the key, the second (upper case) character will be inserted; otherwise, the first (lower case) version will appear.
|
||||
Characters often come in lower and upper case pairs, such as å and Å. To make inputting these characters easier, you can use `XP(i, j)` in your keymap, where _i_ and _j_ are the mapping table indices of the lower and upper case character, respectively. If you're holding down Shift or have Caps Lock turned on when you press the key, the second (upper case) character will be inserted; otherwise, the first (lower case) version will appear.
|
||||
|
||||
This is most useful when creating a keymap for an international layout with special characters. Instead of having to put the lower and upper case versions of a character on separate keys, you can have them both on the same key by using `XP`. This blends Unicode keys in with regular alphas.
|
||||
This is most useful when creating a keymap for an international layout with special characters. Instead of having to put the lower and upper case versions of a character on separate keys, you can have them both on the same key by using `XP()`. This helps blend Unicode keys in with regular alphas.
|
||||
|
||||
Due to keycode size constraints, _i_ and _j_ can each only refer to one of the first 128 characters in your `unicode_map`. In other words, 0 ≤ _i_ ≤ 127 and 0 ≤ _j_ ≤ 127. This is enough for most use cases, but if you'd like to customize the index calculation, you can override the [`unicodemap_index()`](https://github.com/qmk/qmk_firmware/blob/71f640d47ee12c862c798e1f56392853c7b1c1a8/quantum/process_keycode/process_unicodemap.c#L40) function. This also allows you to, say, check Ctrl instead of Shift/Caps.
|
||||
|
||||
## `UCIS_ENABLE`
|
||||
## UCIS
|
||||
|
||||
Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you have to add a keycode or function that calls `qk_ucis_start()`. Once this function has been called, you can type the corresponding mnemonic for your character, then hit Space or Enter to complete it, or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode character inserted.
|
||||
This method also supports all possible code points. As with the Unicode Map method, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you have to create a custom keycode or function that invokes this functionality.
|
||||
|
||||
For instance, you could define a table like this in your keymap file:
|
||||
Add the following to your `rules.mk`:
|
||||
|
||||
```make
|
||||
UCIS_ENABLE = yes
|
||||
```
|
||||
|
||||
Then define a table like this in your keymap file:
|
||||
|
||||
```c
|
||||
const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE(
|
||||
UCIS_SYM("poop", 0x1F4A9), // 💩
|
||||
UCIS_SYM("rofl", 0x1F923), // 🤣
|
||||
UCIS_SYM("kiss", 0x1F619) // 😙
|
||||
UCIS_SYM("poop", 0x1F4A9), // 💩
|
||||
UCIS_SYM("rofl", 0x1F923), // 🤣
|
||||
UCIS_SYM("kiss", 0x1F619) // 😙
|
||||
);
|
||||
```
|
||||
|
||||
To use it, call `qk_ucis_start()`, then type "rofl" and hit Enter. QMK should erase the "rofl" text and insert the laughing emoji.
|
||||
To use it, call `qk_ucis_start()`. Then, type the mnemonic for the character (such as "rofl"), and hit Space or Enter. QMK should erase the "rofl" text and insert the laughing emoji.
|
||||
|
||||
### Customization
|
||||
|
||||
@@ -68,7 +90,7 @@ Unicode input in QMK works by inputting a sequence of characters to the OS, sort
|
||||
|
||||
The following input modes are available:
|
||||
|
||||
* **`UC_OSX`**: macOS built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with `UNICODEMAP`).
|
||||
* **`UC_OSX`**: macOS built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with Unicode Map).
|
||||
|
||||
To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar.
|
||||
By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_OSX`](#input-key-configuration) with another keycode.
|
||||
@@ -112,7 +134,7 @@ You can also switch the input mode by calling `set_unicode_input_mode(x)` in you
|
||||
|
||||
```c
|
||||
void eeconfig_init_user(void) {
|
||||
set_unicode_input_mode(UC_LNX);
|
||||
set_unicode_input_mode(UC_LNX);
|
||||
}
|
||||
```
|
||||
|
||||
|
@@ -110,16 +110,16 @@ QMK has a bunch of [functions](custom_quantum_functions.md) that have [`_quantum
|
||||
However, you can actually add support for keymap version, so that you can use it in both your userspace and your keymap!
|
||||
|
||||
|
||||
For instance, lets looks at the `layer_state_set_user` function. Lets enable the [Tri Layer State](ref_functions.md#olkb-tri-layers) functionalitly to all of our boards, and then still have your `keymap.c` still able to use this functionality.
|
||||
For instance, let's look at the `layer_state_set_user()` function. You can enable the [Tri Layer State](ref_functions.md#olkb-tri-layers) functionality on all of your boards, while also retaining the Tri Layer functionality in your `keymap.c` files.
|
||||
|
||||
In your `<name.c>` file, you'd want to add this:
|
||||
```c
|
||||
__attribute__ ((weak))
|
||||
uint32_t layer_state_set_keymap (uint32_t state) {
|
||||
layer_state_t layer_state_set_keymap (layer_state_t state) {
|
||||
return state;
|
||||
}
|
||||
|
||||
uint32_t layer_state_set_user (uint32_t state) {
|
||||
layer_state_t layer_state_set_user (layer_state_t state) {
|
||||
state = update_tri_layer_state(state, 2, 3, 5);
|
||||
return layer_state_set_keymap (state);
|
||||
}
|
||||
@@ -211,15 +211,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if ( (temp_mod | temp_osm) & MOD_MASK_SHIFT )
|
||||
#endif
|
||||
{ //
|
||||
#if defined(__arm__) // only run for ARM boards
|
||||
SEND_STRING(":dfu-util");
|
||||
#elif defined(BOOTLOADER_DFU) // only run for DFU boards
|
||||
SEND_STRING(":dfu");
|
||||
#elif defined(BOOTLOADER_HALFKAY) // only run for teensy boards
|
||||
SEND_STRING(":teensy");
|
||||
#elif defined(BOOTLOADER_CATERINA) // only run for Pro Micros
|
||||
SEND_STRING(":avrdude");
|
||||
#endif // bootloader options
|
||||
SEND_STRING(":flash");
|
||||
}
|
||||
if ( (temp_mod | temp_osm) & MOD_MASK_CTRL) {
|
||||
SEND_STRING(" -j8 --output-sync");
|
||||
@@ -244,7 +236,7 @@ endif
|
||||
|
||||
This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make <keyboard>:<keymap>`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time.
|
||||
|
||||
Also, holding `shift` will add the appropriate flashing command (`:dfu`, `:teensy`, `:avrdude`, `:dfu-util`) for a majority of keyboards. Holding `control` will add some commands that will speed up compiling time by processing multiple files at once.
|
||||
Also, holding Shift will add the flash target (`:flash`) to the command. Holding Control will add some commands that will speed up compiling time by processing multiple files at once.
|
||||
|
||||
And for the boards that lack a shift key, or that you want to always attempt the flashing part, you can add `FLASH_BOOTLOADER = yes` to the `rules.mk` of that keymap.
|
||||
|
||||
|
@@ -7,12 +7,16 @@ QMK has a staggering number of features for building your keyboard. It can take
|
||||
* [Audio](feature_audio.md) - Connect a speaker to your keyboard for audio feedback, midi support, and music mode.
|
||||
* [Auto Shift](feature_auto_shift.md) - Tap for the normal key, hold slightly longer for its shifted state.
|
||||
* [Backlight](feature_backlight.md) - LED lighting support for your keyboard.
|
||||
* [Bluetooth](feature_bluetooth.md) - BlueTooth support for your keyboard.
|
||||
* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys.
|
||||
* [Combos](feature_combo.md) - Custom actions for multiple key holds.
|
||||
* [Command](feature_command.md) - Runtime version of bootmagic (Formerly known as "Magic").
|
||||
* [Debounce API](feature_debounce_type.md) - Customization of debouncing algorithms, and the ability to add more/custom debouncing.
|
||||
* [DIP Switch](feature_dip_switch.md) - Toggle switches for customizing board function.
|
||||
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
|
||||
* [Encoders](feature_encoders.md) - Rotary encoders!
|
||||
* [Grave Escape](feature_grave_esc.md) - Lets you use a single key for Esc and Grave.
|
||||
* [Haptic Feedback](feature_haptic_feedback.md) - Add haptic feedback drivers to your board.
|
||||
* [HD44780 LCD Display](feature_hd44780.md) - Support for LCD character displays using the HD44780 standard.
|
||||
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
|
||||
* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
|
||||
@@ -20,12 +24,14 @@ QMK has a staggering number of features for building your keyboard. It can take
|
||||
* [LED Matrix](feature_led_matrix.md) - LED Matrix single color lights for per key lighting (Single Color, not RGB).
|
||||
* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key.
|
||||
* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard.
|
||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - Sticky Keys, lets hit a key rather than holding it.
|
||||
* [OLED Driver](feature_oled_driver.md) - Add OLED screens to your keyboard.
|
||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - Sticky Keys, lets you hit a key rather than holding it.
|
||||
* [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard.
|
||||
* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a PS/2 mouse directly to your keyboard.
|
||||
* [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard.
|
||||
* [RGB Matrix](feature_rgb_matrix.md) - RGB Matrix lights for per key lighting.
|
||||
* [Space Cadet](feature_space_cadet_shift.md) - Use your left/right shift keys to type parenthesis and brackets.
|
||||
* [Space Cadet](feature_space_cadet.md) - Use your left/right shift keys to type parenthesis and brackets.
|
||||
* [Split Keyboard](feature_split_keyboard.md)
|
||||
* [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use.
|
||||
* [Swap Hands](feature_swap_hands.md) - Mirror your keyboard for one handed usage.
|
||||
* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want.
|
||||
@@ -33,3 +39,4 @@ QMK has a staggering number of features for building your keyboard. It can take
|
||||
* [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type.
|
||||
* [Unicode](feature_unicode.md) - Unicode input support.
|
||||
* [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards.
|
||||
* [Velocikey](feature_velocikey.md) - Allows changes in RGB animation speed based on WPM/Typing speed.
|
||||
|
132
docs/flashing.md
132
docs/flashing.md
@@ -10,11 +10,17 @@ Atmel's DFU bootloader comes on all atmega32u4 chips by default, and is used by
|
||||
|
||||
To ensure compatibility with the DFU bootloader, make sure this block is present your `rules.mk` (optionally with `lufa-dfu` or `qmk-dfu` instead):
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
BOOTLOADER = atmel-dfu
|
||||
```make
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
```
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
@@ -64,11 +70,17 @@ Arduino boards and their clones use the [Caterina bootloader](https://github.com
|
||||
|
||||
To ensure compatibility with the Caterina bootloader, make sure this block is present your `rules.mk`:
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
BOOTLOADER = caterina
|
||||
```make
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = caterina
|
||||
```
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
@@ -87,11 +99,16 @@ or
|
||||
|
||||
make <keyboard>:<keymap>:avrdude
|
||||
|
||||
or if you want to flash multiple boards, use the following command
|
||||
|
||||
make <keyboard>:<keymap>:avrdude-loop
|
||||
#### Caterina commands
|
||||
|
||||
There are a number of DFU commands that you can use to flash firmware to a DFU device:
|
||||
|
||||
* `:avrdude` - This is the normal option which waits until a Caterina device is available (by detecting a new COM port), and then flashes the firmware.
|
||||
* `:avrdude-loop` - This runs the same command as `:avrdude`, but after each device is flashed, it will attempt to flash again. This is useful for bulk flashing. _This requires you to manually escape the loop by hitting Ctrl+C._
|
||||
* `:avrdude-split-left` - This flashes the normal firmware, just like the default option (`:avrdude`). However, this also flashes the "Left Side" EEPROM file for split keyboards. _This is ideal for Pro Micro based split keyboards._
|
||||
* `:avrdude-split-right` - This flashes the normal firmware, just like the default option (`:avrdude`). However, this also flashes the "Right Side" EEPROM file for split keyboards. _This is ideal for Pro Micro based split keyboards._
|
||||
|
||||
When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop.
|
||||
|
||||
|
||||
## Halfkay
|
||||
@@ -100,11 +117,17 @@ Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on al
|
||||
|
||||
To ensure compatibility with the Halfkay bootloader, make sure this block is present your `rules.mk`:
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
BOOTLOADER = halfkay
|
||||
```make
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = halfkay
|
||||
```
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
@@ -119,6 +142,73 @@ Flashing sequence:
|
||||
3. Flash a .hex file
|
||||
4. Reset the device into application mode (may be done automatically)
|
||||
|
||||
## USBasploader
|
||||
|
||||
USBasploader is a bootloader developed by matrixstorm. It is used in some non-USB AVR chips such as the ATmega328P, which run V-USB.
|
||||
|
||||
To ensure compatibility with the USBasploader bootloader, make sure this block is present in your `rules.mk`:
|
||||
|
||||
```make
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = USBasp
|
||||
```
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
|
||||
* [avrdude](http://www.nongnu.org/avrdude/) with the `usbasp` programmer
|
||||
* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS)
|
||||
|
||||
Flashing sequence:
|
||||
|
||||
1. Press the `RESET` keycode, or keep the boot pin shorted to GND while quickly shorting RST to GND
|
||||
2. Wait for the OS to detect the device
|
||||
3. Flash a .hex file
|
||||
4. Reset the device into application mode (may be done automatically)
|
||||
|
||||
## BootloadHID
|
||||
|
||||
BootloadHID is a USB bootloader for AVR microcontrollers. The uploader tool requires no kernel level driver on Windows and can therefore be run without installing any DLLs.
|
||||
|
||||
To ensure compatibility with the bootloadHID bootloader, make sure this block is present your `rules.mk`:
|
||||
|
||||
```make
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = bootloadHID
|
||||
```
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
* [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash) (recommended Windows GUI)
|
||||
* [bootloadhid Command Line](https://www.obdev.at/products/vusb/bootloadhid.html) / `:BootloadHID` in QMK (recommended command line)
|
||||
|
||||
Flashing sequence:
|
||||
|
||||
1. Enter the bootloader using any of the following methods:
|
||||
* Tap the `RESET` keycode (may not work on all devices)
|
||||
* Hold the salt key while plugging the keyboard in (usually documented within keyboard readme)
|
||||
2. Wait for the OS to detect the device
|
||||
3. Flash a .hex file
|
||||
4. Reset the device into application mode (may be done automatically)
|
||||
|
||||
or:
|
||||
|
||||
make <keyboard>:<keymap>:bootloadHID
|
||||
|
||||
## STM32
|
||||
|
||||
All STM32 chips come preloaded with a factory bootloader that cannot be modified nor deleted. Some STM32 chips have bootloaders that do not come with USB programming (e.g. STM32F103) but the process is still the same.
|
||||
@@ -146,7 +236,7 @@ Flashing sequence:
|
||||
|
||||
There are a number of DFU commands that you can use to flash firmware to a STM32 device:
|
||||
|
||||
* `:dfu-util` - The default command for flashing to STM32 devices.
|
||||
* `:dfu-util-wait` - This works like the default command, but it gives you a (configurable) 10 second timeout before it attempts to flash the firmware. You can use `TIME_DELAY=20` from the command line to change the timeout.
|
||||
* Eg: `make <keyboard>:<keymap>:dfu-util TIME_DELAY=5`
|
||||
* `:dfu-util` - The default command for flashing to STM32 devices, and will wait until an STM32 bootloader device is present.
|
||||
* `:dfu-util-split-left` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Left Side" EEPROM setting for split keyboards.
|
||||
* `:dfu-util-split-right` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Right Side" EEPROM setting for split keyboards.
|
||||
* `:st-link-cli` - This allows you to flash the firmware via ST-LINK's CLI utility, rather than dfu-util.
|
||||
|
70
docs/flashing_bootloadhid.md
Normal file
70
docs/flashing_bootloadhid.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# BootloadHID Flashing Instructions and Bootloader Information
|
||||
|
||||
ps2avr(GB) boards use an ATmega32A microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
|
||||
|
||||
General flashing sequence:
|
||||
|
||||
1. Enter the bootloader using any of the following methods:
|
||||
* Tap the `RESET` keycode (may not work on all devices)
|
||||
* Hold the salt key while plugging the keyboard in (usually documented within keyboard readme)
|
||||
2. Wait for the OS to detect the device
|
||||
3. Flash a .hex file
|
||||
4. Reset the device into application mode (may be done automatically)
|
||||
|
||||
## bootloadHID Flashing Target
|
||||
|
||||
Using the QMK installation script, detailed [here](newbs_getting_started.md), the required bootloadHID tools should be automatically installed.
|
||||
|
||||
To flash via the command line, use the target `:bootloadHID` by executing the following command:
|
||||
|
||||
make <keyboard>:<keymap>:bootloadHID
|
||||
|
||||
## GUI Flashing
|
||||
|
||||
### Windows
|
||||
1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash).
|
||||
2. Place your keyboard into reset.
|
||||
3. Ensure the configured VendorID is `16c0` and ProductID is `05df`
|
||||
4. Press the `Find Device` button and ensure that your keyboard is found.
|
||||
5. Press the `Open .hex File` button and locate the `.hex` file you created.
|
||||
6. Press the `Flash Device` button and wait for the process to complete.
|
||||
|
||||
## Command Line Flashing
|
||||
|
||||
1. Place your keyboard into reset.
|
||||
2. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
|
||||
|
||||
### Windows Manual Installation
|
||||
For MSYS2:
|
||||
1. Download the BootloadHID firmware package from https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz.
|
||||
2. Extract contents using a compatible tool, for example 7-Zip.
|
||||
3. Add to the MSYS path by copying `commandline/bootloadHID.exe` from the extracted archive to your MSYS2 installation, typically `C:\msys64\usr\bin`.
|
||||
|
||||
For native Windows flashing, the `bootloadHID.exe` can be used outside of the MSYS2 environment.
|
||||
|
||||
### Linux Manual Installation
|
||||
1. Install libusb development dependency:
|
||||
```bash
|
||||
# This depends on OS - for Debian the following works
|
||||
sudo apt-get install libusb-dev
|
||||
```
|
||||
2. Download the BootloadHID firmware package:
|
||||
```
|
||||
wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz -O - | tar -xz -C /tmp
|
||||
```
|
||||
3. Build the bootloadHID executable:
|
||||
```
|
||||
cd /tmp/bootloadHID.2012-12-08/commandline/
|
||||
make
|
||||
sudo cp bootloadHID /usr/local/bin
|
||||
```
|
||||
|
||||
### MacOS Manual Installation
|
||||
1. Install Homebrew by typing the following:
|
||||
```
|
||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
```
|
||||
2. Install the following packages:
|
||||
```
|
||||
brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
|
||||
```
|
52
docs/fr-FR/ChangeLog/20190830.md
Normal file
52
docs/fr-FR/ChangeLog/20190830.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# QMK Breaking Change - 30 août 2019
|
||||
|
||||
Quatre fois par an, QMK lance un processus pour fusionner les Breaking Changes. Un Breaking Change est un changement qui modifie la manière dont QMK fonctionne introduisant des incompatibilités ou des comportements dangereux. Nous n'effectuons ces changements que 4 fois par an afin que les utilisateurs n'aient pas peur de casser leurs keymaps en mettant à jour leur version de QMK.
|
||||
|
||||
Ce document présente les fusions de Breaking Change. Voici la liste des changements.
|
||||
|
||||
## Formattage de code Core avec clang-format
|
||||
|
||||
* Tous les fichiers core (`drivers/`, `quantum/`, `tests/`, et `tmk_core/`) seront formatés avec clang-format
|
||||
* Un processus travis pour reformatter les PRs lors de la fusion a été mis en place
|
||||
* Vous pouvez utiliser la nouvelle commande CLI `qmk cformat` afin de formater avant de soumettre votre PR si vous le souhaitez.
|
||||
|
||||
## Nettoyage des descripteurs LUFA USB
|
||||
|
||||
* Nettoyage du code lié aux descripteurs USB HID sur les claviers AVR, afin de les rendre plus simple à lire et compréhensibles
|
||||
* Plus d'information: https://github.com/qmk/qmk_firmware/pull/4871
|
||||
* Normalement pas de changement de fonctionnement et aucune keymap modifiée.
|
||||
|
||||
## Migration des entrées de `ACTION_LAYER_MOMENTARY()` dans `fn_actions` vers des keycodes `MO()`
|
||||
|
||||
* `fn_actions` est déprécié, et ses fonctionnalités ont été remplacées par des keycodes directs et `process_record_user()`
|
||||
* Supprimer cette fonctionnalité obsolète devrait aboutir à une réduction importante de la taille du firmware et de la complexité du code
|
||||
* Il est recommandé que toutes les keymaps affectées remplacent `fn_actions` vers les fonctionnalités de [keycode custom](https://docs.qmk.fm/#/custom_quantum_functions) et [macro](https://docs.qmk.fm/#/feature_macros)
|
||||
|
||||
## Mise à jour Atreus vers les conventions de codage courantes
|
||||
|
||||
* Les doublons include guards ont contourné le comportement de traitement des headers attendu
|
||||
* Il est recommandé pour toutes les keymaps affectées de supprimer le doublon de `<keyboard>/config.h` et `<keyboard>/keymaps/<user>/config.h` et de ne garder que des surcharges au niveau keymap
|
||||
|
||||
## Récupération des changements de fichier keymap langage de la fork ZSA
|
||||
|
||||
* Corrige une issue dans le fichier `keymap_br_abnt2.h` qui inclut la mauvaise souce (`keymap_common.h` au lieu de `keymap.h`)
|
||||
* Met à jour le fichier `keymap_swedish.h` afin d'être spécifique au suédois et plus "nordique" en général.
|
||||
* Toutes les keymaps qui utilisent ceci devront supprimer `NO_*` et le remplacer par `SE_*`.
|
||||
|
||||
## Mise à jour du repo afin d'utiliser LUFA comme un sous-module git
|
||||
|
||||
* `/lib/LUFA` supprimé du dépôt
|
||||
* LUFA, définis comme un sous-module, pointe vers qmk/lufa
|
||||
* Ceci devrait ajouter plus de flexibilité vers LUFA, et nous permet de garder le sous-module à jour bien plus facilement. Il avait environ 2 ans de retard, sans manière simple de corriger. Ce changement devrait simplifier la mise à jour dans le futur.
|
||||
|
||||
## Migration des entrées `ACTION_BACKLIGHT_*()` dans `fn_actions` vers des keycodes `BL_`
|
||||
|
||||
* `fn_actions` est déprécié, et ses fonctionnalités ont été remplacées par des keycodes directs et `process_record_user()`
|
||||
* Toutes les keymaps utilisant ces actions doivent avoir les clés `KC_FN*` remplacées par les clés `BL_*` équivalentes
|
||||
* Si vous utilisez actuellement `KC_FN*` vous devrez remplacer `fn_actions` avec les fonctionnalités de [keycode custom](https://docs.qmk.fm/#/custom_quantum_functions) et [macro](https://docs.qmk.fm/#/feature_macros)
|
||||
|
||||
## Remplacer l'alias `KC_DELT` par `KC_DEL`
|
||||
|
||||
* `KC_DELT` était un alias redondant et non documenté pour `KC_DELETE`
|
||||
* Il a été supprimé et toutes ses utilisations ont été remplacées par l'alias plus courant `KC_DEL`
|
||||
* Environ 90 keymaps (surtout des boards ErgoDox) ont été modifiées à cette fin
|
32
docs/fr-FR/README.md
Normal file
32
docs/fr-FR/README.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Quantum Mechanical Keyboard Firmware
|
||||
|
||||
[](https://github.com/qmk/qmk_firmware/tags)
|
||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
||||
[](https://discord.gg/Uq7gcHh)
|
||||
[](https://docs.qmk.fm)
|
||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||
[](https://github.com/qmk/qmk_firmware/)
|
||||
|
||||
## Qu'est-ce que QMK Firmware ?
|
||||
|
||||
QMK (*Quantum Mechanical Keyboard*) est une communauté open source qui maintient le firmware QMK, la QMK Toolbox (*Boite à outil*), qmk.fm et leurs documentations. QMK Firmware est un firmware dédié aux claviers qui est basé sur [tmk\_keyboard](http://github.com/tmk/tmk_keyboard). Il offre des fonctionnalités très utiles pour les contrôleurs Atmel AVR, et, plus spécifiquement pour [les produits d'OLKB](http://olkb.com), le clavier [ErgoDox EZ](http://www.ergodox-ez.com), et pour les [produits Clueboard](http://clueboard.co/). Il prend désormais aussi en charge les processeurs ARM qui utilisent ChibiOS. Vous pouvez l'utiliser pour contrôler un clavier personnalisé soudé à la main ou alors sur un clavier avec un PCB personnalisé.
|
||||
|
||||
## Comment l'obtenir
|
||||
|
||||
Si vous souhaitez contribuer à une disposition de clavier (keymap), ou à des fonctionnalités de QMK alors le plus simple est de [forker le dépôt avec Github](https://github.com/qmk/qmk_firmware#fork-destination-box) puis cloner le dépôt localement pour y faire des changements. Vous pourrez pousser vos changements sur github puis ouvrir un [Pull Request](https://github.com/qmk/qmk_firmware/pulls) depuis votre fork Github.
|
||||
|
||||
Sinon, vous pouvez aussi le télécharger directement en ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), ou le cloner avec git en ssh (`git@github.com:qmk/qmk_firmware.git`), ou https (`https://github.com/qmk/qmk_firmware.git`).
|
||||
|
||||
## Comment le compiler
|
||||
|
||||
Avant d'être prêt à compiler vous allez devoir [installer un environnement](getting_started_build_tools.md) pour les développements AVR et/ou ARM. Une fois ceci fait, vous pourrez utiliser la commande `make` pour compiler le clavier et la disposition avec une commande de ce type :
|
||||
|
||||
make planck/rev4:default
|
||||
|
||||
Cette commande compilera la révision `rev4` du clavier `planck` avec la disposition `default`. Notez que tous les claviers n'ont pas forcément de révisions (aussi appelées sous-projects ou dossiers, ou en anglais « subprojects » ou « folder »). Cette option peut donc être omise :
|
||||
|
||||
make preonic:default
|
||||
|
||||
## Comment le personnaliser
|
||||
|
||||
QMK a beaucoup de [fonctionnalités](features.md) à explorer, et [une documentation](http://docs.qmk.fm) très abondante que vous pourrez parcourir. La plupart des fonctionnalités vous permettrons de modifier vos [dispositions](keymap.md) (keymaps) et de changer [les codes de caractères](keycodes.md) (keycodes).
|
125
docs/fr-FR/_summary.md
Normal file
125
docs/fr-FR/_summary.md
Normal file
@@ -0,0 +1,125 @@
|
||||
**En Français**
|
||||
|
||||
* [Guide pour débutant complet](fr-FR/newbs.md)
|
||||
* [Pour débuter](fr-FR/newbs_getting_started.md)
|
||||
* [Compiler son premier firmware](fr-FR/newbs_building_firmware.md)
|
||||
* [Flasher le Firmware](fr-FR/newbs_flashing.md)
|
||||
* [Test et Débuggage](fr-FR/newbs_testing_debugging.md)
|
||||
* [Bonnes pratiques Git](fr-FR/newbs_best_practices.md)
|
||||
* [Ressources d'apprentissage](fr-FR/newbs_learn_more_resources.md)
|
||||
|
||||
* [Les bases de QMK](fr-FR/README.md)
|
||||
* [Indroduction à QMK](fr-FR/getting_started_introduction.md)
|
||||
* [QMK CLI](fr-FR/cli.md)
|
||||
* [Configuration de la CLI QMK](fr-FR/cli_configuration.md)
|
||||
* [Contribuer à QMK](fr-FR/contributing.md)
|
||||
* [Comment utiliser GitHub](fr-FR/getting_started_github.md)
|
||||
* [Trouver de l'aide](fr-FR/getting_started_getting_help.md)
|
||||
|
||||
* [Breaking changes](fr-FR/breaking_changes.md)
|
||||
* [30 août 2019](fr-FR/ChangeLog/20190830.md)
|
||||
|
||||
**En Anglais**
|
||||
|
||||
* [FAQ](faq.md)
|
||||
* [FAQ Générale](faq_general.md)
|
||||
* [Compiler QMK](faq_build.md)
|
||||
* [Débugguer / Dépanner QMK](faq_debug.md)
|
||||
* [Keymap / Disposition](faq_keymap.md)
|
||||
* [Installer les drivers avec Zadig](driver_installation_zadig.md)
|
||||
|
||||
* Guides détaillés
|
||||
* [Installation des outils de compilation](getting_started_build_tools.md)
|
||||
* [Guide Vagrant](getting_started_vagrant.md)
|
||||
* [Commandes de compilations](getting_started_make_guide.md)
|
||||
* [Flasher les firmwares](fr-fr/flashing.md)
|
||||
* [Personnaliser les fonctionnalités](custom_quantum_functions.md)
|
||||
* [Aperçu des fonctionnalités des dispositions](keymap.md)
|
||||
|
||||
* [Hardware](hardware.md)
|
||||
* [Processeurs AVR](hardware_avr.md)
|
||||
* [Pilotes / Drivers](hardware_drivers.md)
|
||||
|
||||
* Réferences
|
||||
* [Lignes de conduite des claviers](hardware_keyboard_guidelines.md)
|
||||
* [Options de configurations](config_options.md)
|
||||
* [Keycodes / Codes des caractères](keycodes.md)
|
||||
* [Conventions de codage - C](coding_conventions_c.md)
|
||||
* [Conventions de codage - Python](coding_conventions_python.md)
|
||||
* [Meilleurs pratiques sur la documentation](documentation_best_practices.md)
|
||||
* [Modèles de documentation](documentation_templates.md)
|
||||
* [Glossaire](reference_glossary.md)
|
||||
* [Tests unitaires](unit_testing.md)
|
||||
* [Fonctions utiles](ref_functions.md)
|
||||
* [Support de configuration](reference_configurator_support.md)
|
||||
* [Format du fichier info.json](reference_info_json.md)
|
||||
* [Développer la CLI en Python](cli_development.md)
|
||||
|
||||
* [Fonctionnalités](features.md)
|
||||
* [Keycodes basiques](keycodes_basic.md)
|
||||
* [Touches utilisées avec Shift (US ANSI)](keycodes_us_ansi_shifted.md)
|
||||
* [Keycodes quantiques](quantum_keycodes.md)
|
||||
* [Keycodes avancés](feature_advanced_keycodes.md)
|
||||
* [Fonctionnalités audio](feature_audio.md)
|
||||
* [Majuscule automatique](feature_auto_shift.md)
|
||||
* [Rétroéclairage](feature_backlight.md)
|
||||
* [Bluetooth](feature_bluetooth.md)
|
||||
* [Bootmagic](feature_bootmagic.md)
|
||||
* [Combos](feature_combo.md)
|
||||
* [Commande](feature_command.md)
|
||||
* [API anti-rebond](feature_debounce_type.md)
|
||||
* [DIP Switch](feature_dip_switch.md)
|
||||
* [Macros dynamiques](feature_dynamic_macros.md)
|
||||
* [Interrupteurs rotatifs](feature_encoders.md)
|
||||
* [Grave Escape](feature_grave_esc.md)
|
||||
* [Retour haptique](feature_haptic_feedback.md)
|
||||
* [Contrôleur LCD HD44780](feature_hd44780.md)
|
||||
* [Touche à verrou / Lock-key](feature_key_lock.md)
|
||||
* [Dispositions / layouts](feature_layouts.md)
|
||||
* [Touche leader](feature_leader_key.md)
|
||||
* [Matrice LED](feature_led_matrix.md)
|
||||
* [Macros](feature_macros.md)
|
||||
* [Boutons de souris](feature_mouse_keys.md)
|
||||
* [Pilotes / Drivers OLED](feature_oled_driver.md)
|
||||
* [Touche one-shot](feature_advanced_keycodes.md#one-shot-keys)
|
||||
* [Périphériques de pointage](feature_pointing_device.md)
|
||||
* [Souris PS/2](feature_ps2_mouse.md)
|
||||
* [Éclairage RGB](feature_rgblight.md)
|
||||
* [Matrice RGB](feature_rgb_matrix.md)
|
||||
* [Space Cadet](feature_space_cadet.md)
|
||||
* [Claviers scindés / splittés](feature_split_keyboard.md)
|
||||
* [Stenographie](feature_stenography.md)
|
||||
* [Inversion des mains](feature_swap_hands.md)
|
||||
* [Tap Dance](feature_tap_dance.md)
|
||||
* [Terminale](feature_terminal.md)
|
||||
* [Imprimante thermique](feature_thermal_printer.md)
|
||||
* [Caractères unicodes](feature_unicode.md)
|
||||
* [Dossier utilisateur](feature_userspace.md)
|
||||
* [Velocikey](feature_velocikey.md)
|
||||
|
||||
* Pour les makers et les bricoleurs
|
||||
* [Guide des claviers soudés à la main](hand_wire.md)
|
||||
* [Guide de flash de l’ISP](isp_flashing_guide.md)
|
||||
* [Guide du débogage ARM](arm_debugging.md)
|
||||
* [Drivers i2c](i2c_driver.md)
|
||||
* [Contrôles des GPIO](internals_gpio_control.md)
|
||||
* [Conversion en Proton C](proton_c_conversion.md)
|
||||
|
||||
* Pour aller plus loin
|
||||
* [Comment fonctionnent les claviers](how_keyboards_work.md)
|
||||
* [Comprendre QMK](understanding_qmk.md)
|
||||
|
||||
* Autres sujets
|
||||
* [Utiliser Eclipse avec QMK](other_eclipse.md)
|
||||
* [Utiliser VSCode avec QMK](other_vscode.md)
|
||||
* [Support](support.md)
|
||||
* [Comment ajouter des traductions](translating.md)
|
||||
|
||||
* À l’intérieur de QMK (En cours de documentation)
|
||||
* [Définitions](internals_defines.md)
|
||||
* [Input Callback Reg](internals_input_callback_reg.md)
|
||||
* [Appareils Midi](internals_midi_device.md)
|
||||
* [Installation d’un appareil Midi](internals_midi_device_setup_process.md)
|
||||
* [Utilitaires Midi](internals_midi_util.md)
|
||||
* [Fonctions Midi](internals_send_functions.md)
|
||||
* [Outils Sysex](internals_sysex_tools.md)
|
107
docs/fr-FR/breaking_changes.md
Normal file
107
docs/fr-FR/breaking_changes.md
Normal file
@@ -0,0 +1,107 @@
|
||||
# Breaking changes
|
||||
|
||||
Ce document décrit le processus de QMK pour la gestion des breaking changes. Un breaking change est un changement qui modifie la manière dont QMK fonctionne introduisant des incompatibilités ou des comportements dangereux. Nous limitons ces changements afin que les utilisateurs n'aient pas peur de casser leurs keymaps en mettant à jour leur version de QMK.
|
||||
|
||||
La période de breaking change est quand nous allons fusionner un PR qui change QMK d'une manière dangereuse ou inattendue. Il y a une période interne de test afin de nous assurer que les problèmes résiduels sont rares ou impossible à prévoir.
|
||||
|
||||
## Qu'est-ce qui a été inclus dans des Breaking Changes précédents?
|
||||
|
||||
* [30 août 2019](ChangeLog/20190830.md)
|
||||
|
||||
## Quand va être le prochain Breaking Change?
|
||||
|
||||
Le prochain Breaking Change est planifié pour le 29 novembre.
|
||||
|
||||
### Dates importantes
|
||||
|
||||
* [x] 21 septembre 2019 - `future` est créé. Il va être rebasé de manière hebdomadaire.
|
||||
* [ ] 01 novembre 2019 - `future` fermé aux nouveaux PRs.
|
||||
* [ ] 01 novembre 2019 - Appel aux testeurs.
|
||||
* [ ] 27 novembre 2019 - `master` est bloqué, pas de PRs fusionnés.
|
||||
* [ ] 29 novembre 2019 - `future` est fusionné dans `master`.
|
||||
* [ ] 30 novembre 2019 - `master` est débloqué. Les PRs peuvent à nouveau être fusionnés.
|
||||
|
||||
## Quels changements seront inclus?
|
||||
|
||||
Pour voir une liste de candidats de breaking changes, vous pouvez regarder la liste des [labels `breaking_change`](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+label%3Abreaking_change+is%3Apr). De nouveaux changements peuvent être ajoutés entre maintenant et lorsque `future` est fermée, et un PR avec ce label n'est pas garanti d'être fusionné.
|
||||
|
||||
Si vous souhaitez que votre breaking change soit inclus dans ce tour, vous devez créer un PR avec le label `breaking_change` et faire en sorte qu'il soit accepté avant que `future` ne soit fermé. Une fois `future` fermé, aucun nouveau breaking change sera accepté.
|
||||
|
||||
Critère d'acceptation:
|
||||
|
||||
* Le PR est complété et prêt à fusionner
|
||||
* Le PR a un ChangeLog
|
||||
|
||||
# Checklists
|
||||
|
||||
Cette section documente plusieurs processus que nous utilisons en lançant le processus de Breaking Change.
|
||||
|
||||
## Rebase `future` de `master`
|
||||
|
||||
Ceci est lancé chaque vendredi tant que `future` est ouvert.
|
||||
|
||||
Processus:
|
||||
|
||||
```
|
||||
cd qmk_firmware
|
||||
git checkout master
|
||||
git pull --ff-only
|
||||
git checkout future
|
||||
git rebase master
|
||||
git push --force
|
||||
```
|
||||
|
||||
## Créer la branche `future`
|
||||
|
||||
Ceci est fait immédiatement après la fusion de la branche `future` précédente.
|
||||
|
||||
* `qmk_firmware` git commands
|
||||
* [ ] `git checkout master`
|
||||
* [ ] `git pull --ff-only`
|
||||
* [ ] `git checkout -b future`
|
||||
* [ ] Modifie `readme.md`
|
||||
* [ ] Ajoute un message en haut qui indique que c'est une branche de test.
|
||||
* [ ] Ajoute un lien vers ce document
|
||||
* [ ] `git commit -m 'Branch point for <DATE> Breaking Change'`
|
||||
* [ ] `git tag breakpoint_<YYYY>_<MM>_<DD>`
|
||||
* [ ] `git tag <next_version>` # Evite que le label point d'arrêt soit confondu par un incrément de version
|
||||
* [ ] `git push origin future`
|
||||
* [ ] `git push --tags`
|
||||
|
||||
## 4 Semaines Avant la Fusion
|
||||
|
||||
* `future` est maintenant fermé aux nouveaux PRs, seul des correctifs pour les PRs courants peuvent être mergés
|
||||
* Envoi de l'appel aux testeurs
|
||||
* [ ] Discord
|
||||
* [ ] GitHub PR
|
||||
* [ ] https://reddit.com/r/olkb
|
||||
|
||||
## 1 Semaine Avant la Fusion
|
||||
|
||||
* Annonce que master sera fermée entre <2 jours avant> à <Jour de la fusion>
|
||||
* [ ] Discord
|
||||
* [ ] GitHub PR
|
||||
* [ ] https://reddit.com/r/olkb
|
||||
|
||||
## 2 Jours Avant la Fusion
|
||||
|
||||
* Annonce que master est fermé pour 2 jours
|
||||
* [ ] Discord
|
||||
* [ ] GitHub PR
|
||||
* [ ] https://reddit.com/r/olkb
|
||||
|
||||
## Jour de la fusion
|
||||
|
||||
* `qmk_firmware` git commands
|
||||
* [ ] `git checkout future`
|
||||
* [ ] `git pull --ff-only`
|
||||
* [ ] `git rebase origin/master`
|
||||
* [ ] Modifie `readme.md`
|
||||
* [ ] Supprimer les notes à propos de `future`
|
||||
* [ ] Regroupe ChangeLog dans un fichier.
|
||||
* [ ] `git commit -m 'Merge point for <DATE> Breaking Change'`
|
||||
* [ ] `git push origin future`
|
||||
* Actions sur Github
|
||||
* [ ] Crée un PR pour `future`
|
||||
* [ ] S'assurer que Travis ne relève aucun problème
|
||||
* [ ] Fusion le PR `future`
|
146
docs/fr-FR/cli.md
Normal file
146
docs/fr-FR/cli.md
Normal file
@@ -0,0 +1,146 @@
|
||||
# La CLI de QMK
|
||||
|
||||
Cette page décrit comment configurer et utiliser la CLI QMK.
|
||||
|
||||
# Vue d'ensemble
|
||||
|
||||
La CLI de QMK permet de simplifier la compilation et l'interaction avec les claviers QMK. Nous avons défini plusieurs commandes pour simplifier et rationaliser les tâches telles qu'obtenir et compiler le firmware QMK, créer de nouvelles keymaps, et plus.
|
||||
|
||||
* [CLI globale](#global-cli)
|
||||
* [CLI locale](#local-cli)
|
||||
* [Les commandes CLI](#cli-commands)
|
||||
|
||||
# Pré-requis
|
||||
|
||||
La CLI nécessite Python 3.5 ou plus récent. Nous essayons de limiter le nombre de pré-requis, mais vous allez aussi devoir installer les paquets listés dans le fichier [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt).
|
||||
|
||||
# CLI globale
|
||||
|
||||
QMK met à disposition une CLI installable qui peut être utilisée pour configurer votre environnement de compilation QMK, fonctionne avec QMK, et qui rend l'utilisation de plusieurs copies de `qmk_firmware` plus simple. Nous recommandons d'installer et de mettre à jour ceci régulièrement.
|
||||
|
||||
## Installer en utilisant Homebrew (macOS, quelques Linux)
|
||||
|
||||
Si vous avez installé [Homebrew](https://brew.sh) vous pouvez entrer ce qui suit et installer QMK:
|
||||
|
||||
```
|
||||
brew tap qmk/qmk
|
||||
brew install qmk
|
||||
export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
|
||||
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
|
||||
```
|
||||
|
||||
## Installer en utilisant easy_install ou pip
|
||||
|
||||
Si votre système n'est pas listé ci-dessus, vous pouvez installer QMK manuellement. Premièrement, vérifiez que vous avez bien installé Python 3.5 (ou plus récent) et pip. Ensuite, installez QMK avec cette commande:
|
||||
|
||||
```
|
||||
pip3 install qmk
|
||||
export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
|
||||
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
|
||||
```
|
||||
|
||||
## Paquets pour d'autres systèmes d'exploitation
|
||||
|
||||
Nous recherchons des gens pour créer et maintenir un paquet `qmk` pour plus de systèmes d'exploitation. Si vous voulez créer un paquet pour votre système d'exploitation, suivez ces directives:
|
||||
|
||||
* Suivez les bonnes pratiques pour votre système d'exploitation lorsqu'elles entrent en conflit avec ces directives
|
||||
* Documentez pourquoi dans un commentaire lorsque vous ne les suivez pas
|
||||
* Installez en utilisant un virtualenv
|
||||
* Expliquez à l'utilisateur de définir la variable d'environnement `QMK_Home` pour "check out" les sources du firmware à un autre endroit que `~/qmk_firmware`.
|
||||
|
||||
# CLI locale
|
||||
|
||||
Si vous ne voulez pas utiliser la CLI globale, il y a une CLI locale empaquetée avec `qmk_firmware`. Vous pouvez le trouver dans `qmk_firmware/bin/qmk`. Vous pouvez lancer la commande `qmk` depuis n'importe quel répertoire et elle fonctionnera toujours sur cette copie de `qmk_firmware`.
|
||||
|
||||
**Exemple**:
|
||||
|
||||
```
|
||||
$ ~/qmk_firmware/bin/qmk hello
|
||||
Ψ Hello, World!
|
||||
```
|
||||
|
||||
## Limitations de la CLI locale
|
||||
|
||||
Il y a quelques limitations à la CLI locale comparé à la globale:
|
||||
|
||||
* La CLI locale ne supporte pas `qmk setup` ou `qmk clone`
|
||||
* La CLI locale n'opère pas sur le même arbre `qmk_firmware`, même si vous avez plusieurs dépôts clonés.
|
||||
* La CLI locale ne s'exécute pas dans un virtualenv, donc il y a des risques que des dépendances seront en conflit
|
||||
|
||||
# Les commandes CLI
|
||||
|
||||
## `qmk compile`
|
||||
|
||||
Cette commande permet de compiler le firmware de n'importe quel répertoire. Vous pouvez compiler des exports JSON de <https://config.qmk.fm> ou compiler des keymaps du dépôt.
|
||||
|
||||
**Utilisation pour les exports de configuration**:
|
||||
|
||||
```
|
||||
qmk compile <configuratorExport.json>
|
||||
```
|
||||
|
||||
**Utilisation pour les Keymaps**:
|
||||
|
||||
```
|
||||
qmk compile -kb <keyboard_name> -km <keymap_name>
|
||||
```
|
||||
|
||||
## `qmk cformat`
|
||||
|
||||
Cette commande formatte le code C en utilisant clang-format. Lancez-la sans arguments pour formatter tout le code core, ou passez les noms de fichiers à la ligne de commande pour la lancer sur des fichiers spécifiques.
|
||||
|
||||
**Utilisation**:
|
||||
|
||||
```
|
||||
qmk cformat [file1] [file2] [...] [fileN]
|
||||
```
|
||||
|
||||
## `qmk config`
|
||||
|
||||
Cette commande vous permet de configurer le comportement de QMK. Pour la documentation complète de `qmk config`, regardez [Configuration de CLI](cli_configuration.md).
|
||||
|
||||
**Utilisation**:
|
||||
|
||||
```
|
||||
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
||||
```
|
||||
|
||||
## `qmk doctor`
|
||||
|
||||
Cette commande examine votre environnement et vous alertes des potentiels problèmes de compilation ou de flash.
|
||||
|
||||
**Utilisation**:
|
||||
|
||||
```
|
||||
qmk doctor
|
||||
```
|
||||
|
||||
## `qmk new-keymap`
|
||||
|
||||
Cette commande crée une nouvelle keymap basée sur une keymap par défaut d'un clavier existant.
|
||||
|
||||
**Utilisation**:
|
||||
|
||||
```
|
||||
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
||||
```
|
||||
|
||||
## `qmk pyformat`
|
||||
|
||||
Cette commande formate le code python dans `qmk_firmware`.
|
||||
|
||||
**Utilisation**:
|
||||
|
||||
```
|
||||
qmk pyformat
|
||||
```
|
||||
|
||||
## `qmk pytest`
|
||||
|
||||
Cette commande démarre la suite de test python. Si vous faites des changements dans le code Python, assurez-vous que les tests se lancent avec succès.
|
||||
|
||||
**Utilisation**:
|
||||
|
||||
```
|
||||
qmk pytest
|
||||
```
|
121
docs/fr-FR/cli_configuration.md
Normal file
121
docs/fr-FR/cli_configuration.md
Normal file
@@ -0,0 +1,121 @@
|
||||
# Configuration de QMK CLI
|
||||
|
||||
Ce document explique comment fonctionne la commande `qmk config`.
|
||||
|
||||
# Introduction
|
||||
|
||||
La configuration pour QMK CLI est un système clé/valeur. Chaque clé est composée d'une sous-commande et d'un argument séparé par une virgule. Cela permet une traduction simple et directe entre les clés de configuration et l'argument qu'elle définit.
|
||||
|
||||
## Exemple simple
|
||||
|
||||
Comme exemple, regardons la commande `qmk compile --keyboard clueboard/66/rev4 --keymap default`.
|
||||
|
||||
Il y a deux arguments de ligne de commande qui peuvent être lu de la configuration:
|
||||
|
||||
* `compile.keyboard`
|
||||
* `compile.keymap`
|
||||
|
||||
Essayons de les définir:
|
||||
|
||||
```shell
|
||||
$ qmk config compile.keyboard=clueboard/66/rev4 compile.keymap=default
|
||||
compile.keyboard: None -> clueboard/66/rev4
|
||||
compile.keymap: None -> default
|
||||
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||
```
|
||||
|
||||
Maintenant, je peux lancer la commande `qmk compile` sans avoir à spécifier mon clavier et keymap à chaque fois.
|
||||
|
||||
## Définir les options par défaut
|
||||
|
||||
Parfois, il est utile de partager une configuration entre plusieurs commandes. Par exemple, plusieurs commandes prennent un argument `--keyboard`. Plutôt que de devoir définir cette valeur pour chaque commande, vous pouvez définir une valeur d'utilisateur qui sera utilisée par toutes les commandes qui prennent cet argument.
|
||||
|
||||
Exemple:
|
||||
|
||||
```
|
||||
$ qmk config user.keyboard=clueboard/66/rev4 user.keymap=default
|
||||
user.keyboard: None -> clueboard/66/rev4
|
||||
user.keymap: None -> default
|
||||
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||
```
|
||||
|
||||
# CLI Documentation (`qmk config`)
|
||||
|
||||
La commande `qmk config` est utilisée pour interagir avec la configuration sous-jacente. Lancée sans argument, elle affiche la configuration courante. Lorsque des arguments sont définis, ils sont considérés comme étant des jetons de configuration, qui sont des chaînes de caractère ne contenant aucun espace avec le format suivant:
|
||||
|
||||
<subcommand|general|default>[.<key>][=<value>]
|
||||
|
||||
## Définir des valeurs de configuration
|
||||
|
||||
Vous pouvez définir des valeurs de configuration en mettant le caractère égal (=) dans votre clé de configuration. La clé doit toujours être dans le format complet `<section>.<key>`.
|
||||
|
||||
Exemple:
|
||||
|
||||
```
|
||||
$ qmk config default.keymap=default
|
||||
default.keymap: None -> default
|
||||
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||
```
|
||||
|
||||
## Lire des valeurs de configuration
|
||||
|
||||
Vous pouvez lire les valeurs de configuration pour la totalité de la configuration, une seule clé, ou une section entière. Vous pouvez aussi spécifier plusieurs clés pour afficher plus d'une valeur.
|
||||
|
||||
### Exemple avec la totalité de la configuration
|
||||
|
||||
qmk config
|
||||
|
||||
### Exemple avec une section entière
|
||||
|
||||
qmk config compile
|
||||
|
||||
### Exemple avec une clé unique
|
||||
|
||||
qmk config compile.keyboard
|
||||
|
||||
### Exemple avec plusieurs clés
|
||||
|
||||
qmk config user compile.keyboard compile.keymap
|
||||
|
||||
## Supprimer des valeurs de configuration
|
||||
|
||||
Vous pouvez supprimer une valeur de configuration en la définissant avec la chaîne spéciale `None`.
|
||||
|
||||
Exemple:
|
||||
|
||||
```
|
||||
$ qmk config default.keymap=None
|
||||
default.keymap: default -> None
|
||||
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||
```
|
||||
|
||||
## Plusieurs opérations
|
||||
|
||||
Vous pouvez combiner plusieurs opérations d'écriture et de lecture en une seule commande. Elles seront exécutées et affichées dans l'ordre:
|
||||
|
||||
```
|
||||
$ qmk config compile default.keymap=default compile.keymap=None
|
||||
compile.keymap=skully
|
||||
compile.keyboard=clueboard/66_hotswap/gen1
|
||||
default.keymap: None -> default
|
||||
compile.keymap: skully -> None
|
||||
Ψ Wrote configuration to '/Users/example/Library/Application Support/qmk/qmk.ini'
|
||||
```
|
||||
|
||||
# Options de configuration utilisateur
|
||||
|
||||
| Clé | Valeur par défaut | Description |
|
||||
|-----|---------------|-------------|
|
||||
| user.keyboard | None | Le chemin d'accès vers le clavier (Exemple: `clueboard/66/rev4`) |
|
||||
| user.keymap | None | Le nom de la keymap (Exemple: `default`) |
|
||||
| user.name | None | Le nom d'utilisateur GitHub de l'utilisateur. |
|
||||
|
||||
# Toutes les options de configuration
|
||||
|
||||
| Clé | Valeur par défaut | Description |
|
||||
|-----|---------------|-------------|
|
||||
| compile.keyboard | None | Le chemin d'accès vers le clavier (Exemple: `clueboard/66/rev4`) |
|
||||
| compile.keymap | None | Le nom de la keymap (Exemple: `default`) |
|
||||
| hello.name | None | Le nom à saluer lorsque démarré. |
|
||||
| new_keyboard.keyboard | None | Le chemin d'accès vers le clavier (Exemple: `clueboard/66/rev4`) |
|
||||
| new_keyboard.keymap | None | Le nom de la keymap (Example: `default`) |
|
154
docs/fr-FR/contributing.md
Normal file
154
docs/fr-FR/contributing.md
Normal file
@@ -0,0 +1,154 @@
|
||||
# Comment contribuer
|
||||
|
||||
👍🎉 Premièrement, merci de prendre le temps de lire ceci et de contribuer! 🎉👍
|
||||
|
||||
Les contributions de tiers nous aide à améliorer et faire grandir QMK. Nous voulons rendre les pull requests et le processus de contribution utile et simple à la fois pour les contributeurs et les mainteneurs. C'est pourquoi nous avons mis en places des directives pour les contributeurs afin que votre pull request puisse être accepté sans changement majeur.
|
||||
|
||||
* [Aperçu du projet](#project-overview)
|
||||
* [Conventions de codage](#coding-conventions)
|
||||
* [Directives générales](#general-guidelines)
|
||||
* [Que veut dire le code de conduite pour moi?](#what-does-the-code-of-conduct-mean-for-me)
|
||||
|
||||
## Je ne veux pas lire tout ce pavé! J'ai juste une question!
|
||||
|
||||
Si vous voulez poser une question sur QMK, vous pouvez le faire sur le [sous-reddit OLKB](https://reddit.com/r/olkb) ou sur [Discord](https://discord.gg/Uq7gcHh).
|
||||
|
||||
Merci de garder ceci en tête:
|
||||
|
||||
* Cela peut prendre plusieurs heures pour que quelqu'un réponde à votre question. Merci d'être patient!
|
||||
* Tous ceux impliqués avec QMK fait don de son temps et de son énergie. Nous ne sommes pas payés pour travailler sur ou répondre aux questions concernant QMK.
|
||||
* Essayez de poser vos questions de manière à ce qu'elles soient le plus simple à répondre possible. Si vous n'êtes pas sûrs de savoir comment faire, voici quelques bon guides (en anglais):
|
||||
* https://opensource.com/life/16/10/how-ask-technical-questions
|
||||
* http://www.catb.org/esr/faqs/smart-questions.html
|
||||
|
||||
# Aperçu du projet
|
||||
|
||||
QMK est majoritairement écrit en C, avec quelques fonctions et parties spécifiques écrites en C++. Il est destiné aux processeurs intégrés que l'on trouve dans des clavier, particulièrement AVR ([LUFA](http://www.fourwalledcubicle.com/LUFA.php)) et ARM ([ChibiOS](http://www.chibios.com)). Si vous maîtrisez déjà la programmation sur Arduino, vous trouverez beaucoup de concepts et de limitations familiers. Une expérience préalable avec les Arduino n'est pas nécessaire à contribuer avec succès à QMK.
|
||||
|
||||
<!-- FIXME: We should include a list of resources for learning C here. -->
|
||||
|
||||
# Où trouver de l'aide?
|
||||
|
||||
Si vous avez besoin d'aide, vous pouvez [ouvrir une issue](https://github.com/qmk/qmk_firmware/issues) ou [un chat sur Discord](https://discord.gg/Uq7gcHh).
|
||||
|
||||
# Comment contribuer?
|
||||
|
||||
Vous n'avez encore jamais contribué à un projet open source? Vous vous demandez comment les contributions dans QMK fonctionnent? Voici un aperçu rapide!
|
||||
|
||||
0. Enregistrez-vous sur [GitHub](https://github.com).
|
||||
1. Définissez une keymap à contribuer, [trouvez une issue](https://github.com/qmk/qmk_firmware/issues) que vous souhaitez corriger, ou [une fonction](https://github.com/qmk/qmk_firmware/issues?q=is%3Aopen+is%3Aissue+label%3Afeature) que vous voulez ajouter.
|
||||
2. Créez un fork sur le dépôt associé avec une issue sur votre compte GitHub. Cela veut dire que vous allez avoir une copie du dépôt sous `votre-login-GitHub/qmk_firmware`.
|
||||
3. Clonez le dépôt sur votre machine locale en utilisant `git clone https://github.com/login-github/repository-name.git`.
|
||||
4. Si vous travaillez sur une nouvelle fonctionnalité, pensez à ouvrir une issue pour parler avec nous du travail que vous souhaitez démarrer.
|
||||
5. Créez une nouvelle branche pour votre correctif en utilisant `git checkout -b nom-de-branche`.
|
||||
6. Faites les changements nécessaires pour corriger le problème ou ajouter la fonctionnalité.
|
||||
7. Utilisez `git add chemin-de-fichier` pour ajouter les contenus des fichiers modifiés au "snapshot" que git utilise pour gérer l'état du projet, appelé aussi l'index.
|
||||
8. Utilisez `git commit -m "Insérez une description courte des changements (en anglais)"` pour enregistrer le contenu de l'index avec un message descriptif.
|
||||
9. Poussez les changements vers votre dépôt sur GitHub en utilisant `git push origin nom-de-branche`.
|
||||
10. Créez un pull request sur [QMK Firmware](https://github.com/qmk/qmk_firmware/pull/new/master).
|
||||
11. Donnez un titre à votre pull request en utilisant une description courte des changements que vous avez fait et ajoutez le numéro de l'issue ou du bug associé avec votre changement. Les commentaires de PR devraient se faire en anglais de préférence. Par exemple, vous pouvez utiliser un titre tel que celui-là: "Added more log outputting to resolve #4352".
|
||||
12. Dans la description du pull request, expliquez les changements que vous avez fait et tous les problèmes qui existent, selon vous, sur le pull request que vous avez fait. Vous pouvez aussi utiliser la description pour poser des questions au mainteneur. Il n'est pas nécessaire que votre pull request soit parfait (aucun pull request ne l'est), le reviewer sera là pour vous aider à résoudre les problèmes et l'améliorer!
|
||||
13. Attendez que le pull request soit revu par un mainteneur.
|
||||
14. Faites des changements au pull request si le mainteneur le recommande.
|
||||
15. Célébrez votre succès une fois votre pull request fusionné!
|
||||
|
||||
# Conventions de codage
|
||||
|
||||
La grande majorité de notre style est plutôt simple à comprendre. Si vous connaissez C ou Python, vous ne devriez pas avoir trop de difficulté avec notre style.
|
||||
|
||||
* [Conventions de codage - C](coding_conventions_c.md)
|
||||
* [Conventions de codage - Python](coding_conventions_python.md)
|
||||
|
||||
# Directives générales
|
||||
|
||||
Nous avons un certain nombre de type de changements dans QMK, chacun nécessitant un niveau de rigueur différent. Nous voulons que vous gardiez les directives suivantes en tête quel que soit le changement que vous êtes en train de faire.
|
||||
|
||||
* Séparez les PR dans des unités logiques. Par exemple, ne soumettez pas un PR qui couvre deux fonctionnalités séparées, soumettez plutôt un PR pour chaque fonctionnalité.
|
||||
* Vérifiez les espaces blancs non nécessaires avec `git diff --check` avant de commit.
|
||||
* Assurez-vous que votre code compile.
|
||||
* Keymaps: Assurez-vous que `make keyboard:your_new_keymap` ne renvoie pas d'erreur.
|
||||
* Claviers: Assurez-vous que `make keyboard:all` ne renvoie pas d'erreur.
|
||||
* Core: Assurez-vous que `make all` ne renvoie pas d'erreur.
|
||||
* Assurez-vous que les messages de commit soient compréhensibles d'eux-mêmes. Vous devriez écrire une description simple (pas plus de 70 caractères) sur la première ligne, suivi d'une ligne vide, suivi d'un détail de votre commit, si nécessaire. Exemple:
|
||||
|
||||
```
|
||||
Adjust the fronzlebop for the kerpleplork
|
||||
|
||||
The kerpleplork was intermittently failing with error code 23. The root cause was the fronzlebop setting, which causes the kerpleplork to activate every N iterations.
|
||||
|
||||
Limited experimentation on the devices I have available shows that 7 is high enough to avoid confusing the kerpleplork, but I'd like to get some feedback from people with ARM devices to be sure.
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
La documentation est l'une des manières les plus simples de démarrer la contribution sur QMK. Il est simple de trouver des endroits où la documentation est fausse ou incomplète, et il est tout aussi simple de la corriger! Nous avons aussi grandement besoin de quelqu'un pour éditer notre documentation, donc si vous avez des compétences en édition mais que vous n'êtes pas sûr de savoir où aller, n'hésitez pas [demandez de l'aide](#where-can-i-go-for-help)!
|
||||
|
||||
Vous trouverez toute notre documentation dans le répertoire `qmk_firmware/docs`, ou si vous préférez utiliser des outils web, vous pouvez cliquer sur le bouton "Suggest An Edit" en haut de chaque page sur http://docs.qmk.fm/.
|
||||
|
||||
Lorsque vous donnez des exemples de code dans la documentation, essayez de suivre les conventions de nommage utilisées ailleurs dans la documentation. Par exemple, standardisez les enums en utilisant `my_layers` ou `my_keycodes` afin de garder une consistance:
|
||||
|
||||
```c
|
||||
enum my_layers {
|
||||
_FIRST_LAYER,
|
||||
_SECOND_LAYER
|
||||
};
|
||||
|
||||
enum my_keycodes {
|
||||
FIRST_LAYER = SAFE_RANGE,
|
||||
SECOND_LAYER
|
||||
};
|
||||
```
|
||||
|
||||
## Keymaps
|
||||
|
||||
La plupart des contributeurs débutants démarrent avec leurs keymaps personnelles. Nous essayons de garder les standards pour les keymaps pluôt simple (les keymaps reflètent, après tout, la personnalité de leurs créateurs) mais nous demandons que vous suiviez les directives suivantes afin que d'autres puissent découvrir et apprendre de votre keymap.
|
||||
|
||||
* Ecrivez un fichier `readme.md` en utilisant [la template](documentation_templates.md).
|
||||
* Tous les PR de keymaps doivent être "squashés", donc si la manière dont vos commits sont squashés vous est important, vous devez le faire vous-même.
|
||||
* Ne regroupez pas des fonctionnalités avec votre PR de keymap. Envoyez d'abord votre fonctionnalité, puis créez un second PR pour la keymap.
|
||||
* N'incluez pas de fichier `Makefile` dans votre dossier de keymap (ils ne sont plus utilisés)
|
||||
* Mettez à jour les copyrights dans les en-têtes de fichiers (cherchez `%YOUR_NAME%`)
|
||||
|
||||
## Claviers
|
||||
|
||||
Les claviers sont la raison d'être de QMK. Certains claviers sont maintenus par la communauté, alors que d'autre sont maintenus par les gens responsables de la création du clavier. Le fichier `readme.md` devrait vous informer de qui maintient le clavier. Si vous avez des questions concernant un clavier en particulier, vous pouvez [Ouvrir une issue](https://github.com/qmk/qmk_firmware/issues) et tagger le mainteneur dans votre question.
|
||||
|
||||
Nous vous demandons aussi que vous suiviez ces directives:
|
||||
|
||||
* Ecrivez un fichier `readme.md` en utilisant [le template](documentation_templates.md).
|
||||
* Gardez un nombre de commits raisonnable, ou nous squasherons votre PR.
|
||||
* Ne regroupez pas des fonctionnalités avec le PR pour votre clavier. Envoyez d'abord votre fonctionnalité, puis créez un second PR pour le clavier.
|
||||
* Appelez les fichiers `.c`/`.h` du nom du dossier parent, par exemple `/keyboards/<kb1>/<kb2>/<kb2>.[ch]`
|
||||
* N'incluez pas de fichier `Makefile` dans votre dossier de keymap (ils ne sont plus utilisés)
|
||||
* Mettez à jour les copyrights dans les en-têtes de fichiers (cherchez `%YOUR_NAME%`)
|
||||
|
||||
## Quantum/TMK Core
|
||||
|
||||
Faites attention d'être sûr d'implémenter votre nouvelle fonctionnalité de la meilleure manière qu'il soit avant d'investir beaucoup de travail à son développement. Vous pouvez apprendre les bases de QMK en lisant [Comprendre QMK](understanding_qmk.md), qui vous donnera une idée du flux du programme QMK. A partir de là, parlez nous afin de définir la meilleure façon d'implémenter votre idée. Il y a deux façons principale de le faire:
|
||||
|
||||
* [Chat sur Discord](https://discord.gg/Uq7gcHh)
|
||||
* [Ouvrir une Issue](https://github.com/qmk/qmk_firmware/issues/new)
|
||||
|
||||
Les PR de nouvelles fonctionnalités de de correction de bug affectent tous les claviers. Nous sommes aussi dans un processus de restructuration de QMK. Pour cette raison, il est absolument nécessaire que tout changement important ou significatif soit discuté avant que l'implémentation soit faite. Si vous ouvrez un PR sans nous avoir parlé, préparez-vous à faire des refontes significatives si vos changements ne sont pas compatibles avec ce que nous avons planifié.
|
||||
|
||||
Voici quelques choses à garder en tête lorsque vous travaillez sur une fonctionnalité ou un bug fix.
|
||||
|
||||
* **Désactivé par défaut** - la mémoire est plutôt limitée sur la plupart des puces que QMK supporte, et il est important que les keymaps courantes ne soient pas cassées. S'il vous plaît faites que vos features doivent être **activées** plutôt que désactivées. Si vous pensez qu'elle devrait être activée par défaut, ou que cela réduit la taille du code, parlez-nous-en.
|
||||
* **Compilez localement avant de soumettre** - Cela devrait aller sans dire, mais votre code doit compiler! Notre système Travis devrait relever les problèmes, mais il est généralement plus rapide de compiler quelques claviers en local plutôt que d'attendre le retour des résultats
|
||||
* **Faites attention aux révisions et différentes bases de puces** - beaucoup de claviers ont des révisions qui permettent des changements de configuration mineurs, voir des bases de chip différentes. Essayez de faire que votre fonctionnalité soit supportée à la fois sur ARM et AVR, ou désactivez-là automatiquement sur les plateformes non supportées.
|
||||
* **Expliquez votre fonctionnalité** - Documentez-là dans `docs/`, soit dans un nouveau fichier, ou dans une partie d'un fichier existant. Si vous ne la documentez pas, personne ne pourra bénéficier de votre dur labeur.
|
||||
|
||||
Nous vous demandons aussi de suivre ces directives:
|
||||
|
||||
* Gardez un nombre de commits raisonnable, ou nous squasherons votre PR.
|
||||
* Ne regroupez pas des claviers ou des keymaps avec des changements core. Soumettez vos changements core en premier.
|
||||
* Ecrivez des [Tests Unitaires](unit_testing.md) pour votre fonctionnalité.
|
||||
* Suivez le style du fichier que vous modifiez. Si le style n'est pas clair ou qu'il y a un mélange de fichiers, vous devriez vous conformer aux [conventions de codage](#coding-conventions) au dessus.
|
||||
|
||||
## Refactoriser
|
||||
|
||||
Afin de maintenir une vision claire sur comment les choses sont architectuées dans QMK, nous essayons de planifier des refactorisations en profondeur et qu'un collaborateur fasse le changement. Si vous avez une idée de refactorisation, ou une suggestion, [ouvrez une issue] [open an issue](https://github.com/qmk/qmk_firmware/issues), nous adorons discuter de comment améliorer QMK.
|
||||
|
||||
# Que veut dire le code de conduite pour moi?
|
||||
|
||||
Note [Code De Conduite](https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) veut dire que vous avez la responsabilité de traiter tout le monde dans le projet avec respect et courtoisie, peu importe leur identité. Si vous êtes victime d'une attitude ou de commentaires inappropriés, tels que décrit dans notre Code de Conduite, nous sommes là pour vous et nous ferons de notre mieux pour nous assurer que le fautif soit réprimandé, tel que décrit dans notre code.
|
239
docs/fr-FR/flashing.md
Normal file
239
docs/fr-FR/flashing.md
Normal file
@@ -0,0 +1,239 @@
|
||||
# Instructions pour flasher et informations sur les bootloader
|
||||
|
||||
Les claviers utilisent différents types de bootloaders et certains doivent être flashés différement. Heureusement, certains projets comme la [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) ont pour objectifs de permettre de flasher les différents bootloader sans trop se faire de soucis et ça peu importe les manières de les flasher.
|
||||
|
||||
Si vous avez un bootloader sélectionné avec la variable `BOOTLOADER` dans votre fichier `rules.mk` alors QMK vas automatiquement calculer si votre fichier .hex n'est pas trop grand pour être flashé sur votre appareil, et il affichera la taille finale du firmware. Pour vérifier la taille manuellement, vous pouvez aussi compiler le firmware avec l'option `check-size`. Exemple : `make planck/rev4:default:check-size`.
|
||||
|
||||
## DFU
|
||||
|
||||
Le bootloader pour les processeurs Atmel DFU est fourni par défaut sur tous les processeurs atmega32u4. Celui-ci est utilisé par beaucoup de claviers plus vieux que les OLKB et Clueboard qui ont leur propre ICs sur leurs PCBs. D'autres claviers utilisent le bootloader DFU de LUFA (ou son fork QMK), notamment les nouveaux claviers OLKB. Ce dernier ajoute des fonctionnalités spécifiques sur le matériel.
|
||||
|
||||
Pour vérifier la compatibilité avec le bootloader DFU, vérifiez que ce bloc de code est présent dans votre fichier `rules.mk`. Parfois il peut être inscrit `lufa-dfu` ou `qmk-dfu` à la place.
|
||||
|
||||
```make
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
```
|
||||
|
||||
Méthodes de flash compatibles :
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé)
|
||||
* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` avec QMK (outil en ligne de commande recommandé)
|
||||
* [Atmel's Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (non recommandé)
|
||||
|
||||
Ordre des actions :
|
||||
|
||||
1. Pressez le keycode `RESET`, ou appuyez sur le bouton physique RESET ou alors créez un contact entre RST et GND.
|
||||
2. Attendez que l'OS detecte l'appareil.
|
||||
3. Éffacez la mémoire, cela peut être fait automatiquement.
|
||||
4. Flasher le fichier .hex.
|
||||
5. Redémarrez l'appareil en mode « application », cela peut être fait automatiquement.
|
||||
|
||||
Alternativement :
|
||||
|
||||
make <keyboard>:<keymap>:dfu
|
||||
|
||||
### DFU QMK
|
||||
|
||||
QMK a un fork du bootloader LUFA DFU qui vous permet de faire un simple scan de la matrice pour quitter le bootloader et retourner à l'application. En même temps que le flash se produira, il est possible de faire flasher un led ou de produire un son via un haut parleur. Pour activer ces fonctionnalités, vous pouvez utiliser ce bloc dans votre fichier `config.h` (La touche permettant de quitter le bootloader a besoin d'être reliée entre les ports définis en INPUT et OUTPUT ici):
|
||||
|
||||
#define QMK_ESC_OUTPUT F1 // usually COL
|
||||
#define QMK_ESC_INPUT D5 // usually ROW
|
||||
#define QMK_LED E6
|
||||
#define QMK_SPEAKER C6
|
||||
|
||||
Le fabricant et le nom du produit proviennent de vos définitions dans fichier `config.h`, et la chaîne de caractère « bootloader » est ajoutée au nom du produit.
|
||||
|
||||
Pour génerer le bootloader, utilisez la cible `bootloader`. Exemple : `make planck/rev4:default:bootloader`.
|
||||
|
||||
Pour génerer un fichier .hex prêt pour la production qui contiendra tant l'application que le bootloader, utilisez la cible `production`. Exemple : `make planck/rev4:default:production`.
|
||||
|
||||
### Commandes DFU
|
||||
|
||||
Il y a plusieurs commandes DFU que vous pouvez utiliser pour flasher le firmware sur un appareil DFU.
|
||||
|
||||
* `:dfu` - C'est l'option normale qui attend qu'un appareil DFU soit disponible et qui flashe le firmware dès que c'est le cas. La vérification sera faite toutes les 5 secondes.
|
||||
* `:dfu-ee` - Cette option flash un fichier `.eep` à la place d'un fichier `.hex`. Ce cas est plutôt rare.
|
||||
* `:dfu-split-left` - Cette option flashe le firmware normal comme avec l'option (`:dfu`). Mais cela aussi flash le coté gauche du fichier EEPROM pour les claviers scindés. _C'est l'option idéale pour un clavier scindé basé sur le Elite C_
|
||||
* `:dfu-split-right` - Cette option flashe le firmware normal comme avec l'option (`:dfu`). Mais cela aussi flash le coté droite du fichier EEPROM pour les claviers scindés. _C'est l'option idéale pour un clavier scindé basé sur le Elite C_
|
||||
|
||||
## Caterina
|
||||
|
||||
Les cartes arduinos et leurs clones utilisent le [bootloader Caterina](https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/caterina) (tous les claviers utilisant un Pro Micro, ou un clone). Ils utilisent aussi le protocole avr109 pour communiquer en virtuellement en série (serial en anglais). Les bootloaders comme le [A-Star](https://www.pololu.com/docs/0J61/9) sont basés sur Caterina.
|
||||
|
||||
Pour vérifier la compatibilité avec un bootloader Caterina, vérifiez que ce bloc est présent dans votre fichier `rules.mk` :
|
||||
|
||||
```make
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = caterina
|
||||
```
|
||||
|
||||
Flashers compatibles :
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recommandée)
|
||||
* [avrdude](http://www.nongnu.org/avrdude/) avec avr109 / `:avrdude` (Outil en ligne de commande recommandé)
|
||||
* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS)
|
||||
|
||||
Séquence de flash :
|
||||
|
||||
1. Pressez la touche avec le keycode `RESET`, ou reliez les ports GND et RST. Vous n'avez que 7 secondes pour flasher une fois que l'opération a été faite.
|
||||
2. Attendez que l'OS détecte l'appareil.
|
||||
3. Flasher le fichier .hex.
|
||||
4. Attendez que l'appareil redémarre automatiquement.
|
||||
|
||||
ou, utilisez :
|
||||
|
||||
make <keyboard>:<keymap>:avrdude
|
||||
|
||||
#### Commandes Caterina
|
||||
|
||||
Il existe un certain nombre de commandes DFU que vous pouvez utiliser pour mettre à jour le firmware sur un périphérique DFU:
|
||||
|
||||
* `: avrdude` - Il s’agit de l’option normale. Le script va attendre qu’un appareil Caterina soit disponible. Dès que c’est le cas, il flash le firmware. Il attendra de détecter un nouveau port COM pour le flasher.
|
||||
* `: avrdude-loop` - Cela fonctionne de la même manière que`: avrdude`, mais une fois que chaque périphérique est flashé, il tentera de flasher à nouveau. Cela peut être utile pour flasher plusieurs claviers à la suite. _Cela implique de sortir manuellement de la boucle en appuyant sur Ctrl + C, Cmd + C ou un raccourci équivalent selon votre OS_
|
||||
* `: avrdude-split-left` - Cela fonctionne de la même manière que la fonction (`: avrdude`). Toutefois, cela permet aussi de flasher le coté gauche de l'EEPROM des claviers splittés / divisés. C'est donc la méthode recommandée pour les claviers splittés avec Pro Micro.
|
||||
* `: avrdude-split-right` - Cela fonctionne de la même manière que la fonction (`: avrdude`). Toutefois, cela permet aussi de flasher le coté droite de l'EEPROM des claviers splittés / divisés. C'est donc la méthode recommandée pour les claviers splittés avec Pro Micro.
|
||||
|
||||
## Halfkay
|
||||
|
||||
Halfkay est un protocole ultra-simple développé par PJRC qui utilise HID et qui est fourni avec tous les Teensys après le modèle 2.0.
|
||||
|
||||
Pour vérifier la compatibilité avec le booloader Halfkay, vérifiez que ce bloc est présent dans votre fichier `rules.mk` :
|
||||
|
||||
```make
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = halfkay
|
||||
```
|
||||
|
||||
Flasher compatibles :
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recomandée)
|
||||
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html) (petit utilitaire ultra simple)
|
||||
[Teensy Loader en ligne de commande](https://www.pjrc.com/teensy/loader_cli.html) (Outil en ligne de commande recommandé)
|
||||
|
||||
Séquence de flash :
|
||||
|
||||
1. Pressez la touche du keycode `RESET`, ou reliez les ports RST et GND rapidement. Vous avez ensuite 7 secondes pour réaliser le flash.
|
||||
2. Attendez que l'OS détecte l'appareil.
|
||||
3. Flasher le fichier .hex.
|
||||
4. Redémarrez l'appareil en mode « application ». Cela peut être fait automatiquement.
|
||||
|
||||
## USBasploader
|
||||
|
||||
USBasploader est un bootloader développé par matrixstorm. Il est utilisé sur des processeurs AVR non-USB comme le ATmega328P, qui fonctionne grâce à V-USB.
|
||||
|
||||
Pour vérifier la compatibilité avec le booloader USBasploader, vérifiez que ce bloc est présent dans votre fichier `rules.mk` :
|
||||
|
||||
```make
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = USBasp
|
||||
```
|
||||
|
||||
Flashers compatibles :
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recommandé)
|
||||
* [avrdude](http://www.nongnu.org/avrdude/) avec le programmeur `usbasp`.
|
||||
* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS)
|
||||
|
||||
Séquence de flash :
|
||||
|
||||
1. Pressez la touche du keycode `RESET`, ou reliez le port de boot pendant que RST et GND snt reliés. Cela doit être fait très rapidement.
|
||||
2. Attendez que l'OS détecte l'appareil.
|
||||
3. Flasher le fichier .hex.
|
||||
4. Redémarrez l'appareil en mode « application ». Cela peut être fait automatiquement.
|
||||
|
||||
## BootloadHID
|
||||
|
||||
BootloadHID est un bootloader pour les microcontrôleurs AVR. L'utilitaire de téleversement ne demande pas de drivers au niveau du kernel et peut être lancé sans installer aucune DLLs.
|
||||
|
||||
Pour vérifier la compatibilité avec le bootloader bootloadHID, vérifiez que ce bloc existe dans votre fichier `rules.mk` :
|
||||
|
||||
```make
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = bootloadHID
|
||||
```
|
||||
|
||||
Utilitaires de flash compatibles :
|
||||
|
||||
* [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash) (Utilitaire avec interface graphique recommandé)
|
||||
* [bootloadhid Command Line](https://www.obdev.at/products/vusb/bootloadhid.html) / `:BootloadHID` avec QMK (utilitaire en ligne de commande recommandé)
|
||||
|
||||
Séquence de flash
|
||||
|
||||
1. Entrez dans le bootloader en utilisant l'une de ces méthodes :
|
||||
* Pressez la touche du keycode `RESET` (Cela ne fonctionnera pas sur certains appareils).
|
||||
* Verrouillez la touche « Salt » tout en branchant le clavier (Généralement ce principe est documenté dans le fichier readme du clavier)
|
||||
2. Attendez que l'OS détecte l'appareil.
|
||||
3. Flasher le fichier .hex.
|
||||
4. Redémarrez l'appareil en mode « application ». Cela peut être fait automatiquement.
|
||||
|
||||
Ou alors :
|
||||
|
||||
make <keyboard>:<keymap>:bootloadHID
|
||||
|
||||
## STM32
|
||||
|
||||
Tous les processeurs STM32 contiennent un bootloader installé en usine qui ne peut pas être modifié ou supprimé. Certains processeurs STM32 ont des bootloaders qui ne peuvent pas être programmés par USB (ex : STM32F103) mais le processus reste le même.
|
||||
|
||||
Pour le moment, aucune variable `BOOTLOADER` n'est nécessaire dans le fichier `rules.mk`.
|
||||
|
||||
Flashers compatibles :
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé)
|
||||
* [dfu-util](https://github.com/Stefan-Schmidt/dfu-util) / `:dfu-util` (utilitaire en ligne de commande recommandé)
|
||||
|
||||
Séquence pour flasher:
|
||||
|
||||
1. Entrez dans le bootloader en utilisant l'une de ces méthodes :
|
||||
* Utilisez une touche sur laquelle le keycode `RESET` (Cela peut ne pas fonctionner sur les appareils STM32F042)
|
||||
* Si un circuit de réinitialisation (Reset) est présent alors utilisé le bouton qui lui est dédié.
|
||||
* Autrement, vous devez réaliser une liaison entre BOOT0 et VCC (en appuyant sur le bouton ou à l'aide d'un pont) puis faire un pont entre RESET et GND et enfin relacher le pont BOOT0.
|
||||
2. Attendre que l'os détecte l'appareil.
|
||||
3. Flasher un fichier `.bin`.h
|
||||
* Vous allez recevoir un avertissement à propos de la signature DFU. Ignorez-la.
|
||||
4. Réinitialisez l'appareil en mode « application ». Cela peut être fait automatiquement.
|
||||
* Si vous êtes en train de travailler en ligne de commande, par exemple avec un `make planck/rev6:default:dfu-util` alors soyez bien sur que l'argument `:leave` est passé aux arguments DFU grâce à la variable `DFU_ARGS` à l'intérieur de votre fichier `rules.mk` (Ex : `DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`) afin que votre appareil redémarre après avoir été flashé.
|
||||
|
||||
### Commandes STM32
|
||||
|
||||
Il y a différentes commandes que vous pouvez utiliser pour flasher un firmware dans un appareil STM32 :
|
||||
|
||||
* `:dfu-util` - C'est l'option standard pour flasher un appareil STM32. Le script attendra qu'un bootloader STM32 soit présent.
|
||||
* `:dfu-util-split-left` - Permet de flasher un firmware normalement, tout comme l'option précédente mais permet de configurer le côté gauche des paramètres EEPROM sur un clavier scindé.
|
||||
* `:dfu-util-split-right` - Permet de flasher un firmware normalement, tout comme l'option précédente mais permet de configurer le côté droit des paramètres EEPROM sur un clavier scindé.
|
||||
* `:st-link-cli` - Cela permet de flasher le firmware avec l'utilitaire en ligne de commande ST-LINK's plutôt que d'utiliser dfu-util.
|
15
docs/fr-FR/getting_started_getting_help.md
Normal file
15
docs/fr-FR/getting_started_getting_help.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Trouver de l'aide
|
||||
|
||||
Il y a beaucoup de ressources pour trouver de l'aide avec QMK.
|
||||
|
||||
## Chat temps-réel
|
||||
|
||||
Vous trouverez des développeurs QMK et des utilisateurs sur notre [Serveur Discord](https://discord.gg/Uq7gcHh) principal. Il y a des canaux spécifiques dans le serveur pour discuter des firmwares, toolbox, hardware et configurateurs.
|
||||
|
||||
## Sous-Reddit OLKB
|
||||
|
||||
Le forum officiel de QMK est [/r/olkb](https://reddit.com/r/olkb) sur [reddit.com](https://reddit.com).
|
||||
|
||||
## Tickets GitHub
|
||||
|
||||
Vous pouvez ouvrir un [ticket sur GitHub](https://github.com/qmk/qmk_firmware/issues). Ceci est spécialement pratique lorsque votre problème demande une discussion sur le long terme ou un débugage.
|
61
docs/fr-FR/getting_started_github.md
Normal file
61
docs/fr-FR/getting_started_github.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# Comment utiliser GitHub avec QMK
|
||||
|
||||
GitHub peut être un peu compliqué pour ceux qui n'y sont pas familier. Ce guide va vous expliquer chaque étape de "fork", clone et envoi d'un pull request avec QMK.
|
||||
|
||||
?> Ce guide part du principe que vous êtes suffisamment à l'aise pour envoyer commandes sur la ligne de commande et que vous avez Git installé sur votre système.
|
||||
|
||||
Commencez par la [page GitHub de QMK](https://github.com/qmk/qmk_firmware), et vous verrez un bouton dans le coin en haut à droite qui indique "Fork":
|
||||
|
||||

|
||||
|
||||
Si vous faites partie d'une organisation, vous aurez besoin de savoir quel compte utiliser pour le fork. Dans la plupart des cas, vous voudrez créer le fork dans votre compte personnel. Une fois le fork complet (cela peut quelques fois prendre un peu de temps), appuyez sur le bouton "Clone or download":
|
||||
|
||||

|
||||
|
||||
Faites attention à sélectionner "HTTPS", et sélectionnez le lien et copiez-le:
|
||||
|
||||

|
||||
|
||||
Ensuite, entrez `git clone` dans la ligne de commande, et collez votre lien:
|
||||
|
||||
```
|
||||
user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git
|
||||
Cloning into 'qmk_firmware'...
|
||||
remote: Counting objects: 46625, done.
|
||||
remote: Compressing objects: 100% (2/2), done.
|
||||
remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623
|
||||
Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done.
|
||||
Resolving deltas: 100% (29362/29362), done.
|
||||
Checking out files: 100% (2799/2799), done.
|
||||
```
|
||||
|
||||
Vous avez maintenant votre fork QMK sur votre machine locale, vous pouvez ajouter votre keymap, la compiler et la flasher sur votre board. Une fois heureux avec vos changements, vous pouvez les ajouter, commit, et pousser vers votre fork comme suit:
|
||||
|
||||
```
|
||||
user@computer:~$ git add .
|
||||
user@computer:~$ git commit -m "adding my keymap"
|
||||
[master cccb1608] adding my keymap
|
||||
1 file changed, 1 insertion(+)
|
||||
create mode 100644 keyboards/planck/keymaps/mine/keymap.c
|
||||
user@computer:~$ git push
|
||||
Counting objects: 1, done.
|
||||
Delta compression using up to 4 threads.
|
||||
Compressing objects: 100% (1/1), done.
|
||||
Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done.
|
||||
Total 1 (delta 1), reused 0 (delta 0)
|
||||
remote: Resolving deltas: 100% (1/1), completed with 1 local objects.
|
||||
To https://github.com/whoeveryouare/qmk_firmware.git
|
||||
+ 20043e64...7da94ac5 master -> master
|
||||
```
|
||||
|
||||
Vos changements existent maintenant dans votre fork sur GitHub. Si vous allez à cette adresse (`https://github.com/<whoeveryouare>/qmk_firmware`), vous pouvez créer un nouveau "Pull Request" en cliquant sur ce bouton:
|
||||
|
||||

|
||||
|
||||
Maintenant, vous pourrez voir exactement ce que vous avez commité. Si ça vous semble bien, vous pouvez le finaliser en cliquant sur "Create Pull Request":
|
||||
|
||||

|
||||
|
||||
Une fois transmis, nous pourrons vous parler de vos changements, vous demander de faire des changements, et éventuellement de les accepter!
|
||||
|
||||
Merci de contribuer à QMK :)
|
62
docs/fr-FR/getting_started_introduction.md
Normal file
62
docs/fr-FR/getting_started_introduction.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# Introduction
|
||||
|
||||
Le but de cette page est d'expliquer les informations de base qui vous serons nécessaire pour travailler sur le projet QMK. Il a pour pré-requis que vous soyez familier à la navigation à l'aide d'un shell Unix, mais ne s'attend pas à ce que vous soyez familier avec C ou la compilation en utilisant make.
|
||||
|
||||
## Structure de base de QMK
|
||||
|
||||
QMK est un fork du projet [tmk_keyboard](https://github.com/tmk/tmk_keyboard) créé par [Jun Wako](https://github.com/tmk). Le code originel de TMK, avec quelques modifications, se trouve dans le dossier `tmk`. Les additions que QMK amène au projet se trouvent dans le dossier `quantum`. Les projets de clavier se trouvent dans les dossiers `handwired` et `keyboard`.
|
||||
|
||||
### Structure du Userspace
|
||||
|
||||
Dans le dossier `users` se trouve un répertoire pour chaque utilisateur. C'est un endroit où les utilisateurs peuvent mettre du code qui serait partagé entre plusieurs claviers. Merci de lire la documentation [Fonctionnalité Userspace](feature_userspace.md) pour plus d'information.
|
||||
|
||||
### Structure du projet clavier
|
||||
|
||||
Dans le dossier `keyboards`, son sous-dossier `handwired` et ses sous-dossiers pour les revendeurs et fabriquants (par exemple `clueboard`) se trouve un répertoire pour chaque projet clavier. Par exemple `qmk_firmware/keyboards/clueboard/2x1800`.
|
||||
|
||||
A l'intérieur, vous trouverez la structure suivante:
|
||||
|
||||
* `keymaps/`: différentes keymaps qui peuvent être compilées
|
||||
* `rules.mk`: Ce fichier définit les options "make" par défaut. Ne modifiez pas ce fichier directement, utilisez à la place un `rules.mk` spécifique à la keymap.
|
||||
* `config.h`: Ce fichier définit les options de compilation par défaut. Ne modifiez pas ce fichier directement, utilisez à la place un `config.h` spécifique à la keymap.
|
||||
* `info.json`: Le fichier utilisé pour définir les options de layout de QMK Configurator. Voyez [Support Configurator](reference_configurator_support.md) pour plus d'information.
|
||||
* `readme.md`: une brève description du clavier.
|
||||
* `<keyboardName>.h`: Ce fichier définit le layout du fichier par rapport à la matrice de commutation.
|
||||
* `<keyboardName>.c`: Ce fichier définit du code custom pour le clavier.
|
||||
|
||||
Pour plus d'information sur la structure du projet, voyez [Directives clavier QMK](hardware_keyboard_guidelines.md).
|
||||
|
||||
### Structure d'une Keymap
|
||||
|
||||
Dans chaque dossier keymap, vous allez trouver les fichiers suivants. Seul le fichier `keymap.c` est nécessaire, et si le reste des fichiers n'existent pas, les options par défaut seront choisies.
|
||||
|
||||
* `config.h`: les options de configuration de votre keymap
|
||||
* `keymap.c`: tout le code de votre keymap, requis
|
||||
* `rules.mk`: les features de QMK qui sont activées
|
||||
* `readme.md`: une description de votre keymap, comment d'autres l'utiliseront, et des explications des fonctionnalités. Uploadez les images vers un service comme imgur.
|
||||
|
||||
# Le fichier `config.h`
|
||||
|
||||
Le fichier `config.h` peut être mis à 3 endroits:
|
||||
|
||||
* keyboard (`/keyboards/<keyboard>/config.h`)
|
||||
* userspace (`/users/<user>/config.h`)
|
||||
* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/config.h`)
|
||||
|
||||
Le système de compilation cherche automatiquement les fichiers de configuration dans l'ordre au-dessus. Si vous souhaitez surcharger une configuration définie par un `config.h` précédent, vous devrez d'abord ajouter le code suivant.
|
||||
|
||||
```
|
||||
#pragma once
|
||||
```
|
||||
|
||||
Ensuite, pour surcharger l'option du fichier `config.h` précédent, vous devez `#undef` puis `#define` l'option à nouveau.
|
||||
|
||||
Voici à quoi l'ensemble du code ressemble une fois regroupé:
|
||||
|
||||
```
|
||||
#pragma once
|
||||
|
||||
// overrides go here!
|
||||
#undef MY_SETTING
|
||||
#define MY_SETTING 4
|
||||
```
|
23
docs/fr-FR/newbs.md
Normal file
23
docs/fr-FR/newbs.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Le Guide pour débutant complet à QMK
|
||||
|
||||
QMK est un firmware Open Source pour votre clavier mécanique. Vous pouvez utiliser QMK pour customiser votre clavier de manière simple et puissante. Tout le monde, du débutant complet au développeur avancé, ont utilisé avec succès QMK pour customiser leur clavier. Ce guide vous aidera à faire de même, quelles que soient vos compétences.
|
||||
|
||||
Vous voulez savoir si votre clavier peut utiliser QMK? Si c'est un clavier mécanique que vous avez vous-même construit, il y a de bonnes chances que vous pouvez. Nous supportons un [grand nombre de "hobbyist boards"](http://qmk.fr/keyboards), donc même si votre clavier ne peut pas utiliser QMK, vous ne devriez pas avoir trop de problème pour en trouver un qui vous convienne.
|
||||
|
||||
## Vue d'ensemble
|
||||
|
||||
Il y a 7 sections principales dans ce guide:
|
||||
|
||||
* [Pour débuter](fr-FR/newbs_getting_started.md)
|
||||
* [Compiler votre premier firmware en utilisant la ligne de commande](fr-FR/newbs_building_firmware.md)
|
||||
* [Compiler votre premier firmware en utilisant l'interface graphique en ligne](fr-FR/newbs_building_firmware_configurator.md)
|
||||
* [Flasher le Firmware](fr-FR/newbs_flashing.md)
|
||||
* [Test et Débuggage](fr-FR/newbs_testing_debugging.md)
|
||||
* [Bonnes pratiques Git](fr-FR/newbs_best_practices.md)
|
||||
* [Ressources d'apprentissage](fr-FR/newbs_learn_more_resources.md)
|
||||
|
||||
Ce guide a pour but principal d'aider quelqu'un qui n'a jamais compilé de logiciel avant. Les recommandations et les choix qu'il contient vont donc dans ce sens. Il y a des méthodes alternatives pour beaucoup de ces procédures, et nous supportons la plupart de ces alternatives. Si vous avez un doute sur comment accomplir une tâche, vous pouvez [nous demander de l'aide](fr-FR/getting_started_getting_help.md).
|
||||
|
||||
## Ressources additionnelles
|
||||
|
||||
* [Thomas Baart's QMK Basics Blog](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – Un blog créé par un utilisateur qui couvre les bases de l'utilisation du Firmware QMK, vue d'un point de vue d'un nouvel utilisateur (anglais).
|
161
docs/fr-FR/newbs_best_practices.md
Normal file
161
docs/fr-FR/newbs_best_practices.md
Normal file
@@ -0,0 +1,161 @@
|
||||
# Bonnes Pratiques
|
||||
|
||||
## Ou, "Comment j'ai appris à ne plus m'en faire et aimer Git."
|
||||
|
||||
Ce document a pour but d'apprendre aux novices les meilleures solutions pour faciliter la contribution à QMK. Nous allons étudier le processus de contribution à QMK, détaillant quelques moyens de rendre cette tâche plus simple. Nous allons faire quelques erreurs afin de vous apprendre à les résoudre.
|
||||
|
||||
Ce document suppose les choses suivantes:
|
||||
|
||||
1. Vous avez un compte GitHub, et avez [créé un "fork" pour le dépôt qmk_firmware](fr-FR/getting_started_github.md) avec votre compte.
|
||||
2. Vous avez [configuré votre environnement de compilation](fr-FR/newbs_getting_started.md?id=environment-setup).
|
||||
|
||||
## La branche master de votre fork: Mettre à jour souvent, ne jamais commit
|
||||
|
||||
Il est hautement recommandé pour le développement de QMK, peu importe ce qui est fait ou où, de garder votre branche `master` à jour, mais de ne ***jamais*** commit dessus. A la place, faites tous vos changements dans une branche de développement et crééz des "pull requests" de votre branche lorsque vous développez.
|
||||
|
||||
Pour réduire les chances de conflits de fusion (merge) — des cas où deux ou plus d'utilisateurs ont édité la même section d'un fichier en parallèle — gardez votre branche `master` relativement à jour et démarrez chaque nouveau développement en créant une nouvelle branche.
|
||||
|
||||
### Mettre à jour votre branche master
|
||||
|
||||
Pour garder votre branche `master` à jour, il est recommandé d'ajouter le dépôt du firmware QMK comme un dépôt distant (remote) dans git. pour se faire, ouvrez votre interface de ligne de commande Git et entrez:
|
||||
|
||||
```bash
|
||||
git remote add upstream https://github.com/qmk/qmk_firmware.git
|
||||
```
|
||||
|
||||
Pour vérifier que le dépôt a bien été ajouté, lancez la commande `git remote -v`, qui devrait retourner le résultat suivant:
|
||||
|
||||
```bash
|
||||
$ git remote -v
|
||||
origin https://github.com/<your_username>/qmk_firmware.git (fetch)
|
||||
origin https://github.com/<your_username>/qmk_firmware.git (push)
|
||||
upstream https://github.com/qmk/qmk_firmware.git (fetch)
|
||||
upstream https://github.com/qmk/qmk_firmware.git (push)
|
||||
```
|
||||
|
||||
Maintenant que c'est fait, vous pouvez vérifier les mises à jour au dépôt en lançant `git fetch upstream`. Cela récupère les branches et les tags — appelé de manière générale "refs" — du dépôt QMK, qui a maintenant le surnom `upstream`. Nous pouvons maintenant comparer les données sur notre "fork" `origin` à celles contenues par QMK.
|
||||
|
||||
Pour mettre à jour la branche master de votre "fork", lancez les commandes suivantes (en appuyant sur Enter après chaque ligne):
|
||||
|
||||
```bash
|
||||
git checkout master
|
||||
git fetch upstream
|
||||
git pull upstream master
|
||||
git push origin master
|
||||
```
|
||||
|
||||
Cela vous change la branche courante en master, synchronise les données de références du dépôt QMK vers votre ordinateur. La commande pull tire les données de références vers votre branche courante puis les y téleverse. La commande push permet de pousser la branche courante (master) vers votre fork github.
|
||||
|
||||
### Faire des changements
|
||||
|
||||
Pour faire des changements, créez une nouvelle branche en entrant:
|
||||
|
||||
```bash
|
||||
git checkout -b dev_branch
|
||||
git push --set-upstream origin dev_branch
|
||||
```
|
||||
|
||||
Ceci crée une branche nommée `dev_branch`, bascule vers cette branche, et ensuite sauvegarde cette nouvelle branche vers votre fork. L'argument `--set-upstream` demande à git d'utiliser votre fork et la branche `dev_branch` à chaque fois que vous utilisez `git push` ou `git pull` depuis cette branche. Vous ne devez l'utiliser que pour le premier "push", après cela, vous pouvez utiliser simplement `git push` ou `git pull`, sans le reste des arguments.
|
||||
|
||||
!> Avec `git push`, vous pouvez utiliser `-u` à la place de `--set-upstream` — `-u` est un alias pour `--set-upstream`.
|
||||
|
||||
Vous pouvez appeler votre branche à peu près comme vous voulez, toutefois il est recommandé d'utiliser un nom qui est lié aux changements que vous allez faire.
|
||||
|
||||
Par défaut, `git checkout -b` va faire de la branche actuelle la branche de base de votre nouvelle branche. Vous pouvez définir la base de votre nouvelle branche comme étant n'importe quelle branche existante qui n'est pas la courante en utilisant la commande:
|
||||
|
||||
```bash
|
||||
git checkout -b dev_branch master
|
||||
```
|
||||
|
||||
Maintenant que vous avez une branche de développement, ouvrez votre éditeur de texte et faites vos changements. Il est recommandé de faire beaucoup de petits commits dans votre branche. Ainsi, un changement qui crée un problème peut être plus facilement retracé et annulé si nécessaire. Pour faire un changement, éditez et sauvez n'importe quel fichier qui doit être mis à jour, ajoutez les à la *zone de staging* de Git, et commitez les vers votre branche:
|
||||
|
||||
```bash
|
||||
git add path/to/updated_file
|
||||
git commit -m "My commit message."
|
||||
```
|
||||
|
||||
`git add` ajoute les fichiers qui ont été changés dans la *zone de staging* de Git, qui est sa "zone de chargement". Elle contient tous les changements qui vont être *validés* (committed) par `git commit`, qui sauvegarde les changements vers le dépôt. Utilisez des messages de validation descriptifs afin que vous puissiez savoir ce qui a changé d'un coup d'oeil.
|
||||
|
||||
!> Si vous changez beaucoup de fichiers, mais tous les fichiers font partie du même changement, vous pouvez utiliser `git add .` pour ajouter tous les fichiers changés dans le répertoire courant, plutôt que d'avoir à ajouter chaque fichier individuellement.
|
||||
|
||||
### Publier Vos Changements
|
||||
|
||||
La dernière étape est de pousser vos changements vers votre fork. Pour ce faire, entrez `git push`. Git publie maintenant l'état courant de `dev_branch` vers votre fork.
|
||||
|
||||
## Résoudre Les Conflits De Merge
|
||||
|
||||
Parfois, lorsque votre travail sur une branche met beaucoup de temps à se compléter, des changements réalisés par d'autres peuvent entrer en conflit avec les changements que vous avez fait sur votre branche au moment où vous avez ouvert un pull request. Ceci est appelé un *conflit de merge*, et c'est ce qui arrive lorsque plusieurs personnes modifient les mêmes parties de mêmes fichiers.
|
||||
|
||||
### Rebaser Vos Changements
|
||||
|
||||
Un *rebase* est la manière pour Git de prendre les changements qui ont été faits à un point, les annuler, et les réappliquer sur un autre point. Dans le cas d'un conflit de merge, vous pouvez rebaser votre branche pour récupérer les changements qui ont été faits entre le moment où vous avez créé votre branche et le présent.
|
||||
|
||||
Pour démarrer, lancez les commandes suivantes:
|
||||
|
||||
```bash
|
||||
git fetch upstream
|
||||
git rev-list --left-right --count HEAD...upstream/master
|
||||
```
|
||||
|
||||
La commande `git rev-list` retourne le nombre de commits qui diffère entre la branche courante et la branche master de QMK. Nous lançons `git fetch` en premier afin d'être sûr que les refs qui représentent l'état courant du dépôt upstream soient à jour. Le résultat de la commande `git rev-list` retourne deux nombres:
|
||||
|
||||
```bash
|
||||
$ git rev-list --left-right --count HEAD...upstream/master
|
||||
7 35
|
||||
```
|
||||
|
||||
Le premier nombre représente combien il y a eu de commits sur la branche courante depuis qu'elle a été créée, et le second nombre est combien de commits ont été faits sur la branche `upstream/master` depuis que la branche a été créée et, ainsi, les changements qui ne sont pas enregistrés sur la branche courante.
|
||||
|
||||
Maintenant que l'état actuel de la branche courante et la branche upstream sont connus, nous pouvons maintenant démarrer une opération de rebase:
|
||||
|
||||
```bash
|
||||
git rebase upstream/master
|
||||
```
|
||||
|
||||
Ceci dit à Git d'annuler les commits de la branche courante puis de les réappliquer sur la branche master de QMK.
|
||||
|
||||
```bash
|
||||
$ git rebase upstream/master
|
||||
First, rewinding head to replay your work on top of it...
|
||||
Applying: Commit #1
|
||||
Using index info to reconstruct a base tree...
|
||||
M conflicting_file_1.txt
|
||||
Falling back to patching base and 3-way merge...
|
||||
Auto-merging conflicting_file_1.txt
|
||||
CONFLICT (content): Merge conflict in conflicting_file_1.txt
|
||||
error: Failed to merge in the changes.
|
||||
hint: Use 'git am --show-current-patch' to see the failed patch
|
||||
Patch failed at 0001 Commit #1
|
||||
|
||||
Resolve all conflicts manually, mark them as resolved with
|
||||
"git add/rm <conflicted_files>", then run "git rebase --continue".
|
||||
You can instead skip this commit: run "git rebase --skip".
|
||||
To abort and get back to the state before "git rebase", run "git rebase --abort".
|
||||
```
|
||||
|
||||
Ceci nous dit que nous avons un conflit de merge, et nous donne le nom du fichier en conflit. Ouvrez le fichier conflictuel dans votre éditeur de texte et, quelque part dans le fichier, vous trouverez quelque chose comme ça:
|
||||
|
||||
```bash
|
||||
<<<<<<< HEAD
|
||||
<p>For help with any issues, email us at support@webhost.us.</p>
|
||||
=======
|
||||
<p>Need help? Email support@webhost.us.</p>
|
||||
>>>>>>> Commit #1
|
||||
```
|
||||
|
||||
La ligne `<<<<<<< HEAD` montre le début d'un conflit de merge et la ligne `>>>>>>> Commit #1` indique la fin, avec les sections conflictuelles séparées par `=======`. La partie du côté `HEAD` vient de la version du fichier provenant de la branche master de QMK, et la partie marquée avec le numéro du commit provient de la branche courrante.
|
||||
|
||||
Parce que Git suis *les changements des fichiers*, plutôt que les contenus des fichiers directement, si Git ne peut pas trouver le texte qu'il y avait dans le fichier avant que le commit soit fait, il ne saura pas comment modifier le fichier. Modifier le fichier à nouveau va résoudre le conflit. Faites votre changement, et sauvez le fichier.
|
||||
|
||||
```bash
|
||||
<p>Need help? Email support@webhost.us.</p>
|
||||
```
|
||||
|
||||
Maintenant, lancez:
|
||||
|
||||
```bash
|
||||
git add conflicting_file_1.txt
|
||||
git rebase --continue
|
||||
```
|
||||
|
||||
Git enregistre le changement dans le fichier conflictuel, et continue à appliquer les commits depuis votre branche jusqu'à ce qu'il arrive à la fin.
|
81
docs/fr-FR/newbs_building_firmware.md
Normal file
81
docs/fr-FR/newbs_building_firmware.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# Compiler Votre Premier Firmware
|
||||
|
||||
Maintenant que vous avez configuré votre environnement de build, vous être prêts à compiler un firmware customisé. Pour cette section, nous allons utiliser trois programmes différents: votre explorateur de fichier, votre éditeur de texte et votre fenêtre de terminal. Gardez les 3 ouverts jusqu'à ce que vous ayez terminé et soyez content de votre firmware de clavier.
|
||||
|
||||
Si vous avez fermé et rouvert votre fenêtre de terminal depuis le démarrage de ce guide, n'oubliez pas de `cd qmk_firmware` afin que votre terminal soit dans le bon répertoire.
|
||||
|
||||
## Naviguez vers votre répertoire keymaps
|
||||
|
||||
Démarrez par naviguer dans le répertoire `keymaps` de votre clavier.
|
||||
|
||||
?> Si vous êtes sous macOS ou Windows, il y a des commandes que vous pouvez utiliser pour facilement ouvrir le dossier keymaps.
|
||||
|
||||
?> macOS:
|
||||
|
||||
open keyboards/<keyboard_folder>/keymaps
|
||||
|
||||
?> Windows:
|
||||
|
||||
start .\\keyboards\\<keyboard_folder>\\keymaps
|
||||
|
||||
## Créez une copie de la keymap `default`
|
||||
|
||||
Une fois le dossier `keymaps` ouvert, créez une copie du répertoire `default`. Nous vous recommandons de nommer ce répertoire de la même manière que votre nom d'utilisateur GitHub. Vous pouvez aussi utiliser le nom que vous voulez, tant qu'il contient uniquement des lettres minuscules, des nombres et le caractère souligné (_).
|
||||
|
||||
Afin d'automatiser ce processus, vous avez aussi l'option de lancer le script `new_keymap.sh`.
|
||||
|
||||
Naviguez vers le répertoire `qmk_firmware/util` et tapez ce qui suit:
|
||||
|
||||
```
|
||||
./new_keymap.sh <keyboard path> <username>
|
||||
```
|
||||
|
||||
Par exemple, pour un utilisateur s'appeleant John, essayant de créer une nouvelle keymap pour le 1up60hse, il taperait:
|
||||
|
||||
```
|
||||
./new_keymap.sh 1upkeyboards/1up60hse john
|
||||
```
|
||||
|
||||
## Ouvrez `keymap.c` dans votre éditeur de texte préféré
|
||||
|
||||
Ouvrez votre fichier `keymap.c`. Dans ce fichier, vous trouverez la structure qui contrôle comment votre clavier se comporte. En haut du fichier `keymap.c` il peut y avoir quelques `defines` et `enums` qui rendent la keymap plus simple à lire. Plus bas, vous trouverez une ligne telle que celle-ci:
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
Cette ligne indique le début d'une liste de calques (layers). En dessous, vous trouverez des lignes contenant soit `LAYOUT`, soit `KEYMAP` et ces lignes indiquent le début d'un calque. En dessous de cette ligne se trouve la liste des touches qui comprennent ce calque particulier.
|
||||
|
||||
!> Lorsque vous éditez votre fichier keymap, faites attention à ne pas ajouter ou enlever une virgule. Si vous le faites, vous aller empêcher votre firmware de compiler et il ne sera pas facile de trouver où la virgule est manquante ou en trop.
|
||||
|
||||
## Customisez le layout à votre goût
|
||||
|
||||
Libre à vous de choisir comment compléter cette étape. Faites le petit changement qui vous dérange ou retravaillez tout de zéro. Vous pouvez supprimer des calques si vous ne les utilisez pas tous, ou ajouter des calques jusqu'à un maximum de 32. Vérifiez la documentation suivante pour trouver ce que vous pouvez définir ici:
|
||||
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Fonctionnalités](features.md)
|
||||
* [FAQ](faq.md)
|
||||
|
||||
?> Lorsque vous découvrez comment des keymaps fonctionnent, faites de petits changements. De gros changements rendent le débuggage des problèmes éventuels plus difficile.
|
||||
|
||||
## Compilez votre firmware
|
||||
|
||||
Lorsque les changements de votre keymap sont complets, vous allez devoir compiler le firmware. Pour ce faire, retournez à votre terminal et lancez la commande de compilation:
|
||||
|
||||
make <my_keyboard>:<my_keymap>
|
||||
|
||||
Par exemple, si votre keymap s'appelle "xyverz" et vous compilez une keymap pour une plank rev5, vous allez utiliser cette commande:
|
||||
|
||||
make planck/rev5:xyverz
|
||||
|
||||
Durant la compilation, vous allez avoir beaucoup de messages sur l'écran vous informant de quels fichiers sont en train d'être compilés. Il devrait se terminer avec des messages qui ressemblent comme suit:
|
||||
|
||||
```
|
||||
Linking: .build/planck_rev5_xyverz.elf [OK]
|
||||
Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
|
||||
Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
|
||||
Checking file size of planck_rev5_xyverz.hex [OK]
|
||||
* File size is fine - 18392/28672
|
||||
```
|
||||
|
||||
## Flasher votre firmware
|
||||
|
||||
Allez sur la page [Flasher le firmware](fr-FR/newbs_flashing.md) pour apprendre comment écrire votre nouveau firmware sur votre clavier.
|
105
docs/fr-FR/newbs_building_firmware_configurator.md
Normal file
105
docs/fr-FR/newbs_building_firmware_configurator.md
Normal file
@@ -0,0 +1,105 @@
|
||||
# Configurateur de QMK
|
||||
|
||||
Le [Configurateur de QMK](https://config.qmk.fm) est une interface graphique en ligne permettant de générer des fichiers "hex" du firmware de QMK.
|
||||
|
||||
?> **S'il vous plaît, suivez les étapes suivantes dans l'ordre.**
|
||||
|
||||
Regardez le [Tutoriel vidéo](https://youtu.be/tx54jkRC9ZY)
|
||||
|
||||
Le configurateur de QMK fonctionne mieux avec Chrome et Firefox.
|
||||
|
||||
!> **Les fichiers d'autres outils, tels que KLE ou kbfirmware ne seront pas compatibles avec le configurateur QMK. Ne les chargez pas, ne les importez pas. Le configurateur QMK est un outil DIFFERENT.**
|
||||
|
||||
## Sélectionner votre clavier
|
||||
|
||||
Cliquez la boîte déroulante et sélectionnez le clavier pour lequel vous voulez créer une keymap.
|
||||
|
||||
?> Si votre clavier a plusieurs versions, faites attention à utiliser la bonne.
|
||||
|
||||
Je vais le répéter, parce que c'est important
|
||||
|
||||
!> **FAITES ATTENTION A UTILISER LA BONNE VERSION !**
|
||||
|
||||
Si votre clavier est annoncé comme fonctionnant grâce à QMK mais n'est pas dans la liste, il y a des chances que le développeur ne l'ait pas encore fait, ou que nous n'avons pas encore eu le temps de le merger. Ajoutez un problème (issue) sur [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) demandant le support de votre clavier, s'il n'y a pas de [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) ouvert pour lui. Il y a aussi des claviers alimentés par QMK qui sont sur le compte GitHub du fabricant, il est bon de le vérifier aussi.
|
||||
|
||||
## Sélectionner la disposition de votre clavier
|
||||
|
||||
Choisissez la disposition (layout) qui représente le mieux la keymap que vous voulez créer. Certains claviers n'ont pas encore assez de dispositions ou des dispositions incorrectes. Ils seront supportés dans le future.
|
||||
|
||||
## Nom de la Keymap
|
||||
|
||||
Appelez cette keymap comme vous voulez.
|
||||
|
||||
?> Si vous rencontrez des problèmes lors de la compilation, il peut être utile de changer ce nom, il peut déjà exister dans le dépôt du firmware QMK.
|
||||
|
||||
## Créer votre keymap
|
||||
|
||||
Entrer un keycode peut s'accomplir de 3 façons différentes.
|
||||
|
||||
1. Glisser déposer
|
||||
2. Cliquer sur un endroit vide sur le layout et cliquer sur le keycode souhaité
|
||||
3. Cliquer sur un endroit vide sur le layout et appuyer sur une touche physique de votre clavier.
|
||||
|
||||
Passez votre souris au dessus d'une touche et un affichage vous dira quel est le rôle du keycode. Pour une version plus verbeuse suivre:
|
||||
|
||||
[Référence Keycode basique](https://docs.qmk.fm/#/keycodes_basic)
|
||||
[Référence Keycode avancé](https://docs.qmk.fm/#/feature_advanced_keycodes)
|
||||
|
||||
Dans le cas où vous ne trouvez pas une disposition qui supporte votre keymap, par exemple trois places pour une barre d'espace, ou deux places pour retour clavier, ou deux places pour shift, etc. etc. remplissez les TOUTES.
|
||||
|
||||
### Exemples
|
||||
|
||||
3 places pour la barre d'espace: Remplissez les TOUTES avec la barre d'espace
|
||||
|
||||
2 places pour un retour clavier: Remplissez les DEUX avec un retour clavier
|
||||
|
||||
2 places pour un shift droit: Remplissez les DEUX avec un shift droit
|
||||
|
||||
1 place pour un shift gauche et 1 place pour le support ISO: Remplissez les deux avec un shift gauche
|
||||
|
||||
5 places, mais seulement 4 touches: Deviner et vérifier, ou demander à quelqu'un qui l'a déjà fait.
|
||||
|
||||
## Sauvez votre keymap pour des éditions futures
|
||||
|
||||
Une fois satisfait de votre keymap, ou si vous souhaitez revenir travailler dessus plus tard, appuyez sur le bouton `Export Keymap`. Il vous permettra de sauvegarder votre keymap avec le nom choisi au dessus suivi de .json.
|
||||
|
||||
Vous pouvez ensuite charger ce fichier .json à nouveau en appuxant sur le bouton `Import Keymap`.
|
||||
|
||||
!> **ATTENTION** Ce n'est pas le même type de fichier .json utilisé pour kbfirmware.com ou n'importe quel autre outil. Si vous essayez d'utiliser ce fichier pour d'autres outil, ou le fichier .json d'autres outils avec le configurateur QMK, il y a des chances que votre clavier **explose**.
|
||||
|
||||
## Générer votre fichier firmware
|
||||
|
||||
Appuyez sur le bouton `Compile`.
|
||||
|
||||
Une fois la compilation terminée, vous pourrez appuyer sur le bouton vert `Download Firmware`.
|
||||
|
||||
## Ecrire votre firmware sur votre clavier
|
||||
|
||||
Merci de vous référer à [Flasher le Firmware](fr-FR/newbs_flashing.md)
|
||||
|
||||
## Dépannage
|
||||
|
||||
#### Mon fichier json ne fonctionne pas
|
||||
|
||||
Si le fichier .json a été généré par le configurateur QMK, bravo vous avez trouvé un bug. Merci d'ouvrir une issue sur [qmk_configurator](https://github.com/qmk/qmk_configurator/issues)
|
||||
|
||||
Sinon... vous avez raté mon message écris en gras qui dit de ne pas utiliser d'autres fichiers .json?
|
||||
|
||||
#### Il y a des espaces en trop dans mon alyout? Qu'est-ce que je fais?
|
||||
|
||||
Si vous voulez dire que vous avez trois places pour une barre d'espace, le mieux est de les remplir tous avec une barre d'espace. Vous pouvez faire de même avec les retour clavier et les shift.
|
||||
|
||||
#### C'est quoi le keycode pour .......
|
||||
|
||||
Merci de regarder
|
||||
|
||||
[Référence keycode basique](https://docs.qmk.fm/#/keycodes_basic)
|
||||
[Référence keycode avancé](https://docs.qmk.fm/#/feature_advanced_keycodes)
|
||||
|
||||
#### Ca ne compile pas?
|
||||
|
||||
Merci de vérifier les autres dispositions de votre keymap afin d'être sûr qu'il n'y a pas de touches aléatoires.
|
||||
|
||||
## Problèmes et Bugs
|
||||
|
||||
Nous acceptons toujours les demandes des clients et les rapports de bugs. Merci de les remplirs sur [qmk_configurator](https://github.com/qmk/qmk_configurator/issues)
|
367
docs/fr-FR/newbs_flashing.md
Normal file
367
docs/fr-FR/newbs_flashing.md
Normal file
@@ -0,0 +1,367 @@
|
||||
# Flasher votre clavier
|
||||
|
||||
Maintenant que vous avez compilé un firmware custom, vous allez vouloir le flasher dans votre clavier.
|
||||
|
||||
## Flasher votre clavier avec QMK Toolbox
|
||||
|
||||
La manière la plus simple de flasher votre clavier est avec [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases).
|
||||
|
||||
Toutefois, la QMK Toolbox n'est actuellement disponible que pour Windows et macOS. Si vous utilisez Linux (ou préférez flasher le firmware depuis la ligne de commande), vous devrez utiliser [la métode décrite ci-dessous](newbs_flashing.md#flash-your-keyboard-from-the-command-line).
|
||||
|
||||
### Charger le fichier dans QMK Toolbox
|
||||
|
||||
Démarrez en ouvrant l'application QMK Toolbox. Cherchez le fichier de firmware dans Finder ou Explorer. Vore firmware de clavier peut être dans un de deux formats `.hex` ou `.bin`. QMK essaye de copier le bon format pour votre clavier du répertoire racine `qmk_firmware`.
|
||||
|
||||
?> Si vous êtes sous Windows ou macOS il y a des commandes que vous pouvez utiliser pour facilement ouvrir le répertoire firmware dans Explorer ou Finder.
|
||||
|
||||
?> Windows:
|
||||
|
||||
start .
|
||||
|
||||
?> macOS:
|
||||
|
||||
open .
|
||||
|
||||
Le fichier firmware suit toujours ce format de nommage:
|
||||
|
||||
<keyboard_name>_<keymap_name>.{bin,hex}
|
||||
|
||||
Par exemple, le `plank/rev5` avec une keymap `default` aura ce nom de fichier:
|
||||
|
||||
planck_rev5_default.hex
|
||||
|
||||
Une fois que vous aurez trouvé votre fichier de firmware, glissez le dans la boîte "Local file" sur QMK Toolbox, ou cliquez sur "Open" et naviguez où votre firmware est enregistré.
|
||||
|
||||
### Mettez votre clavier en mode DFU (Bootloader)
|
||||
|
||||
Afin de flasher votre firmware custom, vous devez mettre votre clavier dans un mode spécial. Lorsqu'il sera dans ce mode, vous ne pourrez pas taper ou utiliser votre clavier. Il est très important que vous ne débranchiez pas votre clavier ou n'arrêtiez pas le processus d'écriture du firmware.
|
||||
|
||||
Chaque clavier a une manière différente d'entrer dans ce mode spécial. Si votre clavier tourne actuellement QMK ou TMK et vous n'avez pas reçu d'instruction spécifiques, essayez, dans cet ordre:
|
||||
|
||||
* Enfoncez les deux touches shift et appuyez sur `Pause`
|
||||
* Enfoncez les deux touches shift et appuyez sur `B`
|
||||
* Débranchez votre clavier, gardez shift la barre d'espace et `B` en même temps, branchez votre clavier et attendez une seconde avant de relâcher les touches.
|
||||
* Appuyez la touche physique `RESET` en bas du PCB
|
||||
* Trouvez les pins sur le PCB marquées `BOOT0` ou `RESET`, court circuitez ces pins en branchant votre PCB
|
||||
|
||||
Lorsque vous aurez réussi, vous verrez le message suivant dans QMK Toolbox:
|
||||
|
||||
```
|
||||
*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
|
||||
*** DFU device connected
|
||||
```
|
||||
|
||||
### Flasher votre clavier
|
||||
|
||||
Appuyez sur le boutton `Flash` dans QMK Toolbox. Vous verrez un résultat similaire à ce qui suit:
|
||||
|
||||
```
|
||||
*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
|
||||
*** DFU device connected
|
||||
*** Attempting to flash, please don't remove device
|
||||
>>> dfu-programmer atmega32u4 erase --force
|
||||
Erasing flash... Success
|
||||
Checking memory from 0x0 to 0x6FFF... Empty.
|
||||
>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
|
||||
Checking memory from 0x0 to 0x55FF... Empty.
|
||||
0% 100% Programming 0x5600 bytes...
|
||||
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
|
||||
0% 100% Reading 0x7000 bytes...
|
||||
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
|
||||
Validating... Success
|
||||
0x5600 bytes written into 0x7000 bytes memory (76.79%).
|
||||
>>> dfu-programmer atmega32u4 reset
|
||||
|
||||
*** DFU device disconnected
|
||||
*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390
|
||||
```
|
||||
|
||||
## Flashez votre clavier à l'aide de la ligne de commande
|
||||
|
||||
C'est désormais relativement simple. Lorsque vous êtes prêt à compiler et à flasher votre firmware, ouvrez la fenêtre de votre terminal et exécutez la commande de build :
|
||||
|
||||
make <my_keyboard>:<my_keymap>:flash
|
||||
|
||||
Par exemple, si votre keymap s'appelle "xyverz" et que vous fabriquez une keymap pour un clavier `planck` de version `rev5` vous devrez utiliser cette commande:
|
||||
|
||||
make planck/rev5:xyverz:flash
|
||||
|
||||
La commande va vérifier la configuration du clavier, puis tentera de le flasher en fonction du bootloader (chargeur d’amorçage) spécifié. Cela signifie que vous n'avez pas besoin de savoir quel bootloader votre clavier utilise. Exécutez simplement la commande et laissez-le faire le gros du travail.
|
||||
|
||||
Cependant, tout dépend du bootloader qui est installé sur le clavier. Si cette information n’est pas configurée ou si vous tentez de flasher un clavier qui ne permet pas d’être flashé alors vous obtiendrez cette erreur :
|
||||
|
||||
WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time.
|
||||
|
||||
Dans ce cas, vous devrez choisir le bootloader.
|
||||
|
||||
Il y a cinq bootloaders principaux. Les Pro-Micro et les clones utilisent Caterina, les Teensy utilisent Halfkay, les claviers AVR d’OLKB utilisent QMK-DFU, certains controleurs atmega32u4 utilisent DFU et la plupart des controlleurs ARM utilisent ARM DFU.
|
||||
|
||||
Vous pouvez trouver plus d'information à propos des bootloaders sur la page [Instructions de flash et information sur le Bootloader](flashing.md).
|
||||
|
||||
Si vous savez quel bootloader vous utilisez, lorsque vous compilez le firmware, vous pouvez ajouter quelques options à la commande `make` pour automatiser le processus de flash.
|
||||
|
||||
### DFU
|
||||
|
||||
Pour le bootloader DFU, lorsque vous êtes prêts à compiler et flasher votre firmware, ouvrez votre fenêtre de terminal et lancez la commande de compilation:
|
||||
|
||||
make <my_keyboard>:<my_keymap>:dfu
|
||||
|
||||
Par exemple, si vous keymap s'appelle "xyverz" et vous compilez une keymap pour une plank rev5, vous utiliserez cette commande:
|
||||
|
||||
make planck/rev5:xyverz:dfu
|
||||
|
||||
Une fois la compilation terminée, le résultat devrait être le suivant:
|
||||
|
||||
```
|
||||
Linking: .build/planck_rev5_xyverz.elf [OK]
|
||||
Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
|
||||
Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
|
||||
Checking file size of planck_rev5_xyverz.hex
|
||||
* File size is fine - 18574/28672
|
||||
```
|
||||
|
||||
Une fois arrivé à ce stade, le script de compilation va chercher le bootloader DFU toutes les 5 secondes. Il va répéter les messages suivants jusqu'à ce que l'appareil soit trouvé ou que vous l'annuliez.
|
||||
|
||||
dfu-programmer: no device present.
|
||||
Error: Bootloader not found. Trying again in 5s.
|
||||
|
||||
Une fois terminé, vous devrez mettre à zéro le contrôleur. Vous allez voir un résultat similaire à ceci:
|
||||
|
||||
```
|
||||
*** Attempting to flash, please don't remove device
|
||||
>>> dfu-programmer atmega32u4 erase --force
|
||||
Erasing flash... Success
|
||||
Checking memory from 0x0 to 0x6FFF... Empty.
|
||||
>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
|
||||
Checking memory from 0x0 to 0x55FF... Empty.
|
||||
0% 100% Programming 0x5600 bytes...
|
||||
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
|
||||
0% 100% Reading 0x7000 bytes...
|
||||
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
|
||||
Validating... Success
|
||||
0x5600 bytes written into 0x7000 bytes memory (76.79%).
|
||||
>>> dfu-programmer atmega32u4 reset
|
||||
```
|
||||
|
||||
?> Si vous avez des soucis concernant ceci - par exemple `dfu-programmer: no device present` - merci de regarder [Foires Aux Questions de Compilation](faq_build.md).
|
||||
|
||||
#### Commandes DFU
|
||||
|
||||
Il y aun certain nombre de commandes du DFU que vous pouvez utiliser pour flasher un firmware sur un device DFU:
|
||||
|
||||
* `:dfu` - C'est l'option standard qui attends jusqu'à e qu'un appareil DFU soit disponible, puis flash le firmware. Il va vérifier toutes les 5 secondes, afin de voir si un appareil DFU est apparu.
|
||||
* `:dfu-ee` - Ceci flash un fichier `eep` à la place du standard hex, peu commun.
|
||||
* `:dfu-split-left` - Ceci flash le firmware standard, comme la commande standard (`:dfu`). Toutefois, elle flash aussi les fichiers EEPROM du "côté gauche" pour les claviers scindés. _C'est l'option idéale pour les claviers scindés basés sur Elite C._
|
||||
* `:dfu-split-right` - Ceci flash le firmware standard, comme la commande standard (`:dfu`). Toutefois, elle flash aussi les fichiers EEPROM du "côté droit" pour les claviers scindés. _C'est l'option idéale pour les claviers scindés basés sur Elite C._
|
||||
|
||||
### Caterina
|
||||
|
||||
Pour les boards Arduino et leurs clones (tel que le SparkFun ProMicro), lorsque vous êtes prêt à compiler et flasher votre firmware, ouvrez votre terminal et lancer la commande de compilation:
|
||||
|
||||
make <my_keyboard>:<my_keymap>:avrdude
|
||||
|
||||
Par exemple, si votre keymap se nomme "xyverz" et que vous compilez une keymap pour un Lets Split rev2, vous utiliserez la commande suivante:
|
||||
|
||||
make lets_split/rev2:xyverz:avrdude
|
||||
|
||||
Une fois le firmware compilé, vous aurez le résultat suivant:
|
||||
|
||||
```
|
||||
Linking: .build/lets_split_rev2_xyverz.elf [OK]
|
||||
Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK]
|
||||
Checking file size of lets_split_rev2_xyverz.hex [OK]
|
||||
* File size is fine - 27938/28672
|
||||
Detecting USB port, reset your controller now..............
|
||||
```
|
||||
|
||||
Une fois ceci fait, réinitialisez votre board et le script va détecter et flasher le firmware. La sortie devrait ressembler à quelque chose comme ça:
|
||||
|
||||
```
|
||||
Detected controller on USB port at /dev/ttyS15
|
||||
|
||||
Connecting to programmer: .
|
||||
Found programmer: Id = "CATERIN"; type = S
|
||||
Software Version = 1.0; No Hardware Version given.
|
||||
Programmer supports auto addr increment.
|
||||
Programmer supports buffered memory access with buffersize=128 bytes.
|
||||
|
||||
Programmer supports the following devices:
|
||||
Device code: 0x44
|
||||
|
||||
avrdude.exe: AVR device initialized and ready to accept instructions
|
||||
|
||||
Reading | ################################################## | 100% 0.00s
|
||||
|
||||
avrdude.exe: Device signature = 0x1e9587 (probably m32u4)
|
||||
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
|
||||
To disable this feature, specify the -D option.
|
||||
avrdude.exe: erasing chip
|
||||
avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex"
|
||||
avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex
|
||||
avrdude.exe: writing flash (27938 bytes):
|
||||
|
||||
Writing | ################################################## | 100% 2.40s
|
||||
|
||||
avrdude.exe: 27938 bytes of flash written
|
||||
avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex:
|
||||
avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex:
|
||||
avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex
|
||||
avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes
|
||||
avrdude.exe: reading on-chip flash data:
|
||||
|
||||
Reading | ################################################## | 100% 0.43s
|
||||
|
||||
avrdude.exe: verifying ...
|
||||
avrdude.exe: 27938 bytes of flash verified
|
||||
|
||||
avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF)
|
||||
|
||||
avrdude.exe done. Thank you.
|
||||
```
|
||||
|
||||
Si vous avez un souci, essayez de faire ceci:
|
||||
|
||||
sudo make <my_keyboard>:<my_keymap>:avrdude
|
||||
|
||||
#### Commandes Caterina
|
||||
|
||||
Il existe un certain nombre de commandes DFU que vous pouvez utiliser pour mettre à jour le firmware sur un périphérique DFU:
|
||||
|
||||
* `: avrdude` - Il s’agit de l’option normale. Elle attend qu’un appareil Caterina soit disponible, puis tente de flasher le firmware. Il attendra de détecter un autre port COM, puis il flashera à nouveau.
|
||||
* `: avrdude-loop` - Cela fonctionne de la même manière que `: avrdude`, mais une fois que chaque périphérique est flashé, il tentera de flasher à nouveau. Cela peut être utile pour flasher plusieurs claviers à la suite. _Cela implique de sortir manuellement de la boucle en appuyant sur Ctrl + C, Cmd + C ou un raccourci équivalent selon votre OS_
|
||||
* `: avrdude-split-left` - Cela fonctionne de la même manière que la fonction (`: avrdude`). Toutefois, cela permet aussi de flasher le coté gauche de l'EEPROM des claviers splittés / divisés. C'est donc la méthode recommandée pour les claviers splittés avec Pro Micro.
|
||||
* `: avrdude-split-right` - Cela fonctionne de la même manière que la fonction (`: avrdude`). Toutefois, cela permet aussi de flasher le coté droite de l'EEPROM des claviers splittés / divisés. C'est donc la méthode recommandée pour les claviers splittés avec Pro Micro.
|
||||
|
||||
### HalfKay
|
||||
|
||||
Pour les composants PJRC (les Teensy), lorsque vous êtes prêts à compiler et flasher votre firmware, ouvrez votre fenêtre de terminal et lancez la commande de compilation suivante:
|
||||
|
||||
make <my_keyboard>:<my_keymap>:teensy
|
||||
|
||||
Par exemple, si vous keymap s'appelle "xyverz" et vous compilez une keymap pour un Ergodox ou un Ergodox EZ, vous utiliserez cette commande:
|
||||
|
||||
make ergodox_ez:xyverz:teensy
|
||||
|
||||
Une fois la compilation du firmware terminée, votre sortie devrait ressembler à ça:
|
||||
|
||||
```
|
||||
Linking: .build/ergodox_ez_xyverz.elf [OK]
|
||||
Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK]
|
||||
Checking file size of ergodox_ez_xyverz.hex [OK]
|
||||
* File size is fine - 25584/32256
|
||||
Teensy Loader, Command Line, Version 2.1
|
||||
Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage
|
||||
Waiting for Teensy device...
|
||||
(hint: press the reset button)
|
||||
```
|
||||
|
||||
Une fois terminé, réinitialisez votre board. Une fois fait, vous verrez une sortie comme ça:
|
||||
|
||||
```
|
||||
Found HalfKay Bootloader
|
||||
Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage
|
||||
Programming............................................................................................................................................................................
|
||||
...................................................
|
||||
Booting
|
||||
```
|
||||
|
||||
### STM32 (ARM)
|
||||
|
||||
Pour la majorité des boards ARM (incluant les Proton C, Planck Rev 6, et Preonic Rev 3), lorsque vous êtes prêt à compiler et flasher votre firmware, ouvrez la fenêtre de terminal et lancez la commande de compilation:
|
||||
|
||||
make <my_keyboard>:<my_keymap>:dfu-util
|
||||
|
||||
Par exemple, si votre keymap s'appelle "xyverz" et vous compilez une keymap pour le clavier Plank Revision 6, vous utiliserez cette commande et redémarrerez le clavier vers le bootloader (avant que la compilation soit terminée):
|
||||
|
||||
make planck/rev6:xyverz:dfu-util
|
||||
|
||||
Une fois le firmware compilé, il va afficher quelque chose comme ça:
|
||||
|
||||
```
|
||||
Linking: .build/planck_rev6_xyverz.elf [OK]
|
||||
Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK]
|
||||
Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK]
|
||||
|
||||
Size after:
|
||||
text data bss dec hex filename
|
||||
0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex
|
||||
|
||||
Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK]
|
||||
dfu-util 0.9
|
||||
|
||||
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
|
||||
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
|
||||
This program is Free Software and has ABSOLUTELY NO WARRANTY
|
||||
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
|
||||
|
||||
Invalid DFU suffix signature
|
||||
A valid DFU suffix will be required in a future dfu-util release!!!
|
||||
Opening DFU capable USB device...
|
||||
ID 0483:df11
|
||||
Run-time device DFU version 011a
|
||||
Claiming USB DFU Interface...
|
||||
Setting Alternate Setting #0 ...
|
||||
Determining device status: state = dfuERROR, status = 10
|
||||
dfuERROR, clearing status
|
||||
Determining device status: state = dfuIDLE, status = 0
|
||||
dfuIDLE, continuing
|
||||
DFU mode device DFU version 011a
|
||||
Device returned transfer size 2048
|
||||
DfuSe interface name: "Internal Flash "
|
||||
Downloading to address = 0x08000000, size = 41824
|
||||
Download [=========================] 100% 41824 bytes
|
||||
Download done.
|
||||
File downloaded successfully
|
||||
Transitioning to dfuMANIFEST state
|
||||
```
|
||||
|
||||
#### Commandes STM32
|
||||
|
||||
Il y aun certain nombre de commandes du DFU que vous pouvez utiliser pour flasher un firmware sur un device STM32:
|
||||
|
||||
* `:dfu-util` - C'est l'option standard pour flasher un appareil STM32. Elle attendra qu'un bootloader STM32 soit présent et tentera de l’utiliser.
|
||||
* `:dfu-util-left` - Ceci flasher le firmware standard, comme la commande standard (`:dfu-util`). Toutefois, elle flasher aussi les fichiers EEPROM du "côté gauche" pour les claviers scindés.
|
||||
* `:dfu-util-right` - Ceci flash le firmware standard, comme la commande standard (`:dfu-util`). Toutefois, elle flash aussi les fichiers EEPROM du "côté droit" pour les claviers scindés.
|
||||
* `:st-link-cli` - Cela permet de flasher le firmware avec l'utilitaire en ligne de commande ST-LINK's plutôt que d'utiliser dfu-util.
|
||||
|
||||
### BootloadHID
|
||||
|
||||
Pour les claviers basés sur Bootmapper Client(BMC)/bootloadHID/ATmega32A, si vous êtes prêts à compiler et flasher le firmware, ouvrez votre fenêtre de terminal et lancez la commande suivante :
|
||||
|
||||
make <my_keyboard>:<my_keymap>:bootloaderHID
|
||||
|
||||
Par exemple, si votre keymap s'appelle "xyverz" et que vous compilez une keymap pour un jj40, utilisez cette commande:
|
||||
|
||||
make jj40:xyverz:bootloaderHID
|
||||
|
||||
Une fois le firmware compilé, vous aurez cette sortie:
|
||||
|
||||
```
|
||||
Linking: .build/jj40_default.elf [OK]
|
||||
Creating load file for flashing: .build/jj40_default.hex [OK]
|
||||
Copying jj40_default.hex to qmk_firmware folder [OK]
|
||||
Checking file size of jj40_default.hex [OK]
|
||||
* The firmware size is fine - 21920/28672 (6752 bytes free)
|
||||
```
|
||||
|
||||
A ce stade, le script de build va chercher le bootloader DFU toutes les 5 secondes. Il répétera l ’affichage de ce message jusqu'à ce que l’appareil soit trouvé ou que vous annuliez l'opération```
|
||||
|
||||
```
|
||||
Error opening HIDBoot device: The specified device was not found
|
||||
Trying again in 5s.
|
||||
```
|
||||
|
||||
Une fois ce résultat obtenu, réinitialisez le contrôleur. Le résultat suivant devrait s’afficher :
|
||||
|
||||
```
|
||||
Page size = 128 (0x80)
|
||||
Device size = 32768 (0x8000); 30720 bytes remaining
|
||||
Uploading 22016 (0x5600) bytes starting at 0 (0x0)
|
||||
0x05580 ... 0x05600
|
||||
```
|
||||
|
||||
## Faites l'essai!
|
||||
|
||||
Bravo! Votre firmware customisé a été programmé sur votre clavier!
|
||||
|
||||
Essayez-le et vérifiez qu'il fonctionne comme vous le souhaitez. Nous avons écrit [Tester et débugger](newbs_testing_debugging.md) pour compléter le guide du débutant, alors allez voir là-bas pour apprendre comment dépanner vos fonctionnalités custom.
|
101
docs/fr-FR/newbs_getting_started.md
Normal file
101
docs/fr-FR/newbs_getting_started.md
Normal file
@@ -0,0 +1,101 @@
|
||||
# Introduction
|
||||
|
||||
Votre clavier d'ordinateur contient un processeur, proche de celui dans votre ordinateur. Ce processeur exécute un logiciel responsable de détecter les touches appuyées et envoie des rapports à propos de l'état du clavier lorsque les touches sont appuyées et relâchées. QMK prend le rôle de ce logiciel, détectant les appuis des boutons et passant cette information à l'ordinateur hôte. Lorsque vous construisez votre keymap customisée, vous créez l'équivalent d'un programme exécutable pour votre clavier.
|
||||
|
||||
QMK essaie de rendre les choses simples faciles, et les choses difficiles possibles. Vous n'avez pas à savoir programmer pour créer des keymaps puissantes - vous devez seulement suivre quelques règles de syntaxe simples.
|
||||
|
||||
# Guide de démarrage
|
||||
|
||||
Avant de pouvoir construire des keymaps, vous devez installer quelques logiciels et configurer votre environnement de compilation. Ceci n'a besoin d'être fait seulement une fois, peu importe le nombre de clavier pour lesquels vous compter compiler un firmware.
|
||||
|
||||
Si vous préférez une approche plus proche d'une interface graphique, considérez utiliser l'outil en ligne [QMK Configurator](https://config.qmk.fm). Référez-vous à [Construire votre premier firmware en utilisant l'interface graphique en ligne](newbs_building_firmware_configurator.md).
|
||||
|
||||
## Logiciels à télécharger
|
||||
|
||||
### Editeur de texte
|
||||
|
||||
Vous allez avoir besoin d'un programme qui peut éditer et sauvegarder des fichiers **plain text**. Si vous êtes sur Windows, vous pouvez utiliser notepad et sur Linux vous pouvez utiliser gedit. Ces deux options sont des éditeurs de texte simples mais fonctionnels. Sur macOS, faites attention avec l'application par défaut TextEdit: elle ne sauvegardera pas les fichiers en mode "plain text" sauf si vous sélectionnez explicitement _Make Plain Text_ à partir du menu _Format_.
|
||||
|
||||
Vous pouvez aussi télécharger et installer un éditeur de texte dédié comme [Sublime Text](https://www.sublimetext.com/) ou [VS Code](https://code.visualstudio.com/). C'est probablement la meilleure solution peu importe la plateforme car ce sont des programmes conçus spécifiquement pour éditer du code.
|
||||
|
||||
?> Pas sûr de quel éditeur de texte utiliser? Laurence Bradford a écrit une [excellente introduction](https://learntocodewith.me/programming/basics/text-editors/) au sujet.
|
||||
|
||||
### QMK Toolbox
|
||||
|
||||
QMK Toolbox est un programme graphique optionnel pour Windows et macOS qui permet à la fois de programmer et débugger votre clavier customisé. Il vous sera probablement très utile pour facilement flasher votre clavier et analyser ses messages de débugage.
|
||||
|
||||
[Télécharger la dernière version ici.](https://github.com/qmk/qmk_toolbox/releases/latest)
|
||||
|
||||
* Pour Windows: `qmk_toolbox.exe` (portable) or `qmk_toolbox_install.exe` (installeur)
|
||||
* Pour macOS: `QMK.Toolbox.app.zip` (portable) or `QMK.Toolbox.pkg` (installeur)
|
||||
|
||||
## Configurez votre environnement
|
||||
|
||||
Nous avons essayé de rendre QMK aussi simple que possible à configurer. Vous avez uniquement à préparer votre environnment Linux ou Unix et laisser QMK installer le reste.
|
||||
|
||||
?> Si vous n'avez jamais travaillé avec la ligne de commande Linux/Unix, il y a un certain nombre de concepts basiques et de commandes que vous devriez apprendre. Ces ressources vous apprendrons suffisemment pour travailler avec QMK:<br>
|
||||
[Commandes Linux à savoir](https://www.guru99.com/must-know-linux-commands.html)<br>
|
||||
[Commandes Unix de base](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
|
||||
|
||||
### Windows
|
||||
|
||||
Vous devez installer MSYS2 et Git.
|
||||
|
||||
* Suivez les instructions d'installation sur la [page de MSYS2](http://www.msys2.org).
|
||||
* Fermez tous les terminaux MSYS2 éventuellement ouverts et ouvrez un nouveau terminal MSYS2 MinGW 64-bit.
|
||||
* Installez Git en lançant la commande: `pacman -S git`.
|
||||
|
||||
### macOS
|
||||
|
||||
Vous devez installer Homebew. Suivez les instructions sur la [page de Homebrew](https://brew.sh).
|
||||
|
||||
Une fois Homebrew installé, continuez avec _Configurer QMK_. Dans cette étape, nous lancerons un script qui va installer d'autres paquets.
|
||||
|
||||
### Linux
|
||||
|
||||
Vous devez installer Git. Il est très probable que vous l'ayez déjà installé, mais sinon, une des commandes suivantes devrait l'installer:
|
||||
|
||||
* Debian / Ubuntu / Devuan: `apt-get install git`
|
||||
* Fedora / Red Hat / CentOS: `yum install git`
|
||||
* Arch: `pacman -S git`
|
||||
|
||||
?> Docker est aussi une option sur toutes les plateformes. [Appuyez ici pour plus de détail.](getting_started_build_tools.md#docker)
|
||||
|
||||
## Configurer QMK
|
||||
|
||||
Une fois votre environnement Linux/Unix configuré, vous êtes prêt à télécharger QMK. Nous allons le faire en utilisant Git pour "cloner" le dépôt de QMK. Ouvrez un terminal ou une fenêtre MSYS2 MinGW et gardez le ouvert pour le reste de ce guide. Dans ce terminal, lancez ces deux commandes:
|
||||
|
||||
```shell
|
||||
git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git
|
||||
cd qmk_firmware
|
||||
```
|
||||
|
||||
?> Si vous savez déjà [comment utiliser GitHub](getting_started_github.md), nous recommandons que vous créez et clonez votre propre fork. Si vous ne savez pas ce que cela veut dire, vous pouvez sans problème ignorer ce message.
|
||||
|
||||
QMK vient avec un script pour vous aider à configurer le reste de ce que vous aurez besoin. Vous devez le lancer en tapant la ligne de commande suivante:
|
||||
|
||||
util/qmk_install.sh
|
||||
|
||||
## Testez votre environnement de compilation
|
||||
|
||||
Maintenant que votre environnement de compilation de QMK est configuré, vous pouvez compiler un firmware pour votre clavier. Démarrez en compilant la keymap par défaut du clavier. Vous devriez pouvoir le faire avec une commande de ce format:
|
||||
|
||||
make <keyboard>:default
|
||||
|
||||
Par exemple, pour compiler un firmware pour une Clueboard 66%, vous utiliserez:
|
||||
|
||||
make clueboard/66/rev3:default
|
||||
|
||||
Une fois ceci fait, vous devriez avoir beaucoup d'information dans votre sortie qui devrait se terminer par quelque chose de similaire à ça:
|
||||
|
||||
```
|
||||
Linking: .build/clueboard_66_rev3_default.elf [OK]
|
||||
Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK]
|
||||
Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK]
|
||||
Checking file size of clueboard_66_rev3_default.hex [OK]
|
||||
* The firmware size is fine - 26356/28672 (2316 bytes free)
|
||||
```
|
||||
|
||||
# Créer votre Keymap
|
||||
|
||||
Vous êtes maintenant prêt à créer votre propre keymap! Passez à l'étape [Compiler votre premier firmware](newbs_building_firmware.md) pour ce faire.
|
14
docs/fr-FR/newbs_learn_more_resources.md
Normal file
14
docs/fr-FR/newbs_learn_more_resources.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Ressources d'apprentissage
|
||||
|
||||
Ces ressources permettent de donner aux nouveaux membres de la communauté QMK plus de compréhension aux informations données dans la documentation Newbs.
|
||||
|
||||
Ressources Git:
|
||||
|
||||
* [Tutoriel général](https://www.codecademy.com/learn/learn-git)
|
||||
* [Jeu Git pour apprendre avec des exemples](https://learngitbranching.js.org/)
|
||||
* [Des ressources Git pour en savoir plus à propos de GitHub](getting_started_github.md)
|
||||
* [Des ressources Git spécifiques à QMK](contributing.md)
|
||||
|
||||
Ressources sur les lignes de commande:
|
||||
|
||||
* [Bon tutoriel général sur la ligne de commande](https://www.codecademy.com/learn/learn-the-command-line)
|
102
docs/fr-FR/newbs_testing_debugging.md
Normal file
102
docs/fr-FR/newbs_testing_debugging.md
Normal file
@@ -0,0 +1,102 @@
|
||||
# Test et débugage
|
||||
|
||||
Une fois votre clavier configuré avec un firmware custom, vous êtes prêt à le tester. Avec un peu de chance, tout fonctionne parfaitement bien, dans le cas contraire, ce document vous aidera à trouver où se trouve le problème.
|
||||
|
||||
## Tester
|
||||
|
||||
Tester votre clavier est normalement assez simple. Appuyez chaque touche de votre clavier et assurez-vous qu'il envoie les touches auquel vous vous attendiez. Il existe même des programmes qui vous aideront à vérifier qu'aucune touche ne soit oubliée.
|
||||
|
||||
Note: ces programmes ne sont ni fournis ni approuvés par QMK.
|
||||
|
||||
* [QMK Configurator](https://config.qmk.fm/#/test/) (Web)
|
||||
* [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (Windows seulement)
|
||||
* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac seulement)
|
||||
* [Keyboard Tester](http://www.keyboardtester.com) (Web)
|
||||
* [Keyboard Checker](http://keyboardchecker.com) (Web)
|
||||
|
||||
## Débuguer
|
||||
|
||||
Votre clavier va envoyer des informations de débugage si vous avez `CONSOLE_ENABLE = yes` dans votre fichier `rules.mk`. Par défaut, la sortie est très limitée, mais vous pouvez activer le mode debug pour augmenter la quantité de sortie de débugage. Utilisez le keycode `DEBUG` dans votre keymap, utilisez la fonction [Commande](feature_command.md) pour activer le mode debug ou ajoutez le code suivant à votre keymap.
|
||||
|
||||
```c
|
||||
void keyboard_post_init_user(void) {
|
||||
// Customise these values to desired behaviour
|
||||
debug_enable=true;
|
||||
debug_matrix=true;
|
||||
//debug_keyboard=true;
|
||||
//debug_mouse=true;
|
||||
}
|
||||
```
|
||||
|
||||
### Débuguer avec QMK Toolbox
|
||||
|
||||
Pour les plateformes compatibles, [QMK Toolbox](https://github.com/qmk/qmk_toolbox) peut être utilisé pour afficher les messages de débugage pour votre clavier.
|
||||
|
||||
### Débuguer avec hid_listen
|
||||
|
||||
Vous préférez une solution basée sur le terminal? [hid_listen](https://www.pjrc.com/teensy/hid_listen.html), fourni par PJRC, peut aussi être utilisé pour afficher des messages de débugage. Des versions compilées pour Windows, Linux et MacOS sont disponibles.
|
||||
|
||||
<!-- FIXME: Describe the debugging messages here. -->
|
||||
|
||||
## Envoyer vos propres messages de débugage
|
||||
|
||||
Parfois, il est utile d'afficher des messages de débugage depuis votre [code custom](custom_quantum_functions.md). Le faire est assez simple. Commencez par ajouter `print.h` au début de votre fichier:
|
||||
|
||||
#include <print.h>
|
||||
|
||||
Une fois fait, vous pouvez utiliser les fonctions print suivantes:
|
||||
|
||||
* `print("string")`: Affiche une simple chaîne de caractères.
|
||||
* `uprintf("%s string", var)`: Affiche une chaîne de caractères formatée.
|
||||
* `dprint("string")` Affiche une chaîne de caractère simple, mais uniquement lorsque le mode debug est activé.
|
||||
* `dprintf("%s string", var)`: Affiche une chaîne de caractère formatée, mais uniquement lorsque le mode debug est activé.
|
||||
|
||||
## Exemples de debugage
|
||||
|
||||
Si dessous se trouve une liste d'exemples réels de débugage. Pour plus d'information, référez-vous à [Débuguer/Dépanner QMK](faq_debug.md).
|
||||
|
||||
### A quelle position de la matrice se trouve cette activation de touche?
|
||||
|
||||
Lors du portage ou lorsque vous essayez de diagnostiquer un problème de PCB, il est utile de savoir si une activation de touche est enregistrée correctement. Pour activer le log de ce scénario, ajoutez le code suivant à votre fichier keymaps `keymap.c`.
|
||||
|
||||
```c
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
// If console is enabled, it will print the matrix position and status of each key pressed
|
||||
#ifdef CONSOLE_ENABLE
|
||||
uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
```
|
||||
|
||||
Exemple de sortie
|
||||
|
||||
```text
|
||||
Waiting for device:.......
|
||||
Listening:
|
||||
KL: kc: 169, col: 0, row: 0, pressed: 1
|
||||
KL: kc: 169, col: 0, row: 0, pressed: 0
|
||||
KL: kc: 174, col: 1, row: 0, pressed: 1
|
||||
KL: kc: 174, col: 1, row: 0, pressed: 0
|
||||
KL: kc: 172, col: 2, row: 0, pressed: 1
|
||||
KL: kc: 172, col: 2, row: 0, pressed: 0
|
||||
```
|
||||
|
||||
### Combien de temps cela a pris pour une activation de touche?
|
||||
|
||||
Lorsque vous testez des problèmes de performance, il peut être utile de savoir à quelle fréquence la matrice est scannée. Pour activer le log dans ce scénario, ajoutez la ligne suivante à votre fichier `config.h` de votre keymaps.
|
||||
|
||||
```c
|
||||
#define DEBUG_MATRIX_SCAN_RATE
|
||||
```
|
||||
|
||||
Exemple de sortie
|
||||
|
||||
```text
|
||||
> matrix scan frequency: 315
|
||||
> matrix scan frequency: 313
|
||||
> matrix scan frequency: 316
|
||||
> matrix scan frequency: 316
|
||||
> matrix scan frequency: 316
|
||||
> matrix scan frequency: 316
|
||||
```
|
@@ -62,14 +62,14 @@ If you're using [homebrew,](http://brew.sh/) you can use the following commands:
|
||||
brew tap osx-cross/avr
|
||||
brew tap PX4/homebrew-px4
|
||||
brew update
|
||||
brew install avr-gcc@7
|
||||
brew link --force avr-gcc@7
|
||||
brew install avr-gcc@8
|
||||
brew link --force avr-gcc@8
|
||||
brew install dfu-programmer
|
||||
brew install dfu-util
|
||||
brew install gcc-arm-none-eabi
|
||||
brew install avrdude
|
||||
|
||||
This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of `avr-gcc@7` can take over 20 minutes and exhibit high CPU usage.
|
||||
This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of `avr-gcc@8` can take over 20 minutes and exhibit high CPU usage.
|
||||
|
||||
## Windows with msys2 (recommended)
|
||||
|
||||
@@ -145,7 +145,7 @@ util/docker_build.sh
|
||||
There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well:
|
||||
```bash
|
||||
util/docker_build.sh keyboard:keymap:target
|
||||
# For example: util/docker_build.sh planck/rev6:default:dfu-util
|
||||
# For example: util/docker_build.sh planck/rev6:default:flash
|
||||
```
|
||||
If you're on Linux, this should work out of the box. On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use [QMK Toolbox](https://github.com/qmk/qmk_toolbox) instead.
|
||||
|
||||
|
@@ -12,11 +12,17 @@ Within the folder `users` is a directory for each user. This is a place for user
|
||||
|
||||
### Keyboard Project Structure
|
||||
|
||||
Within the folder `keyboards` and its subfolder `handwired` is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within it you'll find the following structure:
|
||||
Within the folder `keyboards`, its subfolder `handwired` and its vendor and manufacture subdirectories e.g. `clueboard` is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard/2x1800`. Within it, you'll find the following structure:
|
||||
|
||||
* `keymaps/`: Different keymaps that can be built
|
||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `rules.mk`.
|
||||
* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
|
||||
* `info.json`: The file used for setting layout for QMK Configurator. See [Configurator Support](reference_configurator_support.md) for more information.
|
||||
* `readme.md`: A brief overview of the keyboard.
|
||||
* `<keyboardName>.h`: This file is where the keyboard layout is defined against the keyboard's switch matrix.
|
||||
* `<keyboardName>.c`: This file is where you can find custom code for the keyboard.
|
||||
|
||||
For more information on project structure, see [QMK Keyboard Guidelines](hardware_keyboard_guidelines.md).
|
||||
|
||||
### Keymap Structure
|
||||
|
||||
|
@@ -14,8 +14,8 @@ The full syntax of the `make` command is `<keyboard_folder>:<keymap>:<target>`,
|
||||
The `<target>` means the following
|
||||
* If no target is given, then it's the same as `all` below
|
||||
* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck.
|
||||
* `dfu`, `teensy`, `avrdude` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme.
|
||||
* **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:dfu`.
|
||||
* `flash`, `dfu`, `teensy`, `avrdude`, `dfu-util`, or `bootloadHID` compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme.
|
||||
* **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:flash`.
|
||||
* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems.
|
||||
|
||||
You can also add extra options at the end of the make command line, after the target
|
||||
@@ -31,7 +31,7 @@ Here are some examples commands
|
||||
|
||||
* `make all:all` builds everything (all keyboard folders, all keymaps). Running just `make` from the `root` will also run this.
|
||||
* `make ergodox_infinity:algernon:clean` will clean the build output of the Ergodox Infinity keyboard.
|
||||
* `make planck/rev4:default:dfu COLOR=false` builds and uploads the keymap without color output.
|
||||
* `make planck/rev4:default:flash COLOR=false` builds and uploads the keymap without color output.
|
||||
|
||||
## `rules.mk` Options
|
||||
|
||||
@@ -41,8 +41,6 @@ Set these variables to `no` to disable them, and `yes` to enable them.
|
||||
|
||||
This allows you to hold a key and the salt key (space by default) and have access to a various EEPROM settings that persist over power loss. It's advised you keep this disabled, as the settings are often changed by accident, and produce confusing results that makes it difficult to debug. It's one of the more common problems encountered in help sessions.
|
||||
|
||||
Consumes about 1000 bytes.
|
||||
|
||||
`MOUSEKEY_ENABLE`
|
||||
|
||||
This gives you control over cursor movements and clicks via keycodes/custom functions.
|
||||
@@ -67,8 +65,6 @@ To see the text, open `hid_listen` and enjoy looking at your printed messages.
|
||||
|
||||
**NOTE:** Do not include *uprint* messages in anything other than your keymap code. It must not be used within the QMK system framework. Otherwise, you will bloat other people's .hex files.
|
||||
|
||||
Consumes about 400 bytes.
|
||||
|
||||
`COMMAND_ENABLE`
|
||||
|
||||
This enables magic commands, typically fired with the default magic key combo `LSHIFT+RSHIFT+KEY`. Magic commands include turning on debugging messages (`MAGIC+D`) or temporarily toggling NKRO (`MAGIC+N`).
|
||||
@@ -83,7 +79,7 @@ This allows the keyboard to tell the host OS that up to 248 keys are held down a
|
||||
|
||||
`BACKLIGHT_ENABLE`
|
||||
|
||||
This enables your backlight on Timer1 and ports B5, B6, or B7 (for now). You can specify your port by putting this in your `config.h`:
|
||||
This enables the in-switch LED backlighting. You can specify the backlight pin by putting this in your `config.h`:
|
||||
|
||||
#define BACKLIGHT_PIN B7
|
||||
|
||||
@@ -125,11 +121,9 @@ Use this to debug changes to variable values, see the [tracing variables](unit_t
|
||||
|
||||
This enables using the Quantum SYSEX API to send strings (somewhere?)
|
||||
|
||||
This consumes about 5390 bytes.
|
||||
|
||||
`KEY_LOCK_ENABLE`
|
||||
|
||||
This enables [key lock](feature_key_lock.md). This consumes an additional 260 bytes.
|
||||
This enables [key lock](feature_key_lock.md).
|
||||
|
||||
`SPLIT_KEYBOARD`
|
||||
|
||||
|
@@ -1,16 +1,20 @@
|
||||
# Vagrant Quick Start
|
||||
|
||||
This project includes a Vagrantfile that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else using the Vagrantfile to build. This makes it much easier for people to help you troubleshoot any issues you encounter.
|
||||
This project includes a `Vagrantfile` that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else using the Vagrantfile to build. This makes it much easier for people to help you troubleshoot any issues you encounter.
|
||||
|
||||
## Requirements
|
||||
|
||||
Using the `/Vagrantfile` in this repository requires you have [Vagrant](http://www.vagrantup.com/) as well as [VirtualBox](https://www.virtualbox.org/) (or [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](http://www.vagrantup.com/vmware) but the (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion).
|
||||
Using the `Vagrantfile` in this repository requires you have [Vagrant](http://www.vagrantup.com/) as well as a supported provider installed:
|
||||
|
||||
*COMPATIBILITY NOTICE* Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:** `vagrant plugin install vagrant-vbguest`
|
||||
* [VirtualBox](https://www.virtualbox.org/) (Version at least 5.0.12)
|
||||
* Sold as 'the most accessible platform to use Vagrant'
|
||||
* [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](http://www.vagrantup.com/vmware)
|
||||
* The (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion
|
||||
* [Docker](https://www.docker.com/)
|
||||
|
||||
Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below.
|
||||
Other than having Vagrant, a suitable provider installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start an environment (either a virtual machine or container) that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below.
|
||||
|
||||
# Flashing the Firmware
|
||||
## Flashing the Firmware
|
||||
|
||||
The "easy" way to flash the firmware is using a tool from your host OS:
|
||||
|
||||
@@ -19,3 +23,35 @@ The "easy" way to flash the firmware is using a tool from your host OS:
|
||||
* [Atmel FLIP](http://www.atmel.com/tools/flip.aspx)
|
||||
|
||||
If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version.
|
||||
|
||||
## Vagrantfile Overview
|
||||
The development environment is configured to run the QMK Docker image, `qmkfm/base_container`. This not only ensures predictability between systems, it also mirrors the CI environment.
|
||||
|
||||
## FAQ
|
||||
|
||||
### Why am I seeing issues under Virtualbox?
|
||||
Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:**
|
||||
|
||||
```console
|
||||
vagrant plugin install vagrant-vbguest
|
||||
```
|
||||
|
||||
### How do I remove an existing environment?
|
||||
Finished with your environment? From anywhere inside the folder where you checked out this project, Execute:
|
||||
|
||||
```console
|
||||
vagrant destory
|
||||
```
|
||||
|
||||
### What if I want to use Docker directly?
|
||||
Want to benefit from the Vagrant workflow without a virtual machine? The Vagrantfile is configured to bypass running a virtual machine, and run the container directly. Execute the following when bringing up the environment to force the use of Docker:
|
||||
```console
|
||||
vagrant up --provider=docker
|
||||
```
|
||||
|
||||
### How do I access the virtual machine instead of the Docker container?
|
||||
Execute the following to bypass the `vagrant` user booting directly to the official qmk builder image:
|
||||
|
||||
```console
|
||||
vagrant ssh -c 'sudo -i'
|
||||
```
|
@@ -1,19 +1,18 @@
|
||||
# Quantum Hand-Wiring Guide
|
||||
# Hand-Wiring Guide
|
||||
|
||||
Parts list:
|
||||
* *x* keyswitches (MX, Matias, Gateron, etc)
|
||||
* *x* diodes
|
||||
* Keyboard plate (metal, plastic, cardboard, etc)
|
||||
* Wire (strained for wiring to the Teensy, anything for the rows/columns)
|
||||
* Soldering iron set at 600ºF or 315ºC (if temperature-controlled)
|
||||
* Rosin-cored solder (leaded or lead-free)
|
||||
* Adequate ventilation/a fan
|
||||
* Tweezers (optional)
|
||||
* Wire cutters/snippers
|
||||
## Preamble: How a Keyboard Matrix Works (and why we need diodes)
|
||||
|
||||
## How the Matrix Works (Why We Need Diodes)
|
||||
The collapsible section below covers why keyboards are wired the way they are, as outlined in this guide. It isn't required reading to make your own hand wired keyboard, but provides background information.
|
||||
|
||||
The microcontroller (in this case, the Teensy 2.0) will be setup up via the firmware to send a logical 1 to the columns, one at a time, and read from the rows, all at once - this process is called matrix scanning. The matrix is a bunch of open switches that, by default, don't allow any current to pass through - the firmware will read this as no keys being pressed. As soon as you press one key down, the logical 1 that was coming from the column the keyswitch is attached to gets passed through the switch and to the corresponding row - check out the following 2x2 example:
|
||||
<details>
|
||||
|
||||
<summary>Click for details</summary>
|
||||
|
||||
Without a matrix circuit each switch would require its own wire directly to the controller.
|
||||
|
||||
Simply put, when the circuit is arranged in rows and columns, if a key is pressed, a column wire makes contact with a row wire and completes a circuit. The keyboard controller detects this closed circuit and registers it as a key press.
|
||||
|
||||
The microcontroller will be setup up via the firmware to send a logical 1 to the columns, one at a time, and read from the rows, all at once - this process is called matrix scanning. The matrix is a bunch of open switches that, by default, don't allow any current to pass through - the firmware will read this as no keys being pressed. As soon as you press one key down, the logical 1 that was coming from the column the keyswitch is attached to gets passed through the switch and to the corresponding row - check out the following 2x2 example:
|
||||
|
||||
Column 0 being scanned Column 1 being scanned
|
||||
x x
|
||||
@@ -100,30 +99,132 @@ Things act as they should! Which will get us the following data:
|
||||
|
||||
The firmware can then use this correct data to detect what it should do, and eventually, what signals it needs to send to the OS.
|
||||
|
||||
# The Actual Hand-Wiring
|
||||
Further reading:
|
||||
- [Wikipedia article](https://en.wikipedia.org/wiki/Keyboard_matrix_circuit)
|
||||
- [Deskthority article](https://deskthority.net/wiki/Keyboard_matrix)
|
||||
- [Keyboard Matrix Help by Dave Dribin (2000)](https://www.dribin.org/dave/keyboard/one_html/)
|
||||
- [How Key Matrices Works by PCBheaven](http://pcbheaven.com/wikipages/How_Key_Matrices_Works/) (animated examples)
|
||||
- [How keyboards work - QMK documentation](how_keyboards_work.md)
|
||||
|
||||
## Getting Things in Place
|
||||
</details>
|
||||
|
||||
When starting this, you should have all of your stabilisers and keyswitches already installed (and optionally keycaps). If you're using a Cherry-type stabiliser (plate-mounted only, obviously), you'll need to install that before your keyswitches. If you're using Costar ones, you can installed them afterwards.
|
||||
|
||||
To make things easier on yourself, make sure all of the keyswitches are oriented the same way (if they can be - not all layouts support this). Despite this, it's important to remember that the contacts on the keyswitches are completely symmetrical. We'll be using the keyswitch's left side contact for wiring the rows, and the right side one for wiring the columns.
|
||||
## Parts list
|
||||
|
||||
Get your soldering iron heated-up and collect the rest of the materials from the part list at the beginning of the guide. Place your keyboard so that the bottoms of the keyswitches are accessible - it may be a good idea to place it on a cloth to protect your keyswitches/keycaps.
|
||||
You will need: (where *x* is the number of keys on your planned keyboard)
|
||||
|
||||
Before continuing, plan out where you're going to place your Teensy. If you're working with a board that has a large (6.25u) spacebar, it may be a good idea to place it in-between switches against the plate. Otherwise, you may want to trim some of the leads on the keyswitches where you plan on putting it - this will make it a little harder to solder the wire/diodes, but give you more room to place the Teensy.
|
||||
* QMK compatible microcontroller board (Teensy, Pro-Micro, QMK Proton C etc.)
|
||||
* *x* keyswitches (MX, Matias, Gateron, etc)
|
||||
* *x* through hole diodes
|
||||
* Keyboard plate and plate mount stabilisers
|
||||
* Wire
|
||||
* Soldering iron
|
||||
* Rosin-cored solder
|
||||
* Adequate ventilation/a fan
|
||||
* Wire cutters/snippers
|
||||
|
||||
## Preparing the Diodes
|
||||
Optional but useful:
|
||||
|
||||
It's a little easier to solder the diodes in place if you bend them at a 90º angle immediately after the black line - this will help to make sure you put them on the right way (direction matters), and in the correct position. The diodes will look like this when bent (with longer leads):
|
||||
* Wire strippers/a sharp knife
|
||||
* Tweezers and/or small needle nose pliers
|
||||
* Soldering station/Helping hands
|
||||
|
||||
```
|
||||
┌─────┬─┐
|
||||
───┤ │ ├─┐
|
||||
└─────┴─┘ │
|
||||
│
|
||||
```
|
||||
## Starting the build
|
||||
|
||||
We'll be using the long lead at the bent end to connect it to the elbow (bent part) of the next diode, creating the row.
|
||||
There are many ways to hand wire a PCB matrix, this guide will describe the fundamentals as well as some recommended ways to go about it.
|
||||
|
||||
As we are dealing with hand wiring, it is assumed that you already have a plate. If you are planning a completely custom layout, tools such as [ai03 Plate Generator](https://kbplate.ai03.me/) and [Swillkb Plate & Case Builder](http://builder.swillkb.com/) can help when designing one.
|
||||
|
||||
Start by installing the switches and stabilisers in the plate. Depending on the thickness and material this may also involve hot gluing it in place.
|
||||
|
||||
## Planning the matrix
|
||||
|
||||
If you are following a pre-existing handwire guide (e.g. for the keyboards in the [handwire firmware section](https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired) you can skip this step, just ensure you wire the matrix as described.
|
||||
|
||||
What you want to achieve is one leg from each switch being attached to the corresponding switches next to it (rows) and the other leg being attached to the switches above and below it (columns) and a diode to one of the legs, mosy commonly this will be the leg attached to the rows, and the diode will face away from it (Column to Row) i.e. with the wire furthest from the black line on the diode connected to the switch (as current will only travel in one direction through a diode)
|
||||
|
||||
It is fairly simple to plan for an ortholinear keyboard (like a Planck).
|
||||
|
||||

|
||||
Image from [RoastPotatoes' "How to hand wire a Planck"](https://blog.roastpotatoes.co/guide/2015/11/04/how-to-handwire-a-planck/)
|
||||
|
||||
But the larger and more complicated your keyboard, the more complex the matrix. [Keyboard Firmware Builder](https://kbfirmware.com/) can help you plan your matrix layout (shown here with a basic fullsize ISO keyboard imported from [Keyboard Layout Editor](http://www.keyboard-layout-editor.com).
|
||||
|
||||

|
||||
|
||||
Bear in mind that the number of rows plus the number of columns can not exceed the number of I/O pins on your controller. So the fullsize matrix shown above would be possible on a Proton C or Teensy++, but not on a regular Teensy or Pro Micro
|
||||
|
||||
#### Common Microcontroller Boards
|
||||
|
||||
| Board | Controller | # I/O | Pinout |
|
||||
| :------------ |:-------------:| ------:| ------ |
|
||||
| Pro Micro* | ATmega32u4 | 20 | [link](https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/hardware-overview-pro-micro#Teensy++_2.0) |
|
||||
| Teensy 2.0 | ATmega32u4 | 25 | [link](https://www.pjrc.com/teensy/pinout.html) |
|
||||
| [QMK Proton C](https://qmk.fm/proton-c/) | STM32F303xC | 36 | [link 1](https://i.imgur.com/RhtrAlc.png), [2](https://deskthority.net/wiki/QMK_Proton_C) |
|
||||
| Teensy++ 2.0 | AT90USB1286 | 46 | [link](https://www.pjrc.com/teensy/pinout.html#Teensy_2.0) |
|
||||
|
||||
*Elite C is essentially the same as a pro micro with a USB-C instead of Micro-USB
|
||||
|
||||
There are also a number of boards designed specifically for handwiring that mount directly to a small number of switches and offer pinouts for the rest. Though these are generally more expensive and may be more difficult to get hold of.
|
||||
|
||||
<img src="https://i.imgur.com/QiA3ta6.jpg" alt="Postage board mini mounted in place" width="500"/>
|
||||
|
||||
| Board | Controller | # I/O |
|
||||
| :------------ |:-------------:| ------:|
|
||||
| [Swiss helper](https://www.reddit.com/r/MechanicalKeyboards/comments/8jg5d6/hand_wiring_this_might_help/) | ATmega32u4 | 20 |
|
||||
| [Postage board](https://github.com/LifeIsOnTheWire/Postage-Board/)| ATmega32u4| 25 |
|
||||
| [Postage board mini](https://geekhack.org/index.php?topic=101460.0)| ATmega32u4| 25 |
|
||||
|
||||
## Wiring the matrix
|
||||
|
||||
There is no one right way to do this. What you want to achieve is good connection at all of the joints planned and no unintentional shorts.
|
||||
|
||||
Established materials and techniques include:
|
||||
|
||||
| Technique | Examples | Pros | Cons | Image
|
||||
| :-----------| :------- | :------ | :--- | :---
|
||||
| Lengths of wire with stripped segments | [Sasha Solomon's Dactyl](https://medium.com/@sachee/building-my-first-keyboard-and-you-can-too-512c0f8a4c5f) and [Cribbit's modern hand wire](https://geekhack.org/index.php?topic=87689.0) | Neat and tidy | Some effort in stripping the wire | 
|
||||
| Short lengths of wire | [u/xicolinguada's ortho build](https://www.reddit.com/r/MechanicalKeyboards/comments/c39k4f/my_first_hand_wired_keyboard_its_not_perfect_but/) | Easier to strip the wire | More difficult to place | 
|
||||
| Magnet/Enamelled wire | [Brett Kosinski's handwired alpha](http://blog.b-ark.ca/Blog-2019-01-27) and [fknraiden's custom board](https://geekhack.org/index.php?topic=74223.0) | Can be directly soldered onto (insulation burns off with heat) | Appearance? | 
|
||||
| Bending the legs of the diodes for the rows | [Matt3o's Brownfox](https://deskthority.net/viewtopic.php?f=7&t=6050) | Fewer solder joints required | Uninsulated | 
|
||||
| Using ridid wiring (e.g. brass tube) | [u/d_stilgar's invisible hardline](https://www.reddit.com/r/MechanicalKeyboards/comments/8aw5j2/invisible_hardline_keyboard_progress_update_april/) and [u/jonasfasler's first attempt](https://www.reddit.com/r/MechanicalKeyboards/comments/de1jyv/my_first_attempt_at_handwiring_a_keyboard/) | Very pretty | More difficult. No physical insulation | 
|
||||
| Bare wire with insulation added after (e.g. kapton tape) | [Matt3o's 65% on his website](https://matt3o.com/hand-wiring-a-custom-keyboard/) | Easier (no wire stripping required) | Not as attractive | 
|
||||
| Copper tape | [ManuForm Dactyl](https://github.com/tshort/dactyl-keyboard) | Very easy | Only really works when your plate/case aligns with the bottom of your switches | 
|
||||
|
||||
|
||||
Note that these methods can be combined. Prepare your lengths of wire before moving on to soldering.
|
||||
|
||||
|
||||
### A note on split keyboards
|
||||
|
||||
If you are planning a split keyboard (e.g. Dactyl) each half will require a controller and a means of communicating between them (like a TRRS or hardwired cable). Further information can be found in the [QMK split keyboard documentation.](feature_split_keyboard.md)
|
||||
|
||||
|
||||
### Soldering
|
||||
|
||||
There are a lot of soldering guides and tips available elsewhere but here are some of the most useful and relevant for hand wiring:
|
||||
|
||||
To ensure a strong solder joint you want a good amount of contact between the solder and the 2 peices of metal you are connecting, a good way of doing this (though not required) is looping around pins or twisting wires together before applying solder.
|
||||
|
||||
<img src="https://i.imgur.com/eHJjmnU.jpg" alt="Looped around rod" width="200"/> <img src="https://i.imgur.com/8nbxmmr.jpg?1" alt="Looped diode leg" width="200"/>
|
||||
|
||||
If your diodes are on a packaging strip and need a bend in them (either the start of a loop or for connecting to its neighbour) this can easily done by bending it over something straight like the edge of a box, table, or ruler. This also helps keep track of the direction of the diode as all the bends will be on the same side.
|
||||
|
||||
<img src="https://i.imgur.com/oITudbX.jpg" alt="Bent diode legs" width="200"/>
|
||||
|
||||
If your iron has temperature control, set it to 315ºC (600ºF).
|
||||
|
||||
Once heated, tin your soldering iron - this means melting a small amount of solder on the end of the iron and then quickly wiping it off on a wet sponge or wire cleaning pad, leaving a shiny silvery coating on the end which helps keep oxidisation at bay and helps solder to flow.
|
||||
|
||||
When you come to apply the solder, hold the soldering iron against the two surfaces for a second to heat it, then apply a small amount of solder to join the two pieces together. Heating the surfaces ensures that the solder adheres to it and that it does not cool too quickly.
|
||||
|
||||
Don't hold the iron on the solder/joint longer than necessary. Heat will be conducted through the surfaces and can damage components (melt switch housings etc.). Also, solder contains flux, which aids in ["wetting"](https://en.m.wikipedia.org/wiki/Wetting). The longer heat is applied to the solder the more flux will evaporate meaning you may end up with a bad solder joint with peaks which, apart from looking bad, may also increase the risk of electrical shorts.
|
||||
|
||||
The following collapsible section describes in detail how to solder rows using the bent diode technique and columns using short lengths of wire.
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Click for details</summary>
|
||||
|
||||
## Soldering the Diodes
|
||||
|
||||
@@ -169,34 +270,52 @@ Before beginning to solder, it helps to have your wire pre-bent (if using single
|
||||
|
||||
If you're not using any insulation, you can try to keep the column wires elevated, and solder them near the tips of the keyswitch contacts - if the wires are sturdy enough, they won't short out to the row wiring an diodes.
|
||||
|
||||
## Wiring Things to the Teensy
|
||||
</details>
|
||||
|
||||
Now that the matrix itself is complete, it's time to connect what you've done to the Teensy. You'll be needing the number of pins equal to your number of columns + your number of rows. There are some pins on the Teensy that are special, like D6 (the LED on the chip), or some of the UART, SPI, I2C, or PWM channels, but only avoid those if you're planning something in addition to a keyboard. If you're unsure about wanting to add something later, you should have enough pins in total to avoid a couple.
|
||||
# Wiring up the controller
|
||||
|
||||
The pins you'll absolutely have to avoid are: GND, VCC, AREF, and RST - all the others are usable and accessible in the firmware.
|
||||
Now that the matrix itself is complete, it's time to connect what you've done to the microcontroller board.
|
||||
|
||||
Place the Teensy where you plan to put it - you'll have to cut wires to length in the next step, and you'll want to make sure they reach.
|
||||
Place the microcontroller where you want it to be located, give thought to mounting and case alignment. Bear in mind that the location of the USB socket can be different from the controller by using a short male to female cable if required,.
|
||||
|
||||
Starting with the first column on the right side, measure out how much wire you'll need to connect it to the first pin on the Teensy - it helps to pick a side that you'll be able to work down, to keep the wires from overlapping too much. It may help to leave a little bit of slack so things aren't too tight. Cut the piece of wire, and solder it to the Teensy, and then the column - you can solder it anywhere along the column, but it may be easiest at the keyswitch. Just be sure the wire doesn't separate from the keyswitch when soldering.
|
||||
Find the pinout/documentation for your microcontroller board ([links here](#common-microcontroller-boards)) and make a note of all the digital I/O pins on it (note that on some controllers, like the teensy, analogue I/O can double as digital) as these are the pins you want to connect your wires to.
|
||||
|
||||
As you move from column to column, it'll be helpful to write the locations of the pins down. We'll use this data to setup the matrix in the future.
|
||||
<details>
|
||||
|
||||
When you're done with the columns, start with the rows in the same process, from top to bottom, and write them all down. Again, you can solder anywhere along the row, as long as it's after the diode - soldering before the diode (on the keyswitch side) will cause that row not to work.
|
||||
<summary>Specific instructions for the Teensy 2.0</summary>
|
||||
|
||||
As you move along, be sure that the Teensy is staying in place - recutting and soldering the wires is a pain!
|
||||
There are some pins on the Teensy that are special, like D6 (the LED on the chip), or some of the UART, SPI, I2C, or PWM channels, but only avoid those if you're planning something in addition to a keyboard. If you're unsure about wanting to add something later, you should have enough pins in total to avoid a couple.
|
||||
|
||||
## Additional guides
|
||||
The pins you'll absolutely have to avoid, as with any controller, are: GND, VCC, AREF, and RST - all the others are usable and accessible in the firmware.
|
||||
|
||||
</details>
|
||||
|
||||
Cut wires to the length of the distance from the a point on each column/row to the controller. You can solder anywhere along the row, as long as it's after the diode - soldering before the diode (on the keyswitch side) will cause that row not to work.
|
||||
|
||||
Ribbon cable can be used to keep this extra tidy. You may also want to consider routing the wires beneath the exisiting columns/rows.
|
||||
|
||||
<img src="https://i.imgur.com/z2QlKfB.jpg" alt="Ribbon Cable" width="350"/>
|
||||
|
||||
As you solder the wires to the controller make a note of which row/column is going to which pin on the controller as we'll use this data to setup the matrix when we create the firmware.
|
||||
|
||||
As you move along, be sure that the controller is staying in place - recutting and soldering the wires is a pain!
|
||||
|
||||
If you're more of a visual learner, or want some additional tips and something more to follow along, these two visual step by step guides may be helpful:
|
||||
|
||||
- [BrownFox's step by step guide](https://deskthority.net/viewtopic.php?f=7&t=6050)
|
||||
- [Cribbit's modern hand wiring guide](https://geekhack.org/index.php?topic=87689.0)
|
||||
|
||||
# Getting Some Basic Firmware Set Up
|
||||
|
||||
From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch.
|
||||
From here, you should have a working keyboard once you program a firmware.
|
||||
|
||||
To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/) (paid) or [Visual Studio Code](https://code.visualstudio.com) (free).
|
||||
Simple firmware can be created easily using the [Keyboard Firmware Builder](https://kbfirmware.com/) website. Recreate your layout using [Keyboard Layout Editor](http://www.keyboard-layout-editor.com), import it and recreate the matrix (if not already done as part of [planning the matrix](#planning-the-matrix).
|
||||
|
||||
Go through the rest of the tabs, assigning keys until you get to the last one where you can compile and download your firmware. The .hex file can be flashed straight onto your keyboard, and the .zip of source files can be modified for advanced functionality and compiled locally using the method described in the collapsable section below, or using the more comprehensive [getting started guide.](newbs_getting_started)
|
||||
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Creating and compiling your firmware locally (command line method)</summary>
|
||||
|
||||
To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/) (paid) or [Visual Studio Code](https://code.visualstudio.com) (free).
|
||||
|
||||
The first thing we're going to do is create a new keyboard. In your terminal, run this command, which will ask you some questions and generate a basic keyboard project:
|
||||
|
||||
@@ -319,9 +438,22 @@ Once everything is installed, running `make` in the terminal should get you some
|
||||
|
||||
Once you have your `<project_name>.hex` file, open up the Teensy loader application, and click the file icon. From here, navigate to your `QMK/keyboards/<project_name>/` folder, and select the `<project_name>.hex` file. Plug in your keyboard and press the button on the Teensy - you should see the LED on the device turn off once you do. The Teensy Loader app will change a little, and the buttons should be clickable - click the download button (down arrow), and then the reset button (right arrow), and your keyboard should be ready to go!
|
||||
|
||||
</details>
|
||||
|
||||
## Flashing the Firmware
|
||||
|
||||
Install [QMK toolbox](https://github.com/qmk/qmk_toolbox).
|
||||
|
||||

|
||||
|
||||
Under "Local File" navigate to your newly created .hex file. Under "Microcontroller", select the corresponding one for your controller board (common ones available [here](#common-microcontroller-boards)).
|
||||
|
||||
Plug in your keyboard and press the reset button (or short the Reset and Ground pins if there is no button) and click the "Flash" button in QMK toolbox.
|
||||
|
||||
|
||||
## Testing Your Firmware
|
||||
|
||||
Carefully flip your keyboard over, open up a new text document, and try typing - you should get the characters that you put into your keymap. Test each key, and note the ones that aren't working. Here's a quick trouble-shooting guide for non-working keys:
|
||||
Use a website such as [keyboard tester](https://www.keyboardtester.com/tester.html)/[keyboard checker](http://keyboardchecker.com/) or just open a text editor and try typing - you should get the characters that you put into your keymap. Test each key, and make a note of the ones that aren't working. Here's a quick trouble-shooting guide for non-working keys:
|
||||
|
||||
0. Flip the keyboard back over and short the keyswitch's contacts with a piece wire - this will eliminate the possibility of the keyswitch being bad and needing to be replaced.
|
||||
1. Check the solder points on the keyswitch - these need to be plump and whole. If you touch it with a moderate amount of force and it comes apart, it's not strong enough.
|
||||
@@ -330,11 +462,25 @@ Carefully flip your keyboard over, open up a new text document, and try typing -
|
||||
4. Check the solder joints on both sides of the wires going to/from the Teensy - the wires need to be fully soldered and connect to both sides.
|
||||
5. Check the `<project_name>.h` file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable.
|
||||
6. Check to make sure you actually compiled the firmware and flashed the Teensy correctly. Unless you got error messages in the terminal, or a pop-up during flashing, you probably did everything correctly.
|
||||
7. Use a multimeter to check that the switch is actually closing when actuated (completing the circuit when pressed down).
|
||||
|
||||
If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end.
|
||||
|
||||
# Securing the Teensy, Finishing Your Hardware, Getting Fancier Firmware
|
||||
# Finishing up
|
||||
|
||||
Once you have confirmed that the keyboard is working, if you have used a seperate (non handwire specific) controller you will want to secure it in place. This can be done in many different ways e.g. hot glue, double sided sticky tape, 3D printed caddy, electrical tape.
|
||||
|
||||
If you found this fullfilling you could experiment by adding additional features such as [in switch LEDs](https://geekhack.org/index.php?topic=94258.0), [in switch RGB](https://www.reddit.com/r/MechanicalKeyboards/comments/5s1l5u/photoskeyboard_science_i_made_a_handwired_rgb/), [RGB underglow](https://medium.com/@DavidNZ/hand-wired-custom-keyboard-cdd14429c7b3#.7a1ovebsk) or even an [OLED display!](https://www.reddit.com/r/olkb/comments/5zy7og/adding_ssd1306_oled_display_to_your_build/)
|
||||
|
||||
There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different keyboards to see how people use all of them. You can always stop by [the OLKB subreddit](http://reddit.com/r/olkb) or [QMK Discord](https://discord.gg/Uq7gcHh) for help!
|
||||
|
||||
# Links to other guides:
|
||||
|
||||
- [matt3o's step by step guide (BrownFox build)](https://deskthority.net/viewtopic.php?f=7&t=6050) also his [website](https://matt3o.com/hand-wiring-a-custom-keyboard/) and [video guide](https://www.youtube.com/watch?v=LVzpsjFWPP4)
|
||||
- [Cribbit's "Modern hand wiring guide - stronger, cleaner, easier"](https://geekhack.org/index.php?topic=87689.0)
|
||||
- [Sasha Solomon's "Building my first Keyboard"](https://medium.com/@sachee/building-my-first-keyboard-and-you-can-too-512c0f8a4c5f)
|
||||
- [RoastPotatoes' "How to hand wire a Planck"](https://blog.roastpotatoes.co/guide/2015/11/04/how-to-handwire-a-planck/)
|
||||
- [Masterzen's "Handwired keyboard build log"](http://www.masterzen.fr/2018/12/16/handwired-keyboard-build-log-part-1/)
|
||||
|
||||
|
||||
Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out.
|
||||
|
||||
There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different keyboards (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Keyboards with AVR Processors
|
||||
|
||||
This page describes the support for for AVR processors in QMK. AVR processors include the atmega32u4, atmega32u2, at90usb1286, and other processors from Atmel Corporation. AVR processors are 8-bit MCU's that are designed to be easy to work with. The most common AVR processors in keyboards have on-board USB and plenty of GPIO for supporting large keyboard matrices. They are the most popular MCU for use in keyboards today.
|
||||
This page describes the support for for AVR processors in QMK. AVR processors include the atmega32u4, atmega32u2, at90usb1286, and other processors from Atmel Corporation. AVR processors are 8-bit MCUs that are designed to be easy to work with. The most common AVR processors in keyboards have on-board USB and plenty of GPIO for supporting large keyboard matrices. They are the most popular MCU for use in keyboards today.
|
||||
|
||||
If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_guidelines.md) to get a sense of how keyboards fit into QMK.
|
||||
|
||||
@@ -78,7 +78,7 @@ Do change the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` lines to accurately r
|
||||
#define DESCRIPTION A custom keyboard
|
||||
```
|
||||
|
||||
?> Note: On Windows and macOS the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` fields will be displayed in the list of USB devices. ?> On Linux these values will not be visible in lsusb by default, since Linux takes the information from the list maintained by [USB ID Repository](http://www.linux-usb.org/usb-ids.html) by default. lsusb will show the information reported by the device when executed with -v option. It is also present in kernel logs after plugging in the device.
|
||||
?> Windows and macOS will display the `MANUFACTURER` and `PRODUCT` in the list of USB devices. `lsusb` on Linux instead takes these from the list maintained by the [USB ID Repository](http://www.linux-usb.org/usb-ids.html) by default. `lsusb -v` will show the values reported by the device, and they are also present in kernel logs after plugging it in.
|
||||
|
||||
### Keyboard Matrix Configuration
|
||||
|
||||
@@ -125,7 +125,7 @@ To configure a keyboard where each switch is connected to a separate pin and gro
|
||||
|
||||
### Backlight Configuration
|
||||
|
||||
By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are using one of those you can simply enable it here. For more details see the [Backlight Documentation](feature_backlight.md).
|
||||
QMK supports backlighting on most GPIO pins. A select few of these can be driven by the MCU in hardware. For more details see the [Backlight Documentation](feature_backlight.md).
|
||||
|
||||
```c
|
||||
#define BACKLIGHT_PIN B7
|
||||
@@ -134,8 +134,6 @@ By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are us
|
||||
#define BREATHING_PERIOD 6
|
||||
```
|
||||
|
||||
?> You can use backlighting on any pin you like, but you will have to do more work to support that. See the [Backlight Documentation](feature_backlight.md) for more details.
|
||||
|
||||
### Other Configuration Options
|
||||
|
||||
There are a lot of features that can be configured or tuned in `config.h`. You should see the [Config Options](config_options.md) page for more details.
|
||||
|
@@ -20,7 +20,7 @@ Support for SSD1306 based OLED displays. For more information see the [OLED Driv
|
||||
|
||||
## uGFX
|
||||
|
||||
You can make use of uGFX within QMK to drive character and graphic LCD's, LED arrays, OLED, TFT, and other display technologies. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process.
|
||||
You can make use of uGFX within QMK to drive character and graphic LCDs, LED arrays, OLED, TFT, and other display technologies. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process.
|
||||
|
||||
## WS2812 (AVR Only)
|
||||
|
||||
|
@@ -67,7 +67,7 @@ The presence of this file means that the folder is a keyboard target and can be
|
||||
|
||||
### `<keyboard_name.c>`
|
||||
|
||||
This is where you will write custom code for your keyboard. Typically you will write code to initialize and interface with the hardware in your keyboard. If your keyboard consists of only a key matrix with no LEDs, speakers, or other auxillary hardware this file can be blank.
|
||||
This is where you will write custom code for your keyboard. Typically you will write code to initialize and interface with the hardware in your keyboard. If your keyboard consists of only a key matrix with no LEDs, speakers, or other auxiliary hardware this file can be blank.
|
||||
|
||||
The following functions are typically defined in this file:
|
||||
|
||||
|
@@ -33,7 +33,11 @@ The firmware does not send actual letters or characters, but only scancodes.
|
||||
Thus, by modifying the firmware, you can only modify what scancode is sent over
|
||||
USB for a given key.
|
||||
|
||||
## 3. What the Operating System Does
|
||||
## 3. What the Event Input/Kernel Does
|
||||
|
||||
The *scancode* is mapped to a *keycode* dependent on the keyboard [60-keyboard.hwdb at Master](https://github.com/systemd/systemd/blob/master/hwdb.d/60-keyboard.hwdb). Without this mapping, the operating system will not receive a valid keycode and will be unable to do anything useful with that key press.
|
||||
|
||||
## 4. What the Operating System Does
|
||||
|
||||
Once the keycode reaches the operating system, a piece of software has to have
|
||||
it match an actual character thanks to a keyboard layout. For example, if your
|
||||
@@ -63,10 +67,10 @@ You may wonder why a keyboard layout containing all of Unicode is not devised th
|
||||
|
||||
## How to (Maybe) Enter Unicode Characters
|
||||
|
||||
You can have the firmware send *sequences of keys* to use the [software Unicode Input Method](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input) of the target operating system, thus effectively entering characters independently of the layout defined in the OS.
|
||||
You can have the firmware send *sequences of keys* to use the [software Unicode Input Method](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_input) of the target operating system, thus effectively entering characters independently of the layout defined in the OS.
|
||||
|
||||
Yet, it does come with multiple disadvantages:
|
||||
|
||||
- Tied to a specific OS a a time (need recompilation when changing OS);
|
||||
- Tied to a specific OS at a time (need recompilation when changing OS);
|
||||
- Within a given OS, does not work in all software;
|
||||
- Limited to a subset of Unicode on some systems.
|
||||
|
@@ -7,7 +7,7 @@ The I2C Master drivers used in QMK have a set of common functions to allow porta
|
||||
|Function |Description |
|
||||
|------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|`void i2c_init(void);` |Initializes the I2C driver. This function should be called once before any transaction is initiated. |
|
||||
|`uint8_t i2c_start(uint8_t address);` |Starts an I2C transaction. Address is the 7-bit slave address without the direction bit. |
|
||||
|`uint8_t i2c_start(uint8_t address, uint16_t timeout);` |Starts an I2C transaction. Address is the 7-bit slave address without the direction bit. |
|
||||
|`uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Transmit data over I2C. Address is the 7-bit slave address without the direction. Returns status of transaction. |
|
||||
|`uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Receive data over I2C. Address is the 7-bit slave address without the direction. Saves number of bytes specified by `length` in `data` array. Returns status of transaction. |
|
||||
|`uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_transmit` function but `regaddr` sets where in the slave the data will be written. |
|
||||
@@ -34,7 +34,6 @@ The following defines can be used to configure the I2C master driver.
|
||||
|Variable |Description |Default|
|
||||
|------------------|---------------------------------------------------|-------|
|
||||
|`F_SCL` |Clock frequency in Hz |400KHz |
|
||||
|`Prescaler` |Divides master clock to aid in I2C clock selection |1 |
|
||||
|
||||
AVRs usually have set GPIO which turn into I2C pins, therefore no further configuration is required.
|
||||
|
||||
@@ -65,12 +64,47 @@ By default the I2C1 hardware driver is assumed to be used. If another hardware d
|
||||
|
||||
STM32 MCUs allows a variety of pins to be configured as I2C pins depending on the hardware driver used. By default B6 and B7 are set to I2C. You can use these defines to set your i2c pins:
|
||||
|
||||
| Variable | Description | Default |
|
||||
|-------------|----------------------------------------------|---------|
|
||||
| `I2C1_BANK` | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) | `GPIOB` |
|
||||
| `I2C1_SCL` | The pin number for the SCL pin (0-9) | `6` |
|
||||
| `I2C1_SDA` | The pin number for the SDA pin (0-9) | `7` |
|
||||
| Variable | Description | Default |
|
||||
|--------------------------|----------------------------------------------------------------------------------------------|---------|
|
||||
| `I2C1_SCL_BANK` | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) to use for SCL | `GPIOB` |
|
||||
| `I2C1_SDA_BANK` | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) to use for SDA | `GPIOB` |
|
||||
| `I2C1_SCL` | The pin number for the SCL pin (0-9) | `6` |
|
||||
| `I2C1_SDA` | The pin number for the SDA pin (0-9) | `7` |
|
||||
| `I2C1_BANK` (deprecated) | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`), superceded by `I2C1_SCL_BANK`, `I2C1_SDA_BANK` | `GPIOB` |
|
||||
|
||||
The ChibiOS I2C driver configuration depends on STM32 MCU:
|
||||
|
||||
STM32F1xx, STM32F2xx, STM32F4xx, STM32L0xx and STM32L1xx use I2Cv1;
|
||||
STM32F0xx, STM32F3xx, STM32F7xx and STM32L4xx use I2Cv2;
|
||||
|
||||
#### I2Cv1
|
||||
STM32 MCUs allow for different clock and duty parameters when configuring I2Cv1. These can be modified using the following parameters, using <https://www.playembedded.org/blog/stm32-i2c-chibios/#I2Cv1_configuration_structure> as a reference:
|
||||
|
||||
| Variable | Default |
|
||||
|--------------------|------------------|
|
||||
| `I2C1_OPMODE` | `OPMODE_I2C` |
|
||||
| `I2C1_CLOCK_SPEED` | `100000` |
|
||||
| `I2C1_DUTY_CYCLE` | `STD_DUTY_CYCLE` |
|
||||
|
||||
#### I2Cv2
|
||||
STM32 MCUs allow for different timing parameters when configuring I2Cv2. These can be modified using the following parameters, using <https://www.st.com/en/embedded-software/stsw-stm32126.html> as a reference:
|
||||
|
||||
| Variable | Default |
|
||||
|-----------------------|---------|
|
||||
| `I2C1_TIMINGR_PRESC` | `15U` |
|
||||
| `I2C1_TIMINGR_SCLDEL` | `4U` |
|
||||
| `I2C1_TIMINGR_SDADEL` | `2U` |
|
||||
| `I2C1_TIMINGR_SCLH` | `15U` |
|
||||
| `I2C1_TIMINGR_SCLL` | `21U` |
|
||||
|
||||
STM32 MCUs allow for different "alternate function" modes when configuring GPIO pins. These are required to switch the pins used to I2Cv2 mode. See the respective datasheet for the appropriate values for your MCU.
|
||||
|
||||
| Variable | Default |
|
||||
|---------------------|---------|
|
||||
| `I2C1_SCL_PAL_MODE` | `4` |
|
||||
| `I2C1_SDA_PAL_MODE` | `4` |
|
||||
|
||||
#### Other
|
||||
You can also overload the `void i2c_init(void)` function, which has a weak attribute. If you do this the configuration variables above will not be used. Please consult the datasheet of your MCU for the available GPIO configurations. The following is an example initialization function:
|
||||
|
||||
```C
|
||||
|
@@ -3,9 +3,16 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>QMK Firmware</title>
|
||||
<link rel="icon" type="image/png" href="gitbook/images/favicon.png">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="description" content="Description">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta property="og:title" content="QMK Firmware Docs">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:description" content="The full documentation of the open-source firmware">
|
||||
<meta property="og:image" content="https://i.imgur.com/svjvIrw.jpg">
|
||||
<meta property="og:url" content="https://docs.qmk.fm">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css" title="light">
|
||||
<link rel="stylesheet" href="qmk.css" title="dark" disabled>
|
||||
<link rel="stylesheet" href="sidebar.css" />
|
||||
@@ -14,19 +21,50 @@
|
||||
<div id="app"></div>
|
||||
<script>
|
||||
window.$docsify = {
|
||||
alias : {
|
||||
'/en/(.*)': '/$1',
|
||||
'/en-us/(.*)': '/$1',
|
||||
'/en-gb/(.*)': '/$1',
|
||||
'/.*/_langs.md': '/_langs.md',
|
||||
},
|
||||
basePath: '/',
|
||||
name: 'QMK Firmware',
|
||||
nameLink: 'https://qmk.fm/',
|
||||
nameLink: '/',
|
||||
repo: 'qmk/qmk_firmware',
|
||||
loadSidebar: '_summary.md',
|
||||
loadNavbar: '_langs.md',
|
||||
mergeNavbar: true,
|
||||
auto2top: true,
|
||||
formatUpdated: '{YYYY}/{MM}/{DD} {HH}:{mm}',
|
||||
search: {
|
||||
paths: 'auto',
|
||||
placeholder: 'Search Documentation...',
|
||||
noData: 'We could not find any documents matching your search.',
|
||||
placeholder: {
|
||||
'/zh-cn/': '搜索',
|
||||
'/': 'Search'
|
||||
},
|
||||
noData: {
|
||||
'/zh-cn/': '没有结果!',
|
||||
'/': 'No results!'
|
||||
},
|
||||
depth: 6
|
||||
},
|
||||
fallbackLanguages: ['zh']
|
||||
plugins: [
|
||||
function (hook, vm) {
|
||||
hook.beforeEach(function (html) {
|
||||
if (/githubusercontent\.com/.test(vm.route.file)) {
|
||||
url = vm.route.file
|
||||
.replace('raw.githubusercontent.com', 'github.com')
|
||||
.replace(/\/master/, '/blob/master')
|
||||
} else {
|
||||
url = 'https://github.com/qmk/qmk_firmware/blob/master/docs/' + vm.route.file
|
||||
}
|
||||
var editHtml = '[:memo: Edit Document](' + url + ')\n'
|
||||
return html
|
||||
+ '\n\n----\n\n'
|
||||
+ editHtml
|
||||
})
|
||||
},
|
||||
]
|
||||
}
|
||||
</script>
|
||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
||||
|
@@ -6,18 +6,17 @@ QMK has a GPIO control abstraction layer which is microcontroller agnostic. This
|
||||
|
||||
The following functions can provide basic control of GPIOs and are found in `quantum/quantum.h`.
|
||||
|
||||
|Function |Description |
|
||||
|----------------------|------------------------------------------------------------------|
|
||||
|`setPinInput(pin)` |Set pin as input with high impedance (High-Z) |
|
||||
|`setPinInputHigh(pin)`|Set pin as input with build in pull-up |
|
||||
|`setPinInputLow(pin)` |Set pin as input with build in pull-down (Supported only on STM32)|
|
||||
|`setPinOutput(pin)` |Set pin as output |
|
||||
|`writePinHigh(pin)` |Set pin level as high, assuming it is an output |
|
||||
|`writePinLow(pin)` |Set pin level as low, assuming it is an output |
|
||||
|`writePin(pin, level)`|Set pin level, assuming it is an output |
|
||||
|`readPin(pin)` |Returns the level of the pin |
|
||||
|Function |Description | Old AVR Examples | Old ChibiOS/ARM Examples |
|
||||
|----------------------|------------------------------------------------------------------|------------------------------------------------|-------------------------------------------------|
|
||||
|`setPinInput(pin)` |Set pin as input with high impedance (High-Z) | `DDRB &= ~(1<<2)` | `palSetLineMode(pin, PAL_MODE_INPUT)` |
|
||||
|`setPinInputHigh(pin)`|Set pin as input with builtin pull-up resistor | `DDRB &= ~(1<<2); PORTB \|= (1<<2)` | `palSetLineMode(pin, PAL_MODE_INPUT_PULLUP)` |
|
||||
|`setPinInputLow(pin)` |Set pin as input with builtin pull-down resistor | N/A (Not supported on AVR) | `palSetLineMode(pin, PAL_MODE_INPUT_PULLDOWN)` |
|
||||
|`setPinOutput(pin)` |Set pin as output | `DDRB \|= (1<<2)` | `palSetLineMode(pin, PAL_MODE_OUTPUT_PUSHPULL)` |
|
||||
|`writePinHigh(pin)` |Set pin level as high, assuming it is an output | `PORTB \|= (1<<2)` | `palSetLine(pin)` |
|
||||
|`writePinLow(pin)` |Set pin level as low, assuming it is an output | `PORTB &= ~(1<<2)` | `palClearLine(pin)` |
|
||||
|`writePin(pin, level)`|Set pin level, assuming it is an output | `(level) ? PORTB \|= (1<<2) : PORTB &= ~(1<<2)` | `(level) ? palSetLine(pin) : palClearLine(pin)` |
|
||||
|`readPin(pin)` |Returns the level of the pin | `_SFR_IO8(pin >> 4) & _BV(pin & 0xF)` | `palReadLine(pin)` |
|
||||
|
||||
## Advanced Settings
|
||||
|
||||
Each microcontroller can have multiple advanced settings regarding its GPIO. This abstraction layer does not limit the use of architecture-specific functions. Advanced users should consult the datasheet of their desired device and include any needed libraries. For AVR, the standard avr/io.h library is used; for STM32, the ChibiOS [PAL library](http://chibios.sourceforge.net/docs3/hal/group___p_a_l.html) is used.
|
||||
|
||||
|
151
docs/keycodes.md
151
docs/keycodes.md
@@ -55,7 +55,7 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`KC_EQUAL` |`KC_EQL` |`=` and `+` |
|
||||
|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` |
|
||||
|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` |
|
||||
|`KC_BSLASH` |`KC_BSLS` |`\` and <code>|</code> |
|
||||
|`KC_BSLASH` |`KC_BSLS` |`\` and `\|` |
|
||||
|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |
|
||||
|`KC_SCOLON` |`KC_SCLN` |`;` and `:` |
|
||||
|`KC_QUOTE` |`KC_QUOT` |`'` and `"` |
|
||||
@@ -106,7 +106,7 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |
|
||||
|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |
|
||||
|`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete |
|
||||
|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and <code>|</code> |
|
||||
|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and `\|` |
|
||||
|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key) |
|
||||
|`KC_POWER` | |System Power (macOS) |
|
||||
|`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` |
|
||||
@@ -143,7 +143,7 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards |
|
||||
|`KC_INT1` |`KC_RO` |JIS `\` and `_` |
|
||||
|`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana |
|
||||
|`KC_INT3` |`KC_JYEN` |JIS `¥` and <code>|</code> |
|
||||
|`KC_INT3` |`KC_JYEN` |JIS `¥` and `\|` |
|
||||
|`KC_INT4` |`KC_HENK` |JIS Henkan |
|
||||
|`KC_INT5` |`KC_MHEN` |JIS Muhenkan |
|
||||
|`KC_INT6` | |JIS Numpad `,` |
|
||||
@@ -185,8 +185,8 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute |
|
||||
|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up |
|
||||
|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down |
|
||||
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track (Windows) |
|
||||
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track (Windows) |
|
||||
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track |
|
||||
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track |
|
||||
|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track (Windows) |
|
||||
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |
|
||||
|`KC_MEDIA_SELECT` |`KC_MSEL` |Launch Media Player (Windows) |
|
||||
@@ -216,6 +216,11 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, <code>`</code> when pressed with Shift or GUI|
|
||||
|`KC_LSPO` | |Left Shift when held, `(` when tapped |
|
||||
|`KC_RSPC` | |Right Shift when held, `)` when tapped |
|
||||
|`KC_LCPO` | |Left Control when held, `(` when tapped |
|
||||
|`KC_RCPC` | |Right Control when held, `)` when tapped |
|
||||
|`KC_LAPO` | |Left Alt when held, `(` when tapped |
|
||||
|`KC_RAPC` | |Right Alt when held, `)` when tapped |
|
||||
|`KC_SFTENT` | |Right Shift when held, Enter when tapped |
|
||||
|`KC_LEAD` | |The [Leader key](feature_leader_key.md) |
|
||||
|`KC_LOCK` | |The [Lock key](feature_key_lock.md) |
|
||||
|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) |
|
||||
@@ -252,28 +257,37 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|
||||
## [Bootmagic](feature_bootmagic.md)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------------------------|---------|------------------------------------|
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Caps Lock and Left Control |
|
||||
|`MAGIC_CAPSLOCK_TO_CONTROL` | |Treat Caps Lock as Control |
|
||||
|`MAGIC_SWAP_LALT_LGUI` | |Swap Left Alt and GUI |
|
||||
|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and GUI |
|
||||
|`MAGIC_NO_GUI` | |Disable the GUI key |
|
||||
|`MAGIC_SWAP_GRAVE_ESC` | |Swap <code>`</code> and Escape |
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace |
|
||||
|`MAGIC_HOST_NKRO` | |Force NKRO on |
|
||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|
||||
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` | |Unswap Caps Lock and Left Control |
|
||||
|`MAGIC_UNCAPSLOCK_TO_CONTROL` | |Stop treating Caps Lock as Control |
|
||||
|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and GUI |
|
||||
|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and GUI |
|
||||
|`MAGIC_UNNO_GUI` | |Enable the GUI key |
|
||||
|`MAGIC_UNSWAP_GRAVE_ESC` | |Unswap <code>`</code> and Escape|
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|
||||
|`MAGIC_UNHOST_NKRO` | |Force NKRO off |
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
||||
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides|
|
||||
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
||||
|Key |Aliases |Description |
|
||||
|----------------------------------|---------|-------------------------------------------|
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Caps Lock and Left Control |
|
||||
|`MAGIC_CAPSLOCK_TO_CONTROL` | |Treat Caps Lock as Control |
|
||||
|`MAGIC_SWAP_LCTL_LGUI` | |Swap Left Control and GUI |
|
||||
|`MAGIC_SWAP_RCTL_RGUI` | |Swap Right Control and GUI |
|
||||
|`MAGIC_SWAP_LALT_LGUI` | |Swap Left Alt and GUI |
|
||||
|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and GUI |
|
||||
|`MAGIC_NO_GUI` | |Disable the GUI key |
|
||||
|`MAGIC_SWAP_GRAVE_ESC` | |Swap <code>`</code> and Escape |
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace |
|
||||
|`MAGIC_HOST_NKRO` | |Force NKRO on |
|
||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|
||||
|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Ctrl and GUI on both sides (for macOS)|
|
||||
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` | |Unswap Caps Lock and Left Control |
|
||||
|`MAGIC_UNCAPSLOCK_TO_CONTROL` | |Stop treating Caps Lock as Control |
|
||||
|`MAGIC_UNSWAP_LCTL_LGUI` | |Unswap Left Control and GUI |
|
||||
|`MAGIC_UNSWAP_RCTL_RGUI` | |Unswap Right Control and GUI |
|
||||
|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and GUI |
|
||||
|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and GUI |
|
||||
|`MAGIC_UNNO_GUI` | |Enable the GUI key |
|
||||
|`MAGIC_UNSWAP_GRAVE_ESC` | |Unswap <code>`</code> and Escape |
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|
||||
|`MAGIC_UNHOST_NKRO` | |Force NKRO off |
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
||||
|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Ctrl and GUI on both sides |
|
||||
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides |
|
||||
|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Ctrl and GUI swap on both sides |
|
||||
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
||||
|`MAGIC_EE_HANDS_LEFT` | |Set "Left Hand" for EE_HANDS handedness |
|
||||
|`MAGIC_EE_HANDS_RIGHT` | |Set "Right Hand" for EE_HANDS handedness |
|
||||
|
||||
## [Bluetooth](feature_bluetooth.md)
|
||||
|
||||
@@ -293,7 +307,7 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. Where `mod` is a mods_bit. Mods can be viewed [here](https://docs.qmk.fm/#/feature_advanced_keycodes?id=mod-tap). Example Implementation: `LM(LAYER_1, MOD_LALT)`|
|
||||
|`LT(layer, kc)` |Turn on `layer` when held, `kc` when tapped |
|
||||
|`TG(layer)` |Toggle `layer` on or off |
|
||||
|`TO(layer)` |Turn on `layer` when pressed |
|
||||
|`TO(layer)` |Turns on `layer` and turns off all other layers, except the default layer |
|
||||
|`TT(layer)` |Normally acts like MO unless it's tapped multiple times, which toggles `layer` on |
|
||||
|
||||
## [Mouse Keys](feature_mouse_keys.md)
|
||||
@@ -339,23 +353,24 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|
||||
## [Mod-Tap Keys](feature_advanced_keycodes.md#mod-tap)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------|-----------------------------------------------------------------|-------------------------------------------------------|
|
||||
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||
|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||
|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
||||
|`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
||||
|Key |Aliases |Description |
|
||||
|-------------|-----------------------------------------------------------------|-------------------------------------------------------|
|
||||
|`MT(mod, kc)`| |`mod` when held, `kc` when tapped |
|
||||
|`LCTL_T(kc)` |`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||
|`LSFT_T(kc)` |`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||
|`LALT_T(kc)` |`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||
|`LGUI_T(kc)` |`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||
|`RCTL_T(kc)` | |Right Control when held, `kc` when tapped |
|
||||
|`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped |
|
||||
|`RALT_T(kc)` |`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||
|`RGUI_T(kc)` |`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||
|`SGUI_T(kc)` |`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||
|`LCAG_T(kc)` | |Left Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`RCAG_T(kc)` | |Right Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
||||
|`HYPR_T(kc)` |`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
||||
|
||||
## [RGB Lighting](feature_rgblight.md)
|
||||
|
||||
@@ -405,29 +420,29 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|
||||
## [US ANSI Shifted Symbols](keycodes_us_ansi_shifted.md)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------------------|-------------------|-------------------|
|
||||
|`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` | |<code>|</code>|
|
||||
|`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` |`?` |
|
||||
|Key |Aliases |Description|
|
||||
|------------------------|-------------------|-----------|
|
||||
|`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` |`?` |
|
||||
|
||||
## [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||
|
||||
|
@@ -85,7 +85,7 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
|
||||
|`KC_EQUAL` |`KC_EQL` |`=` and `+` |
|
||||
|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` |
|
||||
|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` |
|
||||
|`KC_BSLASH` |`KC_BSLS` |`\` and <code>|</code> |
|
||||
|`KC_BSLASH` |`KC_BSLS` |`\` and `\|` |
|
||||
|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |
|
||||
|`KC_SCOLON` |`KC_SCLN` |`;` and `:` |
|
||||
|`KC_QUOTE` |`KC_QUOT` |`'` and `"` |
|
||||
@@ -93,7 +93,7 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
|
||||
|`KC_COMMA` |`KC_COMM` |`,` and `<` |
|
||||
|`KC_DOT` | |`.` and `>` |
|
||||
|`KC_SLASH` |`KC_SLSH` |`/` and `?` |
|
||||
|`KC_NONUS_BSLASH`|`KC_NUBS` |Non-US `\` and <code>|</code> |
|
||||
|`KC_NONUS_BSLASH`|`KC_NUBS` |Non-US `\` and `\|` |
|
||||
|
||||
## Lock Keys
|
||||
|
||||
@@ -121,26 +121,26 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
|
||||
|
||||
## International
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------|---------|-------------------------------|
|
||||
|`KC_INT1` |`KC_RO` |JIS `\` and `_` |
|
||||
|`KC_INT2` |`KC_KANA`|JIS Katakana/Hiragana |
|
||||
|`KC_INT3` |`KC_JYEN`|JIS `¥` and <code>|</code>|
|
||||
|`KC_INT4` |`KC_HENK`|JIS Henkan |
|
||||
|`KC_INT5` |`KC_MHEN`|JIS Muhenkan |
|
||||
|`KC_INT6` | |JIS Numpad `,` |
|
||||
|`KC_INT7` | |International 7 |
|
||||
|`KC_INT8` | |International 8 |
|
||||
|`KC_INT9` | |International 9 |
|
||||
|`KC_LANG1`|`KC_HAEN`|Hangul/English |
|
||||
|`KC_LANG2`|`KC_HANJ`|Hanja |
|
||||
|`KC_LANG3`| |JIS Katakana |
|
||||
|`KC_LANG4`| |JIS Hiragana |
|
||||
|`KC_LANG5`| |JIS Zenkaku/Hankaku |
|
||||
|`KC_LANG6`| |Language 6 |
|
||||
|`KC_LANG7`| |Language 7 |
|
||||
|`KC_LANG8`| |Language 8 |
|
||||
|`KC_LANG9`| |Language 9 |
|
||||
|Key |Aliases |Description |
|
||||
|----------|---------|---------------------|
|
||||
|`KC_INT1` |`KC_RO` |JIS `\` and `_` |
|
||||
|`KC_INT2` |`KC_KANA`|JIS Katakana/Hiragana|
|
||||
|`KC_INT3` |`KC_JYEN`|JIS `¥` and `\|` |
|
||||
|`KC_INT4` |`KC_HENK`|JIS Henkan |
|
||||
|`KC_INT5` |`KC_MHEN`|JIS Muhenkan |
|
||||
|`KC_INT6` | |JIS Numpad `,` |
|
||||
|`KC_INT7` | |International 7 |
|
||||
|`KC_INT8` | |International 8 |
|
||||
|`KC_INT9` | |International 9 |
|
||||
|`KC_LANG1`|`KC_HAEN`|Hangul/English |
|
||||
|`KC_LANG2`|`KC_HANJ`|Hanja |
|
||||
|`KC_LANG3`| |JIS Katakana |
|
||||
|`KC_LANG4`| |JIS Hiragana |
|
||||
|`KC_LANG5`| |JIS Zenkaku/Hankaku |
|
||||
|`KC_LANG6`| |Language 6 |
|
||||
|`KC_LANG7`| |Language 7 |
|
||||
|`KC_LANG8`| |Language 8 |
|
||||
|`KC_LANG9`| |Language 9 |
|
||||
|
||||
## Commands
|
||||
|
||||
@@ -191,7 +191,7 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
|
||||
|
||||
These keycodes are not part of the Keyboard/Keypad usage page. The `SYSTEM_` keycodes are found in the Generic Desktop page, and the rest are located in the Consumer page.
|
||||
|
||||
Windows and macOS use different keycodes for "next track" and "previous track". Make sure you choose the keycode that corresponds to your OS.
|
||||
?> Some of these keycodes may behave differently depending on the OS. For example, on macOS, the keycodes `KC_MEDIA_FAST_FORWARD`, `KC_MEDIA_REWIND`, `KC_MEDIA_NEXT_TRACK` and `KC_MEDIA_PREV_TRACK` skip within the current track when held, but skip the entire track when tapped.
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-----------------------|---------|-----------------------------|
|
||||
@@ -201,8 +201,8 @@ Windows and macOS use different keycodes for "next track" and "previous track".
|
||||
|`KC_AUDIO_MUTE` |`KC_MUTE`|Mute |
|
||||
|`KC_AUDIO_VOL_UP` |`KC_VOLU`|Volume Up |
|
||||
|`KC_AUDIO_VOL_DOWN` |`KC_VOLD`|Volume Down |
|
||||
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT`|Next Track (Windows) |
|
||||
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV`|Previous Track (Windows) |
|
||||
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT`|Next Track |
|
||||
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV`|Previous Track |
|
||||
|`KC_MEDIA_STOP` |`KC_MSTP`|Stop Track (Windows) |
|
||||
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY`|Play/Pause Track |
|
||||
|`KC_MEDIA_SELECT` |`KC_MSEL`|Launch Media Player (Windows)|
|
||||
|
@@ -12,26 +12,26 @@ To fix this, open Remote Desktop Connection, click on "Show Options", open the t
|
||||
|
||||
## Keycodes
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------------------|-------------------|-------------------|
|
||||
|`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` | |<code>|</code>|
|
||||
|`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` |`?` |
|
||||
|Key |Aliases |Description|
|
||||
|------------------------|-------------------|-----------|
|
||||
|`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` |`?` |
|
||||
|
@@ -8,15 +8,15 @@ If you have closed and reopened your terminal window since following the first p
|
||||
|
||||
Start by navigating to the `keymaps` folder for your keyboard.
|
||||
|
||||
?> If you are on macOS or Windows there are commands you can use to easily open the keymaps folder.
|
||||
If you are on macOS or Windows there are commands you can use to easily open the keymaps folder.
|
||||
|
||||
?> macOS:
|
||||
### macOS:
|
||||
|
||||
open keyboards/<keyboard_folder>/keymaps
|
||||
``` open keyboards/<keyboard_folder>/keymaps ```
|
||||
|
||||
?> Windows:
|
||||
### Windows:
|
||||
|
||||
start .\\keyboards\\<keyboard_folder>\\keymaps
|
||||
``` start .\\keyboards\\<keyboard_folder>\\keymaps ```
|
||||
|
||||
## Create a Copy Of The `default` Keymap
|
||||
|
||||
|
@@ -4,7 +4,7 @@ The [QMK Configurator](https://config.qmk.fm) is an online graphical user interf
|
||||
|
||||
?> **Please follow these steps in order.**
|
||||
|
||||
Watch the [Video Tutorial](https://youtu.be/7RH-1pAbjvw)
|
||||
Watch the [Video Tutorial](https://youtu.be/tx54jkRC9ZY)
|
||||
|
||||
The QMK Configurator works best with Chrome/Firefox.
|
||||
|
||||
|
@@ -12,23 +12,31 @@ However, the QMK Toolbox is only available for Windows and macOS currently. If
|
||||
|
||||
Begin by opening the QMK Toolbox application. You'll want to locate the firmware file in Finder or Explorer. Your keyboard firmware may be in one of two formats- `.hex` or `.bin`. QMK tries to copy the appropriate one for your keyboard into the root `qmk_firmware` directory.
|
||||
|
||||
?> If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder.
|
||||
If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder.
|
||||
|
||||
?> Windows:
|
||||
#### Windows
|
||||
|
||||
start .
|
||||
```
|
||||
start .
|
||||
```
|
||||
|
||||
?> macOS:
|
||||
#### macOS
|
||||
|
||||
open .
|
||||
```
|
||||
open .
|
||||
```
|
||||
|
||||
The firmware file always follows this naming format:
|
||||
|
||||
<keyboard_name>_<keymap_name>.{bin,hex}
|
||||
```
|
||||
<keyboard_name>_<keymap_name>.{bin,hex}
|
||||
```
|
||||
|
||||
For example, the `plank/rev5` with a `default` keymap will have this filename:
|
||||
For example, the `planck/rev5` with a `default` keymap will have this filename:
|
||||
|
||||
planck_rev5_default.hex
|
||||
```
|
||||
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.
|
||||
|
||||
@@ -78,7 +86,23 @@ Click the `Flash` button in QMK Toolbox. You will see output similar to the foll
|
||||
|
||||
## Flash your Keyboard from the Command Line
|
||||
|
||||
First thing you'll need to know is which bootloader that your keyboard uses. There are four main bootloaders that are used, usually. Pro-Micro and clones use CATERINA, and Teensy's use Halfkay, OLKB boards use QMK-DFU, and other atmega32u4 chips use DFU.
|
||||
This has been made pretty simple compared to what it used to be. When you are ready to compile and flash your firmware, open up your terminal window and run the build command:
|
||||
|
||||
make <my_keyboard>:<my_keymap>:flash
|
||||
|
||||
For example, if your keymap is named "xyverz" and you're building a keymap for a rev5 planck, you'll use this command:
|
||||
|
||||
make planck/rev5:xyverz:flash
|
||||
|
||||
This will check the keyboard's configuration, and then attempt to flash it based on the specified bootloader. This means that you don't need to know which bootloader that your keyboard uses. Just run the command, and let the command do the heavy lifting.
|
||||
|
||||
However, this does rely on the bootloader being set by the keyboard. If this information is not configured, or you're using a board that doesn't have a supported target to flash it, you will see this error:
|
||||
|
||||
WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time.
|
||||
|
||||
In this case, you'll have to fall back on specifying the bootloader.
|
||||
|
||||
There are five main bootloaders that are used. Pro Micro and clones use Caterina, Teensys use HalfKay, OLKB's AVR boards use QMK-DFU, other ATmega32U4 boards use DFU, and most ARM boards use ARM DFU.
|
||||
|
||||
You can find more information about the bootloaders in the [Flashing Instructions and Bootloader Information](flashing.md) page.
|
||||
|
||||
@@ -109,7 +133,7 @@ After it gets to this point, the build script will look for the DFU bootloader e
|
||||
dfu-programmer: no device present.
|
||||
Error: Bootloader not found. Trying again in 5s.
|
||||
|
||||
Once it does this, you'll want to reset the controller. It should then show output similiar to this:
|
||||
Once it does this, you'll want to reset the controller. It should then show output similar to this:
|
||||
|
||||
```
|
||||
*** Attempting to flash, please don't remove device
|
||||
@@ -127,9 +151,7 @@ Once it does this, you'll want to reset the controller. It should then show out
|
||||
>>> dfu-programmer atmega32u4 reset
|
||||
```
|
||||
|
||||
If you have any issues with this, you may need to this:
|
||||
|
||||
sudo make <my_keyboard>:<my_keymap>:dfu
|
||||
?> If you have any issues with this - such as `dfu-programmer: no device present` - please see the [Frequently Asked Build Questions](faq_build.md).
|
||||
|
||||
#### DFU commands
|
||||
|
||||
@@ -210,14 +232,17 @@ If you have any issues with this, you may need to this:
|
||||
sudo make <my_keyboard>:<my_keymap>:avrdude
|
||||
|
||||
|
||||
Additionally, if you want to flash multiple boards, use the following command:
|
||||
#### Caterina commands
|
||||
|
||||
make <keyboard>:<keymap>:avrdude-loop
|
||||
There are a number of DFU commands that you can use to flash firmware to a DFU device:
|
||||
|
||||
When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop.
|
||||
* `:avrdude` - This is the normal option which waits until a Caterina device is available (by detecting a new COM port), and then flashes the firmware.
|
||||
* `:avrdude-loop` - This runs the same command as `:avrdude`, but after each device is flashed, it will attempt to flash again. This is useful for bulk flashing. _This requires you to manually escape the loop by hitting Control+C._
|
||||
* `:avrdude-split-left` - This flashes the normal firmware, just like the default option (`:avrdude`). However, this also flashes the "Left Side" EEPROM file for split keyboards. _This is ideal for Pro Micro based split keyboards._
|
||||
* `:avrdude-split-right` - This flashes the normal firmware, just like the default option (`:avrdude`). However, this also flashes the "Right Side" EEPROM file for split keyboards. _This is ideal for Pro Micro based split keyboards._
|
||||
|
||||
|
||||
## HalfKay
|
||||
### HalfKay
|
||||
|
||||
For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the build command:
|
||||
|
||||
@@ -225,7 +250,7 @@ For the PJRC devices (Teensy's), when you're ready to compile and flash your fir
|
||||
|
||||
For example, if your keymap is named "xyverz" and you're building a keymap for an Ergodox or Ergodox EZ, you'll use this command:
|
||||
|
||||
make erdogox_ez:xyverz:teensy
|
||||
make ergodox_ez:xyverz:teensy
|
||||
|
||||
Once the firmware finishes compiling, it will output something like this:
|
||||
|
||||
@@ -250,7 +275,7 @@ Programming.....................................................................
|
||||
Booting
|
||||
```
|
||||
|
||||
## STM32 (ARM)
|
||||
### STM32 (ARM)
|
||||
|
||||
For a majority of ARM boards (including the Proton C, Planck Rev 6, and Preonic Rev 3), when you're ready to compile and flash your firmware, open up your terminal window and run the build command:
|
||||
|
||||
@@ -300,6 +325,52 @@ File downloaded successfully
|
||||
Transitioning to dfuMANIFEST state
|
||||
```
|
||||
|
||||
#### STM32 Commands
|
||||
|
||||
There are a number of DFU commands that you can use to flash firmware to a STM32 device:
|
||||
|
||||
* `:dfu-util` - The default command for flashing to STM32 devices, and will wait until an STM32 bootloader is present. .
|
||||
* `:dfu-util-split-left` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Left Side" EEPROM setting for split keyboards.
|
||||
* `:dfu-util-split-right` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Right Side" EEPROM setting for split keyboards.
|
||||
* `:st-link-cli` - This allows you to flash the firmware via ST-LINK's CLI utility, rather than dfu-util.
|
||||
|
||||
|
||||
### BootloadHID
|
||||
|
||||
For Bootmapper Client(BMC)/bootloadHID/ATmega32A based boards, when you're ready to compile and flash your firmware, open up your terminal window and run the build command:
|
||||
|
||||
make <my_keyboard>:<my_keymap>:bootloaderHID
|
||||
|
||||
For example, if your keymap is named "xyverz" and you're building a keymap for a jj40, you'll use this command:
|
||||
|
||||
make jj40:xyverz:bootloaderHID
|
||||
|
||||
Once the firmware finishes compiling, it will output something like this:
|
||||
|
||||
```
|
||||
Linking: .build/jj40_default.elf [OK]
|
||||
Creating load file for flashing: .build/jj40_default.hex [OK]
|
||||
Copying jj40_default.hex to qmk_firmware folder [OK]
|
||||
Checking file size of jj40_default.hex [OK]
|
||||
* The firmware size is fine - 21920/28672 (6752 bytes free)
|
||||
```
|
||||
|
||||
After it gets to this point, the build script will look for the DFU bootloader every 5 seconds. It will repeat the following until the device is found or you cancel it.
|
||||
|
||||
```
|
||||
Error opening HIDBoot device: The specified device was not found
|
||||
Trying again in 5s.
|
||||
```
|
||||
|
||||
Once it does this, you'll want to reset the controller. It should then show output similar to this:
|
||||
|
||||
```
|
||||
Page size = 128 (0x80)
|
||||
Device size = 32768 (0x8000); 30720 bytes remaining
|
||||
Uploading 22016 (0x5600) bytes starting at 0 (0x0)
|
||||
0x05580 ... 0x05600
|
||||
```
|
||||
|
||||
## Test It Out!
|
||||
|
||||
Congrats! Your custom firmware has been programmed to your keyboard!
|
||||
|
@@ -8,7 +8,8 @@ Testing your keyboard is usually pretty straightforward. Press every single key
|
||||
|
||||
Note: These programs are not provided by or endorsed by QMK.
|
||||
|
||||
* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (Windows Only)
|
||||
* [QMK Configurator](https://config.qmk.fm/#/test/) (Web Based)
|
||||
* [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (Windows Only)
|
||||
* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac Only)
|
||||
* [Keyboard Tester](http://www.keyboardtester.com) (Web Based)
|
||||
* [Keyboard Checker](http://keyboardchecker.com) (Web Based)
|
||||
|
@@ -34,7 +34,7 @@ For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the
|
||||
|
||||
To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`.
|
||||
|
||||
`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported.
|
||||
`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to.
|
||||
|
||||
`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user