forked from mirrors/qmk_firmware
Compare commits
1316 Commits
0.12.1
...
python_opt
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e293bf243d | ||
|
|
286acfe7fd | ||
|
|
6d20b28354 | ||
|
|
846da06380 | ||
|
|
243fc17e41 | ||
|
|
f394f23ac6 | ||
|
|
0ca53fa307 | ||
|
|
8c361d6c41 | ||
|
|
8d30209260 | ||
|
|
8db1be6420 | ||
|
|
40bf61118e | ||
|
|
90e57b7b0a | ||
|
|
c234341cf6 | ||
|
|
29df3ce83b | ||
|
|
291455098f | ||
|
|
7ab4902543 | ||
|
|
8f36af8409 | ||
|
|
50a312b635 | ||
|
|
25f1c242f8 | ||
|
|
873658a76d | ||
|
|
f80ee5639e | ||
|
|
745f5f6532 | ||
|
|
085db5ec8d | ||
|
|
eb2886369d | ||
|
|
8f1eccc59b | ||
|
|
438eee96e8 | ||
|
|
2cb4301656 | ||
|
|
0624698d33 | ||
|
|
f106f77692 | ||
|
|
88e53ad9ca | ||
|
|
e4c5b1bbbb | ||
|
|
f6ac5abd95 | ||
|
|
dc39d90270 | ||
|
|
18f6ded5fa | ||
|
|
050457818c | ||
|
|
67af692c97 | ||
|
|
1f4e20cfda | ||
|
|
8d9f527081 | ||
|
|
fc749b40e6 | ||
|
|
c835d2e71d | ||
|
|
7e832e46de | ||
|
|
76e856d052 | ||
|
|
d456963177 | ||
|
|
e3030bff5e | ||
|
|
4dddcb4f03 | ||
|
|
5b7cf9fdc8 | ||
|
|
3c790123ce | ||
|
|
1272ecd73c | ||
|
|
7c5ef4060e | ||
|
|
11f66c317a | ||
|
|
6dfe915e26 | ||
|
|
8dc036c2e4 | ||
|
|
4379afca28 | ||
|
|
939ce6a486 | ||
|
|
37fba09021 | ||
|
|
dfcefc2d5d | ||
|
|
8de028f188 | ||
|
|
8694e2d3f0 | ||
|
|
7fefe128cc | ||
|
|
feaf972eb7 | ||
|
|
0311c8036d | ||
|
|
6e132884b3 | ||
|
|
18554d1134 | ||
|
|
9e9e9b3898 | ||
|
|
8e607851fb | ||
|
|
f81cd4696e | ||
|
|
172e6a7030 | ||
|
|
ef92c9ee2c | ||
|
|
e7ddbc394b | ||
|
|
67fa2568fe | ||
|
|
658ab47908 | ||
|
|
89c01970e3 | ||
|
|
d04f7bc160 | ||
|
|
2f08a34394 | ||
|
|
a9c6adb083 | ||
|
|
f9d88da86f | ||
|
|
9956ff4e03 | ||
|
|
2538d341d8 | ||
|
|
83ee79565c | ||
|
|
d59f8d1c02 | ||
|
|
5c3991cb90 | ||
|
|
abee0610ee | ||
|
|
f8d0ea9206 | ||
|
|
9aea0fd52b | ||
|
|
706c8bebca | ||
|
|
42d8ee16e1 | ||
|
|
25004123ce | ||
|
|
403849bff0 | ||
|
|
d150595f29 | ||
|
|
ba35c11807 | ||
|
|
a61c38c7ec | ||
|
|
875bb48a20 | ||
|
|
968e4f96a4 | ||
|
|
03f7bec6c8 | ||
|
|
311cf865dc | ||
|
|
e2c5893405 | ||
|
|
d37900b906 | ||
|
|
4720aa4a34 | ||
|
|
06971da0be | ||
|
|
ed0451bc28 | ||
|
|
2d6fe6eed4 | ||
|
|
22cd151fc3 | ||
|
|
96c8afea2d | ||
|
|
346f4548db | ||
|
|
3966599940 | ||
|
|
ff61df103e | ||
|
|
a0959f1b33 | ||
|
|
b151153211 | ||
|
|
09e22b9cfc | ||
|
|
41ba616463 | ||
|
|
9cf4148aa9 | ||
|
|
d82e5055dd | ||
|
|
c00a9937f2 | ||
|
|
3be3cdafa2 | ||
|
|
d0a3506d0f | ||
|
|
f5c2f7153d | ||
|
|
640f0fc7c6 | ||
|
|
3d546c0853 | ||
|
|
d7ecfa8382 | ||
|
|
a9525d88a3 | ||
|
|
a2a524afbb | ||
|
|
0713797c58 | ||
|
|
8d0a610f6e | ||
|
|
ae45faca26 | ||
|
|
6dc94019e4 | ||
|
|
449b4b8d86 | ||
|
|
fda4149cc3 | ||
|
|
836b8f7d64 | ||
|
|
3d62e1dfbf | ||
|
|
52028ceea1 | ||
|
|
a08486597d | ||
|
|
f8acb1ee10 | ||
|
|
f48bd8cde3 | ||
|
|
dc17180f84 | ||
|
|
c16b7d63e7 | ||
|
|
421fd75541 | ||
|
|
db36e2be9f | ||
|
|
0f226a30be | ||
|
|
0ef145db15 | ||
|
|
641141c519 | ||
|
|
2e90ef0536 | ||
|
|
6fe3943ad3 | ||
|
|
b2fdd48744 | ||
|
|
cfc7ee61c5 | ||
|
|
d684b8cafe | ||
|
|
7a6e630ffd | ||
|
|
32b2ac0a80 | ||
|
|
e21a039901 | ||
|
|
39c8ed32b4 | ||
|
|
ca0070d11c | ||
|
|
a47f482d24 | ||
|
|
5073dc33e9 | ||
|
|
9177e22d2c | ||
|
|
21aa7890cb | ||
|
|
b829a1d264 | ||
|
|
f287597c19 | ||
|
|
cbfa2dba25 | ||
|
|
4dda716712 | ||
|
|
d9add95037 | ||
|
|
9975e17712 | ||
|
|
17d0fad762 | ||
|
|
13defb0bef | ||
|
|
9dcd03b6ca | ||
|
|
84e691717c | ||
|
|
e0acd3e53d | ||
|
|
f3fb3849a2 | ||
|
|
c277ae4768 | ||
|
|
c508da8a8e | ||
|
|
b52b8f1d23 | ||
|
|
9399865b0d | ||
|
|
b7ef959400 | ||
|
|
827e742bd4 | ||
|
|
17e6e04600 | ||
|
|
5e3ec2faf0 | ||
|
|
a0ed583b75 | ||
|
|
2f910e1b2a | ||
|
|
093a89c534 | ||
|
|
f922133d30 | ||
|
|
c1bd8eed76 | ||
|
|
5686a00a9c | ||
|
|
9dffd35762 | ||
|
|
b72f10c635 | ||
|
|
59862d30d0 | ||
|
|
b10728edc1 | ||
|
|
680cc1fab4 | ||
|
|
2e68897a62 | ||
|
|
49fd3c0760 | ||
|
|
415dd21206 | ||
|
|
94e80912a4 | ||
|
|
102442a841 | ||
|
|
7b666245d6 | ||
|
|
fff115c1a4 | ||
|
|
23631de191 | ||
|
|
c7277a1420 | ||
|
|
0374e4c733 | ||
|
|
7e4f01f454 | ||
|
|
56ce0e4e33 | ||
|
|
add10524d6 | ||
|
|
a1e575780d | ||
|
|
7aab06ffdf | ||
|
|
3d3b9807ab | ||
|
|
ab6128e86d | ||
|
|
3e1e64ca19 | ||
|
|
8128c5f822 | ||
|
|
25fffb7da8 | ||
|
|
770a3349be | ||
|
|
c38332a5c7 | ||
|
|
c7c9f3e3cf | ||
|
|
01cb2867db | ||
|
|
e660dcff09 | ||
|
|
17f51fa9df | ||
|
|
6eb18a6ccb | ||
|
|
a6f030fb42 | ||
|
|
af91221ddb | ||
|
|
2344d06475 | ||
|
|
261d94ce34 | ||
|
|
eaa2e0cb24 | ||
|
|
a0cc2dc6d0 | ||
|
|
65fe74fde0 | ||
|
|
597d2e0e7b | ||
|
|
b8711b9726 | ||
|
|
35dbe8ba03 | ||
|
|
9544b41640 | ||
|
|
93496c8364 | ||
|
|
e5d3e5a989 | ||
|
|
d64a853b55 | ||
|
|
5a06813b10 | ||
|
|
554c36a055 | ||
|
|
5c6c37e3a9 | ||
|
|
6bafefa886 | ||
|
|
c22f4aeb8e | ||
|
|
1a3064afb1 | ||
|
|
234d37ec16 | ||
|
|
2b8f1fcdfb | ||
|
|
bc01ee2a6e | ||
|
|
7b055dcc55 | ||
|
|
aa923b2034 | ||
|
|
fc9a2167b1 | ||
|
|
160f9144c2 | ||
|
|
3aca3d3572 | ||
|
|
0d74ed3c35 | ||
|
|
305cca9a5e | ||
|
|
a72172a8fd | ||
|
|
1646c0f26c | ||
|
|
7d1194de01 | ||
|
|
e628051505 | ||
|
|
275996f4c1 | ||
|
|
3ea3f32dfe | ||
|
|
f55e39e8a2 | ||
|
|
d66090af19 | ||
|
|
b963049305 | ||
|
|
5386c4c7b2 | ||
|
|
c1a3060431 | ||
|
|
84883d3400 | ||
|
|
b769b36202 | ||
|
|
879185a214 | ||
|
|
147cf8afbb | ||
|
|
726368ce67 | ||
|
|
9da95bc3ab | ||
|
|
995c9dff49 | ||
|
|
088c71b4ea | ||
|
|
69604e1750 | ||
|
|
7e14f85dd5 | ||
|
|
06aea834c4 | ||
|
|
e128d45420 | ||
|
|
0e53917471 | ||
|
|
0717890353 | ||
|
|
446ef4a676 | ||
|
|
cd78ab25a9 | ||
|
|
1f86c3ac96 | ||
|
|
beaebdf8eb | ||
|
|
6750733cda | ||
|
|
a5c2a74b8c | ||
|
|
975e42ed3c | ||
|
|
ebaba80287 | ||
|
|
15e408a6a5 | ||
|
|
712d53c953 | ||
|
|
1593e78c97 | ||
|
|
2ca7a8677a | ||
|
|
452a5216e2 | ||
|
|
722b1d655d | ||
|
|
769396839b | ||
|
|
e7d68c500b | ||
|
|
17991629c1 | ||
|
|
5962f05f56 | ||
|
|
513f5b0655 | ||
|
|
3a6188fc55 | ||
|
|
b158afee93 | ||
|
|
7cd9edab99 | ||
|
|
57306fb61c | ||
|
|
0399271a73 | ||
|
|
d9610120de | ||
|
|
a78964c918 | ||
|
|
8ba537fa23 | ||
|
|
f461adbd1d | ||
|
|
cc815c4d83 | ||
|
|
0211e30032 | ||
|
|
5cecfe8c9b | ||
|
|
aa97f52963 | ||
|
|
57158cc3bc | ||
|
|
8e22da67c1 | ||
|
|
bc67ca6a59 | ||
|
|
330fe1d1cc | ||
|
|
f5820059e4 | ||
|
|
bbe453599f | ||
|
|
54c368d3aa | ||
|
|
5eb48994ad | ||
|
|
8f4767d966 | ||
|
|
9ce4bdfd6a | ||
|
|
d5a94b58d2 | ||
|
|
a0fed0ea17 | ||
|
|
76c23b15ab | ||
|
|
e17a6c4f8d | ||
|
|
4c1ea0a522 | ||
|
|
3328aefd8e | ||
|
|
c01f873978 | ||
|
|
f173963d95 | ||
|
|
924c25e702 | ||
|
|
60da67fbd2 | ||
|
|
95d2f7c3c5 | ||
|
|
1bb7905f78 | ||
|
|
1a7c1c0036 | ||
|
|
3d49563535 | ||
|
|
6152861356 | ||
|
|
ca570947b0 | ||
|
|
8feb767994 | ||
|
|
d14f1ab7ff | ||
|
|
31130b9031 | ||
|
|
0be53004b3 | ||
|
|
8e96c5a060 | ||
|
|
81821f0a12 | ||
|
|
d425fcc8b1 | ||
|
|
e1500ce493 | ||
|
|
10f8a6d983 | ||
|
|
4c0d8ae8d7 | ||
|
|
de8fada3a3 | ||
|
|
40f235a96c | ||
|
|
aeaa209b9d | ||
|
|
e961e34c7f | ||
|
|
6955c5a002 | ||
|
|
db1eacdaac | ||
|
|
82aa9ad4a5 | ||
|
|
068af97b7a | ||
|
|
a9aec546c8 | ||
|
|
e756586f41 | ||
|
|
3023015c5b | ||
|
|
1c81e69503 | ||
|
|
d86a97a089 | ||
|
|
58142f0726 | ||
|
|
6cdc996e0b | ||
|
|
4dd5f45b6c | ||
|
|
7e06393407 | ||
|
|
22e9a0bd01 | ||
|
|
b098757a7e | ||
|
|
3bee24a827 | ||
|
|
8508fc8b98 | ||
|
|
f7c6d68b34 | ||
|
|
6c7450dad7 | ||
|
|
c14fa1e28f | ||
|
|
1d3f775051 | ||
|
|
e6887f4260 | ||
|
|
6d1f059868 | ||
|
|
d8e38ef0b1 | ||
|
|
3e1fa8cd31 | ||
|
|
39b2b2b010 | ||
|
|
29e35d83b7 | ||
|
|
fef78c41cd | ||
|
|
526fbf0faf | ||
|
|
de5c30a9ba | ||
|
|
8761e973ec | ||
|
|
a5d7e83985 | ||
|
|
433834fb8b | ||
|
|
173aed3d0e | ||
|
|
86422f87c6 | ||
|
|
36ba4806b1 | ||
|
|
388c151de7 | ||
|
|
0876bdf1a3 | ||
|
|
396abb0244 | ||
|
|
4c13de9b45 | ||
|
|
7599cd4e50 | ||
|
|
1e5962adbf | ||
|
|
de2294413f | ||
|
|
430cd6dbc2 | ||
|
|
4e32465f06 | ||
|
|
7ca4608427 | ||
|
|
3efaa5ba7c | ||
|
|
08ec7618a1 | ||
|
|
60cf7ae8b7 | ||
|
|
2bc35205a7 | ||
|
|
cc77710b4a | ||
|
|
14c0f4e44b | ||
|
|
f9a395e265 | ||
|
|
d6b707403e | ||
|
|
b057194568 | ||
|
|
83be6ba472 | ||
|
|
1dca3a8e3a | ||
|
|
9107c382f3 | ||
|
|
495d47b7d2 | ||
|
|
9c68e27ace | ||
|
|
02e1912371 | ||
|
|
75da5e9742 | ||
|
|
36a2297deb | ||
|
|
1d50693e1b | ||
|
|
16014fe31c | ||
|
|
937f5fe740 | ||
|
|
cae4911ca8 | ||
|
|
188bcf7636 | ||
|
|
3d6d4bd949 | ||
|
|
4a5f575ef4 | ||
|
|
5195f97d35 | ||
|
|
8bf7a1452d | ||
|
|
7262d5cc93 | ||
|
|
2fcf761f33 | ||
|
|
ba66b63fe5 | ||
|
|
70bbcdf084 | ||
|
|
eddd6aa113 | ||
|
|
178fbdac16 | ||
|
|
b2a63b42a5 | ||
|
|
5f9906eccc | ||
|
|
8f4603dd73 | ||
|
|
16c4590396 | ||
|
|
bfbbb21197 | ||
|
|
8d85171f16 | ||
|
|
a6807d1822 | ||
|
|
eeb8ba4e62 | ||
|
|
f594b22332 | ||
|
|
0aaddf697f | ||
|
|
19810f4a8b | ||
|
|
cef1d19a6c | ||
|
|
c48ce4c259 | ||
|
|
37ca66f6cf | ||
|
|
75ffb4b7e2 | ||
|
|
2f6618d699 | ||
|
|
929d06a65f | ||
|
|
5db0a8e2cc | ||
|
|
cbdc3fb81b | ||
|
|
04ab5de73c | ||
|
|
cae9eb4d8d | ||
|
|
542918d073 | ||
|
|
f70dc8435a | ||
|
|
10a3e3a341 | ||
|
|
673c12fa3b | ||
|
|
737fe8d763 | ||
|
|
008d8a740e | ||
|
|
c6cc6ec7f6 | ||
|
|
b4039ec515 | ||
|
|
54e788364a | ||
|
|
f8f0ca458d | ||
|
|
6e5e34662b | ||
|
|
40907fa98a | ||
|
|
3efd94014f | ||
|
|
89a3ef7699 | ||
|
|
ad0e6b6291 | ||
|
|
1dd6adffbe | ||
|
|
4ccba9e3ac | ||
|
|
7078d5a5bd | ||
|
|
dbfe2d7e9e | ||
|
|
32b697f5f1 | ||
|
|
c24d29ef54 | ||
|
|
a2412e3f4c | ||
|
|
2d29ce5de1 | ||
|
|
9633f9a60f | ||
|
|
54a8b5af01 | ||
|
|
17864b249f | ||
|
|
bc9cd3e997 | ||
|
|
0bada398df | ||
|
|
da0c551692 | ||
|
|
d200e3de8e | ||
|
|
49bc835aa9 | ||
|
|
fc52b43592 | ||
|
|
536df7c240 | ||
|
|
7d21ce367d | ||
|
|
9c80db1fdc | ||
|
|
9ada2f30ea | ||
|
|
53075ccc5d | ||
|
|
d471a691f7 | ||
|
|
92fbadeb1b | ||
|
|
07800e82c9 | ||
|
|
c305edc680 | ||
|
|
6da60d4a5d | ||
|
|
3a1ce81d29 | ||
|
|
9a3f4f8f8a | ||
|
|
4bb00c6a0a | ||
|
|
e9aee3bfd0 | ||
|
|
38d8d5445e | ||
|
|
d84cbc3cec | ||
|
|
3edc43964d | ||
|
|
f41fc6b70c | ||
|
|
0432bde962 | ||
|
|
77875e89ec | ||
|
|
17586ea7c4 | ||
|
|
1ab2167ff9 | ||
|
|
069cfb61b8 | ||
|
|
6bb9113e27 | ||
|
|
a116b3f1ae | ||
|
|
0e7c66e891 | ||
|
|
bc38c38f8c | ||
|
|
911b45ce3b | ||
|
|
a3e7f3e7c5 | ||
|
|
cfc6e4bfac | ||
|
|
66ed80ad3a | ||
|
|
ffe81cbec1 | ||
|
|
f0b30e0027 | ||
|
|
40d1506527 | ||
|
|
3f854e16ac | ||
|
|
2549b4b082 | ||
|
|
4fa32f0f04 | ||
|
|
201dc6d024 | ||
|
|
5c924efa04 | ||
|
|
2f367bab98 | ||
|
|
30aae6298b | ||
|
|
ad1244e2cf | ||
|
|
6c5e94061c | ||
|
|
62c3e3d11f | ||
|
|
12292ba264 | ||
|
|
1426ffc0ee | ||
|
|
bfb052db1d | ||
|
|
f544b60aaa | ||
|
|
a0c95cb07e | ||
|
|
7725d813c9 | ||
|
|
7a25dcacff | ||
|
|
d0a3bca9ec | ||
|
|
60a39f4f5d | ||
|
|
0e6359bce9 | ||
|
|
df57590ec6 | ||
|
|
767089384f | ||
|
|
3e9f809988 | ||
|
|
a871444743 | ||
|
|
b7fe24923e | ||
|
|
fd5da75bdd | ||
|
|
067a6f0174 | ||
|
|
fca7cc1747 | ||
|
|
992b146bc4 | ||
|
|
189e0d5b98 | ||
|
|
5d7b026ce2 | ||
|
|
56e5a83e68 | ||
|
|
8c2db395c4 | ||
|
|
34f3918244 | ||
|
|
c820a5732c | ||
|
|
f3a1629469 | ||
|
|
447bd64013 | ||
|
|
3d922e6257 | ||
|
|
45f710f3ff | ||
|
|
38b9f67c3b | ||
|
|
15f4ab6a3f | ||
|
|
c6778dde82 | ||
|
|
65ee9d1b09 | ||
|
|
c27a458799 | ||
|
|
084d0ae96e | ||
|
|
8ed1addd1e | ||
|
|
5d27c772fd | ||
|
|
0ec438289d | ||
|
|
25c97e0019 | ||
|
|
79e86adfb6 | ||
|
|
0fd8faa1ad | ||
|
|
f5b6bef4b3 | ||
|
|
3c2e69af79 | ||
|
|
e9b0e9286e | ||
|
|
fc2b51194c | ||
|
|
876352a030 | ||
|
|
18dc12cd78 | ||
|
|
109b462789 | ||
|
|
489c814a48 | ||
|
|
fc29068986 | ||
|
|
8190a795ed | ||
|
|
c05fef752e | ||
|
|
d3963a61cb | ||
|
|
9d5cd52284 | ||
|
|
4abc3ceb4b | ||
|
|
b481f554a0 | ||
|
|
05ee0afd54 | ||
|
|
39bc8163d0 | ||
|
|
d8167779cd | ||
|
|
7409f03cbf | ||
|
|
54e8dd0885 | ||
|
|
0a8e37509b | ||
|
|
cd6168ee64 | ||
|
|
63cdf80885 | ||
|
|
d89d341541 | ||
|
|
2af86cec3d | ||
|
|
e95c76aaed | ||
|
|
e5cde191e1 | ||
|
|
eea33df1f9 | ||
|
|
7be4047df0 | ||
|
|
3e43a7f044 | ||
|
|
3fe356e65c | ||
|
|
f30637ee11 | ||
|
|
b95231c1e3 | ||
|
|
86ab4fcb71 | ||
|
|
f9fb52951d | ||
|
|
a8c0954db5 | ||
|
|
b5419bd574 | ||
|
|
171f3e840b | ||
|
|
8f660ca1e6 | ||
|
|
54c1548247 | ||
|
|
9cf82fae95 | ||
|
|
5168af9a9b | ||
|
|
2f47bafd6a | ||
|
|
61a1915cce | ||
|
|
417a07c22d | ||
|
|
03db48af75 | ||
|
|
8c12fa2e59 | ||
|
|
3f7350732c | ||
|
|
5b1c3e360a | ||
|
|
412e7a03e4 | ||
|
|
611cd80861 | ||
|
|
23e70fa857 | ||
|
|
89bd04b9eb | ||
|
|
ee26e3df60 | ||
|
|
5b394e82c9 | ||
|
|
ab6d07b585 | ||
|
|
da6e888a32 | ||
|
|
891d18d356 | ||
|
|
2a61a500de | ||
|
|
d3bf3d3b1c | ||
|
|
64a9cf18e1 | ||
|
|
dbd65d01b6 | ||
|
|
19b3aa3a12 | ||
|
|
c7ca67a036 | ||
|
|
7718b1598e | ||
|
|
b88498ba85 | ||
|
|
65c9752762 | ||
|
|
f12aea5dfb | ||
|
|
0c50a9eae9 | ||
|
|
7845cf1fac | ||
|
|
35944df7b0 | ||
|
|
33a5468a60 | ||
|
|
2a45d99059 | ||
|
|
34b63cecb1 | ||
|
|
06f8cb1b8a | ||
|
|
7748a093cb | ||
|
|
b2b075c123 | ||
|
|
d8f113bf98 | ||
|
|
26b9b3aa23 | ||
|
|
8f5cc8d762 | ||
|
|
54dc6b7bf2 | ||
|
|
6be87836dc | ||
|
|
ffa1507c2c | ||
|
|
417803d7ae | ||
|
|
4f2afaa6fb | ||
|
|
15ff1927db | ||
|
|
d6ab908272 | ||
|
|
5d458c6c8a | ||
|
|
0b6d8150e4 | ||
|
|
fbc5a6c24b | ||
|
|
054adbaf1e | ||
|
|
15872bde61 | ||
|
|
6b5e349d7e | ||
|
|
b09d068bf6 | ||
|
|
1cecd593c8 | ||
|
|
f7f8f97e6a | ||
|
|
2bccb7132d | ||
|
|
2927af43e1 | ||
|
|
0d5458a7ad | ||
|
|
cce9ddff80 | ||
|
|
7795e167ab | ||
|
|
d330203486 | ||
|
|
b68ed9ebea | ||
|
|
45a557641d | ||
|
|
ed59337239 | ||
|
|
120b15458c | ||
|
|
271c7d4923 | ||
|
|
54bad99e0e | ||
|
|
19887f2d35 | ||
|
|
9a3ba6874c | ||
|
|
5f670fbdc4 | ||
|
|
a9e6dc3629 | ||
|
|
bd07120d33 | ||
|
|
c922fc2cf3 | ||
|
|
3d32cbb0dc | ||
|
|
8da2c48650 | ||
|
|
4ff16fe73e | ||
|
|
5aa3fd5ac7 | ||
|
|
21c147c11b | ||
|
|
6620b6c515 | ||
|
|
752f5d6eb6 | ||
|
|
e31f210b59 | ||
|
|
b6c353db0c | ||
|
|
39e80a3f5c | ||
|
|
666944df2e | ||
|
|
bc66d71dae | ||
|
|
3d37afd495 | ||
|
|
427bff8504 | ||
|
|
f778ede8bd | ||
|
|
cb19c0906e | ||
|
|
b1f48da5ee | ||
|
|
8405d28670 | ||
|
|
c02137a0d2 | ||
|
|
49efd6abb0 | ||
|
|
f93ad79f41 | ||
|
|
663664e48f | ||
|
|
dffa089173 | ||
|
|
c3d1456615 | ||
|
|
3990c0f43d | ||
|
|
dcb8407ed6 | ||
|
|
230f09ca17 | ||
|
|
d562b4fdc5 | ||
|
|
20f35afd53 | ||
|
|
46318f36ac | ||
|
|
00eea387fc | ||
|
|
97e7defaae | ||
|
|
2274631c8f | ||
|
|
81be065fa5 | ||
|
|
56fff80e71 | ||
|
|
53a35c0d0c | ||
|
|
42808238c1 | ||
|
|
cfbd9ba0e7 | ||
|
|
34df6743f6 | ||
|
|
5581ea8809 | ||
|
|
2c0b3649fb | ||
|
|
fe9bd0afb9 | ||
|
|
0235fc7ab2 | ||
|
|
17c880b076 | ||
|
|
180a32ec59 | ||
|
|
f65a5d2fb5 | ||
|
|
ef6802ca60 | ||
|
|
6e5fd1a210 | ||
|
|
c7adb7a352 | ||
|
|
a66947b7d6 | ||
|
|
10dfc8d92f | ||
|
|
c7214e1d13 | ||
|
|
86ece8e98e | ||
|
|
94d9d2bb31 | ||
|
|
5632c5db31 | ||
|
|
0b560673ce | ||
|
|
ca9da27e16 | ||
|
|
2b7078cd21 | ||
|
|
54521bd04b | ||
|
|
99c46e4b73 | ||
|
|
2e7fd319a1 | ||
|
|
1e19227b31 | ||
|
|
21997e8894 | ||
|
|
9b8c5c1860 | ||
|
|
ea29874099 | ||
|
|
0afbf8cc3c | ||
|
|
ca11abc201 | ||
|
|
2aab8a114e | ||
|
|
8ecdc66700 | ||
|
|
6b2a3a67a6 | ||
|
|
9484c46555 | ||
|
|
cfefecd951 | ||
|
|
c2d7ebc3df | ||
|
|
05357d7937 | ||
|
|
7728b0f966 | ||
|
|
a0089aa345 | ||
|
|
0a9e18fae1 | ||
|
|
eb7e668eb9 | ||
|
|
924b9fcf05 | ||
|
|
a3d717cb83 | ||
|
|
884f8658ef | ||
|
|
fd65451679 | ||
|
|
99ce84827a | ||
|
|
d0973e1cfb | ||
|
|
7f809c013a | ||
|
|
c32264d9b7 | ||
|
|
40365f8297 | ||
|
|
09a392433a | ||
|
|
1ac030b119 | ||
|
|
3975c712f0 | ||
|
|
e2289ffac0 | ||
|
|
1629c9b71a | ||
|
|
a8c013a145 | ||
|
|
42a57b37fb | ||
|
|
a69616c45c | ||
|
|
be1b5c5a54 | ||
|
|
39d31d3ee4 | ||
|
|
53eb35b6cf | ||
|
|
2c0aa27e6c | ||
|
|
588bcdc8ca | ||
|
|
19b143688f | ||
|
|
b33e6793de | ||
|
|
3c08d27abb | ||
|
|
bcceb701cd | ||
|
|
98dd9b6614 | ||
|
|
9dea6f7720 | ||
|
|
4ed273699a | ||
|
|
b64dabdffd | ||
|
|
333cd4ec9b | ||
|
|
30f38c4952 | ||
|
|
a2ac6f50aa | ||
|
|
a28fbcda23 | ||
|
|
ce99f98bb5 | ||
|
|
15f7cc3bde | ||
|
|
a8d64c8b89 | ||
|
|
f5aaecfdfc | ||
|
|
1a7a821582 | ||
|
|
ebdf750cdd | ||
|
|
50e0f5dc80 | ||
|
|
79bdfc1110 | ||
|
|
0f516d9026 | ||
|
|
90875997ac | ||
|
|
b23eeb6a14 | ||
|
|
f02af23973 | ||
|
|
1298eab6ab | ||
|
|
c9d7a4af45 | ||
|
|
98939868fa | ||
|
|
34323ecd8b | ||
|
|
7daa2e210c | ||
|
|
d5a8431af4 | ||
|
|
7d953332e0 | ||
|
|
2e2dd3113b | ||
|
|
03685309fd | ||
|
|
11e5bb2d8a | ||
|
|
e09ca63317 | ||
|
|
29d537ce7b | ||
|
|
3dbb7f261d | ||
|
|
688fb1999b | ||
|
|
93e8a401df | ||
|
|
bcfa3fb9f2 | ||
|
|
7f9409bbb3 | ||
|
|
58afb87288 | ||
|
|
633464acfa | ||
|
|
0a453194e8 | ||
|
|
f744e22b49 | ||
|
|
3190c2f98d | ||
|
|
1a913aa12e | ||
|
|
d4b3d00d88 | ||
|
|
75f83210f4 | ||
|
|
15674d0259 | ||
|
|
2170b75b26 | ||
|
|
52e8875eba | ||
|
|
d1270c9d55 | ||
|
|
40c314fe5c | ||
|
|
69bc465ace | ||
|
|
546dfce209 | ||
|
|
96acb499d2 | ||
|
|
64a0f5a659 | ||
|
|
3ce8c9fc8f | ||
|
|
e0614e4f52 | ||
|
|
8428cedc83 | ||
|
|
49dc332a04 | ||
|
|
9bedc6300d | ||
|
|
60e1910e5b | ||
|
|
cc4066189a | ||
|
|
4e2ab3a177 | ||
|
|
733c861052 | ||
|
|
dd7f18f65f | ||
|
|
41f649c9a9 | ||
|
|
d91938c19d | ||
|
|
a3cd1290be | ||
|
|
e90ec6a474 | ||
|
|
7d33d1bace | ||
|
|
638cc50727 | ||
|
|
4b9f5578a0 | ||
|
|
1444ebb7f1 | ||
|
|
59c8672f5c | ||
|
|
028a0dcd3d | ||
|
|
a7920acff5 | ||
|
|
655927ab15 | ||
|
|
79a87a9c2b | ||
|
|
051e23c782 | ||
|
|
8d3581a49f | ||
|
|
887d0fca0e | ||
|
|
cd96377312 | ||
|
|
358b040157 | ||
|
|
8b98e67643 | ||
|
|
184c553cab | ||
|
|
6876263961 | ||
|
|
fc8495a744 | ||
|
|
4caeb64888 | ||
|
|
428e9e7886 | ||
|
|
70540a1f74 | ||
|
|
d475f04c78 | ||
|
|
f0dc206784 | ||
|
|
39e1b5b962 | ||
|
|
caca8949de | ||
|
|
c375ae3ec7 | ||
|
|
0232941b1d | ||
|
|
f561b857f2 | ||
|
|
63445be4e5 | ||
|
|
8880e89bcd | ||
|
|
4c981953ac | ||
|
|
619885b484 | ||
|
|
41723340de | ||
|
|
6592f83589 | ||
|
|
56560a859b | ||
|
|
43d74d7fa5 | ||
|
|
65fab0ef5b | ||
|
|
cd981ec56a | ||
|
|
6e531d0ccc | ||
|
|
12f308748f | ||
|
|
c1ea97e15d | ||
|
|
ac0ba832c7 | ||
|
|
da51302345 | ||
|
|
c5ddada32e | ||
|
|
9d3b11d485 | ||
|
|
a8889718aa | ||
|
|
8a950a7116 | ||
|
|
1704eb16cd | ||
|
|
64551a8386 | ||
|
|
e95a4f4f52 | ||
|
|
c738d60cef | ||
|
|
ae59a51193 | ||
|
|
2ae38e9c43 | ||
|
|
0d1162f180 | ||
|
|
5dc7951dc0 | ||
|
|
ea472b46c9 | ||
|
|
a866fbf381 | ||
|
|
76f8e84edd | ||
|
|
8af7200085 | ||
|
|
3d957a33fa | ||
|
|
f028dbf179 | ||
|
|
0eb36b5e9a | ||
|
|
aa2b4a688b | ||
|
|
67252c246c | ||
|
|
b05565f368 | ||
|
|
e2b652d95f | ||
|
|
57475caab0 | ||
|
|
56dee4acc6 | ||
|
|
34205f5bb5 | ||
|
|
d0d77e8c60 | ||
|
|
3143846ba4 | ||
|
|
9f1608a6a2 | ||
|
|
25f1a3d759 | ||
|
|
0a056cfd81 | ||
|
|
5a0be4c6d8 | ||
|
|
5c1442766c | ||
|
|
2df1b124a7 | ||
|
|
816f2f9cc2 | ||
|
|
666623d39a | ||
|
|
f2729e8974 | ||
|
|
0eabb01e27 | ||
|
|
aa85b5ee1e | ||
|
|
b664db3cf3 | ||
|
|
a5ecd4eb87 | ||
|
|
fd24546787 | ||
|
|
f3f444c1df | ||
|
|
9294c5aa0a | ||
|
|
81c51ec51c | ||
|
|
712c9fc848 | ||
|
|
b5a12fa6d3 | ||
|
|
96a6214316 | ||
|
|
29c82cfb33 | ||
|
|
d2b405066d | ||
|
|
2cd684f8e0 | ||
|
|
ea1ed13bc8 | ||
|
|
c4d05010cb | ||
|
|
6276f54752 | ||
|
|
6ad0b004fa | ||
|
|
8e820cde13 | ||
|
|
c3483458fe | ||
|
|
572395ac20 | ||
|
|
ba5aacbb95 | ||
|
|
95c74ae4ae | ||
|
|
a2165b38a0 | ||
|
|
3fc710e0b1 | ||
|
|
dd0a35273c | ||
|
|
e86b7d0c13 | ||
|
|
cf7404630e | ||
|
|
5bc5921af4 | ||
|
|
ef872595ae | ||
|
|
76db2bb39b | ||
|
|
eac9ee8d3f | ||
|
|
a3760c0891 | ||
|
|
1d706bd77c | ||
|
|
a747ef966b | ||
|
|
3e60997edb | ||
|
|
87f6df0655 | ||
|
|
a74846a0db | ||
|
|
25b7a5d531 | ||
|
|
038d9118b6 | ||
|
|
be771e5fd2 | ||
|
|
c7436e667d | ||
|
|
1fbee7c316 | ||
|
|
183dde75de | ||
|
|
8b39ae13c7 | ||
|
|
8086837f69 | ||
|
|
1bb6d8de6f | ||
|
|
ff41c22fdc | ||
|
|
2f6236d1ea | ||
|
|
a888057453 | ||
|
|
eae7343741 | ||
|
|
921f1ba4cf | ||
|
|
c59fb1b477 | ||
|
|
e7cb7bc737 | ||
|
|
1bb04ea598 | ||
|
|
1ed48c774e | ||
|
|
600fc8be2b | ||
|
|
54b80ecf9f | ||
|
|
c823160d94 | ||
|
|
97a73637e0 | ||
|
|
d6b18ebfe7 | ||
|
|
653ecf91c2 | ||
|
|
b515651feb | ||
|
|
b7870ae78c | ||
|
|
0dc0516f0c | ||
|
|
299008be36 | ||
|
|
743d6c430b | ||
|
|
723d9af04d | ||
|
|
87aa3282f0 | ||
|
|
6edcbdca19 | ||
|
|
bbc48b0ef5 | ||
|
|
2882ee9f55 | ||
|
|
bd18405cf0 | ||
|
|
dd5a732eac | ||
|
|
78149505f9 | ||
|
|
862b01d4c0 | ||
|
|
7b07ce3fef | ||
|
|
9afbbf21fd | ||
|
|
d395c81606 | ||
|
|
b2cfb629e4 | ||
|
|
be257b6f9f | ||
|
|
34423580e0 | ||
|
|
d4a8123267 | ||
|
|
e6d83644e8 | ||
|
|
e1a7027fe8 | ||
|
|
fe58770df8 | ||
|
|
c5b0366a25 | ||
|
|
00a0c81f8e | ||
|
|
945b7a0613 | ||
|
|
217e3a59c4 | ||
|
|
ed28795651 | ||
|
|
9d547a8443 | ||
|
|
0ab88f5342 | ||
|
|
c2dc3008b5 | ||
|
|
8dfe37a3a3 | ||
|
|
32f0567ca5 | ||
|
|
6f7466b6dd | ||
|
|
f2715a0593 | ||
|
|
90b1e271a8 | ||
|
|
69eca63a84 | ||
|
|
d97a9fb4ff | ||
|
|
a5576f9738 | ||
|
|
6d050b7282 | ||
|
|
c833b77646 | ||
|
|
74c89de3e9 | ||
|
|
ed446360a4 | ||
|
|
af5c10ef0c | ||
|
|
9807225f90 | ||
|
|
4aa57e9e46 | ||
|
|
9331c22620 | ||
|
|
d0c2f3c403 | ||
|
|
cc84831cae | ||
|
|
31b657e8ea | ||
|
|
f490777502 | ||
|
|
3367705ac2 | ||
|
|
6e79767f5a | ||
|
|
6671344602 | ||
|
|
3bc7f46412 | ||
|
|
60837c9d0f | ||
|
|
d4ac56226d | ||
|
|
8a2d3a8861 | ||
|
|
29589ce832 | ||
|
|
538194344a | ||
|
|
5e7a7c7e2f | ||
|
|
23765332fa | ||
|
|
71b38e0cee | ||
|
|
163e9b02bf | ||
|
|
8c00003466 | ||
|
|
90f95de5c9 | ||
|
|
33852d14af | ||
|
|
ffc4380b30 | ||
|
|
6bc4528776 | ||
|
|
314ef9df03 | ||
|
|
b4b3be4f05 | ||
|
|
563be8ca2a | ||
|
|
6817771df7 | ||
|
|
e527b375e8 | ||
|
|
ed8ffa4bb4 | ||
|
|
4e8a218d17 | ||
|
|
3c92142f12 | ||
|
|
57de02c9f2 | ||
|
|
c680c84a31 | ||
|
|
3c4972a53f | ||
|
|
da752e5d7d | ||
|
|
6af387ec6f | ||
|
|
cefa23e4eb | ||
|
|
554b73643d | ||
|
|
07ea935533 | ||
|
|
e941ae3811 | ||
|
|
1d341ffbb0 | ||
|
|
319031154d | ||
|
|
f75420c209 | ||
|
|
2defbde5ab | ||
|
|
d99806cc27 | ||
|
|
c12eae0c5e | ||
|
|
cd8497b9fb | ||
|
|
469b4b21d2 | ||
|
|
56d193c5c8 | ||
|
|
926389f3a7 | ||
|
|
c3a2a7659e | ||
|
|
52b7ebd6be | ||
|
|
8b9419aaf7 | ||
|
|
2e50b34c67 | ||
|
|
2f59e1c1d9 | ||
|
|
a18e1305b3 | ||
|
|
998c58e89b | ||
|
|
0779c34db8 | ||
|
|
35db567c9c | ||
|
|
9e1d04fea7 | ||
|
|
93929e8d01 | ||
|
|
b44bffe954 | ||
|
|
75867ff164 | ||
|
|
739925c902 | ||
|
|
78be537eff | ||
|
|
45e6bb7add | ||
|
|
d036ebeaf6 | ||
|
|
7b7689d307 | ||
|
|
f236395176 | ||
|
|
5590c40b5b | ||
|
|
aa73411c14 | ||
|
|
71bb07d10a | ||
|
|
b96c18c952 | ||
|
|
e83f4e0173 | ||
|
|
225bff226f | ||
|
|
0ee473afd1 | ||
|
|
5d7ad69cd8 | ||
|
|
f279f4731b | ||
|
|
b8ad5f4249 | ||
|
|
d95df57297 | ||
|
|
63f9e7ee86 | ||
|
|
71f8f5048b | ||
|
|
88dce24375 | ||
|
|
183c49f352 | ||
|
|
ea2a7c5ea4 | ||
|
|
97268662fe | ||
|
|
0ad7833ca4 | ||
|
|
b113772bb1 | ||
|
|
790f94533c | ||
|
|
40c7ecfdea | ||
|
|
2e24cfadb7 | ||
|
|
bb01ea3809 | ||
|
|
9089244db7 | ||
|
|
25ec655162 | ||
|
|
aed8bace97 | ||
|
|
4496983233 | ||
|
|
4f5e0dd325 | ||
|
|
7b91af780a | ||
|
|
6d8d20774f | ||
|
|
9155b59e1a | ||
|
|
b0069c5c05 | ||
|
|
7d45b7f269 | ||
|
|
2aa38f5bd3 | ||
|
|
43b47495e3 | ||
|
|
75fd6bd269 | ||
|
|
b15288fb87 | ||
|
|
e6e572bf5c | ||
|
|
86e6be342c | ||
|
|
37d1fa53e0 | ||
|
|
8556068534 | ||
|
|
f48d95b415 | ||
|
|
0763269ec5 | ||
|
|
5fb16e3442 | ||
|
|
01b8ef39f5 | ||
|
|
d170a1c0e2 | ||
|
|
08e512a273 | ||
|
|
fbd6b28633 | ||
|
|
1cbf1c681a | ||
|
|
56d5131715 | ||
|
|
9b85b1b638 | ||
|
|
bee226b3ee | ||
|
|
788b1854b4 | ||
|
|
6e19dbc923 | ||
|
|
86e28b4db8 | ||
|
|
cde4165097 | ||
|
|
9c94de070a | ||
|
|
c375a8d75b | ||
|
|
23d6ca9942 | ||
|
|
b7f2f40ae5 | ||
|
|
6e938f1f24 | ||
|
|
b16bfac107 | ||
|
|
e1ce619bf7 | ||
|
|
09dfc08207 | ||
|
|
3acb3a09fc | ||
|
|
07fce7ba13 | ||
|
|
7ca9604422 | ||
|
|
52d8cbf092 | ||
|
|
ebfd555ad1 | ||
|
|
73b8f85816 | ||
|
|
f8f2cf7500 | ||
|
|
aadea5ab97 | ||
|
|
cc6cd394e5 | ||
|
|
54f7708eaa | ||
|
|
7e051e0619 | ||
|
|
d7aa245c33 | ||
|
|
a71fb6057d | ||
|
|
2cb0b41ce7 | ||
|
|
474cffbc0f | ||
|
|
e25f05224f | ||
|
|
4fcc709f4e | ||
|
|
7639b5aa3e | ||
|
|
01c5ee6f7d | ||
|
|
4d41645598 | ||
|
|
8f54152fab | ||
|
|
b1a8fafa62 | ||
|
|
54f6ff3bd5 | ||
|
|
6461087c86 | ||
|
|
d3092ced99 | ||
|
|
7aa74c227b | ||
|
|
0fd95e5db5 | ||
|
|
6c3af2670e | ||
|
|
8f30f4170c | ||
|
|
ad4cfffe3d | ||
|
|
6a4960889e | ||
|
|
2dcd67ce1a | ||
|
|
064265166c | ||
|
|
4c3090ace9 | ||
|
|
9f6ce448bd | ||
|
|
fb3777f085 | ||
|
|
c26344fc93 | ||
|
|
018b8e1d62 | ||
|
|
4235160dcf | ||
|
|
ba3c346195 | ||
|
|
73120947cf | ||
|
|
e420b3981c | ||
|
|
5762bc4a5f | ||
|
|
76cd6b662b | ||
|
|
41933efbf0 | ||
|
|
18a333ec6b | ||
|
|
8f5d2e546e | ||
|
|
0b6ff59448 | ||
|
|
4132dd87a4 | ||
|
|
0752b6b23c | ||
|
|
d950b97115 | ||
|
|
cde2859a65 | ||
|
|
967d7c47dc | ||
|
|
c5b0b6ff32 | ||
|
|
4c04c848b5 | ||
|
|
ab3986a684 | ||
|
|
27d2fb88ca | ||
|
|
d0108869ee | ||
|
|
de585e3109 | ||
|
|
58d043b0d0 | ||
|
|
e662de94f6 | ||
|
|
d918d571cc | ||
|
|
4fedf6efbd | ||
|
|
75ab48958c | ||
|
|
1beb6b686a | ||
|
|
3200007a69 | ||
|
|
50290c78b6 | ||
|
|
0e984b6e7e | ||
|
|
86f6f68274 | ||
|
|
7132526dd2 | ||
|
|
93a1d4f156 | ||
|
|
f8266a228c | ||
|
|
80e8e20a89 | ||
|
|
59c7deab09 | ||
|
|
0efafdd408 | ||
|
|
1a7f2c8f45 | ||
|
|
3718f5149a | ||
|
|
e6905805bb | ||
|
|
3b8ca5f343 | ||
|
|
90c7ae70c6 | ||
|
|
b2f5bd7c60 | ||
|
|
5ba4391cf2 | ||
|
|
415a8bc249 | ||
|
|
a3cbc8a004 | ||
|
|
02dc3b6722 | ||
|
|
ef49a9243b | ||
|
|
db7c8562ed | ||
|
|
0f084751b4 | ||
|
|
51eac99ce4 | ||
|
|
d57b44153e | ||
|
|
c3f83b6761 | ||
|
|
fcf1ec132f | ||
|
|
ce75f48acb | ||
|
|
4a31d0a9c9 | ||
|
|
9fd5c6f619 | ||
|
|
656c39909a | ||
|
|
f41e5ec928 | ||
|
|
70bdf25284 | ||
|
|
cd12fe86d3 | ||
|
|
15af423d86 | ||
|
|
d6fb8f12c6 | ||
|
|
8428dee47e | ||
|
|
371fb853ee | ||
|
|
cf8097138e | ||
|
|
a0f532072d | ||
|
|
c4c3e774cd | ||
|
|
3405efe934 | ||
|
|
a19363ab25 | ||
|
|
af2e1f4e4d | ||
|
|
b6a39f61e5 | ||
|
|
4fe8c473fd | ||
|
|
13d44a2281 | ||
|
|
b2a0e98a60 | ||
|
|
fad596a159 | ||
|
|
74372424ae | ||
|
|
55d85b89c0 | ||
|
|
4a7a9e9951 | ||
|
|
43bd843f37 | ||
|
|
81fd005af9 | ||
|
|
85dd0556d7 | ||
|
|
2395069b0b | ||
|
|
e86e7c351d | ||
|
|
032dfddb6b | ||
|
|
c2f446f40e | ||
|
|
e6f7da4036 | ||
|
|
d9d03d5af8 | ||
|
|
7190971b44 | ||
|
|
b64fd093ad | ||
|
|
6b1170cb97 | ||
|
|
bd4b7f8b25 | ||
|
|
ec06ffe294 | ||
|
|
93d3cf52ab | ||
|
|
03ea478f20 | ||
|
|
33c7d6eb93 | ||
|
|
e4d3ff2374 | ||
|
|
9525d5b5ae | ||
|
|
bcbcb3d107 | ||
|
|
00cb9029f5 | ||
|
|
765d8a33dd | ||
|
|
72abf86870 | ||
|
|
58e733b5a0 | ||
|
|
605fd0eda8 | ||
|
|
0828d0f5c7 | ||
|
|
4db695f932 | ||
|
|
deaabff752 | ||
|
|
89936c66b0 | ||
|
|
6623744172 | ||
|
|
37690f2651 | ||
|
|
e2d3cefc95 | ||
|
|
6ae72f3980 | ||
|
|
dd61f7795f | ||
|
|
06071dc76d | ||
|
|
c7a7982e23 |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -92,3 +92,4 @@ GRAPHICS
|
|||||||
# hex files
|
# hex files
|
||||||
*.hex binary
|
*.hex binary
|
||||||
*.eep binary
|
*.eep binary
|
||||||
|
nix/sources.nix linguist-generated=true
|
||||||
|
|||||||
21
.github/workflows/api.yml
vendored
21
.github/workflows/api.yml
vendored
@@ -25,18 +25,13 @@ jobs:
|
|||||||
- name: Generate API Data
|
- name: Generate API Data
|
||||||
run: qmk generate-api
|
run: qmk generate-api
|
||||||
|
|
||||||
- name: Install rsync
|
|
||||||
run: |
|
|
||||||
apt-get update && apt-get install -y rsync
|
|
||||||
|
|
||||||
- name: Upload API Data
|
- name: Upload API Data
|
||||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
uses: jakejarvis/s3-sync-action@master
|
||||||
with:
|
with:
|
||||||
ACCESS_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
|
args: --acl public-read --follow-symlinks --delete
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
env:
|
||||||
BRANCH: main
|
AWS_S3_BUCKET: ${{ secrets.API_SPACE_MASTER }}
|
||||||
FOLDER: api_data/v1
|
AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }}
|
||||||
CLEAN: true
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_KEY }}
|
||||||
GIT_CONFIG_EMAIL: hello@qmk.fm
|
AWS_S3_ENDPOINT: https://nyc3.digitaloceanspaces.com
|
||||||
REPOSITORY_NAME: qmk/qmk_keyboards
|
SOURCE_DIR: 'api_data'
|
||||||
TARGET_FOLDER: v1
|
|
||||||
|
|||||||
2
.github/workflows/cli.yml
vendored
2
.github/workflows/cli.yml
vendored
@@ -23,6 +23,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip3 install -r requirements.txt
|
run: pip3 install -r requirements-dev.txt
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: bin/qmk pytest
|
run: bin/qmk pytest
|
||||||
|
|||||||
21
.github/workflows/develop_api.yml
vendored
21
.github/workflows/develop_api.yml
vendored
@@ -25,18 +25,13 @@ jobs:
|
|||||||
- name: Generate API Data
|
- name: Generate API Data
|
||||||
run: qmk generate-api
|
run: qmk generate-api
|
||||||
|
|
||||||
- name: Install rsync
|
|
||||||
run: |
|
|
||||||
apt-get update && apt-get install -y rsync
|
|
||||||
|
|
||||||
- name: Upload API Data
|
- name: Upload API Data
|
||||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
uses: jakejarvis/s3-sync-action@master
|
||||||
with:
|
with:
|
||||||
ACCESS_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
|
args: --acl public-read --follow-symlinks --delete
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
env:
|
||||||
BRANCH: main
|
AWS_S3_BUCKET: ${{ secrets.API_SPACE_DEVELOP }}
|
||||||
FOLDER: api_data/v1
|
AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }}
|
||||||
CLEAN: true
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_KEY }}
|
||||||
GIT_CONFIG_EMAIL: hello@qmk.fm
|
AWS_S3_ENDPOINT: https://nyc3.digitaloceanspaces.com
|
||||||
REPOSITORY_NAME: qmk/qmk_keyboards_devel
|
SOURCE_DIR: 'api_data'
|
||||||
TARGET_FOLDER: v1
|
|
||||||
|
|||||||
61
.github/workflows/format.yaml
vendored
61
.github/workflows/format.yaml
vendored
@@ -1,47 +1,42 @@
|
|||||||
name: Format Codebase
|
name: PR Lint Format
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
pull_request:
|
||||||
branches:
|
paths:
|
||||||
- master
|
- 'drivers/**'
|
||||||
- develop
|
- 'lib/arm_atsam/**'
|
||||||
|
- 'lib/lib8tion/**'
|
||||||
|
- 'lib/python/**'
|
||||||
|
- 'platforms/**'
|
||||||
|
- 'quantum/**'
|
||||||
|
- 'tests/**'
|
||||||
|
- 'tmk_core/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
format:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: qmkfm/base_container
|
|
||||||
|
|
||||||
# protect against those who develop with their fork on master
|
container: qmkfm/base_container
|
||||||
if: github.repository == 'qmk/qmk_firmware'
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: rlespinasse/github-slug-action@v3.x
|
- uses: rlespinasse/github-slug-action@v3.x
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.API_TOKEN_GITHUB }}
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install dependencies
|
- uses: trilom/file-changes-action@v1.2.4
|
||||||
run: |
|
id: file_changes
|
||||||
apt-get update && apt-get install -y dos2unix
|
|
||||||
|
|
||||||
- name: Format files
|
|
||||||
run: |
|
|
||||||
bin/qmk cformat -a
|
|
||||||
bin/qmk pyformat
|
|
||||||
bin/qmk fileformat
|
|
||||||
|
|
||||||
- name: Become QMK Bot
|
|
||||||
run: |
|
|
||||||
git config user.name 'QMK Bot'
|
|
||||||
git config user.email 'hello@qmk.fm'
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
uses: peter-evans/create-pull-request@v3
|
|
||||||
with:
|
with:
|
||||||
delete-branch: true
|
output: ' '
|
||||||
branch: bugfix/format_${{ env.GITHUB_REF_SLUG }}
|
fileOutput: ' '
|
||||||
author: QMK Bot <hello@qmk.fm>
|
|
||||||
committer: QMK Bot <hello@qmk.fm>
|
- name: Run qmk cformat and qmk pyformat
|
||||||
commit-message: Format code according to conventions
|
shell: 'bash {0}'
|
||||||
title: '[CI] Format code according to conventions'
|
run: |
|
||||||
|
qmk cformat --core-only -n $(< ~/files.txt)
|
||||||
|
cformat_exit=$?
|
||||||
|
qmk pyformat -n
|
||||||
|
pyformat_exit=$?
|
||||||
|
|
||||||
|
exit $((cformat_exit + pyformat_exit))
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -5,6 +5,7 @@
|
|||||||
*.eep
|
*.eep
|
||||||
*.elf
|
*.elf
|
||||||
*.hex
|
*.hex
|
||||||
|
*.uf2
|
||||||
*.qmk
|
*.qmk
|
||||||
!util/bootloader.hex
|
!util/bootloader.hex
|
||||||
!quantum/tools/eeprom_reset.hex
|
!quantum/tools/eeprom_reset.hex
|
||||||
@@ -50,6 +51,7 @@ doxygen/
|
|||||||
.browse.VC.db*
|
.browse.VC.db*
|
||||||
*.stackdump
|
*.stackdump
|
||||||
# Let these ones be user specific, since we have so many different configurations
|
# Let these ones be user specific, since we have so many different configurations
|
||||||
|
*.code-workspace
|
||||||
.vscode/c_cpp_properties.json
|
.vscode/c_cpp_properties.json
|
||||||
.vscode/launch.json
|
.vscode/launch.json
|
||||||
.vscode/tasks.json
|
.vscode/tasks.json
|
||||||
@@ -71,6 +73,7 @@ id_rsa_*
|
|||||||
|
|
||||||
# python things
|
# python things
|
||||||
__pycache__
|
__pycache__
|
||||||
|
.python-version
|
||||||
|
|
||||||
# prerequisites for updating ChibiOS
|
# prerequisites for updating ChibiOS
|
||||||
/util/fmpp*
|
/util/fmpp*
|
||||||
|
|||||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -22,5 +22,6 @@
|
|||||||
"[markdown]": {
|
"[markdown]": {
|
||||||
"editor.trimAutoWhitespace": false,
|
"editor.trimAutoWhitespace": false,
|
||||||
"files.trimTrailingWhitespace": false
|
"files.trimTrailingWhitespace": false
|
||||||
}
|
},
|
||||||
|
"python.formatting.provider": "yapf"
|
||||||
}
|
}
|
||||||
|
|||||||
17
Makefile
17
Makefile
@@ -29,6 +29,13 @@ $(info QMK Firmware $(QMK_VERSION))
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Determine which qmk cli to use
|
||||||
|
ifeq (,$(shell which qmk))
|
||||||
|
QMK_BIN = bin/qmk
|
||||||
|
else
|
||||||
|
QMK_BIN = qmk
|
||||||
|
endif
|
||||||
|
|
||||||
# avoid 'Entering|Leaving directory' messages
|
# avoid 'Entering|Leaving directory' messages
|
||||||
MAKEFLAGS += --no-print-directory
|
MAKEFLAGS += --no-print-directory
|
||||||
|
|
||||||
@@ -86,8 +93,8 @@ clean:
|
|||||||
|
|
||||||
.PHONY: distclean
|
.PHONY: distclean
|
||||||
distclean: clean
|
distclean: clean
|
||||||
echo -n 'Deleting *.bin and *.hex ... '
|
echo -n 'Deleting *.bin, *.hex, and *.uf2 ... '
|
||||||
rm -f *.bin *.hex
|
rm -f *.bin *.hex *.uf2
|
||||||
echo 'done.'
|
echo 'done.'
|
||||||
|
|
||||||
#Compatibility with the old make variables, anything you specify directly on the command line
|
#Compatibility with the old make variables, anything you specify directly on the command line
|
||||||
@@ -384,7 +391,7 @@ define PARSE_KEYMAP
|
|||||||
# Format it in bold
|
# Format it in bold
|
||||||
KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR)
|
KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR)
|
||||||
# Specify the variables that we are passing forward to submake
|
# Specify the variables that we are passing forward to submake
|
||||||
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY)
|
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY) QMK_BIN=$$(QMK_BIN)
|
||||||
# And the first part of the make command
|
# And the first part of the make command
|
||||||
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET)
|
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET)
|
||||||
# The message to display
|
# The message to display
|
||||||
@@ -501,8 +508,8 @@ endef
|
|||||||
%:
|
%:
|
||||||
# Check if we have the CMP tool installed
|
# Check if we have the CMP tool installed
|
||||||
cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
|
cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
|
||||||
# Ensure that bin/qmk works.
|
# Ensure that $(QMK_BIN) works.
|
||||||
if ! bin/qmk hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; exit 1; fi
|
if ! $(QMK_BIN) hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; exit 1; fi
|
||||||
# Check if the submodules are dirty, and display a warning if they are
|
# Check if the submodules are dirty, and display a warning if they are
|
||||||
ifndef SKIP_GIT
|
ifndef SKIP_GIT
|
||||||
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi
|
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi
|
||||||
|
|||||||
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@@ -6,7 +6,7 @@ Vagrant.configure(2) do |config|
|
|||||||
config.vm.define "qmk_firmware"
|
config.vm.define "qmk_firmware"
|
||||||
|
|
||||||
# VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
|
# VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
|
||||||
config.vm.box = "generic/debian9"
|
config.vm.box = "generic/debian10"
|
||||||
|
|
||||||
config.vm.synced_folder '.', '/vagrant'
|
config.vm.synced_folder '.', '/vagrant'
|
||||||
|
|
||||||
|
|||||||
48
bin/qmk
48
bin/qmk
@@ -3,7 +3,6 @@
|
|||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from importlib.util import find_spec
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
# Add the QMK python libs to our path
|
# Add the QMK python libs to our path
|
||||||
@@ -12,52 +11,9 @@ qmk_dir = script_dir.parent
|
|||||||
python_lib_dir = Path(qmk_dir / 'lib' / 'python').resolve()
|
python_lib_dir = Path(qmk_dir / 'lib' / 'python').resolve()
|
||||||
sys.path.append(str(python_lib_dir))
|
sys.path.append(str(python_lib_dir))
|
||||||
|
|
||||||
|
|
||||||
def _check_modules(requirements):
|
|
||||||
""" Check if the modules in the given requirements.txt are available.
|
|
||||||
"""
|
|
||||||
with Path(qmk_dir / requirements).open() as fd:
|
|
||||||
for line in fd.readlines():
|
|
||||||
line = line.strip().replace('<', '=').replace('>', '=')
|
|
||||||
|
|
||||||
if len(line) == 0 or line[0] == '#' or line.startswith('-r'):
|
|
||||||
continue
|
|
||||||
|
|
||||||
if '#' in line:
|
|
||||||
line = line.split('#')[0]
|
|
||||||
|
|
||||||
module = dict()
|
|
||||||
module['name'] = line.split('=')[0] if '=' in line else line
|
|
||||||
module['import'] = module['name'].replace('-', '_')
|
|
||||||
|
|
||||||
# Not every module is importable by its own name.
|
|
||||||
if module['name'] == "pep8-naming":
|
|
||||||
module['import'] = "pep8ext_naming"
|
|
||||||
|
|
||||||
if not find_spec(module['import']):
|
|
||||||
print('Could not find module %s!' % module['name'])
|
|
||||||
print('Please run `python3 -m pip install -r %s` to install required python dependencies.' % (qmk_dir / requirements,))
|
|
||||||
if developer:
|
|
||||||
print('You can also turn off developer mode: qmk config user.developer=None')
|
|
||||||
print()
|
|
||||||
exit(255)
|
|
||||||
|
|
||||||
|
|
||||||
developer = False
|
|
||||||
# Make sure our modules have been setup
|
|
||||||
_check_modules('requirements.txt')
|
|
||||||
|
|
||||||
# Setup the CLI
|
# Setup the CLI
|
||||||
import milc # noqa
|
import milc # noqa
|
||||||
|
|
||||||
# For developers additional modules are needed
|
|
||||||
if milc.cli.config.user.developer:
|
|
||||||
# Do not run the check for 'config',
|
|
||||||
# so users can turn off developer mode
|
|
||||||
if len(sys.argv) == 1 or (len(sys.argv) > 1 and 'config' != sys.argv[1]):
|
|
||||||
developer = True
|
|
||||||
_check_modules('requirements-dev.txt')
|
|
||||||
|
|
||||||
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
||||||
|
|
||||||
|
|
||||||
@@ -73,9 +29,13 @@ def main():
|
|||||||
"""
|
"""
|
||||||
# Change to the root of our checkout
|
# Change to the root of our checkout
|
||||||
os.environ['ORIG_CWD'] = os.getcwd()
|
os.environ['ORIG_CWD'] = os.getcwd()
|
||||||
|
os.environ['DEPRECATED_BIN_QMK'] = '1'
|
||||||
os.chdir(qmk_dir)
|
os.chdir(qmk_dir)
|
||||||
|
|
||||||
|
print('Warning: The bin/qmk script is being deprecated. Please install the QMK CLI: python3 -m pip install qmk', file=sys.stderr)
|
||||||
|
|
||||||
# Import the subcommands
|
# Import the subcommands
|
||||||
|
import milc.subcommand.config # noqa
|
||||||
import qmk.cli # noqa
|
import qmk.cli # noqa
|
||||||
|
|
||||||
# Execute
|
# Execute
|
||||||
|
|||||||
@@ -89,11 +89,17 @@ ifeq ($(strip $(BOOTLOADER)), USBasp)
|
|||||||
BOOTLOADER_SIZE = 4096
|
BOOTLOADER_SIZE = 4096
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(BOOTLOADER)), lufa-ms)
|
ifeq ($(strip $(BOOTLOADER)), lufa-ms)
|
||||||
# DO NOT USE THIS BOOTLOADER IN NEW PROJECTS!
|
|
||||||
# It is extremely prone to bricking, and is only included to support existing boards.
|
|
||||||
OPT_DEFS += -DBOOTLOADER_MS
|
OPT_DEFS += -DBOOTLOADER_MS
|
||||||
BOOTLOADER_SIZE = 6144
|
BOOTLOADER_SIZE ?= 8192
|
||||||
FIRMWARE_FORMAT = bin
|
FIRMWARE_FORMAT = bin
|
||||||
|
cpfirmware: lufa_warning
|
||||||
|
.INTERMEDIATE: lufa_warning
|
||||||
|
lufa_warning: $(FIRMWARE_FORMAT)
|
||||||
|
$(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@)
|
||||||
|
$(info LUFA MASS STORAGE Bootloader selected)
|
||||||
|
$(info DO NOT USE THIS BOOTLOADER IN NEW PROJECTS!)
|
||||||
|
$(info It is extremely prone to bricking, and is only included to support existing boards.)
|
||||||
|
$(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@)
|
||||||
endif
|
endif
|
||||||
ifdef BOOTLOADER_SIZE
|
ifdef BOOTLOADER_SIZE
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE))
|
OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE))
|
||||||
@@ -137,3 +143,6 @@ ifeq ($(strip $(BOOTLOADER)), stm32duino)
|
|||||||
DFU_ARGS = -d 1EAF:0003 -a 2 -R
|
DFU_ARGS = -d 1EAF:0003 -a 2 -R
|
||||||
DFU_SUFFIX_ARGS = -v 1EAF -p 0003
|
DFU_SUFFIX_ARGS = -v 1EAF -p 0003
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(strip $(BOOTLOADER)), tinyuf2)
|
||||||
|
OPT_DEFS += -DBOOTLOADER_TINYUF2
|
||||||
|
endif
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
# Look for a json keymap file
|
# Look for a json keymap file
|
||||||
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.json)","")
|
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.json)","")
|
||||||
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
|
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
|
||||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_5)/keymap.json
|
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_5)/keymap.json
|
||||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
|
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
|
||||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.json)","")
|
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.json)","")
|
||||||
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
|
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
|
||||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_4)/keymap.json
|
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_4)/keymap.json
|
||||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
|
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
|
||||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.json)","")
|
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.json)","")
|
||||||
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
|
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
|
||||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_3)/keymap.json
|
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_3)/keymap.json
|
||||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
|
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
|
||||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.json)","")
|
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.json)","")
|
||||||
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
|
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
|
||||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_2)/keymap.json
|
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_2)/keymap.json
|
||||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
|
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
|
||||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
|
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
|
||||||
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
|
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
|
||||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json
|
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json
|
||||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
||||||
endif
|
endif
|
||||||
@@ -27,5 +27,5 @@ ifneq ("$(wildcard $(KEYMAP_PATH))", "")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Generate the keymap.c
|
# Generate the keymap.c
|
||||||
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
|
$(KEYMAP_C): $(KEYMAP_JSON)
|
||||||
bin/qmk json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
|
$(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ endif
|
|||||||
|
|
||||||
include common.mk
|
include common.mk
|
||||||
|
|
||||||
|
# Set the qmk cli to use
|
||||||
|
QMK_BIN ?= qmk
|
||||||
|
|
||||||
# Set the filename for the final firmware binary
|
# Set the filename for the final firmware binary
|
||||||
KEYBOARD_FILESAFE := $(subst /,_,$(KEYBOARD))
|
KEYBOARD_FILESAFE := $(subst /,_,$(KEYBOARD))
|
||||||
TARGET ?= $(KEYBOARD_FILESAFE)_$(KEYMAP)
|
TARGET ?= $(KEYBOARD_FILESAFE)_$(KEYMAP)
|
||||||
@@ -97,9 +100,18 @@ MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP)
|
|||||||
MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)
|
MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)
|
||||||
|
|
||||||
# Pull in rules from info.json
|
# Pull in rules from info.json
|
||||||
INFO_RULES_MK = $(shell bin/qmk generate-rules-mk --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/rules.mk)
|
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/rules.mk)
|
||||||
include $(INFO_RULES_MK)
|
include $(INFO_RULES_MK)
|
||||||
|
|
||||||
|
ifneq ($(FORCE_LAYOUT),)
|
||||||
|
TARGET := $(TARGET)_$(FORCE_LAYOUT)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Object files and generated keymap directory
|
||||||
|
# To put object files in current directory, use a dot (.), do NOT make
|
||||||
|
# this an empty or blank macro!
|
||||||
|
KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
|
||||||
|
|
||||||
# Check for keymap.json first, so we can regenerate keymap.c
|
# Check for keymap.json first, so we can regenerate keymap.c
|
||||||
include build_json.mk
|
include build_json.mk
|
||||||
|
|
||||||
@@ -142,10 +154,6 @@ ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
|
|||||||
include platforms/chibios/QMK_PROTON_C/convert_to_proton_c.mk
|
include platforms/chibios/QMK_PROTON_C/convert_to_proton_c.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(FORCE_LAYOUT),)
|
|
||||||
TARGET := $(TARGET)_$(FORCE_LAYOUT)
|
|
||||||
endif
|
|
||||||
|
|
||||||
include quantum/mcu_selection.mk
|
include quantum/mcu_selection.mk
|
||||||
|
|
||||||
# Find all the C source files to be compiled in subfolders.
|
# Find all the C source files to be compiled in subfolders.
|
||||||
@@ -205,6 +213,7 @@ endif
|
|||||||
#
|
#
|
||||||
# https://docs.qmk.fm/#/feature_layouts?id=tips-for-making-layouts-keyboard-agnostic
|
# https://docs.qmk.fm/#/feature_layouts?id=tips-for-making-layouts-keyboard-agnostic
|
||||||
#
|
#
|
||||||
|
QMK_KEYBOARD_H = $(KEYBOARD_OUTPUT)/src/default_keyboard.h
|
||||||
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/$(KEYBOARD_FOLDER_1).h)","")
|
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/$(KEYBOARD_FOLDER_1).h)","")
|
||||||
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_1).h
|
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_1).h
|
||||||
endif
|
endif
|
||||||
@@ -294,12 +303,15 @@ endif
|
|||||||
CONFIG_H += $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h
|
CONFIG_H += $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h
|
||||||
|
|
||||||
$(KEYBOARD_OUTPUT)/src/info_config.h: $(INFO_JSON_FILES)
|
$(KEYBOARD_OUTPUT)/src/info_config.h: $(INFO_JSON_FILES)
|
||||||
bin/qmk generate-config-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_config.h
|
$(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_config.h
|
||||||
|
|
||||||
|
$(KEYBOARD_OUTPUT)/src/default_keyboard.h: $(INFO_JSON_FILES)
|
||||||
|
$(QMK_BIN) generate-keyboard-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/default_keyboard.h
|
||||||
|
|
||||||
$(KEYBOARD_OUTPUT)/src/layouts.h: $(INFO_JSON_FILES)
|
$(KEYBOARD_OUTPUT)/src/layouts.h: $(INFO_JSON_FILES)
|
||||||
bin/qmk generate-layouts --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/layouts.h
|
$(QMK_BIN) generate-layouts --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/layouts.h
|
||||||
|
|
||||||
generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h
|
generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/default_keyboard.h $(KEYBOARD_OUTPUT)/src/layouts.h
|
||||||
|
|
||||||
.INTERMEDIATE : generated-files
|
.INTERMEDIATE : generated-files
|
||||||
|
|
||||||
@@ -320,11 +332,6 @@ endif
|
|||||||
# Disable features that a keyboard doesn't support
|
# Disable features that a keyboard doesn't support
|
||||||
-include disable_features.mk
|
-include disable_features.mk
|
||||||
|
|
||||||
# Object files directory
|
|
||||||
# To put object files in current directory, use a dot (.), do NOT make
|
|
||||||
# this an empty or blank macro!
|
|
||||||
KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
|
|
||||||
|
|
||||||
ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
|
ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
|
||||||
CONFIG_H += $(KEYMAP_PATH)/config.h
|
CONFIG_H += $(KEYMAP_PATH)/config.h
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ endif
|
|||||||
|
|
||||||
include common_features.mk
|
include common_features.mk
|
||||||
include $(TMK_PATH)/common.mk
|
include $(TMK_PATH)/common.mk
|
||||||
|
include $(QUANTUM_PATH)/debounce/tests/rules.mk
|
||||||
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
|
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
|
||||||
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
|
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
|
||||||
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ SERIAL_PATH := $(QUANTUM_PATH)/serial_link
|
|||||||
|
|
||||||
QUANTUM_SRC += \
|
QUANTUM_SRC += \
|
||||||
$(QUANTUM_DIR)/quantum.c \
|
$(QUANTUM_DIR)/quantum.c \
|
||||||
|
$(QUANTUM_DIR)/send_string.c \
|
||||||
$(QUANTUM_DIR)/bitwise.c \
|
$(QUANTUM_DIR)/bitwise.c \
|
||||||
$(QUANTUM_DIR)/led.c \
|
$(QUANTUM_DIR)/led.c \
|
||||||
$(QUANTUM_DIR)/keymap_common.c \
|
$(QUANTUM_DIR)/keymap_common.c \
|
||||||
@@ -222,14 +223,17 @@ VALID_LED_MATRIX_TYPES := IS31FL3731 custom
|
|||||||
|
|
||||||
ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
|
ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
|
||||||
ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),)
|
ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),)
|
||||||
$(error LED_MATRIX_DRIVER="$(LED_MATRIX_DRIVER)" is not a valid matrix type)
|
$(error "$(LED_MATRIX_DRIVER)" is not a valid matrix type)
|
||||||
else
|
|
||||||
BACKLIGHT_ENABLE = yes
|
|
||||||
BACKLIGHT_DRIVER = custom
|
|
||||||
OPT_DEFS += -DLED_MATRIX_ENABLE
|
|
||||||
SRC += $(QUANTUM_DIR)/led_matrix.c
|
|
||||||
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
|
|
||||||
endif
|
endif
|
||||||
|
OPT_DEFS += -DLED_MATRIX_ENABLE
|
||||||
|
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
|
||||||
|
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
|
||||||
|
OPT_DEFS += -DLIB8_ATTINY
|
||||||
|
endif
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
|
||||||
|
SRC += $(QUANTUM_DIR)/led_matrix.c
|
||||||
|
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
|
||||||
|
CIE1931_CURVE := yes
|
||||||
|
|
||||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
|
ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
|
||||||
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||||
@@ -240,7 +244,7 @@ ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
RGB_MATRIX_ENABLE ?= no
|
RGB_MATRIX_ENABLE ?= no
|
||||||
VALID_RGB_MATRIX_TYPES := IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
|
VALID_RGB_MATRIX_TYPES := AW20216 IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
|
||||||
|
|
||||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||||
ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
|
ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
|
||||||
@@ -257,6 +261,13 @@ endif
|
|||||||
CIE1931_CURVE := yes
|
CIE1931_CURVE := yes
|
||||||
RGB_KEYCODES_ENABLE := yes
|
RGB_KEYCODES_ENABLE := yes
|
||||||
|
|
||||||
|
ifeq ($(strip $(RGB_MATRIX_DRIVER)), AW20216)
|
||||||
|
OPT_DEFS += -DAW20216 -DSTM32_SPI -DHAL_USE_SPI=TRUE
|
||||||
|
COMMON_VPATH += $(DRIVER_PATH)/awinic
|
||||||
|
SRC += aw20216.c
|
||||||
|
QUANTUM_LIB_SRC += spi_master.c
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731)
|
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731)
|
||||||
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||||
@@ -346,7 +357,11 @@ endif
|
|||||||
VALID_BACKLIGHT_TYPES := pwm timer software custom
|
VALID_BACKLIGHT_TYPES := pwm timer software custom
|
||||||
|
|
||||||
BACKLIGHT_ENABLE ?= no
|
BACKLIGHT_ENABLE ?= no
|
||||||
BACKLIGHT_DRIVER ?= pwm
|
ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
|
||||||
|
BACKLIGHT_DRIVER ?= software
|
||||||
|
else
|
||||||
|
BACKLIGHT_DRIVER ?= pwm
|
||||||
|
endif
|
||||||
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
||||||
ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),)
|
ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),)
|
||||||
$(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
|
$(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
|
||||||
@@ -421,10 +436,6 @@ ifeq ($(strip $(TERMINAL_ENABLE)), yes)
|
|||||||
OPT_DEFS += -DUSER_PRINT
|
OPT_DEFS += -DUSER_PRINT
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(USB_HID_ENABLE)), yes)
|
|
||||||
include $(TMK_DIR)/protocol/usb_hid.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(WPM_ENABLE)), yes)
|
ifeq ($(strip $(WPM_ENABLE)), yes)
|
||||||
SRC += $(QUANTUM_DIR)/wpm.c
|
SRC += $(QUANTUM_DIR)/wpm.c
|
||||||
OPT_DEFS += -DWPM_ENABLE
|
OPT_DEFS += -DWPM_ENABLE
|
||||||
@@ -458,6 +469,23 @@ ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
|
|||||||
SRC += $(QUANTUM_DIR)/dip_switch.c
|
SRC += $(QUANTUM_DIR)/dip_switch.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
VALID_MAGIC_TYPES := yes full lite
|
||||||
|
BOOTMAGIC_ENABLE ?= no
|
||||||
|
ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
|
||||||
|
ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),)
|
||||||
|
$(error BOOTMAGIC_ENABLE="$(BOOTMAGIC_ENABLE)" is not a valid type of magic)
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(BOOTMAGIC_ENABLE)), full)
|
||||||
|
OPT_DEFS += -DBOOTMAGIC_LITE
|
||||||
|
QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_lite.c
|
||||||
|
else
|
||||||
|
OPT_DEFS += -DBOOTMAGIC_ENABLE
|
||||||
|
QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_full.c
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
COMMON_VPATH += $(QUANTUM_DIR)/bootmagic
|
||||||
|
QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/magic.c
|
||||||
|
|
||||||
VALID_CUSTOM_MATRIX_TYPES:= yes lite no
|
VALID_CUSTOM_MATRIX_TYPES:= yes lite no
|
||||||
|
|
||||||
CUSTOM_MATRIX ?= no
|
CUSTOM_MATRIX ?= no
|
||||||
@@ -508,7 +536,11 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
|||||||
|
|
||||||
# Determine which (if any) transport files are required
|
# Determine which (if any) transport files are required
|
||||||
ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
|
ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
|
||||||
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/transport.c
|
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c \
|
||||||
|
$(QUANTUM_DIR)/split_common/transactions.c
|
||||||
|
|
||||||
|
OPT_DEFS += -DSPLIT_COMMON_TRANSACTIONS
|
||||||
|
|
||||||
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
|
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
|
||||||
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
|
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
|
||||||
ifeq ($(PLATFORM),AVR)
|
ifeq ($(PLATFORM),AVR)
|
||||||
@@ -529,6 +561,11 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
|||||||
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(CRC_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DCRC_ENABLE
|
||||||
|
QUANTUM_LIB_SRC += crc.c
|
||||||
|
endif
|
||||||
|
|
||||||
HAPTIC_ENABLE ?= no
|
HAPTIC_ENABLE ?= no
|
||||||
ifneq ($(strip $(HAPTIC_ENABLE)),no)
|
ifneq ($(strip $(HAPTIC_ENABLE)),no)
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
||||||
@@ -559,6 +596,14 @@ ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
|
|||||||
SRC += oled_driver.c
|
SRC += oled_driver.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(ST7565_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DST7565_ENABLE
|
||||||
|
COMMON_VPATH += $(DRIVER_PATH)/oled # For glcdfont.h
|
||||||
|
COMMON_VPATH += $(DRIVER_PATH)/lcd
|
||||||
|
QUANTUM_LIB_SRC += spi_master.c
|
||||||
|
SRC += st7565.c
|
||||||
|
endif
|
||||||
|
|
||||||
include $(DRIVER_PATH)/qwiic/qwiic.mk
|
include $(DRIVER_PATH)/qwiic/qwiic.mk
|
||||||
|
|
||||||
ifeq ($(strip $(UCIS_ENABLE)), yes)
|
ifeq ($(strip $(UCIS_ENABLE)), yes)
|
||||||
@@ -672,4 +717,4 @@ ifeq ($(strip $(USBPD_ENABLE)), yes)
|
|||||||
# Board designers can add their own driver to $(SRC)
|
# Board designers can add their own driver to $(SRC)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -38,5 +38,9 @@
|
|||||||
"RGBLIGHT_SPLIT": {"info_key": "rgblight.split", "value_type": "bool"},
|
"RGBLIGHT_SPLIT": {"info_key": "rgblight.split", "value_type": "bool"},
|
||||||
"PRODUCT": {"info_key": "keyboard_folder", "to_json": false},
|
"PRODUCT": {"info_key": "keyboard_folder", "to_json": false},
|
||||||
"PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex"},
|
"PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex"},
|
||||||
"VENDOR_ID": {"info_key": "usb.vid", "value_type": "hex"}
|
"VENDOR_ID": {"info_key": "usb.vid", "value_type": "hex"},
|
||||||
|
"QMK_ESC_OUTPUT": {"info_key": "qmk_lufa_bootloader.esc_output"},
|
||||||
|
"QMK_ESC_INPUT": {"info_key": "qmk_lufa_bootloader.esc_input"},
|
||||||
|
"QMK_LED": {"info_key": "qmk_lufa_bootloader.led"},
|
||||||
|
"QMK_SPEAKER": {"info_key": "qmk_lufa_bootloader.speaker"}
|
||||||
}
|
}
|
||||||
|
|||||||
446
data/mappings/keyboard_aliases.json
Normal file
446
data/mappings/keyboard_aliases.json
Normal file
@@ -0,0 +1,446 @@
|
|||||||
|
{
|
||||||
|
# Format for each entry:
|
||||||
|
# <alias>: {
|
||||||
|
# target: <keyboard_folder>,
|
||||||
|
# layouts: {
|
||||||
|
# <layout_alias>: <layout_target>
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# Both target and layouts are optional.
|
||||||
|
'2_milk': {
|
||||||
|
target: 'spaceman/2_milk'
|
||||||
|
},
|
||||||
|
'aeboards/ext65': {
|
||||||
|
target: 'aeboards/ext65/rev1'
|
||||||
|
},
|
||||||
|
'ai03/equinox': {
|
||||||
|
target: 'ai03/equinox/rev1'
|
||||||
|
},
|
||||||
|
aleth42: {
|
||||||
|
target: 'aleth42/rev1'
|
||||||
|
},
|
||||||
|
alice: {
|
||||||
|
target: 'tgr/alice'
|
||||||
|
},
|
||||||
|
angel17: {
|
||||||
|
target: 'angel17/alpha'
|
||||||
|
},
|
||||||
|
angel64: {
|
||||||
|
target: 'angel64/alpha'
|
||||||
|
},
|
||||||
|
at101_blackheart: {
|
||||||
|
target: 'at101_bh'
|
||||||
|
},
|
||||||
|
'atom47/rev2': {
|
||||||
|
target: 'maartenwut/atom47/rev2'
|
||||||
|
},
|
||||||
|
'atom47/rev3': {
|
||||||
|
target: 'maartenwut/atom47/rev3'
|
||||||
|
},
|
||||||
|
bear_face: {
|
||||||
|
target: 'bear_face/v1'
|
||||||
|
},
|
||||||
|
'bpiphany/pegasushoof': {
|
||||||
|
target: 'bpiphany/pegasushoof/2013'
|
||||||
|
},
|
||||||
|
chavdai40: {
|
||||||
|
target: 'chavdai40/rev1'
|
||||||
|
},
|
||||||
|
'candybar/lefty': {
|
||||||
|
target: 'tkc/candybar/lefty'
|
||||||
|
},
|
||||||
|
'candybar/righty': {
|
||||||
|
target: 'tkc/candybar/righty'
|
||||||
|
},
|
||||||
|
canoe: {
|
||||||
|
target: 'percent/canoe'
|
||||||
|
},
|
||||||
|
'cmm_studio/saka68': {
|
||||||
|
target: 'cmm_studio/saka68/solder'
|
||||||
|
},
|
||||||
|
'crkbd/rev1/legacy': {
|
||||||
|
target: 'crkbd/rev1'
|
||||||
|
},
|
||||||
|
'crkbd/rev1/common': {
|
||||||
|
target: 'crkbd/rev1'
|
||||||
|
},
|
||||||
|
'doro67/multi': {
|
||||||
|
layouts: {
|
||||||
|
LAYOUT_ansi: 'LAYOUT_65_ansi_blocker'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'doro67/regular': {
|
||||||
|
layouts: {
|
||||||
|
LAYOUT: 'LAYOUT_65_ansi_blocker'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'doro67/rgb': {
|
||||||
|
layouts: {
|
||||||
|
LAYOUT: 'LAYOUT_65_ansi_blocker'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
drakon: {
|
||||||
|
target: 'jagdpietr/drakon'
|
||||||
|
},
|
||||||
|
'dztech/dz60rgb': {
|
||||||
|
target: 'dztech/dz60rgb/v1'
|
||||||
|
},
|
||||||
|
'dztech/dz60rgb_ansi': {
|
||||||
|
target: 'dztech/dz60rgb_ansi/v1'
|
||||||
|
},
|
||||||
|
'dztech/dz60rgb_wkl': {
|
||||||
|
target: 'dztech/dz60rgb_wkl/v1'
|
||||||
|
},
|
||||||
|
'dztech/dz65rgb': {
|
||||||
|
target: 'dztech/dz65rgb/v1'
|
||||||
|
},
|
||||||
|
eek: {
|
||||||
|
target: 'eek/silk_down'
|
||||||
|
},
|
||||||
|
ergoinu: {
|
||||||
|
target: 'dm9records/ergoinu'
|
||||||
|
},
|
||||||
|
'exclusive/e85': {
|
||||||
|
target: 'exclusive/e85/hotswap'
|
||||||
|
},
|
||||||
|
gh60: {
|
||||||
|
target: 'gh60/revc'
|
||||||
|
},
|
||||||
|
'handwired/ferris': {
|
||||||
|
target: 'ferris/0_1'
|
||||||
|
},
|
||||||
|
'helix/pico/sc/back': {
|
||||||
|
target: 'helix/pico/sc'
|
||||||
|
},
|
||||||
|
'helix/pico/sc/under': {
|
||||||
|
target: 'helix/pico/sc'
|
||||||
|
},
|
||||||
|
'helix/rev2/back/oled': {
|
||||||
|
target: 'helix/rev2/back'
|
||||||
|
},
|
||||||
|
'helix/rev2/oled': {
|
||||||
|
target: 'helix/rev2'
|
||||||
|
},
|
||||||
|
'helix/rev2/oled/back': {
|
||||||
|
target: 'helix/rev2/back'
|
||||||
|
},
|
||||||
|
'helix/rev2/oled/under': {
|
||||||
|
target: 'helix/rev2/under'
|
||||||
|
},
|
||||||
|
'helix/rev2/sc/back': {
|
||||||
|
target: 'helix/rev2/sc'
|
||||||
|
},
|
||||||
|
'helix/rev2/sc/oled': {
|
||||||
|
target: 'helix/rev2/sc'
|
||||||
|
},
|
||||||
|
'helix/rev2/sc/oledback': {
|
||||||
|
target: 'helix/rev2/sc'
|
||||||
|
},
|
||||||
|
'helix/rev2/sc/oledunder': {
|
||||||
|
target: 'helix/rev2/sc'
|
||||||
|
},
|
||||||
|
'helix/rev2/sc/under': {
|
||||||
|
target: 'helix/rev2/sc'
|
||||||
|
},
|
||||||
|
'helix/rev2/under': {
|
||||||
|
target: 'helix/rev2/sc'
|
||||||
|
},
|
||||||
|
'helix/rev2/under/oled': {
|
||||||
|
target: 'helix/rev2/under'
|
||||||
|
},
|
||||||
|
id80: {
|
||||||
|
target: 'id80/ansi'
|
||||||
|
},
|
||||||
|
idb_60: {
|
||||||
|
target: 'idb/idb_60',
|
||||||
|
layouts: {
|
||||||
|
LAYOUT: 'LAYOUT_all'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
jones: {
|
||||||
|
target: 'jones/v03_1'
|
||||||
|
},
|
||||||
|
katana60: {
|
||||||
|
target: 'rominronin/katana60/rev1'
|
||||||
|
},
|
||||||
|
'kbdfans/kbd67mkiirgb': {
|
||||||
|
target: 'kbdfans/kbd67/mkiirgb',
|
||||||
|
layouts: {
|
||||||
|
LAYOUT: 'LAYOUT_65_ansi_blocker'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'kbdfans/kbd67/mkiirgb': {
|
||||||
|
target: 'kbdfans/kbd67/mkiirgb/v1'
|
||||||
|
},
|
||||||
|
'keebio/dsp40': {
|
||||||
|
target: 'keebio/dsp40/rev1'
|
||||||
|
},
|
||||||
|
'keycapsss/plaid_pad': {
|
||||||
|
target: 'keycapsss/plaid_pad/rev1'
|
||||||
|
},
|
||||||
|
kudox: {
|
||||||
|
target: 'kudox/rev1'
|
||||||
|
},
|
||||||
|
'lfkeyboards/lfk78': {
|
||||||
|
target: 'lfkeyboards/lfk78/revj'
|
||||||
|
},
|
||||||
|
'lfkeyboards/smk65': {
|
||||||
|
target: 'lfkeyboards/smk65/revb'
|
||||||
|
},
|
||||||
|
'maartenwut/atom47/rev2': {
|
||||||
|
target: 'evyd13/atom47/rev2'
|
||||||
|
},
|
||||||
|
'maartenwut/atom47/rev3': {
|
||||||
|
target: 'evyd13/atom47/rev3'
|
||||||
|
},
|
||||||
|
'maartenwut/eon40': {
|
||||||
|
target: 'evyd13/eon40'
|
||||||
|
},
|
||||||
|
'maartenwut/eon65': {
|
||||||
|
target: 'evyd13/eon65'
|
||||||
|
},
|
||||||
|
'maartenwut/eon75': {
|
||||||
|
target: 'evyd13/eon75'
|
||||||
|
},
|
||||||
|
'maartenwut/eon87': {
|
||||||
|
target: 'evyd13/eon87'
|
||||||
|
},
|
||||||
|
'maartenwut/eon95': {
|
||||||
|
target: 'evyd13/eon95'
|
||||||
|
},
|
||||||
|
'maartenwut/gh80_1800': {
|
||||||
|
target: 'evyd13/gh80_1800'
|
||||||
|
},
|
||||||
|
'maartenwut/gh80_3700': {
|
||||||
|
target: 'evyd13/gh80_3700'
|
||||||
|
},
|
||||||
|
'maartenwut/minitomic': {
|
||||||
|
target: 'evyd13/minitomic'
|
||||||
|
},
|
||||||
|
'maartenwut/mx5160': {
|
||||||
|
target: 'evyd13/mx5160'
|
||||||
|
},
|
||||||
|
'maartenwut/nt660': {
|
||||||
|
target: 'evyd13/nt660'
|
||||||
|
},
|
||||||
|
'maartenwut/omrontkl': {
|
||||||
|
target: 'evyd13/omrontkl'
|
||||||
|
},
|
||||||
|
'maartenwut/plain60': {
|
||||||
|
target: 'evyd13/plain60'
|
||||||
|
},
|
||||||
|
'maartenwut/pockettype': {
|
||||||
|
target: 'evyd13/pockettype'
|
||||||
|
},
|
||||||
|
'maartenwut/quackfire': {
|
||||||
|
target: 'evyd13/quackfire'
|
||||||
|
},
|
||||||
|
'maartenwut/solheim68': {
|
||||||
|
target: 'evyd13/solheim68'
|
||||||
|
},
|
||||||
|
'maartenwut/ta65': {
|
||||||
|
target: 'evyd13/ta65'
|
||||||
|
},
|
||||||
|
'maartenwut/wasdat': {
|
||||||
|
target: 'evyd13/wasdat'
|
||||||
|
},
|
||||||
|
'maartenwut/wasdat_code': {
|
||||||
|
target: 'evyd13/wasdat_code'
|
||||||
|
},
|
||||||
|
'maartenwut/wonderland': {
|
||||||
|
target: 'evyd13/wonderland'
|
||||||
|
},
|
||||||
|
'mechlovin/hannah910': {
|
||||||
|
target: 'mechlovin/hannah910/rev1'
|
||||||
|
},
|
||||||
|
'mechlovin/adelais/rgb_led': {
|
||||||
|
target: 'mechlovin/adelais/rgb_led/rev1'
|
||||||
|
},
|
||||||
|
'mechlovin/adelais/standard_led': {
|
||||||
|
target: 'mechlovin/adelais/standard_led/rev2'
|
||||||
|
},
|
||||||
|
'mechlovin/delphine': {
|
||||||
|
target: 'mechlovin/delphine/mono_led'
|
||||||
|
},
|
||||||
|
'mechlovin/hannah60rgb': {
|
||||||
|
target: 'mechlovin/hannah60rgb/rev1'
|
||||||
|
},
|
||||||
|
'melgeek/z70ultra': {
|
||||||
|
target: 'melgeek/z70ultra/rev1'
|
||||||
|
},
|
||||||
|
'mechlovin/hannah65': {
|
||||||
|
target: 'mechlovin/hannah65/rev1'
|
||||||
|
},
|
||||||
|
model01: {
|
||||||
|
target: 'keyboardio/model01'
|
||||||
|
},
|
||||||
|
m0lly: {
|
||||||
|
target: 'tkc/m0lly'
|
||||||
|
},
|
||||||
|
'montsinger/rebound': {
|
||||||
|
target: 'montsinger/rebound/rev1'
|
||||||
|
},
|
||||||
|
nomu30: {
|
||||||
|
target: 'nomu30/rev1'
|
||||||
|
},
|
||||||
|
'noxary/268_2': {
|
||||||
|
layouts: {
|
||||||
|
LAYOUT: 'LAYOUT_65_ansi_blocker'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
oddball: {
|
||||||
|
target: 'oddball/v1'
|
||||||
|
},
|
||||||
|
omnikey_blackheart: {
|
||||||
|
target: 'omnikey_bh'
|
||||||
|
},
|
||||||
|
'pabile/p20': {
|
||||||
|
target: 'pabile/p20/ver1'
|
||||||
|
},
|
||||||
|
'pancake/feather': {
|
||||||
|
target: 'spaceman/pancake/feather'
|
||||||
|
},
|
||||||
|
'pancake/promicro': {
|
||||||
|
target: 'spaceman/pancake/promicro'
|
||||||
|
},
|
||||||
|
'percent/canoe': {
|
||||||
|
layouts: {
|
||||||
|
LAYOUT_iso: 'LAYOUT_65_iso_blocker'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
plaid: {
|
||||||
|
target: 'dm9records/plaid'
|
||||||
|
},
|
||||||
|
plain60: {
|
||||||
|
target: 'maartenwut/plain60'
|
||||||
|
},
|
||||||
|
'ploopyco/trackball': {
|
||||||
|
target: 'ploopyco/trackball/rev1_005'
|
||||||
|
},
|
||||||
|
polilla: {
|
||||||
|
target: 'polilla/rev1'
|
||||||
|
},
|
||||||
|
'preonic/rev1': {
|
||||||
|
layouts: {
|
||||||
|
LAYOUT_preonic_grid: 'LAYOUT_ortho_5x12'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'preonic/rev2': {
|
||||||
|
layouts: {
|
||||||
|
LAYOUT_preonic_grid: 'LAYOUT_ortho_5x12'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'preonic/rev3': {
|
||||||
|
layouts: {
|
||||||
|
LAYOUT_preonic_grid: 'LAYOUT_ortho_5x12'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'primekb/prime_l': {
|
||||||
|
target: 'primekb/prime_l/v1'
|
||||||
|
},
|
||||||
|
'primekb/prime_l_v2': {
|
||||||
|
target: 'primekb/prime_l/v2'
|
||||||
|
},
|
||||||
|
'projectkb/alice': {
|
||||||
|
target: 'projectkb/alice/rev1'
|
||||||
|
},
|
||||||
|
'rama/koyu': {
|
||||||
|
target: 'wilba_tech/rama_works_koyu'
|
||||||
|
},
|
||||||
|
'rama/m6_a': {
|
||||||
|
target: 'wilba_tech/rama_works_m6_a'
|
||||||
|
},
|
||||||
|
'rama/m6_b': {
|
||||||
|
target: 'wilba_tech/rama_works_m6_b'
|
||||||
|
},
|
||||||
|
'rama/m10_b': {
|
||||||
|
target: 'wilba_tech/rama_works_m10_b'
|
||||||
|
},
|
||||||
|
'rama/m60_a': {
|
||||||
|
target: 'wilba_tech/rama_works_m60_a'
|
||||||
|
},
|
||||||
|
'rama/u80_a': {
|
||||||
|
target: 'wilba_tech/rama_works_u80_a'
|
||||||
|
},
|
||||||
|
'ramonimbao/herringbone': {
|
||||||
|
target: 'ramonimbao/herringbone/v1'
|
||||||
|
},
|
||||||
|
'rgbkb/pan': {
|
||||||
|
target: 'rgbkb/pan/rev1/32a'
|
||||||
|
},
|
||||||
|
'rgbkb/pan/rev1': {
|
||||||
|
target: 'rgbkb/pan/rev1/32a'
|
||||||
|
},
|
||||||
|
romac: {
|
||||||
|
target: 'kingly_keys/romac'
|
||||||
|
},
|
||||||
|
ropro: {
|
||||||
|
target: 'kingly_keys/ropro'
|
||||||
|
},
|
||||||
|
satan: {
|
||||||
|
target: 'gh60/satan'
|
||||||
|
},
|
||||||
|
skog: {
|
||||||
|
target: 'percent/skog'
|
||||||
|
},
|
||||||
|
speedo: {
|
||||||
|
target: 'cozykeys/speedo/v2'
|
||||||
|
},
|
||||||
|
stoutgat: {
|
||||||
|
target: 'tkw/stoutgat/v1'
|
||||||
|
},
|
||||||
|
suihankey: {
|
||||||
|
target: 'suihankey/split/alpha'
|
||||||
|
},
|
||||||
|
ta65: {
|
||||||
|
target: 'maartenwut/ta65'
|
||||||
|
},
|
||||||
|
tartan: {
|
||||||
|
target: 'dm9records/tartan'
|
||||||
|
},
|
||||||
|
tkc1800: {
|
||||||
|
target: 'tkc/tkc1800'
|
||||||
|
},
|
||||||
|
'tkw/stoutgat/v2': {
|
||||||
|
target: 'tkw/stoutgat/v2/f411'
|
||||||
|
},
|
||||||
|
underscore33: {
|
||||||
|
target: 'underscore33/rev1'
|
||||||
|
},
|
||||||
|
vinta: {
|
||||||
|
layouts: {
|
||||||
|
LAYOUT_67_ansi: 'LAYOUT_65_ansi_blocker'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
wasdat: {
|
||||||
|
target: 'maartenwut/wasdat'
|
||||||
|
},
|
||||||
|
'westfoxtrot/cypher': {
|
||||||
|
target: 'westfoxtrot/cypher/rev1'
|
||||||
|
},
|
||||||
|
'whale/sk': {
|
||||||
|
target: 'whale/sk/v3'
|
||||||
|
},
|
||||||
|
'xelus/dawn60': {
|
||||||
|
target: 'xelus/dawn60/rev1'
|
||||||
|
},
|
||||||
|
'xelus/valor': {
|
||||||
|
target: 'xelus/valor/rev1'
|
||||||
|
},
|
||||||
|
yd60mq: {
|
||||||
|
target: 'yd60mq/12led'
|
||||||
|
},
|
||||||
|
ymd75: {
|
||||||
|
target: 'ymd75/rev1'
|
||||||
|
},
|
||||||
|
z150_blackheart: {
|
||||||
|
target: 'z150_bh'
|
||||||
|
},
|
||||||
|
zeal60: {
|
||||||
|
target: 'wilba_tech/zeal60'
|
||||||
|
},
|
||||||
|
zeal65: {
|
||||||
|
target: 'wilba_tech/zeal65'
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,34 +1,22 @@
|
|||||||
{
|
{
|
||||||
|
"$id": "qmk.api.keyboard.v1",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "$ref": "qmk.keyboard.v1" },
|
{"$ref": "qmk.keyboard.v1"},
|
||||||
{
|
{
|
||||||
"$id": "qmk.api.keyboard.v1",
|
"properties": {
|
||||||
"keymaps": {
|
"keymaps": {
|
||||||
"type": "string"
|
"type": "object",
|
||||||
},
|
"properties": {
|
||||||
"parse_errors": {
|
"url": {"type": "string"}
|
||||||
"type": "array",
|
}
|
||||||
"items": {
|
|
||||||
"type": "string"
|
},
|
||||||
}
|
"parse_errors": {"$ref": "qmk.definitions.v1#/string_array"},
|
||||||
},
|
"parse_warnings": {"$ref": "qmk.definitions.v1#/string_array"},
|
||||||
"parse_warnings": {
|
"processor_type": {"type": "string"},
|
||||||
"type": "array",
|
"protocol": {"type": "string"},
|
||||||
"items": {
|
"keyboard_folder": {"type": "string"},
|
||||||
"type": "string"
|
"platform": {"type": "string"}
|
||||||
}
|
|
||||||
},
|
|
||||||
"processor_type": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"protocol": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"keyboard_folder": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"platform": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
107
data/schemas/definitions.jsonschema
Normal file
107
data/schemas/definitions.jsonschema
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"$id": "qmk.definitions.v1",
|
||||||
|
"title": "Common definitions used across QMK's jsonschemas.",
|
||||||
|
"type": "object",
|
||||||
|
"boolean_array": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {"type": "boolean"}
|
||||||
|
},
|
||||||
|
"filename": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"pattern": "^[0-9a-z_]*$"
|
||||||
|
},
|
||||||
|
"hex_number_2d": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^0x[0-9A-F]{2}$"
|
||||||
|
},
|
||||||
|
"hex_number_4d": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^0x[0-9A-F]{4}$"
|
||||||
|
},
|
||||||
|
"text_identifier": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 250
|
||||||
|
},
|
||||||
|
"layout_macro": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["LAYOUT", "LAYOUT_planck_1x2uC"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^LAYOUT_[0-9a-z_]*$"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_unit": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0.25
|
||||||
|
},
|
||||||
|
"mcu_pin_array": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {"$ref": "#/mcu_pin"}
|
||||||
|
},
|
||||||
|
"mcu_pin": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^[A-K]\\d{1,2}$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^LINE_PIN\\d{1,2}$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "number",
|
||||||
|
"multipleOf": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"signed_decimal": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"signed_int": {
|
||||||
|
"type": "number",
|
||||||
|
"multipleOf": 1
|
||||||
|
}
|
||||||
|
"signed_int_8": {
|
||||||
|
"type": "number",
|
||||||
|
"min": -127,
|
||||||
|
"max": 127,
|
||||||
|
"multipleOf": 1
|
||||||
|
}
|
||||||
|
"string_array": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"string_object": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"unsigned_decimal": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0
|
||||||
|
},
|
||||||
|
"unsigned_int": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"multipleOf": 1
|
||||||
|
}
|
||||||
|
"unsigned_int_8": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"max": 255,
|
||||||
|
"multipleOf": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,31 +1,19 @@
|
|||||||
{
|
{
|
||||||
"$schema": "http://json-schema.org/schema#",
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
"$id": "qmk.keyboard.v1",
|
"$id": "qmk.keyboard.v1",
|
||||||
"title": "Keyboard Information",
|
"title": "Keyboard Information",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"keyboard_name": {
|
"keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||||
"type": "string",
|
"maintainer": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||||
"minLength": 2,
|
"manufacturer": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||||
"maxLength": 250
|
|
||||||
},
|
|
||||||
"maintainer": {
|
|
||||||
"type": "string",
|
|
||||||
"minLength": 2,
|
|
||||||
"maxLength": 250
|
|
||||||
},
|
|
||||||
"manufacturer": {
|
|
||||||
"type": "string",
|
|
||||||
"minLength": 2,
|
|
||||||
"maxLength": 250
|
|
||||||
},
|
|
||||||
"url": {
|
"url": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "uri"
|
"format": "uri"
|
||||||
},
|
},
|
||||||
"processor": {
|
"processor": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32G431", "STM32G474", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
|
"enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L433", "STM32L443", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
|
||||||
},
|
},
|
||||||
"board": {
|
"board": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -34,68 +22,31 @@
|
|||||||
},
|
},
|
||||||
"bootloader": {
|
"bootloader": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["atmel-dfu", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "stm32-dfu", "stm32duino", "unknown", "USBasp"]
|
"enum": ["atmel-dfu", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "stm32-dfu", "stm32duino", "unknown", "USBasp", "tinyuf2"]
|
||||||
},
|
},
|
||||||
"diode_direction": {
|
"diode_direction": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["COL2ROW", "ROW2COL"]
|
"enum": ["COL2ROW", "ROW2COL"]
|
||||||
},
|
},
|
||||||
"debounce": {
|
"debounce": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||||
"type": "number",
|
"height": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||||
"min": 0,
|
"width": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||||
"multipleOf": 1
|
|
||||||
},
|
|
||||||
"height": {
|
|
||||||
"type": "number",
|
|
||||||
"min": 0.25
|
|
||||||
},
|
|
||||||
"width": {
|
|
||||||
"type": "number",
|
|
||||||
"min": 0.25
|
|
||||||
},
|
|
||||||
"community_layouts": {
|
"community_layouts": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {"$ref": "qmk.definitions.v1#/filename"}
|
||||||
"type": "string",
|
|
||||||
"minLength": 2,
|
|
||||||
"pattern": "^[0-9a-z_]*$"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"features": {
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": {"type": "boolean"}
|
|
||||||
},
|
},
|
||||||
|
"features": {"$ref": "qmk.definitions.v1#/boolean_array"},
|
||||||
"indicators": {
|
"indicators": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"caps_lock": {
|
"caps_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||||
"type": "string",
|
"num_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||||
"pattern": "^[A-K]\\d{1,2}$"
|
"scroll_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"}
|
||||||
},
|
|
||||||
"num_lock": {
|
|
||||||
"type": "string",
|
|
||||||
"pattern": "^[A-K]\\d{1,2}$"
|
|
||||||
},
|
|
||||||
"scroll_lock": {
|
|
||||||
"type": "string",
|
|
||||||
"pattern": "^[A-K]\\d{1,2}$"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"layout_aliases": {
|
"layout_aliases": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": {
|
"additionalProperties": {"$ref": "qmk.definitions.v1#/layout_macro"}
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"enum": ["LAYOUT"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"pattern": "^LAYOUT_[0-9a-z_]*$"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@@ -109,11 +60,7 @@
|
|||||||
"c_macro": {
|
"c_macro": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"key_count": {
|
"key_count": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||||
"type": "number",
|
|
||||||
"min": 0,
|
|
||||||
"multipleOf": 1
|
|
||||||
},
|
|
||||||
"layout": {
|
"layout": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
@@ -131,34 +78,14 @@
|
|||||||
"multipleOf": 1
|
"multipleOf": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"h": {
|
"key_count": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||||
"type": "number",
|
"r": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
|
||||||
"min": 0.25
|
"rx": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
|
||||||
},
|
"ry": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
|
||||||
"r": {
|
"h": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||||
"type": "number",
|
"w": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||||
"min": 0
|
"x": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||||
},
|
"y": {"$ref": "qmk.definitions.v1#/key_unit"}
|
||||||
"rx": {
|
|
||||||
"type": "number",
|
|
||||||
"min": 0
|
|
||||||
},
|
|
||||||
"ry": {
|
|
||||||
"type": "number",
|
|
||||||
"min": 0
|
|
||||||
},
|
|
||||||
"w": {
|
|
||||||
"type": "number",
|
|
||||||
"min": 0.25
|
|
||||||
},
|
|
||||||
"x": {
|
|
||||||
"type": "number",
|
|
||||||
"min": 0
|
|
||||||
},
|
|
||||||
"y": {
|
|
||||||
"type": "number",
|
|
||||||
"min": 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -171,61 +98,10 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"direct": {
|
"direct": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {$ref": "qmk.definitions.v1#/mcu_pin_array"}
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"pattern": "^[A-K]\\d{1,2}$"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "number",
|
|
||||||
"multipleOf": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"cols": {
|
"cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
|
||||||
"type": "array",
|
"rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
|
||||||
"items": {
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"pattern": "^[A-K]\\d{1,2}$"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "number",
|
|
||||||
"multipleOf": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rows": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"pattern": "^[A-K]\\d{1,2}$"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "number",
|
|
||||||
"multipleOf": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rgblight": {
|
"rgblight": {
|
||||||
@@ -238,47 +114,19 @@
|
|||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"brightness_steps": {
|
"brightness_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||||
"type": "number",
|
"hue_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||||
"min": 0,
|
"led_count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||||
"multipleOf": 1
|
"max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||||
},
|
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||||
"hue_steps": {
|
"saturation_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||||
"type": "number",
|
|
||||||
"min": 0,
|
|
||||||
"multipleOf": 1
|
|
||||||
},
|
|
||||||
"led_count": {
|
|
||||||
"type": "number",
|
|
||||||
"min": 0,
|
|
||||||
"multipleOf": 1
|
|
||||||
},
|
|
||||||
"max_brightness": {
|
|
||||||
"type": "number",
|
|
||||||
"min": 0,
|
|
||||||
"max": 255,
|
|
||||||
"multipleOf": 1
|
|
||||||
},
|
|
||||||
"pin": {
|
|
||||||
"type": "string",
|
|
||||||
"pattern": "^[A-K]\\d{1,2}$"
|
|
||||||
},
|
|
||||||
"saturation_steps": {
|
|
||||||
"type": "number",
|
|
||||||
"min": 0,
|
|
||||||
"multipleOf": 1
|
|
||||||
},
|
|
||||||
"sleep": {"type": "boolean"},
|
"sleep": {"type": "boolean"},
|
||||||
"split": {"type": "boolean"},
|
"split": {"type": "boolean"},
|
||||||
"split_count": {
|
"split_count": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"minLength": 2,
|
"minLength": 2,
|
||||||
"maxLength": 2,
|
"maxLength": 2,
|
||||||
"items": {
|
"items": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||||
"type": "number",
|
|
||||||
"min": 0,
|
|
||||||
"multipleOf": 1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -286,18 +134,19 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
"device_ver": {
|
"device_ver": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
|
||||||
"type": "string",
|
"pid": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
|
||||||
"pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
|
"vid": {"$ref": "qmk.definitions.v1#/hex_number_4d"}
|
||||||
},
|
}
|
||||||
"pid": {
|
},
|
||||||
"type": "string",
|
"qmk_lufa_bootloader": {
|
||||||
"pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
|
"type": "object",
|
||||||
},
|
"additionalProperties": false,
|
||||||
"vid": {
|
"properties": {
|
||||||
"type": "string",
|
"esc_output": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||||
"pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
|
"esc_input": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||||
}
|
"led": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||||
|
"speaker": {"$ref": "qmk.definitions.v1#/mcu_pin"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Four times a year QMK runs a process for merging Breaking Changes. A Breaking Ch
|
|||||||
|
|
||||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||||
|
|
||||||
### Relocated Keyboards :id-relocated-keyboards
|
### Relocated Keyboards :id=relocated-keyboards
|
||||||
|
|
||||||
#### The Key Company project consolidation ([#9547](https://github.com/qmk/qmk_firmware/pull/9547))
|
#### The Key Company project consolidation ([#9547](https://github.com/qmk/qmk_firmware/pull/9547))
|
||||||
#### relocating boards by flehrad to flehrad/ folder ([#9635](https://github.com/qmk/qmk_firmware/pull/9635))
|
#### relocating boards by flehrad to flehrad/ folder ([#9635](https://github.com/qmk/qmk_firmware/pull/9635))
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Four times a year QMK runs a process for merging Breaking Changes. A Breaking Ch
|
|||||||
|
|
||||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||||
|
|
||||||
### Relocated Keyboards :id-relocated-keyboards
|
### Relocated Keyboards :id=relocated-keyboards
|
||||||
|
|
||||||
#### Reduce Helix keyboard build variation ([#8669](https://github.com/qmk/qmk_firmware/pull/8669))
|
#### Reduce Helix keyboard build variation ([#8669](https://github.com/qmk/qmk_firmware/pull/8669))
|
||||||
|
|
||||||
|
|||||||
192
docs/ChangeLog/20210529.md
Normal file
192
docs/ChangeLog/20210529.md
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
# QMK Breaking Changes - 2021 May 29 Changelog
|
||||||
|
|
||||||
|
## Notable Changes :id=notable-changes
|
||||||
|
|
||||||
|
### RGB Matrix support for split common ([#11055](https://github.com/qmk/qmk_firmware/pull/11055)) :id=rgb-matrix-split-common
|
||||||
|
|
||||||
|
Split boards can now use RGB Matrix without defining a custom matrix.
|
||||||
|
|
||||||
|
### Teensy 3.6 support ([#12258](https://github.com/qmk/qmk_firmware/pull/12258)) :id=teensy-3-6-support
|
||||||
|
|
||||||
|
Added support for MK66F18 (Teensy 3.6) microcontroller.
|
||||||
|
|
||||||
|
### New command: qmk console ([#12828](https://github.com/qmk/qmk_firmware/pull/12828)) :id=new-command-qmk-console
|
||||||
|
|
||||||
|
A new `qmk console` command has been added for attaching to your keyboard's console. It operates similiarly to QMK Toolbox by allowing you to connect to one or more keyboard consoles to display debugging messages.
|
||||||
|
|
||||||
|
### Improved command: qmk config :id=improve-command-qmk-config
|
||||||
|
|
||||||
|
We've updated the `qmk config` command to show only the configuration items you have actually set. You can now display (almost) all of the available configuration options, along with their default values, using `qmk config -a`.
|
||||||
|
|
||||||
|
### LED Matrix Improvements ([#12509](https://github.com/qmk/qmk_firmware/pull/12509), [#12580](https://github.com/qmk/qmk_firmware/pull/12580), [#12588](https://github.com/qmk/qmk_firmware/pull/12588), [#12633](https://github.com/qmk/qmk_firmware/pull/12633), [#12651](https://github.com/qmk/qmk_firmware/pull/12651), [#12685](https://github.com/qmk/qmk_firmware/pull/12685)) :id=led-matrix-improvements
|
||||||
|
|
||||||
|
LED Matrix has been improved with effects, CIE1931 curves, and a task system.
|
||||||
|
|
||||||
|
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||||
|
|
||||||
|
### Updated Keyboard Codebases :id=updated-keyboard-codebases
|
||||||
|
|
||||||
|
* Durgod keyboard refactor in preparation for adding additional durgod keyboards ([#11978](https://github.com/qmk/qmk_firmware/pull/11978))
|
||||||
|
* Updated Function96 with V2 files and removed chconf.h and halconf.h ([#12613](https://github.com/qmk/qmk_firmware/pull/12613))
|
||||||
|
* [Keyboard] updated a vendor name / fixed minor keymap issues ([#12881](https://github.com/qmk/qmk_firmware/pull/12881))
|
||||||
|
* [Keyboard] Corne - Remove legacy revision support ([#12226](https://github.com/qmk/qmk_firmware/pull/12226))
|
||||||
|
|
||||||
|
The following keyboards have had their source moved within QMK:
|
||||||
|
|
||||||
|
Old Keyboard Name | New Keyboard Name
|
||||||
|
:---------------- | :----------------
|
||||||
|
crkbd/rev1/common | crkbd/rev1
|
||||||
|
function96 | function96/v1
|
||||||
|
nckiibs/flatbread60 | delikeeb/flatbread60
|
||||||
|
nckiibs/vaguettelite | delikeeb/vaguettelite
|
||||||
|
nckiibs/vanana/rev1 | delikeeb/vanana/rev1
|
||||||
|
nckiibs/vanana/rev2 | delikeeb/vanana/rev2
|
||||||
|
nckiibs/vaneela | delikeeb/vaneela
|
||||||
|
nckiibs/vaneelaex | delikeeb/vaneelaex
|
||||||
|
nckiibs/waaffle/rev3/elite_c | delikeeb/waaffle/rev3/elite_c
|
||||||
|
nckiibs/waaffle/rev3/pro_micro | delikeeb/waaffle/rev3/pro_micro
|
||||||
|
|
||||||
|
The [Function96 V2](https://github.com/qmk/qmk_firmware/tree/0.13.0/keyboards/function96/v2) has also been added as part of these changes.
|
||||||
|
|
||||||
|
The codebase for the [Durgod K320](https://github.com/qmk/qmk_firmware/tree/0.13.0/keyboards/durgod/k320) has been reworked in anticipation of additional Durgod keyboards gaining QMK support.
|
||||||
|
|
||||||
|
Additionally, the `crkbd/rev1/legacy` keyboard has been removed.
|
||||||
|
|
||||||
|
### Bootmagic Deprecation and Refactor ([#12172](https://github.com/qmk/qmk_firmware/pull/12172)) :id=bootmagic-deprecation-and-refactor
|
||||||
|
|
||||||
|
QMK has decided to deprecate the full Bootmagic feature and leave Bootmagic Lite as the only remaining option.
|
||||||
|
|
||||||
|
This pull request changes the behavior of `BOOTMAGIC_ENABLE` such that specifying `BOOTMAGIC_ENABLE = yes` enables Bootmagic Lite instead of full Bootmagic.
|
||||||
|
|
||||||
|
If attempts to use Bootmagic functionality result in unexpected behavior, check your `rules.mk` file and change the `BOOTMAGIC_ENABLE` setting to specify either `lite` or `full`.
|
||||||
|
|
||||||
|
#### Tentative Deprecation Schedule
|
||||||
|
|
||||||
|
This is the current planned roadmap for the behavior of `BOOTMAGIC_ENABLE`:
|
||||||
|
|
||||||
|
- From 2021 May 29, setting `BOOTMAGIC_ENABLE = yes` will enable Bootmagic Lite instead of full Bootmagic.
|
||||||
|
- From 2021 Aug 28, `BOOTMAGIC_ENABLE` must be either `yes`, `lite`, or `no` – setting `BOOTMAGIC_ENABLE = full` will cause compilation to fail.
|
||||||
|
- From 2021 Nov 27, `BOOTMAGIC_ENABLE` must be either `yes` or `no` – setting `BOOTMAGIC_ENABLE = lite` will cause compilation to fail.
|
||||||
|
|
||||||
|
### Removal of LAYOUT_kc ([#12160](https://github.com/qmk/qmk_firmware/pull/12160)) :id=removal-of-layout-kc
|
||||||
|
|
||||||
|
We've removed support for `LAYOUT_kc` macros, if your keymap uses one you will need to update it use a regular `LAYOUT` macro.
|
||||||
|
|
||||||
|
### Encoder callbacks are now boolean ([#12805](https://github.com/qmk/qmk_firmware/pull/12805), [#12985](https://github.com/qmk/qmk_firmware/pull/12985)) :id=encoder-callback-boolean
|
||||||
|
|
||||||
|
To allow for keyboards to override (or not) keymap level code the `encoder_update_kb` function has been changed from `void` to `bool`. You will need to update your function definition to reflect this and ensure that you return a `true` or `false` value.
|
||||||
|
|
||||||
|
Example code before change:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void encoder_update_kb(uint8_t index, bool clockwise) {
|
||||||
|
encoder_update_user(index, clockwise);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Example code after change:
|
||||||
|
|
||||||
|
```c
|
||||||
|
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||||
|
return encoder_update_user(index, clockwise);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Core Changes :id=core-changes
|
||||||
|
|
||||||
|
### Fixes :id=core-fixes
|
||||||
|
|
||||||
|
* Fix connection issue in split keyboards when slave and OLED display are connected via I2C (fixes #9335) ([#11487](https://github.com/qmk/qmk_firmware/pull/11487))
|
||||||
|
* Terrazzo: Fix wrong LED Matrix function names ([#12561](https://github.com/qmk/qmk_firmware/pull/12561))
|
||||||
|
* Apply the "NO_LIMITED_CONTROLLER_CONNECT" fix to atmega16u2 ([#12482](https://github.com/qmk/qmk_firmware/pull/12482))
|
||||||
|
* Fix comment parsing ([#12750](https://github.com/qmk/qmk_firmware/pull/12750))
|
||||||
|
* Turn OLED off on suspend in soundmonster Corne keymap ([#10419](https://github.com/qmk/qmk_firmware/pull/10419))
|
||||||
|
* Fixup build errors on `develop` branch. ([#12723](https://github.com/qmk/qmk_firmware/pull/12723))
|
||||||
|
* Fix syntax error when compiling for ARM ([#12866](https://github.com/qmk/qmk_firmware/pull/12866))
|
||||||
|
* Add missing LED Matrix suspend code to suspend.c ([#12878](https://github.com/qmk/qmk_firmware/pull/12878))
|
||||||
|
* Fix spelling mistake regarding LED Matrix in split_common. ([#12888](https://github.com/qmk/qmk_firmware/pull/12888))
|
||||||
|
* [Keymap] Fix QWERTY/DVORAK status output for kzar keymap ([#12895](https://github.com/qmk/qmk_firmware/pull/12895))
|
||||||
|
* Fixup housekeeping from being invoked twice per loop. ([#12933](https://github.com/qmk/qmk_firmware/pull/12933))
|
||||||
|
* wait for matrix row signal to go HIGH for every row ([#12945](https://github.com/qmk/qmk_firmware/pull/12945))
|
||||||
|
* ensure we do not conflict with existing keymap aliases ([#12976](https://github.com/qmk/qmk_firmware/pull/12976))
|
||||||
|
* [Keyboard] Fix Terrazzo build failure ([#12977](https://github.com/qmk/qmk_firmware/pull/12977))
|
||||||
|
* Do not hard set config in CPTC files ([#11864](https://github.com/qmk/qmk_firmware/pull/11864))
|
||||||
|
|
||||||
|
### Additions and Enhancements :id=core-additions
|
||||||
|
|
||||||
|
* ARM - Refactor SLEEP_LED to support more platforms ([#8403](https://github.com/qmk/qmk_firmware/pull/8403))
|
||||||
|
* Add ability to toggle One Shot functionality ([#4198](https://github.com/qmk/qmk_firmware/pull/4198))
|
||||||
|
* Add RGB Matrix support to Split Common ([#11055](https://github.com/qmk/qmk_firmware/pull/11055))
|
||||||
|
* Add support for complementary outputs to the ChibiOS WS2812 PWM driver ([#11988](https://github.com/qmk/qmk_firmware/pull/11988))
|
||||||
|
* Enable RGB Matrix for Corne ([#12091](https://github.com/qmk/qmk_firmware/pull/12091))
|
||||||
|
* Set default OLED Update Interval for Split Keyboards to improve matrix scan performance ([#12107](https://github.com/qmk/qmk_firmware/pull/12107))
|
||||||
|
* Add support for MK66F18 (Teensy 3.6) micro controller ([#12258](https://github.com/qmk/qmk_firmware/pull/12258))
|
||||||
|
* Split RGB Matrix support for RGBKB Zygomorph ([#11083](https://github.com/qmk/qmk_firmware/pull/11083))
|
||||||
|
* Add baudrate and circular buffer to ARM WS2812 SPI config ([#12216](https://github.com/qmk/qmk_firmware/pull/12216))
|
||||||
|
* Add keyboard level weak function for slave matrix scan ([#12317](https://github.com/qmk/qmk_firmware/pull/12317))
|
||||||
|
* Add link to schematic on EasyEDA for XD60 ([#12018](https://github.com/qmk/qmk_firmware/pull/12018))
|
||||||
|
* Add Config functions for LED Matrix ([#12361](https://github.com/qmk/qmk_firmware/pull/12361))
|
||||||
|
* Add pin definitions for MK66F18 ([#12419](https://github.com/qmk/qmk_firmware/pull/12419))
|
||||||
|
* add kinesis/kint36 keyboard ([#10171](https://github.com/qmk/qmk_firmware/pull/10171))
|
||||||
|
* Add support for producing UF2-format binaries. ([#12435](https://github.com/qmk/qmk_firmware/pull/12435))
|
||||||
|
* Implement CIE1931 curve for LED Matrix ([#12417](https://github.com/qmk/qmk_firmware/pull/12417))
|
||||||
|
* Change `BOOTMAGIC_ENABLE=yes` to use Bootmagic Lite ([#12172](https://github.com/qmk/qmk_firmware/pull/12172))
|
||||||
|
* Add kzar keymap for Kinesis Advantage ([#12444](https://github.com/qmk/qmk_firmware/pull/12444))
|
||||||
|
* LED Matrix: suspend code ([#12509](https://github.com/qmk/qmk_firmware/pull/12509))
|
||||||
|
* LED Matrix: Task system ([#12580](https://github.com/qmk/qmk_firmware/pull/12580))
|
||||||
|
* Add missing RGB_MODE_TWINKLE / RGB_M_TW keycodes ([#11935](https://github.com/qmk/qmk_firmware/pull/11935))
|
||||||
|
* Enhancement of WPM feature ([#11727](https://github.com/qmk/qmk_firmware/pull/11727))
|
||||||
|
* Add Per Key functionality for AutoShift ([#11536](https://github.com/qmk/qmk_firmware/pull/11536))
|
||||||
|
* LED Matrix: Reactive effect buffers & advanced indicators ([#12588](https://github.com/qmk/qmk_firmware/pull/12588))
|
||||||
|
* LED Matrix: support for Split keyboards ([#12633](https://github.com/qmk/qmk_firmware/pull/12633))
|
||||||
|
* add setting to enable infinite timeout for leader key ([#6580](https://github.com/qmk/qmk_firmware/pull/6580), [#12721](https://github.com/qmk/qmk_firmware/pull/12721 "Fix bad PR merge for #6580"))
|
||||||
|
* Update ADC driver for STM32F1xx, STM32F3xx, STM32F4xx ([#12403](https://github.com/qmk/qmk_firmware/pull/12403))
|
||||||
|
* Add initial support for tinyuf2 bootloader (when hosted on F411 blackpill) ([#12600](https://github.com/qmk/qmk_firmware/pull/12600))
|
||||||
|
* Add support for STM32F446 MCU ([#12619](https://github.com/qmk/qmk_firmware/pull/12619))
|
||||||
|
* Add STM32L433 and L443 support ([#12063](https://github.com/qmk/qmk_firmware/pull/12063))
|
||||||
|
* Added OLED fade out support ([#12086](https://github.com/qmk/qmk_firmware/pull/12086))
|
||||||
|
* New command: `qmk console` ([#12828](https://github.com/qmk/qmk_firmware/pull/12828))
|
||||||
|
* LED Matrix: Effects! ([#12651](https://github.com/qmk/qmk_firmware/pull/12651))
|
||||||
|
* Add setup, clone, and env to the list of commands we allow even with broken modules ([#12868](https://github.com/qmk/qmk_firmware/pull/12868))
|
||||||
|
* LED Matrix: Documentation ([#12685](https://github.com/qmk/qmk_firmware/pull/12685))
|
||||||
|
* Add function to allow repeated blinking of one layer ([#12237](https://github.com/qmk/qmk_firmware/pull/12237))
|
||||||
|
* Add support for up to 4 IS31FL3733 drivers ([#12342](https://github.com/qmk/qmk_firmware/pull/12342))
|
||||||
|
* Convert Encoder callbacks to be boolean functions ([#12805](https://github.com/qmk/qmk_firmware/pull/12805), [#12985](https://github.com/qmk/qmk_firmware/pull/12985))
|
||||||
|
* [Keymap] Update to Drashna keymap and user code (based on develop) ([#12936](https://github.com/qmk/qmk_firmware/pull/12936))
|
||||||
|
* Add Full-duplex serial driver for ARM boards ([#9842](https://github.com/qmk/qmk_firmware/pull/9842))
|
||||||
|
* Document LED_MATRIX_FRAMEBUFFER_EFFECTS ([#12987](https://github.com/qmk/qmk_firmware/pull/12987))
|
||||||
|
* Backlight: add defines for default level and breathing state ([#12560](https://github.com/qmk/qmk_firmware/pull/12560), [#13024](https://github.com/qmk/qmk_firmware/pull/13024))
|
||||||
|
* Add dire message about LUFA mass storage bootloader ([#13014](https://github.com/qmk/qmk_firmware/pull/13014))
|
||||||
|
|
||||||
|
### Clean-ups and Optimizations :id=core-optimizations
|
||||||
|
|
||||||
|
* Overhaul bootmagic logic to have single entrypoint ([#8532](https://github.com/qmk/qmk_firmware/pull/8532))
|
||||||
|
* Refactor of USB code within split_common ([#11890](https://github.com/qmk/qmk_firmware/pull/11890))
|
||||||
|
* Begin the process of deprecating `bin/qmk` in favor of the global CLI ([#12109](https://github.com/qmk/qmk_firmware/pull/12109))
|
||||||
|
* LED Matrix: decouple from Backlight ([#12054](https://github.com/qmk/qmk_firmware/pull/12054))
|
||||||
|
* Remove `FUNC()` ([#12161](https://github.com/qmk/qmk_firmware/pull/12161))
|
||||||
|
* Move gpio wait logic to wait.h ([#12067](https://github.com/qmk/qmk_firmware/pull/12067))
|
||||||
|
* LED Matrix: Clean up includes ([#12197](https://github.com/qmk/qmk_firmware/pull/12197))
|
||||||
|
* Consistently use bin/qmk when that script is called ([#12286](https://github.com/qmk/qmk_firmware/pull/12286))
|
||||||
|
* LED Matrix: Additional common_features.mk tweaks ([#12187](https://github.com/qmk/qmk_firmware/pull/12187))
|
||||||
|
* LED Matrix: Fix up eeconfig code ([#12327](https://github.com/qmk/qmk_firmware/pull/12327))
|
||||||
|
* Big quantum_keycodes cleanup ([#12249](https://github.com/qmk/qmk_firmware/pull/12249))
|
||||||
|
* Fix up builds that are now too big for `develop` branch. ([#12495](https://github.com/qmk/qmk_firmware/pull/12495))
|
||||||
|
* [Keyboard] kint36: switch to sym_eager_pk debouncing ([#12626](https://github.com/qmk/qmk_firmware/pull/12626))
|
||||||
|
* [Keyboard] kint2pp: reduce input latency by ≈10ms ([#12625](https://github.com/qmk/qmk_firmware/pull/12625))
|
||||||
|
* eeprom driver: Refactor where eeprom driver initialisation (and EEPROM emulation initialisation) occurs to make it non-target-specific. ([#12671](https://github.com/qmk/qmk_firmware/pull/12671))
|
||||||
|
* Change RGB/LED Matrix to use a simple define for USB suspend ([#12697](https://github.com/qmk/qmk_firmware/pull/12697), [#12770](https://github.com/qmk/qmk_firmware/pull/12770 "Fixing transport's led/rgb matrix suspend state logic"))
|
||||||
|
* Remove pointless SERIAL_LINK_ENABLE rules ([#12846](https://github.com/qmk/qmk_firmware/pull/12846))
|
||||||
|
* Make Swap Hands use PROGMEM ([#12284](https://github.com/qmk/qmk_firmware/pull/12284))
|
||||||
|
* Remove KEYMAP and LAYOUT_kc ([#12160](https://github.com/qmk/qmk_firmware/pull/12160))
|
||||||
|
* Rename `point_t` -> `led_point_t` ([#12864](https://github.com/qmk/qmk_firmware/pull/12864))
|
||||||
|
* Deprecate `send_unicode_hex_string()` ([#12602](https://github.com/qmk/qmk_firmware/pull/12602))
|
||||||
|
* [Keyboard] Remove redundant legacy and common headers for crkbd ([#13023](https://github.com/qmk/qmk_firmware/pull/13023))
|
||||||
|
|
||||||
|
### QMK Infrastructure and Internals :id=qmk-internals
|
||||||
|
|
||||||
|
* trivial change to trigger api update ([`b15288fb87`](https://github.com/qmk/qmk_firmware/commit/b15288fb87))
|
||||||
|
* fix some references to bin/qmk that slipped in ([#12832](https://github.com/qmk/qmk_firmware/pull/12832))
|
||||||
|
* Resolve a number of warnings in `qmk generate-api` ([#12833](https://github.com/qmk/qmk_firmware/pull/12833))
|
||||||
|
* Fix another bin/qmk reference ([#12856](https://github.com/qmk/qmk_firmware/pull/12856))
|
||||||
|
* Use milc.subcommand.config instead of qmk.cli.config ([#12915](https://github.com/qmk/qmk_firmware/pull/12915))
|
||||||
@@ -29,6 +29,7 @@
|
|||||||
* [Overview](cli.md)
|
* [Overview](cli.md)
|
||||||
* [Configuration](cli_configuration.md)
|
* [Configuration](cli_configuration.md)
|
||||||
* [Commands](cli_commands.md)
|
* [Commands](cli_commands.md)
|
||||||
|
* [Tab Completion](cli_tab_complete.md)
|
||||||
|
|
||||||
* Using QMK
|
* Using QMK
|
||||||
* Guides
|
* Guides
|
||||||
@@ -92,6 +93,7 @@
|
|||||||
* Hardware Features
|
* Hardware Features
|
||||||
* Displays
|
* Displays
|
||||||
* [HD44780 LCD Controller](feature_hd44780.md)
|
* [HD44780 LCD Controller](feature_hd44780.md)
|
||||||
|
* [ST7565 LCD Driver](feature_st7565.md)
|
||||||
* [OLED Driver](feature_oled_driver.md)
|
* [OLED Driver](feature_oled_driver.md)
|
||||||
* Lighting
|
* Lighting
|
||||||
* [Backlight](feature_backlight.md)
|
* [Backlight](feature_backlight.md)
|
||||||
@@ -107,6 +109,7 @@
|
|||||||
* [Haptic Feedback](feature_haptic_feedback.md)
|
* [Haptic Feedback](feature_haptic_feedback.md)
|
||||||
* [Joystick](feature_joystick.md)
|
* [Joystick](feature_joystick.md)
|
||||||
* [LED Indicators](feature_led_indicators.md)
|
* [LED Indicators](feature_led_indicators.md)
|
||||||
|
* [MIDI](feature_midi.md)
|
||||||
* [Proton C Conversion](proton_c_conversion.md)
|
* [Proton C Conversion](proton_c_conversion.md)
|
||||||
* [PS/2 Mouse](feature_ps2_mouse.md)
|
* [PS/2 Mouse](feature_ps2_mouse.md)
|
||||||
* [Split Keyboard](feature_split_keyboard.md)
|
* [Split Keyboard](feature_split_keyboard.md)
|
||||||
@@ -119,7 +122,7 @@
|
|||||||
* Breaking Changes
|
* Breaking Changes
|
||||||
* [Overview](breaking_changes.md)
|
* [Overview](breaking_changes.md)
|
||||||
* [My Pull Request Was Flagged](breaking_changes_instructions.md)
|
* [My Pull Request Was Flagged](breaking_changes_instructions.md)
|
||||||
* [Most Recent ChangeLog](ChangeLog/20210227.md "QMK v0.12.0 - 2021 Feb 27")
|
* [Most Recent ChangeLog](ChangeLog/20210529.md "QMK v0.13.0 - 2021 May 29")
|
||||||
* [Past Breaking Changes](breaking_changes_history.md)
|
* [Past Breaking Changes](breaking_changes_history.md)
|
||||||
|
|
||||||
* C Development
|
* C Development
|
||||||
|
|||||||
@@ -47,73 +47,79 @@ Note that some of these pins are doubled-up on ADCs with the same channel. This
|
|||||||
|
|
||||||
Also note that the F0 and F3 use different numbering schemes. The F0 has a single ADC and the channels are 0-indexed, whereas the F3 has 4 ADCs and the channels are 1-indexed. This is because the F0 uses the `ADCv1` implementation of the ADC, whereas the F3 uses the `ADCv3` implementation.
|
Also note that the F0 and F3 use different numbering schemes. The F0 has a single ADC and the channels are 0-indexed, whereas the F3 has 4 ADCs and the channels are 1-indexed. This is because the F0 uses the `ADCv1` implementation of the ADC, whereas the F3 uses the `ADCv3` implementation.
|
||||||
|
|
||||||
|ADC|Channel|STM32F0xx|STM32F3xx|
|
|ADC|Channel|STM32F0xx|STM32F1xx|STM32F3xx|STM32F4xx|
|
||||||
|---|-------|---------|---------|
|
|---|-------|---------|---------|---------|---------|
|
||||||
|1 |0 |`A0` | |
|
|1 |0 |`A0` |`A0` | |`A0` |
|
||||||
|1 |1 |`A1` |`A0` |
|
|1 |1 |`A1` |`A1` |`A0` |`A1` |
|
||||||
|1 |2 |`A2` |`A1` |
|
|1 |2 |`A2` |`A2` |`A1` |`A2` |
|
||||||
|1 |3 |`A3` |`A2` |
|
|1 |3 |`A3` |`A3` |`A2` |`A3` |
|
||||||
|1 |4 |`A4` |`A3` |
|
|1 |4 |`A4` |`A4` |`A3` |`A4` |
|
||||||
|1 |5 |`A5` |`F4` |
|
|1 |5 |`A5` |`A5` |`F4` |`A5` |
|
||||||
|1 |6 |`A6` |`C0` |
|
|1 |6 |`A6` |`A6` |`C0` |`A6` |
|
||||||
|1 |7 |`A7` |`C1` |
|
|1 |7 |`A7` |`A7` |`C1` |`A7` |
|
||||||
|1 |8 |`B0` |`C2` |
|
|1 |8 |`B0` |`B0` |`C2` |`B0` |
|
||||||
|1 |9 |`B1` |`C3` |
|
|1 |9 |`B1` |`B1` |`C3` |`B1` |
|
||||||
|1 |10 |`C0` |`F2` |
|
|1 |10 |`C0` |`C0` |`F2` |`C0` |
|
||||||
|1 |11 |`C1` | |
|
|1 |11 |`C1` |`C1` | |`C1` |
|
||||||
|1 |12 |`C2` | |
|
|1 |12 |`C2` |`C2` | |`C2` |
|
||||||
|1 |13 |`C3` | |
|
|1 |13 |`C3` |`C3` | |`C3` |
|
||||||
|1 |14 |`C4` | |
|
|1 |14 |`C4` |`C4` | |`C4` |
|
||||||
|1 |15 |`C5` | |
|
|1 |15 |`C5` |`C5` | |`C5` |
|
||||||
|1 |16 | | |
|
|1 |16 | | | | |
|
||||||
|2 |1 | |`A4` |
|
|2 |0 | |`A0`¹ | |`A0`² |
|
||||||
|2 |2 | |`A5` |
|
|2 |1 | |`A1`¹ |`A4` |`A1`² |
|
||||||
|2 |3 | |`A6` |
|
|2 |2 | |`A2`¹ |`A5` |`A2`² |
|
||||||
|2 |4 | |`A7` |
|
|2 |3 | |`A3`¹ |`A6` |`A3`² |
|
||||||
|2 |5 | |`C4` |
|
|2 |4 | |`A4`¹ |`A7` |`A4`² |
|
||||||
|2 |6 | |`C0` |
|
|2 |5 | |`A5`¹ |`C4` |`A5`² |
|
||||||
|2 |7 | |`C1` |
|
|2 |6 | |`A6`¹ |`C0` |`A6`² |
|
||||||
|2 |8 | |`C2` |
|
|2 |7 | |`A7`¹ |`C1` |`A7`² |
|
||||||
|2 |9 | |`C3` |
|
|2 |8 | |`B0`¹ |`C2` |`B0`² |
|
||||||
|2 |10 | |`F2` |
|
|2 |9 | |`B1`¹ |`C3` |`B1`² |
|
||||||
|2 |11 | |`C5` |
|
|2 |10 | |`C0`¹ |`F2` |`C0`² |
|
||||||
|2 |12 | |`B2` |
|
|2 |11 | |`C1`¹ |`C5` |`C1`² |
|
||||||
|2 |13 | | |
|
|2 |12 | |`C2`¹ |`B2` |`C2`² |
|
||||||
|2 |14 | | |
|
|2 |13 | |`C3`¹ | |`C3`² |
|
||||||
|2 |15 | | |
|
|2 |14 | |`C4`¹ | |`C4`² |
|
||||||
|2 |16 | | |
|
|2 |15 | |`C5`¹ | |`C5`² |
|
||||||
|3 |1 | |`B1` |
|
|2 |16 | | | | |
|
||||||
|3 |2 | |`E9` |
|
|3 |0 | |`A0`¹ | |`A0`² |
|
||||||
|3 |3 | |`E13` |
|
|3 |1 | |`A1`¹ |`B1` |`A1`² |
|
||||||
|3 |4 | | |
|
|3 |2 | |`A2`¹ |`E9` |`A2`² |
|
||||||
|3 |5 | | |
|
|3 |3 | |`A3`¹ |`E13` |`A3`² |
|
||||||
|3 |6 | |`E8` |
|
|3 |4 | |`F6`¹ | |`F6`² |
|
||||||
|3 |7 | |`D10` |
|
|3 |5 | |`F7`¹ |`B13` |`F7`² |
|
||||||
|3 |8 | |`D11` |
|
|3 |6 | |`F8`¹ |`E8` |`F8`² |
|
||||||
|3 |9 | |`D12` |
|
|3 |7 | |`F9`¹ |`D10` |`F9`² |
|
||||||
|3 |10 | |`D13` |
|
|3 |8 | |`F10`¹ |`D11` |`F10`² |
|
||||||
|3 |11 | |`D14` |
|
|3 |9 | | |`D12` |`F3`² |
|
||||||
|3 |12 | |`B0` |
|
|3 |10 | |`C0`¹ |`D13` |`C0`² |
|
||||||
|3 |13 | |`E7` |
|
|3 |11 | |`C1`¹ |`D14` |`C1`² |
|
||||||
|3 |14 | |`E10` |
|
|3 |12 | |`C2`¹ |`B0` |`C2`² |
|
||||||
|3 |15 | |`E11` |
|
|3 |13 | |`C3`¹ |`E7` |`C3`² |
|
||||||
|3 |16 | |`E12` |
|
|3 |14 | | |`E10` |`F4`² |
|
||||||
|4 |1 | |`E14` |
|
|3 |15 | | |`E11` |`F5`² |
|
||||||
|4 |2 | |`B12` |
|
|3 |16 | | |`E12` | |
|
||||||
|4 |3 | |`B13` |
|
|4 |1 | | |`E14` | |
|
||||||
|4 |4 | |`B14` |
|
|4 |2 | | |`E15` | |
|
||||||
|4 |5 | |`B15` |
|
|4 |3 | | |`B12` | |
|
||||||
|4 |6 | |`E8` |
|
|4 |4 | | |`B14` | |
|
||||||
|4 |7 | |`D10` |
|
|4 |5 | | |`B15` | |
|
||||||
|4 |8 | |`D11` |
|
|4 |6 | | |`E8` | |
|
||||||
|4 |9 | |`D12` |
|
|4 |7 | | |`D10` | |
|
||||||
|4 |10 | |`D13` |
|
|4 |8 | | |`D11` | |
|
||||||
|4 |11 | |`D14` |
|
|4 |9 | | |`D12` | |
|
||||||
|4 |12 | |`D8` |
|
|4 |10 | | |`D13` | |
|
||||||
|4 |13 | |`D9` |
|
|4 |11 | | |`D14` | |
|
||||||
|4 |14 | | |
|
|4 |12 | | |`D8` | |
|
||||||
|4 |15 | | |
|
|4 |13 | | |`D9` | |
|
||||||
|4 |16 | | |
|
|4 |14 | | | | |
|
||||||
|
|4 |15 | | | | |
|
||||||
|
|4 |16 | | | | |
|
||||||
|
|
||||||
|
<sup>¹ As of ChibiOS 20.3.4, the ADC driver for STM32F1xx devices supports only ADC1, therefore any configurations involving ADC2 or ADC3 cannot actually be used. In particular, pins `F6`…`F10`, which are present at least on some STM32F103x[C-G] devices, cannot be used as ADC inputs because of this driver limitation.</sup>
|
||||||
|
|
||||||
|
<sup>² Not all STM32F4xx devices have ADC2 and/or ADC3, therefore some configurations shown in this table may be unavailable; in particular, pins `F4`…`F10` cannot be used as ADC inputs on devices which do not have ADC3. Check the device datasheet to confirm which pin functions are supported.</sup>
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
|
|
||||||
@@ -141,10 +147,10 @@ Also note that the F0 and F3 use different numbering schemes. The F0 has a singl
|
|||||||
|
|
||||||
The ARM implementation of the ADC has a few additional options that you can override in your own keyboards and keymaps to change how it operates. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options.
|
The ARM implementation of the ADC has a few additional options that you can override in your own keyboards and keymaps to change how it operates. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options.
|
||||||
|
|
||||||
|`#define` |Type |Default |Description |
|
|`#define` |Type |Default |Description |
|
||||||
|---------------------|------|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|---------------------|------|----------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|`ADC_CIRCULAR_BUFFER`|`bool`|`false` |If `true`, then the implementation will use a circular buffer. |
|
|`ADC_CIRCULAR_BUFFER`|`bool`|`false` |If `true`, then the implementation will use a circular buffer. |
|
||||||
|`ADC_NUM_CHANNELS` |`int` |`1` |Sets the number of channels that will be scanned as part of an ADC operation. The current implementation only supports `1`. |
|
|`ADC_NUM_CHANNELS` |`int` |`1` |Sets the number of channels that will be scanned as part of an ADC operation. The current implementation only supports `1`. |
|
||||||
|`ADC_BUFFER_DEPTH` |`int` |`2` |Sets the depth of each result. Since we are only getting a 12-bit result by default, we set this to 2 bytes so we can contain our one value. This could be set to 1 if you opt for an 8-bit or lower result.|
|
|`ADC_BUFFER_DEPTH` |`int` |`2` |Sets the depth of each result. Since we are only getting a 10-bit result by default, we set this to 2 bytes so we can contain our one value. This could be set to 1 if you opt for an 8-bit or lower result.|
|
||||||
|`ADC_SAMPLING_RATE` |`int` |`ADC_SMPR_SMP_1P5` |Sets the sampling rate of the ADC. By default, it is set to the fastest setting. |
|
|`ADC_SAMPLING_RATE` |`int` |`ADC_SMPR_SMP_1P5` |Sets the sampling rate of the ADC. By default, it is set to the fastest setting. |
|
||||||
|`ADC_RESOLUTION` |`int` |`ADC_CFGR1_RES_12BIT`|The resolution of your result. We choose 12 bit by default, but you can opt for 12, 10, 8, or 6 bit. |
|
|`ADC_RESOLUTION` |`int` |`ADC_CFGR1_RES_10BIT` or `ADC_CFGR_RES_10BITS`|The resolution of your result. We choose 10 bit by default, but you can opt for 12, 10, 8, or 6 bit. Different MCUs use slightly different names for the resolution constants. |
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ The breaking change period is when we will merge PR's that change QMK in dangero
|
|||||||
|
|
||||||
## What has been included in past Breaking Changes?
|
## What has been included in past Breaking Changes?
|
||||||
|
|
||||||
|
* [2021 May 29](ChangeLog/20210529.md)
|
||||||
* [2021 Feb 27](ChangeLog/20210227.md)
|
* [2021 Feb 27](ChangeLog/20210227.md)
|
||||||
* [2020 Nov 28](ChangeLog/20201128.md)
|
* [2020 Nov 28](ChangeLog/20201128.md)
|
||||||
* [2020 Aug 29](ChangeLog/20200829.md)
|
* [2020 Aug 29](ChangeLog/20200829.md)
|
||||||
@@ -15,16 +16,16 @@ The breaking change period is when we will merge PR's that change QMK in dangero
|
|||||||
|
|
||||||
## When is the next Breaking Change?
|
## When is the next Breaking Change?
|
||||||
|
|
||||||
The next Breaking Change is scheduled for February 27, 2021.
|
The next Breaking Change is scheduled for August 28, 2021.
|
||||||
|
|
||||||
### Important Dates
|
### Important Dates
|
||||||
|
|
||||||
* [x] 2021 Feb 27 - `develop` is created. Each push to `master` is subsequently merged to `develop`
|
* [x] 2021 May 29 - `develop` is created. Each push to `master` is subsequently merged to `develop`
|
||||||
* [ ] 2021 May 01 - `develop` closed to new PR's.
|
* [ ] 2021 Jul 31 - `develop` closed to new PR's.
|
||||||
* [ ] 2021 May 01 - Call for testers.
|
* [ ] 2021 Jul 31 - Call for testers.
|
||||||
* [ ] 2021 May 27 - `master` is locked, no PR's merged.
|
* [ ] 2021 Aug 26 - `master` is locked, no PR's merged.
|
||||||
* [ ] 2021 May 29 - Merge `develop` to `master`.
|
* [ ] 2021 Aug 28 - Merge `develop` to `master`.
|
||||||
* [ ] 2021 May 29 - `master` is unlocked. PR's can be merged again.
|
* [ ] 2021 Aug 28 - `master` is unlocked. PR's can be merged again.
|
||||||
|
|
||||||
## What changes will be included?
|
## What changes will be included?
|
||||||
|
|
||||||
@@ -55,7 +56,7 @@ This happens immediately after the previous `develop` branch is merged.
|
|||||||
* [ ] `git commit -m 'Branch point for <DATE> Breaking Change'`
|
* [ ] `git commit -m 'Branch point for <DATE> Breaking Change'`
|
||||||
* [ ] `git tag breakpoint_<YYYY>_<MM>_<DD>`
|
* [ ] `git tag breakpoint_<YYYY>_<MM>_<DD>`
|
||||||
* [ ] `git tag <next_version>` # Prevent the breakpoint tag from confusing version incrementing
|
* [ ] `git tag <next_version>` # Prevent the breakpoint tag from confusing version incrementing
|
||||||
* [ ] `git push origin develop`
|
* [ ] `git push upstream develop`
|
||||||
* [ ] `git push --tags`
|
* [ ] `git push --tags`
|
||||||
|
|
||||||
## 4 Weeks Before Merge
|
## 4 Weeks Before Merge
|
||||||
@@ -85,13 +86,21 @@ This happens immediately after the previous `develop` branch is merged.
|
|||||||
* `qmk_firmware` git commands
|
* `qmk_firmware` git commands
|
||||||
* [ ] `git checkout develop`
|
* [ ] `git checkout develop`
|
||||||
* [ ] `git pull --ff-only`
|
* [ ] `git pull --ff-only`
|
||||||
* [ ] `git rebase origin/master`
|
|
||||||
* [ ] Edit `readme.md`
|
* [ ] Edit `readme.md`
|
||||||
* [ ] Remove the notes about `develop`
|
* [ ] Remove the notes about `develop`
|
||||||
* [ ] Roll up the ChangeLog into one file.
|
* [ ] Roll up the ChangeLog into one file.
|
||||||
* [ ] `git commit -m 'Merge point for <DATE> Breaking Change'`
|
* [ ] `git commit -m 'Merge point for <DATE> Breaking Change'`
|
||||||
* [ ] `git push origin develop`
|
* [ ] `git push upstream develop`
|
||||||
* GitHub Actions
|
* GitHub Actions
|
||||||
* [ ] Create a PR for `develop`
|
* [ ] Create a PR for `develop`
|
||||||
* [ ] Make sure travis comes back clean
|
* [ ] Make sure travis comes back clean
|
||||||
* [ ] Merge `develop` PR
|
* [ ] **Turn off 'Automatically delete head branches' for the repository** -- confirm with @qmk/directors that it is done before continuing
|
||||||
|
* `qmk_firmware` git commands
|
||||||
|
* [ ] `git checkout master`
|
||||||
|
* [ ] `git pull --ff-only`
|
||||||
|
* [ ] `git merge --no-ff develop`
|
||||||
|
* [ ] `git push upstream master`
|
||||||
|
|
||||||
|
## Post-merge operations
|
||||||
|
|
||||||
|
* (Optional) [update ChibiOS + ChibiOS-Contrib on `develop`](chibios_upgrade_instructions.md)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
This page links to all previous changelogs from the QMK Breaking Changes process.
|
This page links to all previous changelogs from the QMK Breaking Changes process.
|
||||||
|
|
||||||
|
* [2021 May 29](ChangeLog/20210529.md) - version 0.13.0
|
||||||
* [2021 Feb 27](ChangeLog/20210227.md) - version 0.12.0
|
* [2021 Feb 27](ChangeLog/20210227.md) - version 0.12.0
|
||||||
* [2020 Nov 28](ChangeLog/20201128.md) - version 0.11.0
|
* [2020 Nov 28](ChangeLog/20201128.md) - version 0.11.0
|
||||||
* [2020 Aug 29](ChangeLog/20200829.md) - version 0.10.0
|
* [2020 Aug 29](ChangeLog/20200829.md) - version 0.10.0
|
||||||
|
|||||||
56
docs/chibios_upgrade_instructions.md
Normal file
56
docs/chibios_upgrade_instructions.md
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
# ChibiOS Upgrade Procedure
|
||||||
|
|
||||||
|
ChibiOS and ChibiOS-Contrib need to be updated in tandem -- the latter has a branch tied to the ChibiOS version in use and should not be mixed with different versions.
|
||||||
|
|
||||||
|
## Getting ChibiOS
|
||||||
|
|
||||||
|
* `svn` Initialisation:
|
||||||
|
* Only needed to be done once
|
||||||
|
* You might need to separately install `git-svn` package in your OS's package manager
|
||||||
|
* `git svn init --stdlayout --prefix='svn/' http://svn.osdn.net/svnroot/chibios/`
|
||||||
|
* `git remote add qmk git@github.com:qmk/ChibiOS.git`
|
||||||
|
* Updating:
|
||||||
|
* `git svn fetch`
|
||||||
|
* First time around this will take several hours
|
||||||
|
* Subsequent updates will be incremental only
|
||||||
|
* Tagging example (work out which version first!):
|
||||||
|
* `git tag -a ver20.3.3 -m ver20.3.3 svn/tags/ver20.3.3`
|
||||||
|
* `git push qmk ver20.3.3`
|
||||||
|
* `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN svn/tags/ver20.3.3`
|
||||||
|
* `git push qmk breaking_YYYY_qN`
|
||||||
|
|
||||||
|
## Getting ChibiOS-Contrib
|
||||||
|
|
||||||
|
* `git` Initialisation:
|
||||||
|
* `git clone git@github.com:qmk/ChibiOS-Contrib`
|
||||||
|
* `git remote add upstream https://github.com/ChibiOS/ChibiOS-Contrib`
|
||||||
|
* `git checkout -b chibios-20.3.x upstream/chibios-20.3.x`
|
||||||
|
* Updating:
|
||||||
|
* `git fetch --all --tags --prune`
|
||||||
|
* `git checkout chibios-20.3.x`
|
||||||
|
* `git pull --ff-only`
|
||||||
|
* `git push origin chibios-20.3.x`
|
||||||
|
* `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN chibios-20.3.x`
|
||||||
|
* `git push origin breaking_YYYY_qN`
|
||||||
|
|
||||||
|
## Updating submodules
|
||||||
|
|
||||||
|
* Update the submodules
|
||||||
|
* `cd $QMK_FIRMWARE`
|
||||||
|
* `git checkout develop`
|
||||||
|
* `git pull --ff-only`
|
||||||
|
* `git checkout -b chibios-version-bump`
|
||||||
|
* `cd lib/chibios`
|
||||||
|
* `git fetch --all --tags --prune`
|
||||||
|
* `git checkout breaking_YYYY_qN`
|
||||||
|
* `cd ../chibios-contrib`
|
||||||
|
* `git fetch --all --tags --prune`
|
||||||
|
* `git checkout breaking_YYYY_qN`
|
||||||
|
* Build everything
|
||||||
|
* `cd $QMK_FIRMWARE`
|
||||||
|
* `qmk multibuild -j4`
|
||||||
|
* Make sure there are no errors
|
||||||
|
* Push to the repo
|
||||||
|
* `git commit -am 'Update ChibiOS to XXXXXXXXX'`
|
||||||
|
* `git push --set-upstream origin chibios-version-bump`
|
||||||
|
* Make a PR to qmk_firmware with the new branch
|
||||||
@@ -107,6 +107,54 @@ This command lets you configure the behavior of QMK. For the full `qmk config` d
|
|||||||
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `qmk console`
|
||||||
|
|
||||||
|
This command lets you connect to keyboard consoles to get debugging messages. It only works if your keyboard firmware has been compiled with `CONSOLE_ENABLED=yes`.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk console [-d <pid>:<vid>[:<index>]] [-l] [-n] [-t] [-w <seconds>]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Examples**:
|
||||||
|
|
||||||
|
Connect to all available keyboards and show their console messages:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk console
|
||||||
|
```
|
||||||
|
|
||||||
|
List all devices:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk console -l
|
||||||
|
```
|
||||||
|
|
||||||
|
Show only messages from clueboard/66/rev3 keyboards:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk console -d C1ED:2370
|
||||||
|
```
|
||||||
|
|
||||||
|
Show only messages from the second clueboard/66/rev3:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk console -d C1ED:2370:2
|
||||||
|
```
|
||||||
|
|
||||||
|
Show timestamps and VID:PID instead of names:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk console -n -t
|
||||||
|
```
|
||||||
|
|
||||||
|
Disable bootloader messages:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk console --no-bootloaders
|
||||||
|
```
|
||||||
|
|
||||||
## `qmk doctor`
|
## `qmk doctor`
|
||||||
|
|
||||||
This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
|
This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
|
||||||
@@ -131,6 +179,16 @@ Check your environment and report problems only:
|
|||||||
|
|
||||||
qmk doctor -n
|
qmk doctor -n
|
||||||
|
|
||||||
|
## `qmk format-json`
|
||||||
|
|
||||||
|
Formats a JSON file in a (mostly) human-friendly way. Will usually correctly detect the format of the JSON (info.json or keymap.json) but you can override this with `--format` if neccesary.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk format-json [-f FORMAT] <json_file>
|
||||||
|
```
|
||||||
|
|
||||||
## `qmk info`
|
## `qmk info`
|
||||||
|
|
||||||
Displays information about keyboards and keymaps in QMK. You can use this to get information about a keyboard, show the layouts, display the underlying key matrix, or to pretty-print JSON keymaps.
|
Displays information about keyboards and keymaps in QMK. You can use this to get information about a keyboard, show the layouts, display the underlying key matrix, or to pretty-print JSON keymaps.
|
||||||
@@ -170,7 +228,7 @@ qmk json2c [-o OUTPUT] filename
|
|||||||
## `qmk c2json`
|
## `qmk c2json`
|
||||||
|
|
||||||
Creates a keymap.json from a keymap.c.
|
Creates a keymap.json from a keymap.c.
|
||||||
**Note:** Parsing C source files is not easy, therefore this subcommand may not work your keymap. In some cases not using the C pre-processor helps.
|
**Note:** Parsing C source files is not easy, therefore this subcommand may not work with your keymap. In some cases not using the C pre-processor helps.
|
||||||
|
|
||||||
**Usage**:
|
**Usage**:
|
||||||
|
|
||||||
@@ -218,6 +276,18 @@ This command is directory aware. It will automatically fill in KEYBOARD if you a
|
|||||||
qmk list-keymaps -kb planck/ez
|
qmk list-keymaps -kb planck/ez
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `qmk new-keyboard`
|
||||||
|
|
||||||
|
This command creates a new keyboard based on available templates.
|
||||||
|
|
||||||
|
This command will prompt for input to guide you though the generation process.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk new-keyboard
|
||||||
|
```
|
||||||
|
|
||||||
## `qmk new-keymap`
|
## `qmk new-keymap`
|
||||||
|
|
||||||
This command creates a new keymap based on a keyboard's existing default keymap.
|
This command creates a new keymap based on a keyboard's existing default keymap.
|
||||||
|
|||||||
27
docs/cli_tab_complete.md
Normal file
27
docs/cli_tab_complete.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# Tab Completion for QMK
|
||||||
|
|
||||||
|
If you are using Bash 4.2 or later, Zsh, or FiSH you can enable Tab Completion for the QMK CLI. This will let you tab complete the names of flags, keyboards, files, and other `qmk` options.
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
There are several ways you can setup tab completion.
|
||||||
|
|
||||||
|
### For Your User Only
|
||||||
|
|
||||||
|
Add this to the end of your `.profile` or `.bashrc`:
|
||||||
|
|
||||||
|
source ~/qmk_firmware/util/qmk_tab_complete.sh
|
||||||
|
|
||||||
|
If you put `qmk_firmware` into another location you will need to adjust this path.
|
||||||
|
|
||||||
|
### System Wide Symlink
|
||||||
|
|
||||||
|
If you want the tab completion available to all users of the system you can add a symlink to the `qmk_tab_complete.sh` script:
|
||||||
|
|
||||||
|
`ln -s ~/qmk_firmware/util/qmk_tab_complete.sh /etc/profile.d/qmk_tab_complete.sh`
|
||||||
|
|
||||||
|
### System Wide Copy
|
||||||
|
|
||||||
|
In some cases a symlink may not work. Instead you can copy the file directly into place. Be aware that updates to the tab complete script may happen from time to time, you will want to recopy the file periodically.
|
||||||
|
|
||||||
|
cp util/qmk_tab_complete.sh /etc/profile.d
|
||||||
@@ -28,8 +28,11 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s
|
|||||||
* [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)
|
* [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)
|
||||||
* [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html)
|
* [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html)
|
||||||
* [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html)
|
* [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html)
|
||||||
|
* [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html)
|
||||||
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
|
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
|
||||||
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
|
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
|
||||||
|
* [STM32L433](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
|
||||||
|
* [STM32L443](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
|
||||||
|
|
||||||
### NXP (Kinetis)
|
### NXP (Kinetis)
|
||||||
|
|
||||||
|
|||||||
@@ -51,8 +51,10 @@ This is a C header file that is one of the first things included, and will persi
|
|||||||
* the number of columns in your keyboard's matrix
|
* the number of columns in your keyboard's matrix
|
||||||
* `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }`
|
* `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }`
|
||||||
* pins of the rows, from top to bottom
|
* pins of the rows, from top to bottom
|
||||||
|
* may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
|
||||||
* `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }`
|
* `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }`
|
||||||
* pins of the columns, from left to right
|
* pins of the columns, from left to right
|
||||||
|
* may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
|
||||||
* `#define MATRIX_IO_DELAY 30`
|
* `#define MATRIX_IO_DELAY 30`
|
||||||
* the delay in microseconds when between changing matrix pin state and reading values
|
* the delay in microseconds when between changing matrix pin state and reading values
|
||||||
* `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }`
|
* `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }`
|
||||||
@@ -78,10 +80,10 @@ This is a C header file that is one of the first things included, and will persi
|
|||||||
* enables audio on pin B5 (duophony is enabled if one of B pins is enabled along with one of C pins)
|
* enables audio on pin B5 (duophony is enabled if one of B pins is enabled along with one of C pins)
|
||||||
* Deprecated. Use `#define AUDIO_PIN B5`, or use `#define AUDIO_PIN_ALT B5` if a `C` pin is enabled with `AUDIO_PIN`
|
* Deprecated. Use `#define AUDIO_PIN B5`, or use `#define AUDIO_PIN_ALT B5` if a `C` pin is enabled with `AUDIO_PIN`
|
||||||
* `#define B6_AUDIO`
|
* `#define B6_AUDIO`
|
||||||
* enables audio on pin B5 (duophony is enabled if one of B pins is enabled along with one of C pins)
|
* enables audio on pin B6 (duophony is enabled if one of B pins is enabled along with one of C pins)
|
||||||
* Deprecated. Use `#define AUDIO_PIN B6`, or use `#define AUDIO_PIN_ALT B6` if a `C` pin is enabled with `AUDIO_PIN`
|
* Deprecated. Use `#define AUDIO_PIN B6`, or use `#define AUDIO_PIN_ALT B6` if a `C` pin is enabled with `AUDIO_PIN`
|
||||||
* `#define B7_AUDIO`
|
* `#define B7_AUDIO`
|
||||||
* enables audio on pin B5 (duophony is enabled if one of B pins is enabled along with one of C pins)
|
* enables audio on pin B7 (duophony is enabled if one of B pins is enabled along with one of C pins)
|
||||||
* Deprecated. Use `#define AUDIO_PIN B7`, or use `#define AUDIO_PIN_ALT B7` if a `C` pin is enabled with `AUDIO_PIN`
|
* Deprecated. Use `#define AUDIO_PIN B7`, or use `#define AUDIO_PIN_ALT B7` if a `C` pin is enabled with `AUDIO_PIN`
|
||||||
* `#define BACKLIGHT_PIN B7`
|
* `#define BACKLIGHT_PIN B7`
|
||||||
* pin of the backlight
|
* pin of the backlight
|
||||||
@@ -272,7 +274,7 @@ There are a few different ways to set handedness for split keyboards (listed in
|
|||||||
### Other Options
|
### Other Options
|
||||||
|
|
||||||
* `#define USE_I2C`
|
* `#define USE_I2C`
|
||||||
* For using I2C instead of Serial (defaults to serial)
|
* For using I2C instead of Serial (default is serial; serial transport is supported on ARM -- I2C is AVR-only)
|
||||||
|
|
||||||
* `#define SOFT_SERIAL_PIN D0`
|
* `#define SOFT_SERIAL_PIN D0`
|
||||||
* When using serial, define this. `D0` or `D1`,`D2`,`D3`,`E6`.
|
* When using serial, define this. `D0` or `D1`,`D2`,`D3`,`E6`.
|
||||||
@@ -280,6 +282,7 @@ There are a few different ways to set handedness for split keyboards (listed in
|
|||||||
* `#define MATRIX_ROW_PINS_RIGHT { <row pins> }`
|
* `#define MATRIX_ROW_PINS_RIGHT { <row pins> }`
|
||||||
* `#define MATRIX_COL_PINS_RIGHT { <col pins> }`
|
* `#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.
|
* 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.
|
||||||
|
* may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
|
||||||
|
|
||||||
* `#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
|
* `#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`.
|
* 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`.
|
||||||
@@ -300,7 +303,7 @@ There are a few different ways to set handedness for split keyboards (listed in
|
|||||||
* `#define SPLIT_USB_DETECT`
|
* `#define SPLIT_USB_DETECT`
|
||||||
* Detect (with timeout) USB connection when delegating master/slave
|
* Detect (with timeout) USB connection when delegating master/slave
|
||||||
* Default behavior for ARM
|
* Default behavior for ARM
|
||||||
* Required for AVR Teensy
|
* Required for AVR Teensy (without hardware mods)
|
||||||
|
|
||||||
* `#define SPLIT_USB_TIMEOUT 2000`
|
* `#define SPLIT_USB_TIMEOUT 2000`
|
||||||
* Maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`
|
* Maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`
|
||||||
@@ -308,6 +311,28 @@ There are a few different ways to set handedness for split keyboards (listed in
|
|||||||
* `#define SPLIT_USB_TIMEOUT_POLL 10`
|
* `#define SPLIT_USB_TIMEOUT_POLL 10`
|
||||||
* Poll frequency when detecting master/slave when using `SPLIT_USB_DETECT`
|
* Poll frequency when detecting master/slave when using `SPLIT_USB_DETECT`
|
||||||
|
|
||||||
|
* `#define FORCED_SYNC_THROTTLE_MS 100`
|
||||||
|
* Deadline for synchronizing data from master to slave when using the QMK-provided split transport.
|
||||||
|
|
||||||
|
* `#define SPLIT_TRANSPORT_MIRROR`
|
||||||
|
* Mirrors the master-side matrix on the slave when using the QMK-provided split transport.
|
||||||
|
|
||||||
|
* `#define SPLIT_LAYER_STATE_ENABLE`
|
||||||
|
* Ensures the current layer state is available on the slave when using the QMK-provided split transport.
|
||||||
|
|
||||||
|
* `#define SPLIT_LED_STATE_ENABLE`
|
||||||
|
* Ensures the current host indicator state (caps/num/scroll) is available on the slave when using the QMK-provided split transport.
|
||||||
|
|
||||||
|
* `#define SPLIT_MODS_ENABLE`
|
||||||
|
* Ensures the current modifier state (normal, weak, and oneshot) is available on the slave when using the QMK-provided split transport.
|
||||||
|
|
||||||
|
* `#define SPLIT_WPM_ENABLE`
|
||||||
|
* Ensures the current WPM is available on the slave when using the QMK-provided split transport.
|
||||||
|
|
||||||
|
* `#define SPLIT_TRANSACTION_IDS_KB .....`
|
||||||
|
* `#define SPLIT_TRANSACTION_IDS_USER .....`
|
||||||
|
* Allows for custom data sync with the slave when using the QMK-provided split transport. See [custom data sync between sides](feature_split_keyboard.md#custom-data-sync) for more information.
|
||||||
|
|
||||||
# The `rules.mk` File
|
# 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.
|
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.
|
||||||
|
|||||||
@@ -144,6 +144,14 @@ This is useful for setting up stuff that you may need elsewhere, but isn't hardw
|
|||||||
* Keyboard/Revision: `void matrix_init_kb(void)`
|
* Keyboard/Revision: `void matrix_init_kb(void)`
|
||||||
* Keymap: `void matrix_init_user(void)`
|
* Keymap: `void matrix_init_user(void)`
|
||||||
|
|
||||||
|
### Low-level Matrix Overrides Function Documentation :id=low-level-matrix-overrides
|
||||||
|
|
||||||
|
* GPIO pin initialisation: `void matrix_init_pins(void)`
|
||||||
|
* This needs to perform the low-level initialisation of all row and column pins. By default this will initialise the input/output state of each of the GPIO pins listed in `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no initialisation of pin state will occur within QMK itself, instead deferring to the keyboard's override.
|
||||||
|
* `COL2ROW`-based row reads: `void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)`
|
||||||
|
* `ROW2COL`-based column reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)`
|
||||||
|
* `DIRECT_PINS`-based reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)`
|
||||||
|
* These three functions need to perform the low-level retrieval of matrix state of relevant input pins, based on the matrix type. Only one of the functions should be implemented, if needed. By default this will iterate through `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, configuring the inputs and outputs based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no manipulation of matrix GPIO pin state will occur within QMK itself, instead deferring to the keyboard's override.
|
||||||
|
|
||||||
## Keyboard Post Initialization code
|
## Keyboard Post Initialization code
|
||||||
|
|
||||||
|
|||||||
@@ -109,6 +109,19 @@ If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes
|
|||||||
|
|
||||||
You may need privileges to access the device an OS like Linux. Try `sudo hid_listen`.
|
You may need privileges to access the device an OS like Linux. Try `sudo hid_listen`.
|
||||||
|
|
||||||
|
On many Linux distros you can avoid having to run hid_listen as root
|
||||||
|
by creating a file called `/etc/udev/rules.d/70-hid-listen.rules` with
|
||||||
|
the following content:
|
||||||
|
|
||||||
|
```
|
||||||
|
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="abcd", ATTRS{idProduct}=="def1", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||||
|
```
|
||||||
|
|
||||||
|
Replace abcd and def1 with your keyboard's vendor and product id,
|
||||||
|
letters must be lowercase. The `RUN{builtin}+="uaccess"` part is only
|
||||||
|
needed for older distros.
|
||||||
|
|
||||||
|
|
||||||
## Can't Get Message on Console
|
## Can't Get Message on Console
|
||||||
Check:
|
Check:
|
||||||
- *hid_listen* finds your device. See above.
|
- *hid_listen* finds your device. See above.
|
||||||
|
|||||||
@@ -23,6 +23,141 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown
|
|||||||
|
|
||||||
You can also chain them, for example `LCTL(LALT(KC_DEL))` or `C(A(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.
|
You can also chain them, for example `LCTL(LALT(KC_DEL))` or `C(A(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.
|
||||||
|
|
||||||
|
# Checking Modifier State :id=checking-modifier-state
|
||||||
|
|
||||||
|
The current modifier state can mainly be accessed with two functions: `get_mods()` for normal modifiers and modtaps and `get_oneshot_mods()` for one-shot modifiers (unless they're held, in which case they act like normal modifier keys).
|
||||||
|
|
||||||
|
The presence of one or more specific modifiers in the current modifier state can be detected by ANDing the modifier state with a mod mask corresponding to the set of modifiers you want to match for. The reason why bitwise operators are used is that the modifier state is stored as a single byte in the format (GASC)<sub>R</sub>(GASC)<sub>L</sub>.
|
||||||
|
|
||||||
|
Thus, to give an example, `01000010` would be the internal representation of LShift+RAlt.
|
||||||
|
For more information on bitwise operators in C, click [here](https://en.wikipedia.org/wiki/Bitwise_operations_in_C) to open the Wikipedia page on the topic.
|
||||||
|
|
||||||
|
In practice, this means that you can check whether a given modifier is active with `get_mods() & MOD_BIT(KC_<modifier>)` (see the [list of modifier keycodes](keycodes_basic.md#modifiers)) or with `get_mods() & MOD_MASK_<modifier>` if the difference between left and right hand modifiers is not important and you want to match both. Same thing can be done for one-shot modifiers if you replace `get_mods()` with `get_oneshot_mods()`.
|
||||||
|
|
||||||
|
To check that *only* a specific set of mods is active at a time, AND the modifier state and your desired mod mask as explained above and compare the result to the mod mask itself: `get_mods() & <mod mask> == <mod mask>`.
|
||||||
|
|
||||||
|
For example, let's say you want to trigger a piece of custom code if one-shot left control and one-shot left shift are on but every other one-shot mods are off. To do so, you can compose the desired mod mask by combining the mod bits for left control and shift with `(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))` and then plug it in: `get_oneshot_mods & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT)) == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))`. Using `MOD_MASK_CS` instead for the mod bitmask would have forced you to press four modifier keys (both versions of control and shift) to fulfill the condition.
|
||||||
|
|
||||||
|
The full list of mod masks is as follows:
|
||||||
|
|
||||||
|
| Mod Mask Name | Matching Modifiers |
|
||||||
|
|--------------------|------------------------------------------------|
|
||||||
|
| `MOD_MASK_CTRL` | LCTRL , RCTRL |
|
||||||
|
| `MOD_MASK_SHIFT` | LSHIFT , RSHIFT |
|
||||||
|
| `MOD_MASK_ALT` | LALT , RALT |
|
||||||
|
| `MOD_MASK_GUI` | LGUI , RGUI |
|
||||||
|
| `MOD_MASK_CS` | CTRL , SHIFT |
|
||||||
|
| `MOD_MASK_CA` | (L/R)CTRL , (L/R)ALT |
|
||||||
|
| `MOD_MASK_CG` | (L/R)CTRL , (L/R)GUI |
|
||||||
|
| `MOD_MASK_SA` | (L/R)SHIFT , (L/R)ALT |
|
||||||
|
| `MOD_MASK_SG` | (L/R)SHIFT , (L/R)GUI |
|
||||||
|
| `MOD_MASK_AG` | (L/R)ALT , (L/R)GUI |
|
||||||
|
| `MOD_MASK_CSA` | (L/R)CTRL , (L/R)SHIFT , (L/R)ALT |
|
||||||
|
| `MOD_MASK_CSG` | (L/R)CTRL , (L/R)SHIFT , (L/R)GUI |
|
||||||
|
| `MOD_MASK_CAG` | (L/R)CTRL , (L/R)ALT , (L/R)GUI |
|
||||||
|
| `MOD_MASK_SAG` | (L/R)SHIFT , (L/R)ALT , (L/R)GUI |
|
||||||
|
| `MOD_MASK_CSAG` | (L/R)CTRL , (L/R)SHIFT , (L/R)ALT , (L/R)GUI |
|
||||||
|
|
||||||
|
Aside from accessing the currently active modifiers using `get_mods()`, there exists some other functions you can use to modify the modifier state, where the `mods` argument refers to the modifiers bitmask.
|
||||||
|
|
||||||
|
* `add_mods(mods)`: Enable `mods` without affecting any other modifiers
|
||||||
|
* `register_mods(mods)`: Like `add_mods` but send a keyboard report immediately.
|
||||||
|
* `del_mods(mods)`: Disable `mods` without affecting any other modifiers
|
||||||
|
* `unregister_mods(mods)`: Like `del_mods` but send a keyboard report immediately.
|
||||||
|
* `set_mods(mods)`: Overwrite current modifier state with `mods`
|
||||||
|
* `clear_mods()`: Reset the modifier state by disabling all modifiers
|
||||||
|
|
||||||
|
Similarly, in addition to `get_oneshot_mods()`, there also exists these functions for one-shot mods:
|
||||||
|
|
||||||
|
* `add_oneshot_mods(mods)`: Enable `mods` without affecting any other one-shot modifiers
|
||||||
|
* `del_oneshot_mods(mods)`: Disable `mods` without affecting any other one-shot modifiers
|
||||||
|
* `set_oneshot_mods(mods)`: Overwrite current one-shot modifier state with `mods`
|
||||||
|
* `clear_oneshot_mods()`: Reset the one-shot modifier state by disabling all one-shot modifiers
|
||||||
|
|
||||||
|
## Examples :id=examples
|
||||||
|
|
||||||
|
The following examples use [advanced macro functions](feature_macros.md#advanced-macro-functions) which you can read more about in the [documentation page on macros](feature_macros.md).
|
||||||
|
|
||||||
|
### Alt + Escape for Alt + Tab :id=alt-escape-for-alt-tab
|
||||||
|
|
||||||
|
Simple example where chording Left Alt with `KC_ESC` makes it behave like `KC_TAB` for alt-tabbing between applications. This example strictly checks if only Left Alt is active, meaning you can't do Alt+Shift+Esc to switch between applications in reverse order. Also keep in mind that this removes the ability to trigger the actual Alt+Escape keyboard shortcut, though it keeps the ability to do AltGr+Escape.
|
||||||
|
|
||||||
|
```c
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
|
||||||
|
case KC_ESC:
|
||||||
|
// Detect the activation of only Left Alt
|
||||||
|
if ((get_mods() & MOD_BIT(KC_LALT)) == MOD_BIT(KC_LALT)) {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
// No need to register KC_LALT because it's already active.
|
||||||
|
// The Alt modifier will apply on this KC_TAB.
|
||||||
|
register_code(KC_TAB);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_TAB);
|
||||||
|
}
|
||||||
|
// Do not let QMK process the keycode further
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// Else, let QMK process the KC_ESC keycode as usual
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### Shift + Backspace for Delete :id=shift-backspace-for-delete
|
||||||
|
|
||||||
|
Advanced example where the original behaviour of shift is cancelled when chorded with `KC_BSPC` and is instead fully replaced by `KC_DEL`. Two main variables are created to make this work well: `mod_state` and `delkey_registered`. The first one stores the modifier state and is used to restore it after registering `KC_DEL`. The second variable is a boolean variable (true or false) which keeps track of the status of `KC_DEL` to manage the release of the whole Backspace/Delete key correctly.
|
||||||
|
|
||||||
|
As opposed to the previous example, this doesn't use strict modifier checking. Pressing `KC_BSPC` while one or two shifts are active is enough to trigger this custom code, regardless of the state of other modifiers. That approach offers some perks: Ctrl+Shift+Backspace lets us delete the next word (Ctrl+Delete) and Ctrl+Alt+Shift+Backspace lets us execute the Ctrl+Alt+Del keyboard shortcut.
|
||||||
|
|
||||||
|
```c
|
||||||
|
// Initialize variable holding the binary
|
||||||
|
// representation of active modifiers.
|
||||||
|
uint8_t mod_state;
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// Store the current modifier state in the variable for later reference
|
||||||
|
mod_state = get_mods();
|
||||||
|
switch (keycode) {
|
||||||
|
|
||||||
|
case KC_BSPC:
|
||||||
|
{
|
||||||
|
// Initialize a boolean variable that keeps track
|
||||||
|
// of the delete key status: registered or not?
|
||||||
|
static bool delkey_registered;
|
||||||
|
if (record->event.pressed) {
|
||||||
|
// Detect the activation of either shift keys
|
||||||
|
if (mod_state & MOD_MASK_SHIFT) {
|
||||||
|
// First temporarily canceling both shifts so that
|
||||||
|
// shift isn't applied to the KC_DEL keycode
|
||||||
|
del_mods(MOD_MASK_SHIFT);
|
||||||
|
register_code(KC_DEL);
|
||||||
|
// Update the boolean variable to reflect the status of KC_DEL
|
||||||
|
delkey_registered = true;
|
||||||
|
// Reapplying modifier state so that the held shift key(s)
|
||||||
|
// still work even after having tapped the Backspace/Delete key.
|
||||||
|
set_mods(mod_state);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else { // on release of KC_BSPC
|
||||||
|
// In case KC_DEL is still being sent even after the release of KC_BSPC
|
||||||
|
if (delkey_registered) {
|
||||||
|
unregister_code(KC_DEL);
|
||||||
|
delkey_registered = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Let QMK process the KC_BSPC keycode as usual outside of shift
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
# Legacy Content :id=legacy-content
|
# Legacy Content :id=legacy-content
|
||||||
|
|
||||||
This page used to encompass a large set of features. We have moved many sections that used to be part of this page to their own pages. Everything below this point is simply a redirect so that people following old links on the web find what they're looking for.
|
This page used to encompass a large set of features. We have moved many sections that used to be part of this page to their own pages. Everything below this point is simply a redirect so that people following old links on the web find what they're looking for.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ To activate this feature, add `AUDIO_ENABLE = yes` to your `rules.mk`.
|
|||||||
On Atmega32U4 based boards, up to two simultaneous tones can be rendered.
|
On Atmega32U4 based boards, up to two simultaneous tones can be rendered.
|
||||||
With one speaker connected to a PWM capable pin on PORTC driven by timer 3 and the other on one of the PWM pins on PORTB driven by timer 1.
|
With one speaker connected to a PWM capable pin on PORTC driven by timer 3 and the other on one of the PWM pins on PORTB driven by timer 1.
|
||||||
|
|
||||||
The following pins can be configured as audio outputs in `config.h` - for one speaker set eiter one out of:
|
The following pins can be configured as audio outputs in `config.h` - for one speaker set either one out of:
|
||||||
|
|
||||||
* `#define AUDIO_PIN C4`
|
* `#define AUDIO_PIN C4`
|
||||||
* `#define AUDIO_PIN C5`
|
* `#define AUDIO_PIN C5`
|
||||||
@@ -131,12 +131,14 @@ You can override the default songs by doing something like this in your `config.
|
|||||||
|
|
||||||
```c
|
```c
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
#define STARTUP_SONG SONG(STARTUP_SOUND)
|
# define STARTUP_SONG SONG(STARTUP_SOUND)
|
||||||
#endif
|
#endif
|
||||||
```
|
```
|
||||||
|
|
||||||
A full list of sounds can be found in [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) - feel free to add your own to this list! All available notes can be seen in [quantum/audio/musical_notes.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/musical_notes.h).
|
A full list of sounds can be found in [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) - feel free to add your own to this list! All available notes can be seen in [quantum/audio/musical_notes.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/musical_notes.h).
|
||||||
|
|
||||||
|
Additionally, if you with to maintain your own list of songs (such as ones that may be copyrighted) and not have them added to the repo, you can create a `user_song_list.h` file and place it in your keymap (or userspace) folder. This file will be automatically included, it just needs to exist.
|
||||||
|
|
||||||
To play a custom sound at a particular time, you can define a song like this (near the top of the file):
|
To play a custom sound at a particular time, you can define a song like this (near the top of the file):
|
||||||
|
|
||||||
```c
|
```c
|
||||||
@@ -166,7 +168,7 @@ The available keycodes for audio are:
|
|||||||
!> These keycodes turn all of the audio functionality on and off. Turning it off means that audio feedback, audio clicky, music mode, etc. are disabled, completely.
|
!> These keycodes turn all of the audio functionality on and off. Turning it off means that audio feedback, audio clicky, music mode, etc. are disabled, completely.
|
||||||
|
|
||||||
## Tempo
|
## Tempo
|
||||||
the 'speed' at which SONGs are played is dictated by the set Tempo, which is measured in beats-per-minute. Note lenghts are defined relative to that.
|
the 'speed' at which SONGs are played is dictated by the set Tempo, which is measured in beats-per-minute. Note lengths are defined relative to that.
|
||||||
The initial/default tempo is set to 120 bpm, but can be configured by setting `TEMPO_DEFAULT` in `config.c`.
|
The initial/default tempo is set to 120 bpm, but can be configured by setting `TEMPO_DEFAULT` in `config.c`.
|
||||||
There is also a set of functions to modify the tempo from within the user/keymap code:
|
There is also a set of functions to modify the tempo from within the user/keymap code:
|
||||||
```c
|
```c
|
||||||
@@ -291,7 +293,7 @@ You can configure the default, min and max frequencies, the stepping and built i
|
|||||||
|--------|---------------|-------------|
|
|--------|---------------|-------------|
|
||||||
| `AUDIO_CLICKY_FREQ_DEFAULT` | 440.0f | Sets the default/starting audio frequency for the clicky sounds. |
|
| `AUDIO_CLICKY_FREQ_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_MIN` | 65.0f | Sets the lowest frequency (under 60f are a bit buggy). |
|
||||||
| `AUDIO_CLICKY_FREQ_MAX` | 1500.0f | Sets the the highest frequency. Too high may result in coworkers attacking you. |
|
| `AUDIO_CLICKY_FREQ_MAX` | 1500.0f | Sets the highest frequency. Too high may result in coworkers attacking you. |
|
||||||
| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f| Sets the stepping of UP/DOWN key codes. This is a multiplicative factor. The default steps the frequency up/down by a musical minor third. |
|
| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f| Sets the stepping of UP/DOWN key codes. This is a multiplicative factor. The default steps the frequency up/down by a musical minor third. |
|
||||||
| `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | Sets a factor of randomness for the clicks, Setting this to `0f` will make each click identical, and `1.0f` will make this sound much like the 90's computer screen scrolling/typing effect. |
|
| `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | Sets a factor of randomness for the clicks, Setting this to `0f` will make each click identical, and `1.0f` will make this sound much like the 90's computer screen scrolling/typing effect. |
|
||||||
| `AUDIO_CLICKY_DELAY_DURATION` | 1 | An integer note duration where 1 is 1/16th of the tempo, or a sixty-fourth note (see `quantum/audio/musical_notes.h` for implementation details). The main clicky effect will be delayed by this duration. Adjusting this to values around 6-12 will help compensate for loud switches. |
|
| `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. |
|
||||||
@@ -301,8 +303,7 @@ You can configure the default, min and max frequencies, the stepping and built i
|
|||||||
|
|
||||||
## MIDI Functionality
|
## MIDI Functionality
|
||||||
|
|
||||||
This is still a WIP, but check out `quantum/process_keycode/process_midi.c` to see what's happening. Enable from the Makefile.
|
See [MIDI](feature_midi.md)
|
||||||
|
|
||||||
|
|
||||||
## Audio Keycodes
|
## Audio Keycodes
|
||||||
|
|
||||||
@@ -319,114 +320,3 @@ This is still a WIP, but check out `quantum/process_keycode/process_midi.c` to s
|
|||||||
|`MU_OFF` | |Turns off Music Mode |
|
|`MU_OFF` | |Turns off Music Mode |
|
||||||
|`MU_TOG` | |Toggles Music Mode |
|
|`MU_TOG` | |Toggles Music Mode |
|
||||||
|`MU_MOD` | |Cycles through the music modes |
|
|`MU_MOD` | |Cycles through the music modes |
|
||||||
|
|
||||||
<!-- FIXME: this formatting needs work
|
|
||||||
|
|
||||||
## Audio
|
|
||||||
|
|
||||||
```c
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
AU_ON,
|
|
||||||
AU_OFF,
|
|
||||||
AU_TOG,
|
|
||||||
|
|
||||||
// Music mode on/off/toggle
|
|
||||||
MU_ON,
|
|
||||||
MU_OFF,
|
|
||||||
MU_TOG,
|
|
||||||
|
|
||||||
// Music voice iterate
|
|
||||||
MUV_IN,
|
|
||||||
MUV_DE,
|
|
||||||
#endif
|
|
||||||
```
|
|
||||||
|
|
||||||
### Midi
|
|
||||||
|
|
||||||
#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
|
|
||||||
MI_ON, // send midi notes when music mode is enabled
|
|
||||||
MI_OFF, // don't send midi notes when music mode is enabled
|
|
||||||
#endif
|
|
||||||
|
|
||||||
MIDI_TONE_MIN,
|
|
||||||
MIDI_TONE_MAX
|
|
||||||
|
|
||||||
MI_C = MIDI_TONE_MIN,
|
|
||||||
MI_Cs,
|
|
||||||
MI_Db = MI_Cs,
|
|
||||||
MI_D,
|
|
||||||
MI_Ds,
|
|
||||||
MI_Eb = MI_Ds,
|
|
||||||
MI_E,
|
|
||||||
MI_F,
|
|
||||||
MI_Fs,
|
|
||||||
MI_Gb = MI_Fs,
|
|
||||||
MI_G,
|
|
||||||
MI_Gs,
|
|
||||||
MI_Ab = MI_Gs,
|
|
||||||
MI_A,
|
|
||||||
MI_As,
|
|
||||||
MI_Bb = MI_As,
|
|
||||||
MI_B,
|
|
||||||
|
|
||||||
MIDI_TONE_KEYCODE_OCTAVES > 1
|
|
||||||
|
|
||||||
where x = 1-5:
|
|
||||||
MI_C_x,
|
|
||||||
MI_Cs_x,
|
|
||||||
MI_Db_x = MI_Cs_x,
|
|
||||||
MI_D_x,
|
|
||||||
MI_Ds_x,
|
|
||||||
MI_Eb_x = MI_Ds_x,
|
|
||||||
MI_E_x,
|
|
||||||
MI_F_x,
|
|
||||||
MI_Fs_x,
|
|
||||||
MI_Gb_x = MI_Fs_x,
|
|
||||||
MI_G_x,
|
|
||||||
MI_Gs_x,
|
|
||||||
MI_Ab_x = MI_Gs_x,
|
|
||||||
MI_A_x,
|
|
||||||
MI_As_x,
|
|
||||||
MI_Bb_x = MI_As_x,
|
|
||||||
MI_B_x,
|
|
||||||
|
|
||||||
MI_OCT_Nx 1-2
|
|
||||||
MI_OCT_x 0-7
|
|
||||||
MIDI_OCTAVE_MIN = MI_OCT_N2,
|
|
||||||
MIDI_OCTAVE_MAX = MI_OCT_7,
|
|
||||||
MI_OCTD, // octave down
|
|
||||||
MI_OCTU, // octave up
|
|
||||||
|
|
||||||
MI_TRNS_Nx 1-6
|
|
||||||
MI_TRNS_x 0-6
|
|
||||||
MIDI_TRANSPOSE_MIN = MI_TRNS_N6,
|
|
||||||
MIDI_TRANSPOSE_MAX = MI_TRNS_6,
|
|
||||||
MI_TRNSD, // transpose down
|
|
||||||
MI_TRNSU, // transpose up
|
|
||||||
|
|
||||||
MI_VEL_x 1-10
|
|
||||||
MIDI_VELOCITY_MIN = MI_VEL_1,
|
|
||||||
MIDI_VELOCITY_MAX = MI_VEL_9,
|
|
||||||
MI_VELD, // velocity down
|
|
||||||
MI_VELU, // velocity up
|
|
||||||
|
|
||||||
MI_CHx 1-16
|
|
||||||
MIDI_CHANNEL_MIN = MI_CH1
|
|
||||||
MIDI_CHANNEL_MAX = MI_CH16,
|
|
||||||
MI_CHD, // previous channel
|
|
||||||
MI_CHU, // next channel
|
|
||||||
|
|
||||||
MI_ALLOFF, // all notes off
|
|
||||||
|
|
||||||
MI_SUS, // sustain
|
|
||||||
MI_PORT, // portamento
|
|
||||||
MI_SOST, // sostenuto
|
|
||||||
MI_SOFT, // soft pedal
|
|
||||||
MI_LEG, // legato
|
|
||||||
|
|
||||||
MI_MOD, // modulation
|
|
||||||
MI_MODSD, // decrease modulation speed
|
|
||||||
MI_MODSU, // increase modulation speed
|
|
||||||
#endif // MIDI_ADVANCED
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|||||||
@@ -109,6 +109,33 @@ Do not Auto Shift numeric keys, zero through nine.
|
|||||||
|
|
||||||
Do not Auto Shift alpha characters, which include A through Z.
|
Do not Auto Shift alpha characters, which include A through Z.
|
||||||
|
|
||||||
|
### Auto Shift Per Key
|
||||||
|
|
||||||
|
This is a function that allows you to determine which keys shold be autoshifted, much like the tap-hold keys.
|
||||||
|
|
||||||
|
The default function looks like this:
|
||||||
|
|
||||||
|
```c
|
||||||
|
bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
# ifndef NO_AUTO_SHIFT_ALPHA
|
||||||
|
case KC_A ... KC_Z:
|
||||||
|
# endif
|
||||||
|
# ifndef NO_AUTO_SHIFT_NUMERIC
|
||||||
|
case KC_1 ... KC_0:
|
||||||
|
# endif
|
||||||
|
# ifndef NO_AUTO_SHIFT_SPECIAL
|
||||||
|
case KC_TAB:
|
||||||
|
case KC_MINUS ... KC_SLASH:
|
||||||
|
case KC_NONUS_BSLASH:
|
||||||
|
# endif
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
This functionality is enabled by default, and does not need a define.
|
||||||
|
|
||||||
### AUTO_SHIFT_REPEAT (simple define)
|
### AUTO_SHIFT_REPEAT (simple define)
|
||||||
|
|
||||||
Enables keyrepeat.
|
Enables keyrepeat.
|
||||||
|
|||||||
@@ -62,15 +62,17 @@ Valid driver values are `pwm`, `software`, `custom` or `no`. See below for help
|
|||||||
|
|
||||||
To configure the backlighting, `#define` these in your `config.h`:
|
To configure the backlighting, `#define` these in your `config.h`:
|
||||||
|
|
||||||
| Define | Default | Description |
|
|Define |Default |Description |
|
||||||
|------------------------|---------------|-------------------------------------------------------------------------------------------------------------------|
|
|-----------------------------|------------------|-----------------------------------------------------------------------------------------------------------------|
|
||||||
| `BACKLIGHT_PIN` | *Not defined* | The pin that controls the LED(s) |
|
|`BACKLIGHT_PIN` |*Not defined* |The pin that controls the LED(s) |
|
||||||
| `BACKLIGHT_LEVELS` | `3` | The number of brightness levels (maximum 31 excluding off) |
|
|`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_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 |
|
|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds |
|
||||||
| `BACKLIGHT_ON_STATE` | `1` | The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low |
|
|`BACKLIGHT_ON_STATE` |`1` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low |
|
||||||
| `BACKLIGHT_LIMIT_VAL ` | `255` | The maximum duty cycle of the backlight -- `255` allows for full brightness, any lower will decrease the maximum. |
|
|`BACKLIGHT_LIMIT_VAL` |`255` |The maximum duty cycle of the backlight -- `255` allows for full brightness, any lower will decrease the maximum.|
|
||||||
|
|`BACKLIGHT_DEFAULT_LEVEL` |`BACKLIGHT_LEVELS`|The default backlight level to use upon clearing the EEPROM |
|
||||||
|
|`BACKLIGHT_DEFAULT_BREATHING`|*Not defined* |Whether to enable backlight breathing upon clearing the EEPROM |
|
||||||
|
|
||||||
Unless you are designing your own keyboard, you generally should not need to change the `BACKLIGHT_PIN` or `BACKLIGHT_ON_STATE`.
|
Unless you are designing your own keyboard, you generally should not need to change the `BACKLIGHT_PIN` or `BACKLIGHT_ON_STATE`.
|
||||||
|
|
||||||
@@ -171,7 +173,7 @@ BACKLIGHT_DRIVER = software
|
|||||||
|
|
||||||
#### Multiple Backlight Pins :id=multiple-backlight-pins
|
#### Multiple Backlight Pins :id=multiple-backlight-pins
|
||||||
|
|
||||||
Most keyboards have only one backlight pin which control all backlight LEDs (especially if the backlight is connected to an hardware PWM pin).
|
Most keyboards have only one backlight pin which controls all backlight LEDs (especially if the backlight is connected to a hardware PWM pin).
|
||||||
In software PWM, it is possible to define multiple backlight pins, which will be turned on and off at the same time during the PWM duty cycle.
|
In software PWM, it is possible to define multiple backlight pins, which will be turned on and off at the same time during the PWM duty cycle.
|
||||||
|
|
||||||
This feature allows to set, for instance, the Caps Lock LED's (or any other controllable LED) brightness at the same level as the other LEDs of the backlight. This is useful if you have mapped Control in place of Caps Lock and you need the Caps Lock LED to be part of the backlight instead of being activated when Caps Lock is on, as it is usually wired to a separate pin from the backlight.
|
This feature allows to set, for instance, the Caps Lock LED's (or any other controllable LED) brightness at the same level as the other LEDs of the backlight. This is useful if you have mapped Control in place of Caps Lock and you need the Caps Lock LED to be part of the backlight instead of being activated when Caps Lock is on, as it is usually wired to a separate pin from the backlight.
|
||||||
|
|||||||
@@ -121,16 +121,16 @@ DEBOUNCE_TYPE = <name of algorithm>
|
|||||||
Where name of algorithm is one of:
|
Where name of algorithm is one of:
|
||||||
* ```sym_defer_g``` - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occurred, all input changes are pushed.
|
* ```sym_defer_g``` - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occurred, all input changes are pushed.
|
||||||
* This is the current default algorithm. This is the highest performance algorithm with lowest memory usage, and it's also noise-resistant.
|
* This is the current default algorithm. This is the highest performance algorithm with lowest memory usage, and it's also noise-resistant.
|
||||||
* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row.
|
* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row.
|
||||||
For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be
|
For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be
|
||||||
appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
|
appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
|
||||||
* ```sym_eager_pk``` - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key
|
* ```sym_eager_pk``` - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key
|
||||||
* ```sym_defer_pk``` - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key status change is pushed.
|
* ```sym_defer_pk``` - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key status change is pushed.
|
||||||
|
* ```asym_eager_defer_pk``` - debouncing per key. On a key-down state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key. On a key-up state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key-up status change is pushed.
|
||||||
|
|
||||||
### A couple algorithms that could be implemented in the future:
|
### A couple algorithms that could be implemented in the future:
|
||||||
* ```sym_defer_pr```
|
* ```sym_defer_pr```
|
||||||
* ```sym_eager_g```
|
* ```sym_eager_g```
|
||||||
* ```asym_eager_defer_pk```
|
|
||||||
|
|
||||||
### Use your own debouncing code
|
### Use your own debouncing code
|
||||||
You have the option to implement you own debouncing algorithm. To do this:
|
You have the option to implement you own debouncing algorithm. To do this:
|
||||||
|
|||||||
@@ -53,15 +53,15 @@ If you are using different pinouts for the encoders on each half of a split keyb
|
|||||||
The callback functions can be inserted into your `<keyboard>.c`:
|
The callback functions can be inserted into your `<keyboard>.c`:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
void encoder_update_kb(uint8_t index, bool clockwise) {
|
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||||
encoder_update_user(index, clockwise);
|
return encoder_update_user(index, clockwise);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
or `keymap.c`:
|
or `keymap.c`:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
if (index == 0) { /* First encoder */
|
if (index == 0) { /* First encoder */
|
||||||
if (clockwise) {
|
if (clockwise) {
|
||||||
tap_code(KC_PGDN);
|
tap_code(KC_PGDN);
|
||||||
@@ -75,9 +75,29 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
|||||||
tap_code(KC_UP);
|
tap_code(KC_UP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
!> If you return `true`, this will allow the keyboard level code to run, as well. Returning `false` will override the keyboard level code. Depending on how the keyboard level function is set up.
|
||||||
|
|
||||||
## Hardware
|
## 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.
|
The A an B lines of the encoders should be wired directly to the MCU, and the C/common lines should be wired to ground.
|
||||||
|
|
||||||
|
## Multiple Encoders
|
||||||
|
|
||||||
|
Multiple encoders may share pins so long as each encoder has a distinct pair of pins.
|
||||||
|
|
||||||
|
For example you can support two encoders using only 3 pins like this
|
||||||
|
```
|
||||||
|
#define ENCODERS_PAD_A { B1, B1 }
|
||||||
|
#define ENCODERS_PAD_B { B2, B3 }
|
||||||
|
```
|
||||||
|
|
||||||
|
You could even support three encoders using only three pins (one per encoder) however in this configuration, rotating two encoders which share pins simultaneously will often generate incorrect output. For example:
|
||||||
|
```
|
||||||
|
#define ENCODERS_PAD_A { B1, B1, B2 }
|
||||||
|
#define ENCODERS_PAD_B { B2, B3, B3 }
|
||||||
|
```
|
||||||
|
Here rotating Encoder 0 `B1 B2` and Encoder 1 `B1 B3` could be interpreted as rotating Encoder 2 `B2 B3` or `B3 B2` depending on the timing. This may still be a useful configuration depending on your use case
|
||||||
|
|||||||
@@ -162,4 +162,28 @@ This will set what sequence HPT_RST will set as the active mode. If not defined,
|
|||||||
|
|
||||||
### DRV2605L Continuous Haptic Mode
|
### DRV2605L Continuous Haptic Mode
|
||||||
|
|
||||||
This mode sets continuous haptic feedback with the option to increase or decrease strength.
|
This mode sets continuous haptic feedback with the option to increase or decrease strength.
|
||||||
|
|
||||||
|
## Haptic Key Exclusion
|
||||||
|
The Haptic Exclusion is implemented as `__attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t *record)` in haptic.c. This allows a re-definition at the required level with the specific requirement / exclusion.
|
||||||
|
|
||||||
|
### NO_HAPTIC_MOD
|
||||||
|
With the entry of `#define NO_HAPTIC_MOD` in config.h, modifiers from Left Control to Right GUI will not trigger a feedback. This also includes modifiers in a Mod Tap configuration.
|
||||||
|
|
||||||
|
### NO_HAPTIC_FN
|
||||||
|
With the entry of `#define NO_HAPTIC_FN` in config.h, layer keys will not rigger a feedback.
|
||||||
|
|
||||||
|
### NO_HAPTIC_ALPHA
|
||||||
|
With the entry of `#define NO_HAPTIC_ALPHA` in config.h, none of the alpha keys (A ... Z) will trigger a feedback.
|
||||||
|
|
||||||
|
### NO_HAPTIC_PUNCTUATION
|
||||||
|
With the entry of `#define NO_HAPTIC_PUNCTUATION` in config.h, none of the following keys will trigger a feedback: Enter, ESC, Backspace, Space, Minus, Equal, Left Bracket, Right Bracket, Backslash, Non-US Hash, Semicolon, Quote, Grave, Comma, Slash, Dot, Non-US Backslash.
|
||||||
|
|
||||||
|
### NO_HAPTIC_LOCKKEYS
|
||||||
|
With the entry of `#define NO_HAPTIC_LOCKKEYS` in config.h, none of the following keys will trigger a feedback: Caps Lock, Scroll Lock, Num Lock.
|
||||||
|
|
||||||
|
### NO_HAPTIC_NAV
|
||||||
|
With the entry of `#define NO_HAPTIC_NAV` in config.h, none of the following keys will trigger a feedback: Print Screen, Pause, Insert, Delete, Page Down, Page Up, Left Arrow, Up Arrow, Right Arrow, Down Arrow, End, Home.
|
||||||
|
|
||||||
|
### NO_HAPTIC_NUMERIC
|
||||||
|
With the entry of `#define NO_HAPTIC_NUMERIC` in config.h, none of the following keys between 0 and 9 (KC_1 ... KC_0) will trigger a feedback.
|
||||||
@@ -19,12 +19,10 @@ These functions allow you to activate layers in various ways. Note that layers a
|
|||||||
|
|
||||||
### Caveats :id=caveats
|
### Caveats :id=caveats
|
||||||
|
|
||||||
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Specifically, dual function keys like `LT` and `MT` use a 16 bit keycode. 4 bits are used for the function identifier, the next 12 are divided into the parameters. Layer Tap uses 4 bits for the layer (and is why it's limited to layers 0-15, actually), while Mod Tap does the same, 4 bits for the identifier, 4 bits for which mods are used, and all of them use 8 bits for the keycode. Because of this, the keycode used is limited to `0xFF` (0-255), which are the basic keycodes only.
|
Currently, the `layer` argument of `LT()` is limited to layers 0-15, and the `kc` argument to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. This is because QMK uses 16-bit keycodes, of which 4 bits are used for the function identifier and 4 bits for the layer, leaving only 8 bits for the keycode.
|
||||||
|
|
||||||
Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
||||||
|
|
||||||
Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two.
|
|
||||||
|
|
||||||
## Working with Layers :id=working-with-layers
|
## Working with Layers :id=working-with-layers
|
||||||
|
|
||||||
Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems.
|
Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems.
|
||||||
|
|||||||
@@ -72,6 +72,19 @@ SEQ_THREE_KEYS(KC_C, KC_C, KC_C) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Infinite Leader key timeout
|
||||||
|
|
||||||
|
Sometimes your leader key is not on a comfortable places as the rest of keys on your sequence. Imagine that your leader key is one of your outer top right keys, you may need to reposition your hand just to reach your leader key.
|
||||||
|
This can make typing the entire sequence on time hard even if you are able to type most of the sequence fast. For example, if your sequence is `Leader + asd` typing `asd` fast is very easy once you have your hands in your home row. However starting the sequence in time after moving your hand out of the home row to reach the leader key and back is not.
|
||||||
|
To remove the stress this situation produces to your hands you can enable an infinite timeout just for the leader key. This mean that, after you hit the leader key you will have an infinite amount of time to start the rest of the sequence, allowing you to proper position your hands on the best position to type the rest of the sequence comfortably.
|
||||||
|
This infinite timeout only affects the leader key, so in our previous example of `Leader + asd` you will have an infinite amount of time between `Leader` and `a`, but once you start the sequence the timeout you have configured (global or per key) will work normally.
|
||||||
|
This way you can configure a very short `LEADER_TIMEOUT` but still have plenty of time to position your hands.
|
||||||
|
|
||||||
|
In order to enable this, place this in your `config.h`:
|
||||||
|
```c
|
||||||
|
#define LEADER_NO_TIMEOUT
|
||||||
|
```
|
||||||
|
|
||||||
## Strict Key Processing
|
## Strict Key Processing
|
||||||
|
|
||||||
By default, the Leader Key feature will filter the keycode out of [`Mod-Tap`](mod_tap.md) and [`Layer Tap`](feature_layers.md#switching-and-toggling-layers) functions when checking for the Leader sequences. That means if you're using `LT(3, KC_A)`, it will pick this up as `KC_A` for the sequence, rather than `LT(3, KC_A)`, giving a more expected behavior for newer users.
|
By default, the Leader Key feature will filter the keycode out of [`Mod-Tap`](mod_tap.md) and [`Layer Tap`](feature_layers.md#switching-and-toggling-layers) functions when checking for the Leader sequences. That means if you're using `LT(3, KC_A)`, it will pick this up as `KC_A` for the sequence, rather than `LT(3, KC_A)`, giving a more expected behavior for newer users.
|
||||||
@@ -92,7 +105,7 @@ void leader_start(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void leader_end(void) {
|
void leader_end(void) {
|
||||||
// sequence ended (no success/failuer detection)
|
// sequence ended (no success/failure detection)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
# LED Matrix Lighting
|
# LED Matrix Lighting :id=led-matrix-lighting
|
||||||
|
|
||||||
This feature allows you to use LED matrices driven by external drivers. It hooks into the backlight system so you can use the same keycodes as backlighting to control it.
|
This feature allows you to use LED matrices driven by external drivers. It hooks into the backlight system so you can use the same keycodes as backlighting to control it.
|
||||||
|
|
||||||
If you want to use RGB LED's you should use the [RGB Matrix Subsystem](feature_rgb_matrix.md) instead.
|
If you want to use RGB LED's you should use the [RGB Matrix Subsystem](feature_rgb_matrix.md) instead.
|
||||||
|
|
||||||
## Driver configuration
|
## Driver configuration :id=driver-configuration
|
||||||
|
---
|
||||||
|
### IS31FL3731 :id=is31fl3731
|
||||||
|
|
||||||
### IS31FL3731
|
There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 LED controller. To enable it, add this to your `rules.mk`:
|
||||||
|
|
||||||
There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
|
|
||||||
|
|
||||||
```make
|
```make
|
||||||
LED_MATRIX_ENABLE = yes
|
LED_MATRIX_ENABLE = yes
|
||||||
@@ -19,7 +19,7 @@ You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>
|
|||||||
|
|
||||||
| Variable | Description | Default |
|
| Variable | Description | Default |
|
||||||
|----------|-------------|---------|
|
|----------|-------------|---------|
|
||||||
| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages | 100 |
|
| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
|
||||||
| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
|
| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
|
||||||
| `LED_DRIVER_COUNT` | (Required) How many LED driver IC's are present | |
|
| `LED_DRIVER_COUNT` | (Required) How many LED driver IC's are present | |
|
||||||
| `DRIVER_LED_TOTAL` | (Required) How many LED lights are present across all drivers | |
|
| `DRIVER_LED_TOTAL` | (Required) How many LED lights are present across all drivers | |
|
||||||
@@ -42,59 +42,338 @@ Here is an example using 2 drivers.
|
|||||||
#define LED_DRIVER_ADDR_2 0b1110110
|
#define LED_DRIVER_ADDR_2 0b1110110
|
||||||
|
|
||||||
#define LED_DRIVER_COUNT 2
|
#define LED_DRIVER_COUNT 2
|
||||||
#define LED_DRIVER_1_LED_COUNT 25
|
#define LED_DRIVER_1_LED_TOTAL 25
|
||||||
#define LED_DRIVER_2_LED_COUNT 24
|
#define LED_DRIVER_2_LED_TOTAL 24
|
||||||
#define DRIVER_LED_TOTAL LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL
|
#define DRIVER_LED_TOTAL (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)
|
||||||
```
|
```
|
||||||
|
|
||||||
Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
|
!> Note the parentheses, this is so when `LED_DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)` will give very different results than `rand() % LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL`.
|
||||||
|
|
||||||
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||||
/* Refer to IS31 manual for these locations
|
/* Refer to IS31 manual for these locations
|
||||||
* driver
|
* driver
|
||||||
* | LED address
|
* | LED address
|
||||||
* | | */
|
* | | */
|
||||||
{ 0, C1_1 },
|
{ 0, C1_1 },
|
||||||
{ 0, C1_15 },
|
{ 0, C1_15 },
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731-simple.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ).
|
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731-simple.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ).
|
||||||
|
|
||||||
## Keycodes
|
---
|
||||||
|
|
||||||
All LED matrix keycodes are currently shared with the [backlight system](feature_backlight.md).
|
## Common Configuration :id=common-configuration
|
||||||
|
|
||||||
## LED Matrix Effects
|
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
|
||||||
|
|
||||||
Currently no LED matrix effects have been created.
|
|
||||||
|
|
||||||
## Custom Layer Effects
|
|
||||||
|
|
||||||
Custom layer effects can be done by defining this in your `<keyboard>.c`:
|
|
||||||
|
|
||||||
|
```c
|
||||||
|
led_config_t g_led_config = { {
|
||||||
|
// Key Matrix to LED Index
|
||||||
|
{ 5, NO_LED, NO_LED, 0 },
|
||||||
|
{ NO_LED, NO_LED, NO_LED, NO_LED },
|
||||||
|
{ 4, NO_LED, NO_LED, 1 },
|
||||||
|
{ 3, NO_LED, NO_LED, 2 }
|
||||||
|
}, {
|
||||||
|
// LED Index to Physical Position
|
||||||
|
{ 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 }
|
||||||
|
}, {
|
||||||
|
// LED Index to Flag
|
||||||
|
1, 4, 4, 4, 4, 1
|
||||||
|
} };
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
As mentioned earlier, the center of the keyboard by default is expected to be `{ 112, 32 }`, but this can be changed if you want to more accurately calculate the LED's physical `{ x, y }` positions. Keyboard designers can implement `#define LED_MATRIX_CENTER { 112, 32 }` in their config.h file with the new center point of the keyboard, or where they want it to be allowing more possibilities for the `{ x, y }` values. Do note that the maximum value for x or y is 255, and the recommended maximum is 224 as this gives animations runoff room before they reset.
|
||||||
|
|
||||||
|
`// 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.
|
||||||
|
|
||||||
|
## Flags :id=flags
|
||||||
|
|
||||||
|
|Define |Value |Description |
|
||||||
|
|----------------------------|------|-------------------------------------------------|
|
||||||
|
|`HAS_FLAGS(bits, flags)` |*n/a* |Evaluates to `true` if `bits` has all `flags` set|
|
||||||
|
|`HAS_ANY_FLAGS(bits, flags)`|*n/a* |Evaluates to `true` if `bits` has any `flags` set|
|
||||||
|
|`LED_FLAG_NONE` |`0x00`|If this LED has no flags |
|
||||||
|
|`LED_FLAG_ALL` |`0xFF`|If this LED has all flags |
|
||||||
|
|`LED_FLAG_MODIFIER` |`0x01`|If the LED is on a modifier key |
|
||||||
|
|`LED_FLAG_KEYLIGHT` |`0x04`|If the LED is for key backlight |
|
||||||
|
|`LED_FLAG_INDICATOR` |`0x08`|If the LED is for keyboard state indication |
|
||||||
|
|
||||||
|
## Keycodes :id=keycodes
|
||||||
|
|
||||||
|
All LED matrix keycodes are currently shared with the [Backlight feature](feature_backlight.md).
|
||||||
|
|
||||||
|
|Key |Description |
|
||||||
|
|---------|-----------------------------|
|
||||||
|
|`BL_TOGG`|Toggle LED Matrix on or off |
|
||||||
|
|`BL_STEP`|Cycle through modes |
|
||||||
|
|`BL_ON` |Turn on LED Matrix |
|
||||||
|
|`BL_OFF` |Turn off LED Matrix |
|
||||||
|
|`BL_INC` |Increase the brightness level|
|
||||||
|
|`BL_DEC` |Decrease the brightness level|
|
||||||
|
|
||||||
|
## LED Matrix Effects :id=led-matrix-effects
|
||||||
|
|
||||||
|
These are the effects that are currently available:
|
||||||
|
|
||||||
|
```c
|
||||||
|
enum led_matrix_effects {
|
||||||
|
LED_MATRIX_NONE = 0,
|
||||||
|
LED_MATRIX_SOLID = 1, // Static single val, no speed support
|
||||||
|
LED_MATRIX_ALPHAS_MODS, // Static dual val, speed is val for LEDs marked as modifiers
|
||||||
|
LED_MATRIX_BREATHING, // Cycling brightness animation
|
||||||
|
LED_MATRIX_BAND, // Band fading brightness scrolling left to right
|
||||||
|
LED_MATRIX_BAND_PINWHEEL, // 3 blade spinning pinwheel fades brightness
|
||||||
|
LED_MATRIX_BAND_SPIRAL, // Spinning spiral fades brightness
|
||||||
|
LED_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right
|
||||||
|
LED_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom
|
||||||
|
LED_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in
|
||||||
|
LED_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
|
||||||
|
#if defined(LED_MATRIX_KEYPRESSES) || defined(LED_MATRIX_KEYRELEASES)
|
||||||
|
LED_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit then fades out
|
||||||
|
LED_MATRIX_SOLID_REACTIVE_WIDE // Value pulses near a single key hit then fades out
|
||||||
|
LED_MATRIX_SOLID_REACTIVE_MULTIWIDE // Value pulses near multiple key hits then fades out
|
||||||
|
LED_MATRIX_SOLID_REACTIVE_CROSS // Value pulses the same column and row of a single key hit then fades out
|
||||||
|
LED_MATRIX_SOLID_REACTIVE_MULTICROSS // Value pulses the same column and row of multiple key hits then fades out
|
||||||
|
LED_MATRIX_SOLID_REACTIVE_NEXUS // Value pulses away on the same column and row of a single key hit then fades out
|
||||||
|
LED_MATRIX_SOLID_REACTIVE_MULTINEXUS // Value pulses away on the same column and row of multiple key hits then fades out
|
||||||
|
LED_MATRIX_SOLID_SPLASH, // Value pulses away from a single key hit then fades out
|
||||||
|
LED_MATRIX_SOLID_MULTISPLASH, // Value pulses away from multiple key hits then fades out
|
||||||
|
#endif
|
||||||
|
LED_MATRIX_WAVE_LEFT_RIGHT // Sine wave scrolling from left to right
|
||||||
|
LED_MATRIX_WAVE_UP_DOWN // Sine wave scrolling from up to down
|
||||||
|
LED_MATRIX_EFFECT_MAX
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`:
|
||||||
|
|
||||||
|
|
||||||
|
|Define |Description |
|
||||||
|
|-------------------------------------------------------|-----------------------------------------------|
|
||||||
|
|`#define DISABLE_LED_MATRIX_ALPHAS_MODS` |Disables `LED_MATRIX_ALPHAS_MODS` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_BREATHING` |Disables `LED_MATRIX_BREATHING` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_BAND` |Disables `LED_MATRIX_BAND` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_BAND_PINWHEEL` |Disables `LED_MATRIX_BAND_PINWHEEL` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_BAND_SPIRAL` |Disables `LED_MATRIX_BAND_SPIRAL` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT` |Disables `LED_MATRIX_CYCLE_LEFT_RIGHT` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_CYCLE_UP_DOWN` |Disables `LED_MATRIX_CYCLE_UP_DOWN` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_CYCLE_OUT_IN` |Disables `LED_MATRIX_CYCLE_OUT_IN` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_DUAL_BEACON` |Disables `LED_MATRIX_DUAL_BEACON` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `LED_MATRIX_SOLID_REACTIVE_SIMPLE` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE` |Disables `LED_MATRIX_SOLID_REACTIVE_WIDE` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS` |Disables `LED_MATRIX_SOLID_REACTIVE_CROSS` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTICROSS`|
|
||||||
|
|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS` |Disables `LED_MATRIX_SOLID_REACTIVE_NEXUS` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTINEXUS`|
|
||||||
|
|`#define DISABLE_LED_MATRIX_SOLID_SPLASH` |Disables `LED_MATRIX_SOLID_SPLASH` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_SOLID_MULTISPLASH` |Disables `LED_MATRIX_SOLID_MULTISPLASH` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT` |Disables `LED_MATRIX_WAVE_LEFT_RIGHT` |
|
||||||
|
|`#define DISABLE_LED_MATRIX_WAVE_UP_DOWN` |Disables `LED_MATRIX_WAVE_UP_DOWN` |
|
||||||
|
|
||||||
|
## Custom LED Matrix Effects :id=custom-led-matrix-effects
|
||||||
|
|
||||||
|
By setting `LED_MATRIX_CUSTOM_USER` (and/or `LED_MATRIX_CUSTOM_KB`) in `rules.mk`, new effects can be defined directly from userspace, without having to edit any QMK core files.
|
||||||
|
|
||||||
|
To declare new effects, create a new `led_matrix_user/kb.inc` that looks something like this:
|
||||||
|
|
||||||
|
`led_matrix_user.inc` should go in the root of the keymap directory.
|
||||||
|
`led_matrix_kb.inc` should go in the root of the keyboard directory.
|
||||||
|
|
||||||
|
To use custom effects in your code, simply prepend `LED_MATRIX_CUSTOM_` to the effect name specified in `LED_MATRIX_EFFECT()`. For example, an effect declared as `LED_MATRIX_EFFECT(my_cool_effect)` would be referenced with:
|
||||||
|
|
||||||
|
```c
|
||||||
|
led_matrix_mode(led_MATRIX_CUSTOM_my_cool_effect);
|
||||||
|
```
|
||||||
|
|
||||||
|
```c
|
||||||
|
// !!! DO NOT ADD #pragma once !!! //
|
||||||
|
|
||||||
|
// Step 1.
|
||||||
|
// Declare custom effects using the LED_MATRIX_EFFECT macro
|
||||||
|
// (note the lack of semicolon after the macro!)
|
||||||
|
LED_MATRIX_EFFECT(my_cool_effect)
|
||||||
|
LED_MATRIX_EFFECT(my_cool_effect2)
|
||||||
|
|
||||||
|
// Step 2.
|
||||||
|
// Define effects inside the `LED_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block
|
||||||
|
#ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
|
||||||
|
|
||||||
|
// e.g: A simple effect, self-contained within a single method
|
||||||
|
static bool my_cool_effect(effect_params_t* params) {
|
||||||
|
LED_MATRIX_USE_LIMITS(led_min, led_max);
|
||||||
|
for (uint8_t i = led_min; i < led_max; i++) {
|
||||||
|
led_matrix_set_value(i, 0xFF);
|
||||||
|
}
|
||||||
|
return led_max < DRIVER_LED_TOTAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// e.g: A more complex effect, relying on external methods and state, with
|
||||||
|
// dedicated init and run methods
|
||||||
|
static uint8_t some_global_state;
|
||||||
|
static void my_cool_effect2_complex_init(effect_params_t* params) {
|
||||||
|
some_global_state = 1;
|
||||||
|
}
|
||||||
|
static bool my_cool_effect2_complex_run(effect_params_t* params) {
|
||||||
|
LED_MATRIX_USE_LIMITS(led_min, led_max);
|
||||||
|
for (uint8_t i = led_min; i < led_max; i++) {
|
||||||
|
led_matrix_set_value(i, some_global_state++);
|
||||||
|
}
|
||||||
|
|
||||||
|
return led_max < DRIVER_LED_TOTAL;
|
||||||
|
}
|
||||||
|
static bool my_cool_effect2(effect_params_t* params) {
|
||||||
|
if (params->init) my_cool_effect2_complex_init(params);
|
||||||
|
return my_cool_effect2_complex_run(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
|
||||||
|
```
|
||||||
|
|
||||||
|
For inspiration and examples, check out the built-in effects under `quantum/led_matrix_animations/`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Additional `config.h` Options :id=additional-configh-options
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define LED_MATRIX_KEYPRESSES // reacts to keypresses
|
||||||
|
#define LED_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
||||||
|
#define LED_MATRIX_FRAMEBUFFER_EFFECTS // enable framebuffer effects
|
||||||
|
#define LED_DISABLE_TIMEOUT 0 // number of milliseconds to wait until led automatically turns off
|
||||||
|
#define LED_DISABLE_AFTER_TIMEOUT 0 // OBSOLETE: number of ticks to wait until disabling effects
|
||||||
|
#define LED_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
|
||||||
|
#define LED_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
|
||||||
|
#define LED_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
||||||
|
#define LED_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs
|
||||||
|
#define LED_MATRIX_STARTUP_MODE LED_MATRIX_SOLID // Sets the default mode, if none has been set
|
||||||
|
#define LED_MATRIX_STARTUP_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
|
||||||
|
#define LED_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
|
||||||
|
#define LED_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
|
||||||
|
// If LED_MATRIX_KEYPRESSES or LED_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
|
||||||
|
```
|
||||||
|
|
||||||
|
## EEPROM storage :id=eeprom-storage
|
||||||
|
|
||||||
|
The EEPROM for it is currently shared with the RGB Matrix system (it's generally assumed only one feature would be used at a time), but could be configured to use its own 32bit address with:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define EECONFIG_LED_MATRIX (uint32_t *)28
|
||||||
|
```
|
||||||
|
|
||||||
|
Where `28` is an unused index from `eeconfig.h`.
|
||||||
|
|
||||||
|
### Direct Operation :id=direct-operation
|
||||||
|
|Function |Description |
|
||||||
|
|--------------------------------------------|-------------|
|
||||||
|
|`led_matrix_set_value_all(v)` |Set all of the LEDs to the given value, where `v` is between 0 and 255 (not written to EEPROM) |
|
||||||
|
|`led_matrix_set_value(index, v)` |Set a single LED to the given value, where `v` is between 0 and 255, and `index` is between 0 and `DRIVER_LED_TOTAL` (not written to EEPROM) |
|
||||||
|
|
||||||
|
### Disable/Enable Effects :id=disable-enable-effects
|
||||||
|
|Function |Description |
|
||||||
|
|--------------------------------------------|-------------|
|
||||||
|
|`led_matrix_toggle()` |Toggle effect range LEDs between on and off |
|
||||||
|
|`led_matrix_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) |
|
||||||
|
|`led_matrix_enable()` |Turn effect range LEDs on, based on their previous state |
|
||||||
|
|`led_matrix_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) |
|
||||||
|
|`led_matrix_disable()` |Turn effect range LEDs off, based on their previous state |
|
||||||
|
|`led_matrix_disable_noeeprom()` |Turn effect range LEDs off, based on their previous state (not written to EEPROM) |
|
||||||
|
|
||||||
|
### Change Effect Mode :id=change-effect-mode
|
||||||
|
|Function |Description |
|
||||||
|
|--------------------------------------------|-------------|
|
||||||
|
|`led_matrix_mode(mode)` |Set the mode, if LED animations are enabled |
|
||||||
|
|`led_matrix_mode_noeeprom(mode)` |Set the mode, if LED animations are enabled (not written to EEPROM) |
|
||||||
|
|`led_matrix_step()` |Change the mode to the next LED animation in the list of enabled LED animations |
|
||||||
|
|`led_matrix_step_noeeprom()` |Change the mode to the next LED animation in the list of enabled LED animations (not written to EEPROM) |
|
||||||
|
|`led_matrix_step_reverse()` |Change the mode to the previous LED animation in the list of enabled LED animations |
|
||||||
|
|`led_matrix_step_reverse_noeeprom()` |Change the mode to the previous LED animation in the list of enabled LED animations (not written to EEPROM) |
|
||||||
|
|`led_matrix_increase_speed()` |Increase the speed of the animations |
|
||||||
|
|`led_matrix_increase_speed_noeeprom()` |Increase the speed of the animations (not written to EEPROM) |
|
||||||
|
|`led_matrix_decrease_speed()` |Decrease the speed of the animations |
|
||||||
|
|`led_matrix_decrease_speed_noeeprom()` |Decrease the speed of the animations (not written to EEPROM) |
|
||||||
|
|`led_matrix_set_speed(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 |
|
||||||
|
|`led_matrix_set_speed_noeeprom(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 (not written to EEPROM) |
|
||||||
|
|
||||||
|
### Change Value :id=change-value
|
||||||
|
|Function |Description |
|
||||||
|
|--------------------------------------------|-------------|
|
||||||
|
|`led_matrix_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value |
|
||||||
|
|`led_matrix_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) |
|
||||||
|
|`led_matrix_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value |
|
||||||
|
|`led_matrix_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) |
|
||||||
|
|
||||||
|
### Query Current Status :id=query-current-status
|
||||||
|
|Function |Description |
|
||||||
|
|---------------------------------|---------------------------|
|
||||||
|
|`led_matrix_is_enabled()` |Gets current on/off status |
|
||||||
|
|`led_matrix_get_mode()` |Gets current mode |
|
||||||
|
|`led_matrix_get_val()` |Gets current val |
|
||||||
|
|`led_matrix_get_speed()` |Gets current speed |
|
||||||
|
|`led_matrix_get_suspend_state()` |Gets current suspend state |
|
||||||
|
|
||||||
|
## Callbacks :id=callbacks
|
||||||
|
|
||||||
|
### Indicators :id=indicators
|
||||||
|
|
||||||
|
If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `led_matrix_indicators_kb` or `led_matrix_indicators_user` function for that:
|
||||||
```c
|
```c
|
||||||
void led_matrix_indicators_kb(void) {
|
void led_matrix_indicators_kb(void) {
|
||||||
led_matrix_set_index_value(index, value);
|
led_matrix_set_color(index, value);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
A similar function works in the keymap as `led_matrix_indicators_user`.
|
In addition, there are the advanced indicator functions. These are aimed at those with heavily customized displays, where rendering every LED per cycle is expensive. This includes a special macro to help make this easier to use: `LED_MATRIX_INDICATOR_SET_VALUE(i, v)`.
|
||||||
|
|
||||||
## Suspended State
|
```c
|
||||||
|
void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
||||||
|
LED_MATRIX_INDICATOR_SET_VALUE(index, value);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
To use the suspend feature, add this to your `<keyboard>.c`:
|
## Suspended State :id=suspended-state
|
||||||
|
To use the suspend feature, make sure that `#define LED_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file.
|
||||||
|
|
||||||
|
Additionally add this to your `<keyboard>.c`:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
void suspend_power_down_kb(void) {
|
void suspend_power_down_kb(void) {
|
||||||
led_matrix_set_suspend_state(true);
|
led_matrix_set_suspend_state(true);
|
||||||
|
suspend_power_down_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
void suspend_wakeup_init_kb(void) {
|
void suspend_wakeup_init_kb(void) {
|
||||||
led_matrix_set_suspend_state(false);
|
led_matrix_set_suspend_state(false);
|
||||||
|
suspend_wakeup_init_user();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
or add this to your `keymap.c`:
|
||||||
|
```c
|
||||||
|
void suspend_power_down_user(void) {
|
||||||
|
led_matrix_set_suspend_state(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void suspend_wakeup_init_user(void) {
|
||||||
|
led_matrix_set_suspend_state(false);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ SEND_STRING(".."SS_TAP(X_END));
|
|||||||
|
|
||||||
There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro, if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple.
|
There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro, if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple.
|
||||||
|
|
||||||
?> You can also use the functions described in [Useful functions](ref_functions.md) for additional functionality. For example `reset_keyboard()` allows you to reset the keyboard as part of a macro.
|
?> You can also use the functions described in [Useful function](ref_functions.md) and [Checking modifier state](feature_advanced_keycodes#checking-modifier-state) for additional functionality. For example, `reset_keyboard()` allows you to reset the keyboard as part of a macro and `get_mods() & MOD_MASK_SHIFT` lets you check for the existence of active shift modifiers.
|
||||||
|
|
||||||
### `record->event.pressed`
|
### `record->event.pressed`
|
||||||
|
|
||||||
|
|||||||
260
docs/feature_midi.md
Normal file
260
docs/feature_midi.md
Normal file
@@ -0,0 +1,260 @@
|
|||||||
|
# MIDI
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
First, enable MIDI by adding the following to your `rules.mk`:
|
||||||
|
|
||||||
|
```makefile
|
||||||
|
MIDI_ENABLE = yes
|
||||||
|
```
|
||||||
|
|
||||||
|
There are two MIDI systems in QMK: basic and advanced. With basic MIDI you will only be able to send Note On and Note Off messages using the note keycodes, meaning that keycodes like `MI_OCTU` and `MI_OCTD` will not work. Advanced MIDI allows you to do things like octave shifts, channel changes, velocity changes, modulation, and more.
|
||||||
|
|
||||||
|
### Basic MIDI
|
||||||
|
|
||||||
|
To enable basic MIDI, add the following to your `config.h`:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define MIDI_BASIC
|
||||||
|
```
|
||||||
|
|
||||||
|
### Advanced MIDI
|
||||||
|
|
||||||
|
To enable advanced MIDI, add the following to your `config.h`:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define MIDI_ADVANCED
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Sending Control Change (CC) Messages
|
||||||
|
|
||||||
|
If you're aiming to emulate the features of something like a Launchpad or other MIDI controller you'll need to access the internal MIDI device directly.
|
||||||
|
|
||||||
|
Because there are so many possible CC messages, not all of them are implemented as keycodes. Additionally, you might need to provide more than just two values that you would get from a keycode (pressed and released) - for example, the analog values from a fader or a potentiometer. So, you will need to implement [custom keycodes](feature_macros.md) if you want to use them in your keymap directly using `process_record_user()`.
|
||||||
|
|
||||||
|
|
||||||
|
For reference of all the possible control code numbers see [MIDI Specification](#midi-specification)
|
||||||
|
|
||||||
|
#### Example code for using Generic On Off Switches as per MIDI Specification.
|
||||||
|
```c
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
extern MidiDevice midi_device;
|
||||||
|
|
||||||
|
// MIDI CC codes for generic on/off switches (80, 81, 82, 83)
|
||||||
|
// Off: 0-63
|
||||||
|
// On: 64-127
|
||||||
|
|
||||||
|
#define MIDI_CC_OFF 0
|
||||||
|
#define MIDI_CC_ON 127
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
MIDI_CC80 = SAFE_RANGE,
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case MIDI_CC80:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
midi_send_cc(&midi_device, midi_config.channel, 80, ON);
|
||||||
|
} else {
|
||||||
|
midi_send_cc(&midi_device, midi_config.channel, 80, OFF);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
LAYOUT(
|
||||||
|
// ...
|
||||||
|
MIDI_CC80,
|
||||||
|
// ...
|
||||||
|
)
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### Keycodes
|
||||||
|
|
||||||
|
|Keycode |Aliases |Description |
|
||||||
|
|------------|---------|---------------------------------|
|
||||||
|
|`MI_ON` | |Turn MIDI on |
|
||||||
|
|`MI_OFF` | |Turn MIDI off |
|
||||||
|
|`MI_TOG` | |Toggle MIDI enabled |
|
||||||
|
|`MI_C` | |C octave 0 |
|
||||||
|
|`MI_Cs` |`MI_Db` |C♯/D♭ octave 0 |
|
||||||
|
|`MI_D` | |D octave 0 |
|
||||||
|
|`MI_Ds` |`MI_Eb` |D♯/E♭ octave 0 |
|
||||||
|
|`MI_E` | |E octave 0 |
|
||||||
|
|`MI_F` | |F octave 0 |
|
||||||
|
|`MI_Fs` |`MI_Gb` |F♯/G♭ octave 0 |
|
||||||
|
|`MI_G` | |G octave 0 |
|
||||||
|
|`MI_Gs` |`MI_Gs` |G♯/A♭ octave 0 |
|
||||||
|
|`MI_A` | |A octave 0 |
|
||||||
|
|`MI_As` |`MI_Bb` |A♯/B♭ octave 0 |
|
||||||
|
|`MI_B` | |B octave 0 |
|
||||||
|
|`MI_C_1` | |C octave 1 |
|
||||||
|
|`MI_Cs_1` |`MI_Db_1`|C♯/D♭ octave 1 |
|
||||||
|
|`MI_D_1` | |D octave 1 |
|
||||||
|
|`MI_Ds_1` |`MI_Eb_1`|D♯/E♭ octave 1 |
|
||||||
|
|`MI_E_1` | |E octave 1 |
|
||||||
|
|`MI_F_1` | |F octave 1 |
|
||||||
|
|`MI_Fs_1` |`MI_Gb_1`|F♯/G♭ octave 1 |
|
||||||
|
|`MI_G_1` | |G octave 1 |
|
||||||
|
|`MI_Gs_1` |`MI_Ab_1`|G♯/A♭ octave 1 |
|
||||||
|
|`MI_A_1` | |A octave 1 |
|
||||||
|
|`MI_As_1` |`MI_Bb_1`|A♯/B♭ octave 1 |
|
||||||
|
|`MI_B_1` | |B octave 1 |
|
||||||
|
|`MI_C_2` | |C octave 2 |
|
||||||
|
|`MI_Cs_2` |`MI_Db_2`|C♯/D♭ octave 2 |
|
||||||
|
|`MI_D_2` | |D octave 2 |
|
||||||
|
|`MI_Ds_2` |`MI_Eb_2`|D♯/E♭ octave 2 |
|
||||||
|
|`MI_E_2` | |E octave 2 |
|
||||||
|
|`MI_F_2` | |F octave 2 |
|
||||||
|
|`MI_Fs_2` |`MI_Gb_2`|F♯/G♭ octave 2 |
|
||||||
|
|`MI_G_2` | |G octave 2 |
|
||||||
|
|`MI_Gs_2` |`MI_Ab_2`|G♯/A♭ octave 2 |
|
||||||
|
|`MI_A_2` | |A octave 2 |
|
||||||
|
|`MI_As_2` |`MI_Bb_2`|A♯/B♭ octave 2 |
|
||||||
|
|`MI_B_2` | |B octave 2 |
|
||||||
|
|`MI_C_3` | |C octave 3 |
|
||||||
|
|`MI_Cs_3` |`MI_Db_3`|C♯/D♭ octave 3 |
|
||||||
|
|`MI_D_3` | |D octave 3 |
|
||||||
|
|`MI_Ds_3` |`MI_Eb_3`|D♯/E♭ octave 3 |
|
||||||
|
|`MI_E_3` | |E octave 3 |
|
||||||
|
|`MI_F_3` | |F octave 3 |
|
||||||
|
|`MI_Fs_3` |`MI_Gb_3`|F♯/G♭ octave 3 |
|
||||||
|
|`MI_G_3` | |G octave 3 |
|
||||||
|
|`MI_Gs_3` |`MI_Ab_3`|G♯/A♭ octave 3 |
|
||||||
|
|`MI_A_3` | |A octave 3 |
|
||||||
|
|`MI_As_3` |`MI_Bb_3`|A♯/B♭ octave 3 |
|
||||||
|
|`MI_B_3` | |B octave 3 |
|
||||||
|
|`MI_C_4` | |C octave 4 |
|
||||||
|
|`MI_Cs_4` |`MI_Db_4`|C♯/D♭ octave 4 |
|
||||||
|
|`MI_D_4` | |D octave 4 |
|
||||||
|
|`MI_Ds_4` |`MI_Eb_4`|D♯/E♭ octave 4 |
|
||||||
|
|`MI_E_4` | |E octave 4 |
|
||||||
|
|`MI_F_4` | |F octave 4 |
|
||||||
|
|`MI_Fs_4` |`MI_Gb_4`|F♯/G♭ octave 4 |
|
||||||
|
|`MI_G_4` | |G octave 4 |
|
||||||
|
|`MI_Gs_4` |`MI_Ab_4`|G♯/A♭ octave 4 |
|
||||||
|
|`MI_A_4` | |A octave 4 |
|
||||||
|
|`MI_As_4` |`MI_Bb_4`|A♯/B♭ octave 4 |
|
||||||
|
|`MI_B_4` | |B octave 4 |
|
||||||
|
|`MI_C_5` | |C octave 5 |
|
||||||
|
|`MI_Cs_5` |`MI_Db_5`|C♯/D♭ octave 5 |
|
||||||
|
|`MI_D_5` | |D octave 5 |
|
||||||
|
|`MI_Ds_5` |`MI_Eb_5`|D♯/E♭ octave 5 |
|
||||||
|
|`MI_E_5` | |E octave 5 |
|
||||||
|
|`MI_F_5` | |F octave 5 |
|
||||||
|
|`MI_Fs_5` |`MI_Gb_5`|F♯/G♭ octave 5 |
|
||||||
|
|`MI_G_5` | |G octave 5 |
|
||||||
|
|`MI_Gs_5` |`MI_Ab_5`|G♯/A♭ octave 5 |
|
||||||
|
|`MI_A_5` | |A octave 5 |
|
||||||
|
|`MI_As_5` |`MI_Bb_5`|A♯/B♭ octave 5 |
|
||||||
|
|`MI_B_5` | |B octave 5 |
|
||||||
|
|`MI_OCT_N2` | |Set octave to -2 |
|
||||||
|
|`MI_OCT_N1` | |Set octave to -1 |
|
||||||
|
|`MI_OCT_0` | |Set octave to 0 |
|
||||||
|
|`MI_OCT_1` | |Set octave to 1 |
|
||||||
|
|`MI_OCT_2` | |Set octave to 2 |
|
||||||
|
|`MI_OCT_3` | |Set octave to 3 |
|
||||||
|
|`MI_OCT_4` | |Set octave to 4 |
|
||||||
|
|`MI_OCT_5` | |Set octave to 5 |
|
||||||
|
|`MI_OCT_6` | |Set octave to 6 |
|
||||||
|
|`MI_OCT_7` | |Set octave to 7 |
|
||||||
|
|`MI_OCTD` | |Move down an octave |
|
||||||
|
|`MI_OCTU` | |Move up an octave |
|
||||||
|
|`MI_TRNS_N6`| |Set transposition to -6 semitones|
|
||||||
|
|`MI_TRNS_N5`| |Set transposition to -5 semitones|
|
||||||
|
|`MI_TRNS_N4`| |Set transposition to -4 semitones|
|
||||||
|
|`MI_TRNS_N3`| |Set transposition to -3 semitones|
|
||||||
|
|`MI_TRNS_N2`| |Set transposition to -2 semitones|
|
||||||
|
|`MI_TRNS_N1`| |Set transposition to -1 semitone |
|
||||||
|
|`MI_TRNS_0` | |No transposition |
|
||||||
|
|`MI_TRNS_1` | |Set transposition to +1 semitone |
|
||||||
|
|`MI_TRNS_2` | |Set transposition to +2 semitones|
|
||||||
|
|`MI_TRNS_3` | |Set transposition to +3 semitones|
|
||||||
|
|`MI_TRNS_4` | |Set transposition to +4 semitones|
|
||||||
|
|`MI_TRNS_5` | |Set transposition to +5 semitones|
|
||||||
|
|`MI_TRNS_6` | |Set transposition to +6 semitones|
|
||||||
|
|`MI_TRNSD` | |Decrease transposition |
|
||||||
|
|`MI_TRNSU` | |Increase transposition |
|
||||||
|
|`MI_VEL_0` | |Set velocity to 0 |
|
||||||
|
|`MI_VEL_1` | |Set velocity to 12 |
|
||||||
|
|`MI_VEL_2` | |Set velocity to 25 |
|
||||||
|
|`MI_VEL_3` | |Set velocity to 38 |
|
||||||
|
|`MI_VEL_4` | |Set velocity to 51 |
|
||||||
|
|`MI_VEL_5` | |Set velocity to 64 |
|
||||||
|
|`MI_VEL_6` | |Set velocity to 76 |
|
||||||
|
|`MI_VEL_7` | |Set velocity to 89 |
|
||||||
|
|`MI_VEL_8` | |Set velocity to 102 |
|
||||||
|
|`MI_VEL_9` | |Set velocity to 114 |
|
||||||
|
|`MI_VEL_10` | |Set velocity to 127 |
|
||||||
|
|`MI_VELD` | |Decrease velocity |
|
||||||
|
|`MI_VELU` | |Increase velocity |
|
||||||
|
|`MI_CH1` | |Set channel to 1 |
|
||||||
|
|`MI_CH2` | |Set channel to 2 |
|
||||||
|
|`MI_CH3` | |Set channel to 3 |
|
||||||
|
|`MI_CH4` | |Set channel to 4 |
|
||||||
|
|`MI_CH5` | |Set channel to 5 |
|
||||||
|
|`MI_CH6` | |Set channel to 6 |
|
||||||
|
|`MI_CH7` | |Set channel to 7 |
|
||||||
|
|`MI_CH8` | |Set channel to 8 |
|
||||||
|
|`MI_CH9` | |Set channel to 9 |
|
||||||
|
|`MI_CH10` | |Set channel to 10 |
|
||||||
|
|`MI_CH11` | |Set channel to 11 |
|
||||||
|
|`MI_CH12` | |Set channel to 12 |
|
||||||
|
|`MI_CH13` | |Set channel to 13 |
|
||||||
|
|`MI_CH14` | |Set channel to 14 |
|
||||||
|
|`MI_CH15` | |Set channel to 15 |
|
||||||
|
|`MI_CH16` | |Set channel to 16 |
|
||||||
|
|`MI_CHD` | |Decrease channel |
|
||||||
|
|`MI_CHU` | |Increase channel |
|
||||||
|
|`MI_ALLOFF` | |Stop all notes |
|
||||||
|
|`MI_SUS` | |Sustain |
|
||||||
|
|`MI_PORT` | |Portmento |
|
||||||
|
|`MI_SOST` | |Sostenuto |
|
||||||
|
|`MI_SOFT` | |Soft Pedal |
|
||||||
|
|`MI_LEG` | |Legato |
|
||||||
|
|`MI_MOD` | |Modulation |
|
||||||
|
|`MI_MODSD` | |Decrease modulation speed |
|
||||||
|
|`MI_MODSU` | |Increase modulation speed |
|
||||||
|
|`MI_BENDD` | |Bend pitch down |
|
||||||
|
|`MI_BENDU` | |Bend pitch up |
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
Certain values are stored in the `midi_config` struct. This configuration is not persisted to EEPROM. By default, these values are:
|
||||||
|
|
||||||
|
|Configuration |Value|Comments |
|
||||||
|
|-------------------|-----|-------------------------|
|
||||||
|
|Octave |`4` |Corresponds to `MI_OCT_2`|
|
||||||
|
|Transposition |`0` | |
|
||||||
|
|Velocity |`127`| |
|
||||||
|
|Channel |`0` | |
|
||||||
|
|Modulation Interval|`8` | |
|
||||||
|
|
||||||
|
For the above, the `MI_C` keycode will produce a C3 (note number 48), and so on.
|
||||||
|
|
||||||
|
### References
|
||||||
|
#### MIDI Specification
|
||||||
|
|
||||||
|
* [MIDI.org](https://www.midi.org/specifications-old/item/table-1-summary-of-midi-message)
|
||||||
|
* [CMU MIDI Programmer's Reference](https://www.cs.cmu.edu/~music/cmsip/readings/MIDI%20tutorial%20for%20programmers.html)
|
||||||
|
#### QMK C Files
|
||||||
|
|
||||||
|
* `quantum/process_keycode/process_midi.c`
|
||||||
|
* `quantum/quantum_keycodes.h`
|
||||||
|
* `tmk_core/protocol/midi.h`
|
||||||
|
* `tmk_core/protocol/midi.c`
|
||||||
|
* `tmk_core/protocol/qmk_midi.c`
|
||||||
|
* `tmk_core/protocol/midi_device.h`
|
||||||
|
|
||||||
|
<!--
|
||||||
|
#### QMK Internals (Autogenerated)
|
||||||
|
|
||||||
|
* [Internals/MIDI Device Setup Process](internals_midi_device_setup_process.md)
|
||||||
|
* [Internals/MIDI Device](internals_midi_device.md)
|
||||||
|
* [Internals/MIDI Util](internals_midi_util.md)
|
||||||
|
-->
|
||||||
@@ -145,6 +145,8 @@ void oled_task_user(void) {
|
|||||||
|`OLED_FONT_WIDTH` |`6` |The font width |
|
|`OLED_FONT_WIDTH` |`6` |The font width |
|
||||||
|`OLED_FONT_HEIGHT` |`8` |The font height (untested) |
|
|`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_TIMEOUT` |`60000` |Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
|
||||||
|
|`OLED_FADE_OUT` |*Not defined* |Enables fade out animation. Use together with `OLED_TIMEOUT`. |
|
||||||
|
|`OLED_FADE_OUT_INTERVAL` |`0` |The speed of fade out animation, from 0 to 15. Larger values are slower. |
|
||||||
|`OLED_SCROLL_TIMEOUT` |`0` |Scrolls the OLED screen after 0ms of OLED inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
|
|`OLED_SCROLL_TIMEOUT` |`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_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_IC` |`OLED_IC_SSD1306`|Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
|
||||||
@@ -261,11 +263,25 @@ void oled_write(const char *data, bool invert);
|
|||||||
void oled_write_ln(const char *data, bool invert);
|
void oled_write_ln(const char *data, bool invert);
|
||||||
|
|
||||||
// Pans the buffer to the right (or left by passing true) by moving contents of the buffer
|
// Pans the buffer to the right (or left by passing true) by moving contents of the buffer
|
||||||
// Useful for moving the screen in preparation for new drawing
|
// Useful for moving the screen in preparation for new drawing
|
||||||
// oled_scroll_left or oled_scroll_right should be preferred for all cases of moving a static
|
// oled_scroll_left or oled_scroll_right should be preferred for all cases of moving a static
|
||||||
// image such as a logo or to avoid burn-in as it's much, much less cpu intensive
|
// image such as a logo or to avoid burn-in as it's much, much less cpu intensive
|
||||||
void oled_pan(bool left);
|
void oled_pan(bool left);
|
||||||
|
|
||||||
|
// Returns a pointer to the requested start index in the buffer plus remaining
|
||||||
|
// buffer length as struct
|
||||||
|
oled_buffer_reader_t oled_read_raw(uint16_t start_index);
|
||||||
|
|
||||||
|
// Writes a string to the buffer at current cursor position
|
||||||
|
void oled_write_raw(const char *data, uint16_t size);
|
||||||
|
|
||||||
|
// Writes a single byte into the buffer at the specified index
|
||||||
|
void oled_write_raw_byte(const char data, uint16_t index);
|
||||||
|
|
||||||
|
// Sets a specific pixel on or off
|
||||||
|
// Coordinates start at top-left and go right and down for positive x and y
|
||||||
|
void oled_write_pixel(uint8_t x, uint8_t y, bool on);
|
||||||
|
|
||||||
// Writes a PROGMEM string to the buffer at current cursor position
|
// Writes a PROGMEM string to the buffer at current cursor position
|
||||||
// Advances the cursor while writing, inverts the pixels if true
|
// Advances the cursor while writing, inverts the pixels if true
|
||||||
// Remapped to call 'void oled_write(const char *data, bool invert);' on ARM
|
// Remapped to call 'void oled_write(const char *data, bool invert);' on ARM
|
||||||
@@ -277,23 +293,9 @@ void oled_write_P(const char *data, bool invert);
|
|||||||
// Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM
|
// Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM
|
||||||
void oled_write_ln_P(const char *data, bool invert);
|
void oled_write_ln_P(const char *data, bool invert);
|
||||||
|
|
||||||
// Returns a pointer to the requested start index in the buffer plus remaining
|
|
||||||
// buffer length as struct
|
|
||||||
oled_buffer_reader_t oled_read_raw(uint16_t start_index);
|
|
||||||
|
|
||||||
// Writes a string to the buffer at current cursor position
|
|
||||||
void oled_write_raw(const char *data, uint16_t size);
|
|
||||||
|
|
||||||
// Writes a single byte into the buffer at the specified index
|
|
||||||
void oled_write_raw_byte(const char data, uint16_t index);
|
|
||||||
|
|
||||||
// Writes a PROGMEM string to the buffer at current cursor position
|
// Writes a PROGMEM string to the buffer at current cursor position
|
||||||
void oled_write_raw_P(const char *data, uint16_t size);
|
void oled_write_raw_P(const char *data, uint16_t size);
|
||||||
|
|
||||||
// Sets a specific pixel on or off
|
|
||||||
// Coordinates start at top-left and go right and down for positive x and y
|
|
||||||
void oled_write_pixel(uint8_t x, uint8_t y, bool on);
|
|
||||||
|
|
||||||
// Can be used to manually turn on the screen if it is off
|
// Can be used to manually turn on the screen if it is off
|
||||||
// Returns true if the screen was on or turns on
|
// Returns true if the screen was on or turns on
|
||||||
bool oled_on(void);
|
bool oled_on(void);
|
||||||
@@ -344,6 +346,10 @@ bool oled_scroll_left(void);
|
|||||||
// Returns true if the screen was not scrolling or stops scrolling
|
// Returns true if the screen was not scrolling or stops scrolling
|
||||||
bool oled_scroll_off(void);
|
bool oled_scroll_off(void);
|
||||||
|
|
||||||
|
// Inverts the display
|
||||||
|
// Returns true if the screen was or is inverted
|
||||||
|
bool oled_invert(bool invert);
|
||||||
|
|
||||||
// Returns the maximum number of characters that will fit on a line
|
// Returns the maximum number of characters that will fit on a line
|
||||||
uint8_t oled_max_chars(void);
|
uint8_t oled_max_chars(void);
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,20 @@ RGB_MATRIX_ENABLE = yes
|
|||||||
RGB_MATRIX_DRIVER = IS31FL3731
|
RGB_MATRIX_DRIVER = IS31FL3731
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure the hardware via your `config.h`:
|
You can use between 1 and 4 IS31FL3731 IC's. Do not specify `DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
|
||||||
|
|
||||||
|
| Variable | Description | Default |
|
||||||
|
|----------|-------------|---------|
|
||||||
|
| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
|
||||||
|
| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
|
||||||
|
| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
|
||||||
|
| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | |
|
||||||
|
| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | |
|
||||||
|
| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | |
|
||||||
|
| `DRIVER_ADDR_3` | (Optional) Address for the third RGB driver | |
|
||||||
|
| `DRIVER_ADDR_4` | (Optional) Address for the fourth RGB driver | |
|
||||||
|
|
||||||
|
Here is an example using 2 drivers.
|
||||||
|
|
||||||
```c
|
```c
|
||||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||||
@@ -36,8 +49,6 @@ Configure the hardware via your `config.h`:
|
|||||||
|
|
||||||
!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
|
!> 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`:
|
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
@@ -53,12 +64,10 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now).
|
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3`).
|
||||||
|
|
||||||
---
|
---
|
||||||
### IS31FL3733/IS31FL3737 :id=is31fl3733is31fl3737
|
### IS31FL3733 :id=is31fl3733
|
||||||
|
|
||||||
!> For the IS31FL3737, replace all instances of `IS31FL3733` below with `IS31FL3737`.
|
|
||||||
|
|
||||||
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`:
|
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`:
|
||||||
|
|
||||||
@@ -67,7 +76,24 @@ RGB_MATRIX_ENABLE = yes
|
|||||||
RGB_MATRIX_DRIVER = IS31FL3733
|
RGB_MATRIX_DRIVER = IS31FL3733
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure the hardware via your `config.h`:
|
You can use between 1 and 4 IS31FL3733 IC's. Do not specify `DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
|
||||||
|
|
||||||
|
| Variable | Description | Default |
|
||||||
|
|----------|-------------|---------|
|
||||||
|
| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
|
||||||
|
| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
|
||||||
|
| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
|
||||||
|
| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | |
|
||||||
|
| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | |
|
||||||
|
| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | |
|
||||||
|
| `DRIVER_ADDR_3` | (Optional) Address for the third RGB driver | |
|
||||||
|
| `DRIVER_ADDR_4` | (Optional) Address for the fourth RGB driver | |
|
||||||
|
| `DRIVER_SYNC_1` | (Optional) Sync configuration for the first RGB driver | 0 |
|
||||||
|
| `DRIVER_SYNC_2` | (Optional) Sync configuration for the second RGB driver | 0 |
|
||||||
|
| `DRIVER_SYNC_3` | (Optional) Sync configuration for the third RGB driver | 0 |
|
||||||
|
| `DRIVER_SYNC_4` | (Optional) Sync configuration for the fourth RGB driver | 0 |
|
||||||
|
|
||||||
|
Here is an example using 2 drivers.
|
||||||
|
|
||||||
```c
|
```c
|
||||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||||
@@ -81,6 +107,58 @@ Configure the hardware via your `config.h`:
|
|||||||
// ADDR2 represents A3:A2 of the 7-bit address.
|
// ADDR2 represents A3:A2 of the 7-bit address.
|
||||||
// The result is: 0b101(ADDR2)(ADDR1)
|
// The result is: 0b101(ADDR2)(ADDR1)
|
||||||
#define DRIVER_ADDR_1 0b1010000
|
#define DRIVER_ADDR_1 0b1010000
|
||||||
|
#define DRIVER_ADDR_2 0b1010011
|
||||||
|
|
||||||
|
#define DRIVER_COUNT 2
|
||||||
|
#define DRIVER_1_LED_TOTAL 58
|
||||||
|
#define DRIVER_2_LED_TOTAL 10
|
||||||
|
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||||
|
```
|
||||||
|
|
||||||
|
!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
|
||||||
|
|
||||||
|
Currently only 4 drivers are supported, but it would be trivial to support all 8 combinations.
|
||||||
|
|
||||||
|
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
||||||
|
|
||||||
|
```c
|
||||||
|
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||||
|
/* Refer to IS31 manual for these locations
|
||||||
|
* driver
|
||||||
|
* | R location
|
||||||
|
* | | G location
|
||||||
|
* | | | B location
|
||||||
|
* | | | | */
|
||||||
|
{0, B_1, A_1, C_1},
|
||||||
|
....
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` for now).
|
||||||
|
|
||||||
|
---
|
||||||
|
### IS31FL3737 :id=is31fl3737
|
||||||
|
|
||||||
|
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3737 RGB controller. To enable it, add this to your `rules.mk`:
|
||||||
|
|
||||||
|
```makefile
|
||||||
|
RGB_MATRIX_ENABLE = yes
|
||||||
|
RGB_MATRIX_DRIVER = IS31FL3737
|
||||||
|
```
|
||||||
|
|
||||||
|
Configure the hardware via your `config.h`:
|
||||||
|
|
||||||
|
```c
|
||||||
|
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||||
|
// set to 0 for write, 1 for read (as per I2C protocol)
|
||||||
|
// The address will vary depending on your wiring:
|
||||||
|
// 0000 <-> GND
|
||||||
|
// 0101 <-> SCL
|
||||||
|
// 1010 <-> SDA
|
||||||
|
// 1111 <-> VCC
|
||||||
|
// ADDR represents A3:A0 of the 7-bit address.
|
||||||
|
// The result is: 0b101(ADDR)
|
||||||
|
#define DRIVER_ADDR_1 0b1010000
|
||||||
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
|
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
|
||||||
|
|
||||||
#define DRIVER_COUNT 2
|
#define DRIVER_COUNT 2
|
||||||
@@ -105,7 +183,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now).
|
Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3737.pdf) and the header file `drivers/issi/is31fl3737.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -150,6 +228,76 @@ Configure the hardware via your `config.h`:
|
|||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
### AW20216 :id=aw20216
|
||||||
|
There is basic support for addressable RGB matrix lighting with the SPI AW20216 RGB controller. To enable it, add this to your `rules.mk`:
|
||||||
|
|
||||||
|
```makefile
|
||||||
|
RGB_MATRIX_ENABLE = yes
|
||||||
|
RGB_MATRIX_DRIVER = AW20216
|
||||||
|
```
|
||||||
|
|
||||||
|
You can use up to 2 AW20216 IC's. Do not specify `DRIVER_<N>_xxx` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
|
||||||
|
|
||||||
|
| Variable | Description | Default |
|
||||||
|
|----------|-------------|---------|
|
||||||
|
| `DRIVER_1_CS` | (Required) MCU pin connected to first RGB driver chip select line | B13 |
|
||||||
|
| `DRIVER_2_CS` | (Optional) MCU pin connected to second RGB driver chip select line | |
|
||||||
|
| `DRIVER_1_EN` | (Required) MCU pin connected to first RGB driver hardware enable line | C13 |
|
||||||
|
| `DRIVER_2_EN` | (Optional) MCU pin connected to second RGB driver hardware enable line | |
|
||||||
|
| `DRIVER_1_LED_TOTAL` | (Required) How many RGB lights are connected to first RGB driver | |
|
||||||
|
| `DRIVER_2_LED_TOTAL` | (Optional) How many RGB lights are connected to second RGB driver | |
|
||||||
|
| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
|
||||||
|
| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | |
|
||||||
|
| `AW_SCALING_MAX` | (Optional) LED current scaling value (0-255, higher values mean LED is brighter at full PWM) | 150 |
|
||||||
|
| `AW_GLOBAL_CURRENT_MAX` | (Optional) Driver global current limit (0-255, higher values means the driver may consume more power) | 150 |
|
||||||
|
|
||||||
|
Here is an example using 2 drivers.
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define DRIVER_1_CS B13
|
||||||
|
#define DRIVER_2_CS B14
|
||||||
|
// Hardware enable lines may be connected to the same pin
|
||||||
|
#define DRIVER_1_EN C13
|
||||||
|
#define DRIVER_2_EN C13
|
||||||
|
|
||||||
|
#define DRIVER_COUNT 2
|
||||||
|
#define DRIVER_1_LED_TOTAL 66
|
||||||
|
#define DRIVER_2_LED_TOTAL 32
|
||||||
|
#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`.
|
||||||
|
|
||||||
|
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
||||||
|
|
||||||
|
```c
|
||||||
|
const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
|
||||||
|
/* Each AW20216 channel is controlled by a register at some offset between 0x00
|
||||||
|
* and 0xD7 inclusive.
|
||||||
|
* See drivers/awinic/aw20216.h for the mapping between register offsets and
|
||||||
|
* driver pin locations.
|
||||||
|
* driver
|
||||||
|
* | R location
|
||||||
|
* | | G location
|
||||||
|
* | | | B location
|
||||||
|
* | | | | */
|
||||||
|
{ 0, CS1_SW1, CS2_SW1, CS3_SW1 },
|
||||||
|
{ 0, CS4_SW1, CS5_SW1, CS6_SW1 },
|
||||||
|
{ 0, CS7_SW1, CS8_SW1, CS9_SW1 },
|
||||||
|
{ 0, CS10_SW1, CS11_SW1, CS12_SW1 },
|
||||||
|
{ 0, CS13_SW1, CS14_SW1, CS15_SW1 },
|
||||||
|
...
|
||||||
|
{ 1, CS1_SW1, CS2_SW1, CS3_SW1 },
|
||||||
|
{ 1, CS13_SW1, CS14_SW1, CS15_SW1 },
|
||||||
|
{ 1, CS16_SW1, CS17_SW1, CS18_SW1 },
|
||||||
|
{ 1, CS4_SW2, CS5_SW2, CS6_SW2 },
|
||||||
|
...
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Common Configuration :id=common-configuration
|
||||||
|
|
||||||
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
|
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
|
||||||
|
|
||||||
@@ -254,6 +402,9 @@ enum rgb_matrix_effects {
|
|||||||
RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs 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_RAINDROPS, // Randomly changes a single key's hue
|
||||||
RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation
|
RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation
|
||||||
|
RGB_MATRIX_HUE_BREATHING, // Hue shifts up a slight ammount at the same time, then shifts back
|
||||||
|
RGB_MATRIX_HUE_PENDULUM, // Hue shifts up a slight ammount in a wave to the right, then back to the left
|
||||||
|
RGB_MATRIX_HUE_WAVE, // Hue shifts up a slight ammount and then back down in a wave to the right
|
||||||
#if define(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
|
#if define(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
|
||||||
RGB_MATRIX_TYPING_HEATMAP, // How hot is your WPM!
|
RGB_MATRIX_TYPING_HEATMAP, // How hot is your WPM!
|
||||||
RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation
|
RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation
|
||||||
@@ -283,6 +434,7 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
|
|||||||
|-------------------------------------------------------|-----------------------------------------------|
|
|-------------------------------------------------------|-----------------------------------------------|
|
||||||
|`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` |
|
|`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` |
|
||||||
|`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` |
|
|`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` |
|
||||||
|
|`#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT` |Disables `MATRIX_GRADIENT_LEFT_RIGHT` |
|
||||||
|`#define DISABLE_RGB_MATRIX_BREATHING` |Disables `RGB_MATRIX_BREATHING` |
|
|`#define DISABLE_RGB_MATRIX_BREATHING` |Disables `RGB_MATRIX_BREATHING` |
|
||||||
|`#define DISABLE_RGB_MATRIX_BAND_SAT` |Disables `RGB_MATRIX_BAND_SAT` |
|
|`#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_VAL` |Disables `RGB_MATRIX_BAND_VAL` |
|
||||||
@@ -293,20 +445,23 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
|
|||||||
|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` |
|
|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` |
|
||||||
|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` |
|
|`#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_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` |
|
||||||
|
|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |
|
||||||
|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN` |Disables `RGB_MATRIX_CYCLE_OUT_IN` |
|
|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN` |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_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_PINWHEEL` |Disables `RGB_MATRIX_CYCLE_PINWHEEL` |
|
||||||
|`#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL` |Disables `RGB_MATRIX_CYCLE_SPIRAL` |
|
|`#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL` |Disables `RGB_MATRIX_CYCLE_SPIRAL` |
|
||||||
|
|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` |
|
||||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` |
|
|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` |
|
||||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` |
|
|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` |
|
||||||
|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` |
|
|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` |
|
||||||
|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` |
|
|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` |
|
||||||
|
|`#define DISABLE_RGB_MATRIX_HUE_BREATHING` |Disables `RGB_MATRIX_HUE_BREATHING` |
|
||||||
|
|`#define DISABLE_RGB_MATRIX_HUE_PENDULUM` |Disables `RGB_MATRIX_HUE_PENDULUM` |
|
||||||
|
|`#define DISABLE_RGB_MATRIX_HUE_WAVE ` |Disables `RGB_MATRIX_HUE_WAVE ` |
|
||||||
|`#define DISABLE_RGB_MATRIX_TYPING_HEATMAP` |Disables `RGB_MATRIX_TYPING_HEATMAP` |
|
|`#define DISABLE_RGB_MATRIX_TYPING_HEATMAP` |Disables `RGB_MATRIX_TYPING_HEATMAP` |
|
||||||
|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` |
|
|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` |
|
||||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` |
|
|
||||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |
|
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |
|
||||||
|
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` |
|
||||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_WIDE` |
|
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_WIDE` |
|
||||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` |
|
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` |
|
||||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS` |Disables `RGB_MATRIX_SOLID_REACTIVE_CROSS` |
|
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS` |Disables `RGB_MATRIX_SOLID_REACTIVE_CROSS` |
|
||||||
@@ -391,7 +546,7 @@ static bool my_cool_effect2(effect_params_t* params) {
|
|||||||
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
|
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
|
||||||
```
|
```
|
||||||
|
|
||||||
For inspiration and examples, check out the built-in effects under `quantum/rgb_matrix_animation/`
|
For inspiration and examples, check out the built-in effects under `quantum/rgb_matrix_animations/`
|
||||||
|
|
||||||
|
|
||||||
## Colors :id=colors
|
## Colors :id=colors
|
||||||
@@ -427,9 +582,10 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
|
|||||||
```c
|
```c
|
||||||
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||||
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
||||||
|
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS // enable framebuffer effects
|
||||||
#define RGB_DISABLE_TIMEOUT 0 // number of milliseconds to wait until rgb automatically turns off
|
#define RGB_DISABLE_TIMEOUT 0 // number of milliseconds to wait until rgb automatically turns off
|
||||||
#define RGB_DISABLE_AFTER_TIMEOUT 0 // OBSOLETE: number of ticks to wait until disabling effects
|
#define RGB_DISABLE_AFTER_TIMEOUT 0 // OBSOLETE: number of ticks to wait until disabling effects
|
||||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
|
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
|
||||||
#define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
|
#define RGB_MATRIX_LED_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_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_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
||||||
@@ -439,11 +595,13 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
|
|||||||
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
|
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
|
||||||
#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
|
#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
|
||||||
#define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature)
|
#define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature)
|
||||||
|
#define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
|
||||||
|
// If RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
|
||||||
```
|
```
|
||||||
|
|
||||||
## EEPROM storage :id=eeprom-storage
|
## EEPROM storage :id=eeprom-storage
|
||||||
|
|
||||||
The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with:
|
The EEPROM for it is currently shared with the LED Matrix system (it's generally assumed only one feature would be used at a time), but could be configured to use its own 32bit address with:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#define EECONFIG_RGB_MATRIX (uint32_t *)28
|
#define EECONFIG_RGB_MATRIX (uint32_t *)28
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ Changing the **Value** sets the overall brightness.<br>
|
|||||||
|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode |
|
|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode |
|
||||||
|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
|
|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
|
||||||
|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode |
|
|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode |
|
||||||
|
|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode |
|
||||||
|
|
||||||
!> By default, if you have both the RGB Light and the [RGB Matrix](feature_rgb_matrix.md) feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature.
|
!> By default, if you have both the RGB Light and the [RGB Matrix](feature_rgb_matrix.md) feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature.
|
||||||
|
|
||||||
@@ -309,6 +310,18 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also use `rgblight_blink_layer_repeat` to specify the amount of times the layer is supposed to blink. Using the layers from above,
|
||||||
|
```c
|
||||||
|
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case DEBUG:
|
||||||
|
rgblight_blink_layer_repeat(debug_enable ? 0 : 1, 200, 3);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
would turn the layer 0 (or 1) on and off again three times when `DEBUG` is pressed.
|
||||||
|
|
||||||
### Overriding RGB Lighting on/off status
|
### Overriding RGB Lighting on/off status
|
||||||
|
|
||||||
Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `RGB_TOG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`.
|
Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `RGB_TOG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`.
|
||||||
@@ -359,9 +372,9 @@ rgblight_set(); // Utility functions do not call rgblight_set() automatically, s
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
```c
|
```c
|
||||||
rgblight_sethsv(HSV_WHITE, 0); // led 0
|
rgblight_sethsv_at(HSV_WHITE, 0); // led 0
|
||||||
rgblight_sethsv(HSV_RED, 1); // led 1
|
rgblight_sethsv_at(HSV_RED, 1); // led 1
|
||||||
rgblight_sethsv(HSV_GREEN, 2); // led 2
|
rgblight_sethsv_at(HSV_GREEN, 2); // led 2
|
||||||
// The above functions automatically calls rgblight_set(), so there is no need to call it explicitly.
|
// The above functions automatically calls rgblight_set(), so there is no need to call it explicitly.
|
||||||
// Note that it is inefficient to call repeatedly.
|
// Note that it is inefficient to call repeatedly.
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ QMK Firmware has a generic implementation that is usable by any board, as well a
|
|||||||
|
|
||||||
For this, we will mostly be talking about the generic implementation used by the Let's Split and other keyboards.
|
For this, we will mostly be talking about the generic implementation used by the Let's Split and other keyboards.
|
||||||
|
|
||||||
!> ARM is not yet fully supported for Split Keyboards and has many limitations. Progress is being made, but we have not yet reached 100% feature parity.
|
!> ARM split supports most QMK subsystems when using the 'serial' and 'serial_usart' drivers. I2C slave is currently unsupported.
|
||||||
|
|
||||||
|
|
||||||
## Compatibility Overview
|
## Compatibility Overview
|
||||||
|
|
||||||
@@ -60,6 +59,7 @@ The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and D0/D1/D2/D3 (aka
|
|||||||
The 4 wires of the TRRS cable need to connect GND, VCC, and SCL and SDA (aka PD0/pin 3 and PD1/pin 2, respectively) between the two Pro Micros.
|
The 4 wires of the TRRS cable need to connect GND, VCC, and SCL and SDA (aka PD0/pin 3 and PD1/pin 2, respectively) between the two Pro Micros.
|
||||||
|
|
||||||
The pull-up resistors may be placed on either half. If you wish to use the halves independently, it is also possible to use 4 resistors and have the pull-ups in both halves.
|
The pull-up resistors may be placed on either half. If you wish to use the halves independently, it is also possible to use 4 resistors and have the pull-ups in both halves.
|
||||||
|
Note that the total resistance for the connected system should be within spec at 2.2k-10kOhm, with an 'ideal' at 4.7kOhm, regardless of the placement and number.
|
||||||
|
|
||||||
<img alt="sk-i2c-connection-mono" src="https://user-images.githubusercontent.com/2170248/92297182-92b98580-ef77-11ea-9d7d-d6033914af43.JPG" width="50%"/>
|
<img alt="sk-i2c-connection-mono" src="https://user-images.githubusercontent.com/2170248/92297182-92b98580-ef77-11ea-9d7d-d6033914af43.JPG" width="50%"/>
|
||||||
|
|
||||||
@@ -109,6 +109,10 @@ Normally, when a diode is connected to an intersection, it is judged to be left.
|
|||||||
#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT
|
#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Note that adding a diode at a previously unused intersection will effectively tell the firmware that there is a key held down at that point. You can instruct qmk to ignore that intersection by defining `MATRIX_MASKED` and then defining a `matrix_row_t matrix_mask[MATRIX_ROWS]` array in your keyboard config. Each bit of a single value (starting form the least-significant bit) is used to tell qmk whether or not to pay attention to key presses at that intersection.
|
||||||
|
|
||||||
|
While `MATRIX_MASKED` isn't necessary to use `SPLIT_HAND_MATRIX_GRID` successfully, without it you may experience issues trying to suspend your computer with your keyboard attached as the matrix will always report at least one key-press.
|
||||||
|
|
||||||
#### Handedness by EEPROM
|
#### Handedness by EEPROM
|
||||||
|
|
||||||
This method sets the keyboard's handedness by setting a flag in the persistent storage (`EEPROM`). This is checked when the controller first starts up, and determines what half the keyboard is, and how to orient the keyboard layout.
|
This method sets the keyboard's handedness by setting a flag in the persistent storage (`EEPROM`). This is checked when the controller first starts up, and determines what half the keyboard is, and how to orient the keyboard layout.
|
||||||
@@ -129,6 +133,12 @@ However, you'll have to flash the EEPROM files for the correct hand to each cont
|
|||||||
* `:dfu-util-split-left`
|
* `:dfu-util-split-left`
|
||||||
* `:dfu-util-split-right`
|
* `:dfu-util-split-right`
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```
|
||||||
|
make crkbd:default:avrdude-split-left
|
||||||
|
```
|
||||||
|
|
||||||
This setting is not changed when re-initializing the EEPROM using the `EEP_RST` key, or using the `eeconfig_init()` function. However, if you reset the EEPROM outside of the firmware's built in options (such as flashing a file that overwrites the `EEPROM`, like how the [QMK Toolbox]()'s "Reset EEPROM" button works), you'll need to re-flash the controller with the `EEPROM` files.
|
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).
|
You can find the `EEPROM` files in the QMK firmware repo, [here](https://github.com/qmk/qmk_firmware/tree/master/quantum/split_common).
|
||||||
@@ -158,7 +168,7 @@ Because not every split keyboard is identical, there are a number of additional
|
|||||||
#define USE_I2C
|
#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.
|
This configures the use of I<sup>2</sup>C support for split keyboard transport (AVR only).
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#define SOFT_SERIAL_PIN D0
|
#define SOFT_SERIAL_PIN D0
|
||||||
@@ -182,20 +192,115 @@ If you're having issues with serial communication, you can change this value, as
|
|||||||
* **`5`**: about 20kbps
|
* **`5`**: about 20kbps
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#define SPLIT_MODS_ENABLE
|
#define FORCED_SYNC_THROTTLE_MS 100
|
||||||
```
|
```
|
||||||
|
|
||||||
This enables transmitting modifier state (normal, weak and oneshot) to the non
|
This sets the maximum number of milliseconds before forcing a synchronization of data from master to slave. Under normal circumstances this sync occurs whenever the data _changes_, for safety a data transfer occurs after this number of milliseconds if no change has been detected since the last sync.
|
||||||
primary side of the split keyboard. This adds a few bytes of data to the split
|
|
||||||
communication protocol and may impact the matrix scan speed when enabled.
|
|
||||||
The purpose of this feature is to support cosmetic use of modifer state (e.g.
|
|
||||||
displaying status on an OLED screen).
|
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#define SPLIT_TRANSPORT_MIRROR
|
#define SPLIT_TRANSPORT_MIRROR
|
||||||
```
|
```
|
||||||
|
|
||||||
This mirrors the master side matrix to the slave side for features that react or require knowledge of master side key presses on the slave side. This adds a few bytes of data to the split communication protocol and may impact the matrix scan speed when enabled. The purpose of this feature is to support cosmetic use of key events (e.g. RGB reacting to Keypresses).
|
This mirrors the master side matrix to the slave side for features that react or require knowledge of master side key presses on the slave side. The purpose of this feature is to support cosmetic use of key events (e.g. RGB reacting to keypresses). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define SPLIT_LAYER_STATE_ENABLE
|
||||||
|
```
|
||||||
|
|
||||||
|
This enables syncing of the layer state between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the currently active layer. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define SPLIT_LED_STATE_ENABLE
|
||||||
|
```
|
||||||
|
|
||||||
|
This enables syncing of the Host LED status (caps lock, num lock, etc) between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the Host LED status. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define SPLIT_MODS_ENABLE
|
||||||
|
```
|
||||||
|
|
||||||
|
This enables transmitting modifier state (normal, weak and oneshot) to the non primary side of the split keyboard. The purpose of this feature is to support cosmetic use of modifer state (e.g. displaying status on an OLED screen). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define SPLIT_WPM_ENABLE
|
||||||
|
```
|
||||||
|
|
||||||
|
This enables transmitting the current WPM to the slave side of the split keyboard. The purpose of this feature is to support cosmetic use of WPM (e.g. displaying the current value on an OLED screen). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
|
||||||
|
|
||||||
|
### Custom data sync between sides :id=custom-data-sync
|
||||||
|
|
||||||
|
QMK's split transport allows for arbitrary data transactions at both the keyboard and user levels. This is modelled on a remote procedure call, with the master invoking a function on the slave side, with the ability to send data from master to slave, process it slave side, and send data back from slave to master.
|
||||||
|
|
||||||
|
To leverage this, a keyboard or user/keymap can define a comma-separated list of _transaction IDs_:
|
||||||
|
|
||||||
|
```c
|
||||||
|
// for keyboard-level data sync:
|
||||||
|
#define SPLIT_TRANSACTION_IDS_KB KEYBOARD_SYNC_A, KEYBOARD_SYNC_B
|
||||||
|
// or, for user:
|
||||||
|
#define SPLIT_TRANSACTION_IDS_USER USER_SYNC_A, USER_SYNC_B, USER_SYNC_C
|
||||||
|
```
|
||||||
|
|
||||||
|
These _transaction IDs_ then need a slave-side handler function to be registered with the split transport, for example:
|
||||||
|
|
||||||
|
```c
|
||||||
|
typedef struct _master_to_slave_t {
|
||||||
|
int m2s_data;
|
||||||
|
} master_to_slave_t;
|
||||||
|
|
||||||
|
typedef struct _slave_to_master_t {
|
||||||
|
int s2m_data;
|
||||||
|
} slave_to_master_t;
|
||||||
|
|
||||||
|
void user_sync_a_slave_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
|
||||||
|
const master_to_slave_t *m2s = (const master_to_slave_t*)in_data;
|
||||||
|
slave_to_master_t *s2m = (slave_to_master_t*)out_data;
|
||||||
|
s2m->s2m_data = m2s->m2s_data + 5; // whatever comes in, add 5 so it can be sent back
|
||||||
|
}
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
transaction_register_rpc(USER_SYNC_A, user_sync_a_slave_handler);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The master side can then invoke the slave-side handler - for normal keyboard functionality to be minimally affected, any keyboard- or user-level code attempting to sync data should be throttled:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void housekeeping_task_user(void) {
|
||||||
|
if (is_keyboard_master()) {
|
||||||
|
// Interact with slave every 500ms
|
||||||
|
static uint32_t last_sync = 0;
|
||||||
|
if (timer_elapsed32(last_sync) > 500) {
|
||||||
|
master_to_slave_t m2s = {6};
|
||||||
|
slave_to_master_t s2m = {0};
|
||||||
|
if(transaction_rpc_exec(USER_SYNC_A, sizeof(m2s), &m2s, sizeof(s2m), &s2m)) {
|
||||||
|
last_sync = timer_read32();
|
||||||
|
dprintf("Slave value: %d\n", s2m.s2m_data); // this will now be 11, as the slave adds 5
|
||||||
|
} else {
|
||||||
|
dprint("Slave sync failed!\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
!> It is recommended that any data sync between halves happens during the master side's _housekeeping task_. This ensures timely retries should failures occur.
|
||||||
|
|
||||||
|
If only one-way data transfer is needed, helper methods are provided:
|
||||||
|
|
||||||
|
```c
|
||||||
|
bool transaction_rpc_exec(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
|
||||||
|
bool transaction_rpc_send(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer);
|
||||||
|
bool transaction_rpc_recv(int8_t transaction_id, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
|
||||||
|
```
|
||||||
|
|
||||||
|
By default, the inbound and outbound data is limited to a maximum of 32 bytes each. The sizes can be altered if required:
|
||||||
|
|
||||||
|
```c
|
||||||
|
// Master to slave:
|
||||||
|
#define RPC_M2S_BUFFER_SIZE 48
|
||||||
|
// Slave to master:
|
||||||
|
#define RPC_S2M_BUFFER_SIZE 48
|
||||||
|
```
|
||||||
|
|
||||||
### Hardware Configuration Options
|
### Hardware Configuration Options
|
||||||
|
|
||||||
@@ -239,7 +344,12 @@ This sets how many LEDs are directly connected to each controller. The first nu
|
|||||||
```c
|
```c
|
||||||
#define SPLIT_USB_DETECT
|
#define SPLIT_USB_DETECT
|
||||||
```
|
```
|
||||||
This option changes the startup behavior to detect an active USB connection when delegating master/slave. If this operation times out, then the half is assume to be a slave. This is the default behavior for ARM, and required for AVR Teensy boards (due to hardware limitations).
|
|
||||||
|
Enabling this option changes the startup behavior to listen for an active USB communication to delegate which part is master and which is slave. With this option enabled and theres's USB communication, then that half assumes it is the master, otherwise it assumes it is the slave.
|
||||||
|
|
||||||
|
Without this option, the master is the half that can detect voltage on the physical USB connection (VBUS detection).
|
||||||
|
|
||||||
|
Enabled by default on ChibiOS/ARM.
|
||||||
|
|
||||||
?> This setting will stop the ability to demo using battery packs.
|
?> This setting will stop the ability to demo using battery packs.
|
||||||
|
|
||||||
@@ -255,9 +365,13 @@ This sets the poll frequency when detecting master/slave when using `SPLIT_USB_D
|
|||||||
|
|
||||||
## Hardware Considerations and Mods
|
## Hardware Considerations and Mods
|
||||||
|
|
||||||
While most any Pro Micro can be used, micro controllers like the AVR Teensys and most (if not all) ARM boards require the Split USB Detect.
|
Master/slave delegation is made either by detecting voltage on VBUS connection or waiting for USB communication (`SPLIT_USB_DETECT`). Pro Micro boards can use VBUS detection out of the box and be used with or without `SPLIT_USB_DETECT`.
|
||||||
|
|
||||||
However, with the Teensy 2.0 and Teensy++ 2.0, there is a simple hardware mod that you can perform to add VBUS detection, so you don't need the Split USB detection option.
|
Many ARM boards, but not all, do not support VBUS detection. Because it is common that ARM boards lack VBUS detection, `SPLIT_USB_DETECT` is automatically defined on ARM targets (technically when ChibiOS is targetted).
|
||||||
|
|
||||||
|
### Teensy boards
|
||||||
|
|
||||||
|
Teensy boards lack VBUS detection out of the box and must have `SPLIT_USB_DETECT` defined. With the Teensy 2.0 and Teensy++ 2.0, there is a simple hardware mod that you can perform to add VBUS detection, so you don't need the `SPLIT_USB_DETECT` option.
|
||||||
|
|
||||||
You'll only need a few things:
|
You'll only need a few things:
|
||||||
|
|
||||||
|
|||||||
274
docs/feature_st7565.md
Normal file
274
docs/feature_st7565.md
Normal file
@@ -0,0 +1,274 @@
|
|||||||
|
# ST7565 LCD Driver
|
||||||
|
|
||||||
|
## Supported Hardware
|
||||||
|
|
||||||
|
LCD modules using ST7565 driver IC, communicating over SPI.
|
||||||
|
|
||||||
|
|Module |IC |Size |Notes |
|
||||||
|
|------------------------------|-------|------|----------------------------------------------------------|
|
||||||
|
|Newhaven Display NHD-C12832A1Z|ST7565R|128x32|Used by Ergodox Infinity; primary consumer of this feature|
|
||||||
|
|Zolentech ZLE12864B |ST7565P|128x64|Requires contrast adjustment |
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
To enable the feature, there are three steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`:
|
||||||
|
|
||||||
|
```make
|
||||||
|
ST7565_ENABLE = yes
|
||||||
|
```
|
||||||
|
|
||||||
|
Then in your `keymap.c` file, implement the ST7565 task call. This example assumes your keymap has three layers named `_QWERTY`, `_FN` and `_ADJ`:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#ifdef ST7565_ENABLE
|
||||||
|
void st7565_task_user(void) {
|
||||||
|
// Host Keyboard Layer Status
|
||||||
|
st7565_write_P(PSTR("Layer: "), false);
|
||||||
|
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case _QWERTY:
|
||||||
|
st7565_write_P(PSTR("Default\n"), false);
|
||||||
|
break;
|
||||||
|
case _FN:
|
||||||
|
st7565_write_P(PSTR("FN\n"), false);
|
||||||
|
break;
|
||||||
|
case _ADJ:
|
||||||
|
st7565_write_P(PSTR("ADJ\n"), false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// Or use the write_ln shortcut over adding '\n' to the end of your string
|
||||||
|
st7565_write_ln_P(PSTR("Undefined"), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Host Keyboard LED Status
|
||||||
|
led_t led_state = host_keyboard_led_state();
|
||||||
|
st7565_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
|
||||||
|
st7565_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
|
||||||
|
st7565_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
```
|
||||||
|
|
||||||
|
## Logo Example
|
||||||
|
|
||||||
|
In the default font, certain ranges of characters are reserved for a QMK logo. To render this logo to the screen, use the following code example:
|
||||||
|
|
||||||
|
```c
|
||||||
|
static void render_logo(void) {
|
||||||
|
static const char PROGMEM qmk_logo[] = {
|
||||||
|
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||||
|
0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
|
||||||
|
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
|
||||||
|
};
|
||||||
|
|
||||||
|
st7565_write_P(qmk_logo, false);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Buffer Read Example
|
||||||
|
For some purposes, you may need to read the current state of the display buffer. The `st7565_read_raw` function can be used to safely read bytes from the buffer.
|
||||||
|
|
||||||
|
In this example, calling `fade_display` in the `st7565_task_user` function will slowly fade away whatever is on the screen by turning random pixels off over time.
|
||||||
|
```c
|
||||||
|
//Setup some mask which can be or'd with bytes to turn off pixels
|
||||||
|
const uint8_t single_bit_masks[8] = {127, 191, 223, 239, 247, 251, 253, 254};
|
||||||
|
|
||||||
|
static void fade_display(void) {
|
||||||
|
//Define the reader structure
|
||||||
|
display_buffer_reader_t reader;
|
||||||
|
uint8_t buff_char;
|
||||||
|
if (random() % 30 == 0) {
|
||||||
|
srand(timer_read());
|
||||||
|
// Fetch a pointer for the buffer byte at index 0. The return structure
|
||||||
|
// will have the pointer and the number of bytes remaining from this
|
||||||
|
// index position if we want to perform a sequential read by
|
||||||
|
// incrementing the buffer pointer
|
||||||
|
reader = st7565_read_raw(0);
|
||||||
|
//Loop over the remaining buffer and erase pixels as we go
|
||||||
|
for (uint16_t i = 0; i < reader.remaining_element_count; i++) {
|
||||||
|
//Get the actual byte in the buffer by dereferencing the pointer
|
||||||
|
buff_char = *reader.current_element;
|
||||||
|
if (buff_char != 0) {
|
||||||
|
st7565_write_raw_byte(buff_char & single_bit_masks[rand() % 8], i);
|
||||||
|
}
|
||||||
|
//increment the pointer to fetch a new byte during the next loop
|
||||||
|
reader.current_element++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Other Examples
|
||||||
|
|
||||||
|
In split keyboards, it is very common to have two displays that each render different content and are oriented or flipped differently. You can do this by switching which content to render by using the return value from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#ifdef ST7565_ENABLE
|
||||||
|
display_rotation_t st7565_init_user(display_rotation_t rotation) {
|
||||||
|
if (!is_keyboard_master()) {
|
||||||
|
return DISPLAY_ROTATION_180; // flips the display 180 degrees if offhand
|
||||||
|
}
|
||||||
|
|
||||||
|
return rotation;
|
||||||
|
}
|
||||||
|
|
||||||
|
void st7565_task_user(void) {
|
||||||
|
if (is_keyboard_master()) {
|
||||||
|
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||||
|
} else {
|
||||||
|
render_logo(); // Renders a static logo
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
```
|
||||||
|
|
||||||
|
## Basic Configuration
|
||||||
|
|
||||||
|
|Define |Default |Description |
|
||||||
|
|------------------------|--------------|-----------------------------------------------------------------------------------------------------|
|
||||||
|
|`ST7565_A0_PIN` |*Not defined* |(Required) The GPIO connected to the display's A0 (data/command) pin |
|
||||||
|
|`ST7565_RST_PIN` |*Not defined* |(Required) The GPIO connected to the display's reset pin |
|
||||||
|
|`ST7565_SS_PIN` |*Not defined* |(Required) The GPIO connected to the display's slave select pin |
|
||||||
|
|`ST7565_SPI_CLK_DIVISOR`|`4` |The SPI clock divisor to use |
|
||||||
|
|`ST7565_FONT_H` |`"glcdfont.c"`|The font code file to use for custom fonts |
|
||||||
|
|`ST7565_FONT_START` |`0` |The starting character index for custom fonts |
|
||||||
|
|`ST7565_FONT_END` |`223` |The ending character index for custom fonts |
|
||||||
|
|`ST7565_FONT_WIDTH` |`6` |The font width |
|
||||||
|
|`ST7565_FONT_HEIGHT` |`8` |The font height (untested) |
|
||||||
|
|`ST7565_TIMEOUT` |`60000` |Turns off the screen after 60000ms of keyboard inactivity. Helps reduce burn-in. Set to 0 to disable.|
|
||||||
|
|`ST7565_COLUMN_OFFSET` |`0` |Shift output to the right this many pixels. |
|
||||||
|
|`ST7565_CONTRAST` |`32` |The default contrast level of the display, from 0 to 255. |
|
||||||
|
|`ST7565_UPDATE_INTERVAL`|`0` |Set the time interval for updating the display in ms. This will improve the matrix scan rate. |
|
||||||
|
|
||||||
|
## Custom sized displays
|
||||||
|
|
||||||
|
The default display size for this feature is 128x32 and all necessary defines are precalculated with that in mind.
|
||||||
|
|
||||||
|
|Define |Default |Description |
|
||||||
|
|-----------------------|----------|-----------------------------------------------------------------------------------------------------------|
|
||||||
|
|`ST7565_DISPLAY_WIDTH` |`128` |The width of the display. |
|
||||||
|
|`ST7565_DISPLAY_HEIGHT`|`32` |The height of the display. |
|
||||||
|
|`ST7565_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br>`(ST7565_DISPLAY_HEIGHT / 8 * ST7565_DISPLAY_WIDTH)`. |
|
||||||
|
|`ST7565_BLOCK_TYPE` |`uint16_t`|The unsigned integer type to use for dirty rendering. |
|
||||||
|
|`ST7565_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br>`(sizeof(ST7565_BLOCK_TYPE) * 8)`.|
|
||||||
|
|`ST7565_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br>`(ST7565_MATRIX_SIZE / ST7565_BLOCK_COUNT)`. |
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
```c
|
||||||
|
// Rotation enum values are flags
|
||||||
|
typedef enum {
|
||||||
|
DISPLAY_ROTATION_0,
|
||||||
|
DISPLAY_ROTATION_180
|
||||||
|
} display_rotation_t;
|
||||||
|
|
||||||
|
// Initialize the display, rotating the rendered output based on the define passed in.
|
||||||
|
// Returns true if the was initialized successfully
|
||||||
|
bool st7565_init(display_rotation_t rotation);
|
||||||
|
|
||||||
|
// Called at the start of st7565_init, weak function overridable by the user
|
||||||
|
// rotation - the value passed into st7565_init
|
||||||
|
// Return new display_rotation_t if you want to override default rotation
|
||||||
|
display_rotation_t st7565_init_user(display_rotation_t rotation);
|
||||||
|
|
||||||
|
// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering
|
||||||
|
void st7565_clear(void);
|
||||||
|
|
||||||
|
// Renders the dirty chunks of the buffer to display
|
||||||
|
void st7565_render(void);
|
||||||
|
|
||||||
|
// Moves cursor to character position indicated by column and line, wraps if out of bounds
|
||||||
|
// Max column denoted by 'st7565_max_chars()' and max lines by 'st7565_max_lines()' functions
|
||||||
|
void st7565_set_cursor(uint8_t col, uint8_t line);
|
||||||
|
|
||||||
|
// Advances the cursor to the next page, writing ' ' if true
|
||||||
|
// Wraps to the begining when out of bounds
|
||||||
|
void st7565_advance_page(bool clearPageRemainder);
|
||||||
|
|
||||||
|
// Moves the cursor forward 1 character length
|
||||||
|
// Advance page if there is not enough room for the next character
|
||||||
|
// Wraps to the begining when out of bounds
|
||||||
|
void st7565_advance_char(void);
|
||||||
|
|
||||||
|
// Writes a single character to the buffer at current cursor position
|
||||||
|
// Advances the cursor while writing, inverts the pixels if true
|
||||||
|
// Main handler that writes character data to the display buffer
|
||||||
|
void st7565_write_char(const char data, bool invert);
|
||||||
|
|
||||||
|
// Writes a string to the buffer at current cursor position
|
||||||
|
// Advances the cursor while writing, inverts the pixels if true
|
||||||
|
void st7565_write(const char *data, bool invert);
|
||||||
|
|
||||||
|
// Writes a string to the buffer at current cursor position
|
||||||
|
// Advances the cursor while writing, inverts the pixels if true
|
||||||
|
// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
|
||||||
|
void st7565_write_ln(const char *data, bool invert);
|
||||||
|
|
||||||
|
// Pans the buffer to the right (or left by passing true) by moving contents of the buffer
|
||||||
|
// Useful for moving the screen in preparation for new drawing
|
||||||
|
void st7565_pan(bool left);
|
||||||
|
|
||||||
|
// Returns a pointer to the requested start index in the buffer plus remaining
|
||||||
|
// buffer length as struct
|
||||||
|
display_buffer_reader_t st7565_read_raw(uint16_t start_index);
|
||||||
|
|
||||||
|
// Writes a string to the buffer at current cursor position
|
||||||
|
void st7565_write_raw(const char *data, uint16_t size);
|
||||||
|
|
||||||
|
// Writes a single byte into the buffer at the specified index
|
||||||
|
void st7565_write_raw_byte(const char data, uint16_t index);
|
||||||
|
|
||||||
|
// Sets a specific pixel on or off
|
||||||
|
// Coordinates start at top-left and go right and down for positive x and y
|
||||||
|
void st7565_write_pixel(uint8_t x, uint8_t y, bool on);
|
||||||
|
|
||||||
|
// Writes a PROGMEM string to the buffer at current cursor position
|
||||||
|
// Advances the cursor while writing, inverts the pixels if true
|
||||||
|
// Remapped to call 'void st7565_write(const char *data, bool invert);' on ARM
|
||||||
|
void st7565_write_P(const char *data, bool invert);
|
||||||
|
|
||||||
|
// Writes a PROGMEM string to the buffer at current cursor position
|
||||||
|
// Advances the cursor while writing, inverts the pixels if true
|
||||||
|
// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
|
||||||
|
// Remapped to call 'void st7565_write_ln(const char *data, bool invert);' on ARM
|
||||||
|
void st7565_write_ln_P(const char *data, bool invert);
|
||||||
|
|
||||||
|
// Writes a PROGMEM string to the buffer at current cursor position
|
||||||
|
void st7565_write_raw_P(const char *data, uint16_t size);
|
||||||
|
|
||||||
|
// Can be used to manually turn on the screen if it is off
|
||||||
|
// Returns true if the screen was on or turns on
|
||||||
|
bool st7565_on(void);
|
||||||
|
|
||||||
|
// Called when st7565_on() turns on the screen, weak function overridable by the user
|
||||||
|
// Not called if the screen is already on
|
||||||
|
void st7565_on_user(void);
|
||||||
|
|
||||||
|
// Can be used to manually turn off the screen if it is on
|
||||||
|
// Returns true if the screen was off or turns off
|
||||||
|
bool st7565_off(void);
|
||||||
|
|
||||||
|
// Called when st7565_off() turns off the screen, weak function overridable by the user
|
||||||
|
// Not called if the screen is already off
|
||||||
|
void st7565_off_user(void);
|
||||||
|
|
||||||
|
// Returns true if the screen is currently on, false if it is
|
||||||
|
// not
|
||||||
|
bool st7565_is_on(void);
|
||||||
|
|
||||||
|
// Basically it's st7565_render, but with timeout management and st7565_task_user calling!
|
||||||
|
void st7565_task(void);
|
||||||
|
|
||||||
|
// Called at the start of st7565_task, weak function overridable by the user
|
||||||
|
void st7565_task_user(void);
|
||||||
|
|
||||||
|
// Inverts the display
|
||||||
|
// Returns true if the screen was or is inverted
|
||||||
|
bool st7565_invert(bool invert);
|
||||||
|
|
||||||
|
// Returns the maximum number of characters that will fit on a line
|
||||||
|
uint8_t st7565_max_chars(void);
|
||||||
|
|
||||||
|
// Returns the maximum number of lines that will fit on the display
|
||||||
|
uint8_t st7565_max_lines(void);
|
||||||
|
```
|
||||||
@@ -7,7 +7,7 @@ The swap-hands action allows support for one-handed typing without requiring a s
|
|||||||
The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck:
|
The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck:
|
||||||
|
|
||||||
```C
|
```C
|
||||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
|
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
|
||||||
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
|
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
|
||||||
{{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
|
{{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
|||||||
[TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS),
|
[TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add tap dance item in place of a key code
|
// Add tap dance item to your keymap in place of a keycode
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
// ...
|
// ...
|
||||||
TD(TD_ESC_CAPS)
|
TD(TD_ESC_CAPS)
|
||||||
@@ -206,20 +206,22 @@ You will need a few things that can be used for 'Quad Function Tap-Dance'.
|
|||||||
You'll need to add these to the top of your `keymap.c` file, before your keymap.
|
You'll need to add these to the top of your `keymap.c` file, before your keymap.
|
||||||
|
|
||||||
```c
|
```c
|
||||||
|
typedef enum {
|
||||||
|
TD_NONE,
|
||||||
|
TD_UNKNOWN,
|
||||||
|
TD_SINGLE_TAP,
|
||||||
|
TD_SINGLE_HOLD,
|
||||||
|
TD_DOUBLE_TAP,
|
||||||
|
TD_DOUBLE_HOLD,
|
||||||
|
TD_DOUBLE_SINGLE_TAP, // Send two single taps
|
||||||
|
TD_TRIPLE_TAP,
|
||||||
|
TD_TRIPLE_HOLD
|
||||||
|
} td_state_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
bool is_press_action;
|
bool is_press_action;
|
||||||
uint8_t state;
|
td_state_t state;
|
||||||
} tap;
|
} td_tap_t;
|
||||||
|
|
||||||
enum {
|
|
||||||
SINGLE_TAP = 1,
|
|
||||||
SINGLE_HOLD,
|
|
||||||
DOUBLE_TAP,
|
|
||||||
DOUBLE_HOLD,
|
|
||||||
DOUBLE_SINGLE_TAP, // Send two single taps
|
|
||||||
TRIPLE_TAP,
|
|
||||||
TRIPLE_HOLD
|
|
||||||
};
|
|
||||||
|
|
||||||
// Tap dance enums
|
// Tap dance enums
|
||||||
enum {
|
enum {
|
||||||
@@ -227,7 +229,7 @@ enum {
|
|||||||
SOME_OTHER_DANCE
|
SOME_OTHER_DANCE
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8_t cur_dance(qk_tap_dance_state_t *state);
|
td_state_t cur_dance(qk_tap_dance_state_t *state);
|
||||||
|
|
||||||
// For the x tap dance. Put it here so it can be used in any keymap
|
// For the x tap dance. Put it here so it can be used in any keymap
|
||||||
void x_finished(qk_tap_dance_state_t *state, void *user_data);
|
void x_finished(qk_tap_dance_state_t *state, void *user_data);
|
||||||
@@ -261,61 +263,61 @@ Now, at the bottom of your `keymap.c` file, you'll need to add the following:
|
|||||||
* Letters used in common words as a double. For example 'p' in 'pepper'. If a tap dance function existed on the
|
* Letters used in common words as a double. For example 'p' in 'pepper'. If a tap dance function existed on the
|
||||||
* letter 'p', the word 'pepper' would be quite frustating to type.
|
* letter 'p', the word 'pepper' would be quite frustating to type.
|
||||||
*
|
*
|
||||||
* For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested
|
* For the third point, there does exist the 'TD_DOUBLE_SINGLE_TAP', however this is not fully tested
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
uint8_t cur_dance(qk_tap_dance_state_t *state) {
|
td_state_t cur_dance(qk_tap_dance_state_t *state) {
|
||||||
if (state->count == 1) {
|
if (state->count == 1) {
|
||||||
if (state->interrupted || !state->pressed) return SINGLE_TAP;
|
if (state->interrupted || !state->pressed) return TD_SINGLE_TAP;
|
||||||
// Key has not been interrupted, but the key is still held. Means you want to send a 'HOLD'.
|
// Key has not been interrupted, but the key is still held. Means you want to send a 'HOLD'.
|
||||||
else return SINGLE_HOLD;
|
else return TD_SINGLE_HOLD;
|
||||||
} else if (state->count == 2) {
|
} else if (state->count == 2) {
|
||||||
// DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap
|
// TD_DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap
|
||||||
// action when hitting 'pp'. Suggested use case for this return value is when you want to send two
|
// action when hitting 'pp'. Suggested use case for this return value is when you want to send two
|
||||||
// keystrokes of the key, and not the 'double tap' action/macro.
|
// keystrokes of the key, and not the 'double tap' action/macro.
|
||||||
if (state->interrupted) return DOUBLE_SINGLE_TAP;
|
if (state->interrupted) return TD_DOUBLE_SINGLE_TAP;
|
||||||
else if (state->pressed) return DOUBLE_HOLD;
|
else if (state->pressed) return TD_DOUBLE_HOLD;
|
||||||
else return DOUBLE_TAP;
|
else return TD_DOUBLE_TAP;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assumes no one is trying to type the same letter three times (at least not quickly).
|
// Assumes no one is trying to type the same letter three times (at least not quickly).
|
||||||
// If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add
|
// If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add
|
||||||
// an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP'
|
// an exception here to return a 'TD_TRIPLE_SINGLE_TAP', and define that enum just like 'TD_DOUBLE_SINGLE_TAP'
|
||||||
if (state->count == 3) {
|
if (state->count == 3) {
|
||||||
if (state->interrupted || !state->pressed) return TRIPLE_TAP;
|
if (state->interrupted || !state->pressed) return TD_TRIPLE_TAP;
|
||||||
else return TRIPLE_HOLD;
|
else return TD_TRIPLE_HOLD;
|
||||||
} else return 8; // Magic number. At some point this method will expand to work for more presses
|
} else return TD_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create an instance of 'tap' for the 'x' tap dance.
|
// Create an instance of 'td_tap_t' for the 'x' tap dance.
|
||||||
static tap xtap_state = {
|
static td_tap_t xtap_state = {
|
||||||
.is_press_action = true,
|
.is_press_action = true,
|
||||||
.state = 0
|
.state = TD_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
void x_finished(qk_tap_dance_state_t *state, void *user_data) {
|
void x_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
xtap_state.state = cur_dance(state);
|
xtap_state.state = cur_dance(state);
|
||||||
switch (xtap_state.state) {
|
switch (xtap_state.state) {
|
||||||
case SINGLE_TAP: register_code(KC_X); break;
|
case TD_SINGLE_TAP: register_code(KC_X); break;
|
||||||
case SINGLE_HOLD: register_code(KC_LCTRL); break;
|
case TD_SINGLE_HOLD: register_code(KC_LCTRL); break;
|
||||||
case DOUBLE_TAP: register_code(KC_ESC); break;
|
case TD_DOUBLE_TAP: register_code(KC_ESC); break;
|
||||||
case DOUBLE_HOLD: register_code(KC_LALT); break;
|
case TD_DOUBLE_HOLD: register_code(KC_LALT); break;
|
||||||
// Last case is for fast typing. Assuming your key is `f`:
|
// Last case is for fast typing. Assuming your key is `f`:
|
||||||
// For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
|
// For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
|
||||||
// In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
|
// In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
|
||||||
case DOUBLE_SINGLE_TAP: tap_code(KC_X); register_code(KC_X);
|
case TD_DOUBLE_SINGLE_TAP: tap_code(KC_X); register_code(KC_X);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void x_reset(qk_tap_dance_state_t *state, void *user_data) {
|
void x_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
switch (xtap_state.state) {
|
switch (xtap_state.state) {
|
||||||
case SINGLE_TAP: unregister_code(KC_X); break;
|
case TD_SINGLE_TAP: unregister_code(KC_X); break;
|
||||||
case SINGLE_HOLD: unregister_code(KC_LCTRL); break;
|
case TD_SINGLE_HOLD: unregister_code(KC_LCTRL); break;
|
||||||
case DOUBLE_TAP: unregister_code(KC_ESC); break;
|
case TD_DOUBLE_TAP: unregister_code(KC_ESC); break;
|
||||||
case DOUBLE_HOLD: unregister_code(KC_LALT);
|
case TD_DOUBLE_HOLD: unregister_code(KC_LALT);
|
||||||
case DOUBLE_SINGLE_TAP: unregister_code(KC_X);
|
case TD_DOUBLE_SINGLE_TAP: unregister_code(KC_X);
|
||||||
}
|
}
|
||||||
xtap_state.state = 0;
|
xtap_state.state = TD_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
@@ -343,9 +345,11 @@ enum td_keycodes {
|
|||||||
|
|
||||||
// Define a type containing as many tapdance states as you need
|
// Define a type containing as many tapdance states as you need
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SINGLE_TAP,
|
TD_NONE,
|
||||||
SINGLE_HOLD,
|
TD_UNKNOWN,
|
||||||
DOUBLE_SINGLE_TAP
|
TD_SINGLE_TAP,
|
||||||
|
TD_SINGLE_HOLD,
|
||||||
|
TD_DOUBLE_SINGLE_TAP
|
||||||
} td_state_t;
|
} td_state_t;
|
||||||
|
|
||||||
// Create a global instance of the tapdance state type
|
// Create a global instance of the tapdance state type
|
||||||
@@ -354,7 +358,7 @@ static td_state_t td_state;
|
|||||||
// Declare your tapdance functions:
|
// Declare your tapdance functions:
|
||||||
|
|
||||||
// Function to determine the current tapdance state
|
// Function to determine the current tapdance state
|
||||||
uint8_t cur_dance(qk_tap_dance_state_t *state);
|
td_state_t cur_dance(qk_tap_dance_state_t *state);
|
||||||
|
|
||||||
// `finished` and `reset` functions for each tapdance keycode
|
// `finished` and `reset` functions for each tapdance keycode
|
||||||
void altlp_finished(qk_tap_dance_state_t *state, void *user_data);
|
void altlp_finished(qk_tap_dance_state_t *state, void *user_data);
|
||||||
@@ -365,14 +369,14 @@ Below your `LAYOUT`, define each of the tapdance functions:
|
|||||||
|
|
||||||
```c
|
```c
|
||||||
// Determine the tapdance state to return
|
// Determine the tapdance state to return
|
||||||
uint8_t cur_dance(qk_tap_dance_state_t *state) {
|
td_state_t cur_dance(qk_tap_dance_state_t *state) {
|
||||||
if (state->count == 1) {
|
if (state->count == 1) {
|
||||||
if (state->interrupted || !state->pressed) return SINGLE_TAP;
|
if (state->interrupted || !state->pressed) return TD_SINGLE_TAP;
|
||||||
else return SINGLE_HOLD;
|
else return TD_SINGLE_HOLD;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->count == 2) return DOUBLE_SINGLE_TAP;
|
if (state->count == 2) return TD_DOUBLE_SINGLE_TAP;
|
||||||
else return 3; // Any number higher than the maximum state value you return above
|
else return TD_UNKNOWN; // Any number higher than the maximum state value you return above
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle the possible states for each tapdance keycode you define:
|
// Handle the possible states for each tapdance keycode you define:
|
||||||
@@ -380,13 +384,13 @@ uint8_t cur_dance(qk_tap_dance_state_t *state) {
|
|||||||
void altlp_finished(qk_tap_dance_state_t *state, void *user_data) {
|
void altlp_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
td_state = cur_dance(state);
|
td_state = cur_dance(state);
|
||||||
switch (td_state) {
|
switch (td_state) {
|
||||||
case SINGLE_TAP:
|
case TD_SINGLE_TAP:
|
||||||
register_code16(KC_LPRN);
|
register_code16(KC_LPRN);
|
||||||
break;
|
break;
|
||||||
case SINGLE_HOLD:
|
case TD_SINGLE_HOLD:
|
||||||
register_mods(MOD_BIT(KC_LALT)); // For a layer-tap key, use `layer_on(_MY_LAYER)` here
|
register_mods(MOD_BIT(KC_LALT)); // For a layer-tap key, use `layer_on(_MY_LAYER)` here
|
||||||
break;
|
break;
|
||||||
case DOUBLE_SINGLE_TAP: // Allow nesting of 2 parens `((` within tapping term
|
case TD_DOUBLE_SINGLE_TAP: // Allow nesting of 2 parens `((` within tapping term
|
||||||
tap_code16(KC_LPRN);
|
tap_code16(KC_LPRN);
|
||||||
register_code16(KC_LPRN);
|
register_code16(KC_LPRN);
|
||||||
}
|
}
|
||||||
@@ -394,13 +398,13 @@ void altlp_finished(qk_tap_dance_state_t *state, void *user_data) {
|
|||||||
|
|
||||||
void altlp_reset(qk_tap_dance_state_t *state, void *user_data) {
|
void altlp_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
switch (td_state) {
|
switch (td_state) {
|
||||||
case SINGLE_TAP:
|
case TD_SINGLE_TAP:
|
||||||
unregister_code16(KC_LPRN);
|
unregister_code16(KC_LPRN);
|
||||||
break;
|
break;
|
||||||
case SINGLE_HOLD:
|
case TD_SINGLE_HOLD:
|
||||||
unregister_mods(MOD_BIT(KC_LALT)); // For a layer-tap key, use `layer_off(_MY_LAYER)` here
|
unregister_mods(MOD_BIT(KC_LALT)); // For a layer-tap key, use `layer_off(_MY_LAYER)` here
|
||||||
break;
|
break;
|
||||||
case DOUBLE_SINGLE_TAP:
|
case TD_DOUBLE_SINGLE_TAP:
|
||||||
unregister_code16(KC_LPRN);
|
unregister_code16(KC_LPRN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -420,17 +424,19 @@ Tap Dance can be used to mimic MO(layer) and TG(layer) functionality. For this e
|
|||||||
The first step is to include the following code towards the beginning of your `keymap.c`:
|
The first step is to include the following code towards the beginning of your `keymap.c`:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
|
// Define a type for as many tap dance states as you need
|
||||||
|
typedef enum {
|
||||||
|
TD_NONE,
|
||||||
|
TD_UNKNOWN,
|
||||||
|
TD_SINGLE_TAP,
|
||||||
|
TD_SINGLE_HOLD,
|
||||||
|
TD_DOUBLE_TAP
|
||||||
|
} td_state_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
bool is_press_action;
|
bool is_press_action;
|
||||||
uint8_t state;
|
td_state_t state;
|
||||||
} tap;
|
} td_tap_t;
|
||||||
|
|
||||||
// Define a type for as many tap dance states as you need
|
|
||||||
enum {
|
|
||||||
SINGLE_TAP = 1,
|
|
||||||
SINGLE_HOLD,
|
|
||||||
DOUBLE_TAP
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
QUOT_LAYR, // Our custom tap dance key; add any other tap dance keys to this enum
|
QUOT_LAYR, // Our custom tap dance key; add any other tap dance keys to this enum
|
||||||
@@ -439,7 +445,7 @@ enum {
|
|||||||
// Declare the functions to be used with your tap dance key(s)
|
// Declare the functions to be used with your tap dance key(s)
|
||||||
|
|
||||||
// Function associated with all tap dances
|
// Function associated with all tap dances
|
||||||
uint8_t cur_dance(qk_tap_dance_state_t *state);
|
td_state_t cur_dance(qk_tap_dance_state_t *state);
|
||||||
|
|
||||||
// Functions associated with individual tap dances
|
// Functions associated with individual tap dances
|
||||||
void ql_finished(qk_tap_dance_state_t *state, void *user_data);
|
void ql_finished(qk_tap_dance_state_t *state, void *user_data);
|
||||||
@@ -450,31 +456,31 @@ Towards the bottom of your `keymap.c`, include the following code:
|
|||||||
|
|
||||||
```c
|
```c
|
||||||
// Determine the current tap dance state
|
// Determine the current tap dance state
|
||||||
uint8_t cur_dance(qk_tap_dance_state_t *state) {
|
td_state_t cur_dance(qk_tap_dance_state_t *state) {
|
||||||
if (state->count == 1) {
|
if (state->count == 1) {
|
||||||
if (!state->pressed) return SINGLE_TAP;
|
if (!state->pressed) return TD_SINGLE_TAP;
|
||||||
else return SINGLE_HOLD;
|
else return TD_SINGLE_HOLD;
|
||||||
} else if (state->count == 2) return DOUBLE_TAP;
|
} else if (state->count == 2) return TD_DOUBLE_TAP;
|
||||||
else return 8;
|
else return TD_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize tap structure associated with example tap dance key
|
// Initialize tap structure associated with example tap dance key
|
||||||
static tap ql_tap_state = {
|
static td_tap_t ql_tap_state = {
|
||||||
.is_press_action = true,
|
.is_press_action = true,
|
||||||
.state = 0
|
.state = TD_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
// Functions that control what our tap dance key does
|
// Functions that control what our tap dance key does
|
||||||
void ql_finished(qk_tap_dance_state_t *state, void *user_data) {
|
void ql_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
ql_tap_state.state = cur_dance(state);
|
ql_tap_state.state = cur_dance(state);
|
||||||
switch (ql_tap_state.state) {
|
switch (ql_tap_state.state) {
|
||||||
case SINGLE_TAP:
|
case TD_SINGLE_TAP:
|
||||||
tap_code(KC_QUOT);
|
tap_code(KC_QUOT);
|
||||||
break;
|
break;
|
||||||
case SINGLE_HOLD:
|
case TD_SINGLE_HOLD:
|
||||||
layer_on(_MY_LAYER);
|
layer_on(_MY_LAYER);
|
||||||
break;
|
break;
|
||||||
case DOUBLE_TAP:
|
case TD_DOUBLE_TAP:
|
||||||
// Check to see if the layer is already set
|
// Check to see if the layer is already set
|
||||||
if (layer_state_is(_MY_LAYER)) {
|
if (layer_state_is(_MY_LAYER)) {
|
||||||
// If already set, then switch it off
|
// If already set, then switch it off
|
||||||
@@ -489,10 +495,10 @@ void ql_finished(qk_tap_dance_state_t *state, void *user_data) {
|
|||||||
|
|
||||||
void ql_reset(qk_tap_dance_state_t *state, void *user_data) {
|
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 the key was held down and now is released then switch off the layer
|
||||||
if (ql_tap_state.state == SINGLE_HOLD) {
|
if (ql_tap_state.state == TD_SINGLE_HOLD) {
|
||||||
layer_off(_MY_LAYER);
|
layer_off(_MY_LAYER);
|
||||||
}
|
}
|
||||||
ql_tap_state.state = 0;
|
ql_tap_state.state = TD_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Associate our tap dance key with its functionality
|
// Associate our tap dance key with its functionality
|
||||||
@@ -505,7 +511,7 @@ The above code is similar to that used in previous examples. The one point to no
|
|||||||
|
|
||||||
The use of `cur_dance()` and `ql_tap_state` mirrors the above examples.
|
The use of `cur_dance()` and `ql_tap_state` mirrors the above examples.
|
||||||
|
|
||||||
The `case:SINGLE_TAP` in `ql_finished` is similar to the above examples. The `SINGLE_HOLD` case works in conjunction with `ql_reset()` to switch to `_MY_LAYER` while the tap dance key is held, and to switch away from `_MY_LAYER` when the key is released. This mirrors the use of `MO(_MY_LAYER)`. The `DOUBLE_TAP` case works by checking whether `_MY_LAYER` is the active layer, and toggling it on or off accordingly. This mirrors the use of `TG(_MY_LAYER)`.
|
The `case: TD_SINGLE_TAP` in `ql_finished` is similar to the above examples. The `TD_SINGLE_HOLD` case works in conjunction with `ql_reset()` to switch to `_MY_LAYER` while the tap dance key is held, and to switch away from `_MY_LAYER` when the key is released. This mirrors the use of `MO(_MY_LAYER)`. The `TD_DOUBLE_TAP` case works by checking whether `_MY_LAYER` is the active layer, and toggling it on or off accordingly. This mirrors the use of `TG(_MY_LAYER)`.
|
||||||
|
|
||||||
`tap_dance_actions[]` works similar to the above examples. Note that I used `ACTION_TAP_DANCE_FN_ADVANCED_TIME()` instead of `ACTION_TAP_DANCE_FN_ADVANCED()`. This is because I like my `TAPPING_TERM` to be short (\~175ms) for my non-tap-dance keys but find that this is too quick for me to reliably complete tap dance actions - thus the increased time of 275ms here.
|
`tap_dance_actions[]` works similar to the above examples. Note that I used `ACTION_TAP_DANCE_FN_ADVANCED_TIME()` instead of `ACTION_TAP_DANCE_FN_ADVANCED()`. This is because I like my `TAPPING_TERM` to be short (\~175ms) for my non-tap-dance keys but find that this is too quick for me to reliably complete tap dance actions - thus the increased time of 275ms here.
|
||||||
|
|
||||||
|
|||||||
@@ -126,6 +126,8 @@ The following input modes are available:
|
|||||||
Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else.
|
Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else.
|
||||||
By default, this mode uses Ctrl+Shift+U (`LCTL(LSFT(KC_U))`) to start Unicode input, but this can be changed by defining [`UNICODE_KEY_LNX`](#input-key-configuration) with a different keycode. This might be required for IBus versions ≥1.5.15, where Ctrl+Shift+U behavior is consolidated into Ctrl+Shift+E.
|
By default, this mode uses Ctrl+Shift+U (`LCTL(LSFT(KC_U))`) to start Unicode input, but this can be changed by defining [`UNICODE_KEY_LNX`](#input-key-configuration) with a different keycode. This might be required for IBus versions ≥1.5.15, where Ctrl+Shift+U behavior is consolidated into Ctrl+Shift+E.
|
||||||
|
|
||||||
|
Users who wish support in non-GTK apps without IBus may need to resort to a more indirect method, such as creating a custom keyboard layout ([more on this method](#custom-linux-layout)).
|
||||||
|
|
||||||
* **`UC_WIN`**: _(not recommended)_ Windows built-in hex numpad Unicode input. Supports code points up to `0xFFFF`.
|
* **`UC_WIN`**: _(not recommended)_ Windows built-in hex numpad Unicode input. Supports code points up to `0xFFFF`.
|
||||||
|
|
||||||
To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Reboot afterwards.
|
To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Reboot afterwards.
|
||||||
@@ -228,7 +230,7 @@ send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
|
|||||||
|
|
||||||
Example uses include sending Unicode strings when a key is pressed, as described in [Macros](feature_macros.md).
|
Example uses include sending Unicode strings when a key is pressed, as described in [Macros](feature_macros.md).
|
||||||
|
|
||||||
### `send_unicode_hex_string()`
|
### `send_unicode_hex_string()` (Deprecated)
|
||||||
|
|
||||||
Similar to `send_unicode_string()`, but the characters are represented by their Unicode code points, written in hexadecimal and separated by spaces. For example, the table flip above would be achieved with:
|
Similar to `send_unicode_string()`, but the characters are represented by their Unicode code points, written in hexadecimal and separated by spaces. For example, the table flip above would be achieved with:
|
||||||
|
|
||||||
@@ -270,3 +272,22 @@ AutoHotkey inserts the Text right of `Send, ` when this combination is pressed.
|
|||||||
|
|
||||||
If you enable the US International layout on the system, it will use punctuation to accent the characters. For instance, typing "\`a" will result in à.
|
If you enable the US International layout on the system, it will use punctuation to accent the characters. For instance, typing "\`a" will result in à.
|
||||||
You can find details on how to enable this [here](https://support.microsoft.com/en-us/help/17424/windows-change-keyboard-layout).
|
You can find details on how to enable this [here](https://support.microsoft.com/en-us/help/17424/windows-change-keyboard-layout).
|
||||||
|
|
||||||
|
## Software keyboard layout on Linux :id=custom-linux-layout
|
||||||
|
|
||||||
|
This method does not require Unicode support on the keyboard itself but instead uses a custom keyboard layout for Xorg. This is how special characters are inserted by regular keyboards. This does not require IBus and works in practically all software. Help on creating a custom layout can be found [here](https://www.linux.com/news/creating-custom-keyboard-layouts-x11-using-xkb/), [here](http://karols.github.io/blog/2013/11/18/creating-custom-keyboard-layouts-for-linux/) and [here](https://wiki.archlinux.org/index.php/X_keyboard_extension). An example of how you could edit the `us` layout to gain 🤣 on `RALT(KC_R)`:
|
||||||
|
|
||||||
|
Edit the keyboard layout file `/usr/share/X11/xkb/symbols/us`.
|
||||||
|
|
||||||
|
Inside `xkb_symbols "basic" {`, add `include "level3(ralt_switch)"`.
|
||||||
|
|
||||||
|
Find the line defining the R key and add an entry to the list, making it look like this:
|
||||||
|
```
|
||||||
|
key <AD04> { [ r, R, U1F923 ] };
|
||||||
|
```
|
||||||
|
|
||||||
|
Save the file and run the command `setxkbmap us` to reload the layout.
|
||||||
|
|
||||||
|
You can define one custom character for key defined in the layout, and another if you populate the fourth layer. Additional layers up to 8th are also possible.
|
||||||
|
|
||||||
|
This method is specific to the computer on which you set the custom layout. The custom keys will be available only when Xorg is running. To avoid accidents, you should always reload the layout using `setxkbmap`, otherwise an invalid layout could prevent you from logging into your system, locking you out.
|
||||||
|
|||||||
@@ -1,25 +1,62 @@
|
|||||||
# Word Per Minute (WPM) Calculcation
|
# Word Per Minute (WPM) Calculcation
|
||||||
|
|
||||||
The WPM feature uses time between keystrokes to compute a rolling average words
|
The WPM feature uses time between keystrokes to compute a rolling average words per minute rate and makes this available for various uses.
|
||||||
per minute rate and makes this available for various uses.
|
|
||||||
|
|
||||||
Enable the WPM system by adding this to your `rules.mk`:
|
Enable the WPM system by adding this to your `rules.mk`:
|
||||||
|
|
||||||
WPM_ENABLE = yes
|
WPM_ENABLE = yes
|
||||||
|
|
||||||
For split keyboards using soft serial, the computed WPM
|
For split keyboards using soft serial, the computed WPM score will be available on the master AND slave half.
|
||||||
score will be available on the master AND slave half.
|
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
|Define |Default | Description |
|
||||||
|
|-----------------------------|--------------|------------------------------------------------------------------------------------------|
|
||||||
|
|`WPM_SMOOTHING` |`0.0487` | Sets the smoothing to about 40 keystrokes |
|
||||||
|
|`WPM_ESTIMATED_WORD_SIZE` |`5` | This is the value used when estimating average word size (for regression and normal use) |
|
||||||
|
|`WPM_ALLOW_COUNT_REGRESSOIN` |_Not defined_ | If defined allows the WPM to be decreased when hitting Delete or Backspace |
|
||||||
## Public Functions
|
## Public Functions
|
||||||
|
|
||||||
`uint8_t get_current_wpm(void);`
|
|Function |Description |
|
||||||
This function returns the current WPM as an unsigned integer.
|
|--------------------------|--------------------------------------------------|
|
||||||
|
|`get_current_wpm(void)` | Returns the current WPM as a value between 0-255 |
|
||||||
|
|`set_current_wpm(x)` | Sets the current WPM to `x` (between 0-255) |
|
||||||
|
|
||||||
|
## Callbacks
|
||||||
|
|
||||||
## Customized keys for WPM calc
|
By default, the WPM score only includes letters, numbers, space and some punctuation. If you want to change the set of characters considered as part of the WPM calculation, you can implement your own `bool wpm_keycode_user(uint16_t keycode)` and return true for any characters you would like included in the calculation, or false to not count that particular keycode.
|
||||||
|
|
||||||
By default, the WPM score only includes letters, numbers, space and some
|
For instance, the default is:
|
||||||
punctuation. If you want to change the set of characters considered as part of
|
|
||||||
the WPM calculation, you can implement `wpm_keycode_user(uint16_t keycode)`
|
```c
|
||||||
and return true for any characters you would like included in the calculation,
|
bool wpm_keycode_user(uint16_t keycode) {
|
||||||
or false to not count that particular keycode.
|
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
|
||||||
|
keycode = keycode & 0xFF;
|
||||||
|
} else if (keycode > 0xFF) {
|
||||||
|
keycode = 0;
|
||||||
|
}
|
||||||
|
if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLASH)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Additionally, if `WPM_ALLOW_COUNT_REGRESSION` is defined, there is the `uint8_t wpm_regress_count(uint16_t keycode)` function that allows you to decrease the WPM. This is useful if you want to be able to penalize certain keycodes (or even combinations).
|
||||||
|
|
||||||
|
__attribute__((weak)) uint8_t wpm_regress_count(uint16_t keycode) {
|
||||||
|
bool weak_modded = (keycode >= QK_LCTL && keycode < QK_LSFT) || (keycode >= QK_RCTL && keycode < QK_RSFT);
|
||||||
|
|
||||||
|
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
|
||||||
|
keycode = keycode & 0xFF;
|
||||||
|
} else if (keycode > 0xFF) {
|
||||||
|
keycode = 0;
|
||||||
|
}
|
||||||
|
if (((get_mods() | get_oneshot_mods()) & MOD_MASK_CTRL} || weak_modded) && (keycode == KC_DEL || keycode == KC_BSPC)) {
|
||||||
|
return WPM_ESTIMATED_WORD_SIZE;
|
||||||
|
}
|
||||||
|
if (keycode == KC_DEL || keycode == KC_BSPC) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -249,3 +249,29 @@ Flashing sequence:
|
|||||||
2. Wait for the OS to detect the device
|
2. Wait for the OS to detect the device
|
||||||
3. Flash a .bin file
|
3. Flash a .bin file
|
||||||
4. Reset the device into application mode (may be done automatically)
|
4. Reset the device into application mode (may be done automatically)
|
||||||
|
|
||||||
|
## tinyuf2
|
||||||
|
|
||||||
|
Keyboards may opt into supporting the tinyuf2 bootloader. This is currently only supported on the F411 blackpill.
|
||||||
|
|
||||||
|
The `rules.mk` setting for this bootloader is `tinyuf2`, and can be specified at the keymap or user level.
|
||||||
|
|
||||||
|
To ensure compatibility with the tinyuf2 bootloader, make sure this block is present in your `rules.mk`:
|
||||||
|
|
||||||
|
```make
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = tinyuf2
|
||||||
|
```
|
||||||
|
|
||||||
|
Compatible flashers:
|
||||||
|
|
||||||
|
* Any application able to copy a file from one place to another, such as _macOS Finder_ or _Windows Explorer_.
|
||||||
|
|
||||||
|
Flashing sequence:
|
||||||
|
|
||||||
|
1. Enter the bootloader using any of the following methods:
|
||||||
|
* Tap the `RESET` keycode
|
||||||
|
* Double-tap the `nRST` button on the PCB.
|
||||||
|
2. Wait for the OS to detect the device
|
||||||
|
3. Copy the .uf2 file to the new USB disk
|
||||||
|
4. Wait for the keyboard to become available
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ This project includes a Docker workflow that will allow you to build a new firmw
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
The main prerequisite is a working `docker` install.
|
The main prerequisite is a working `docker` or `podman` install.
|
||||||
* [Docker CE](https://docs.docker.com/install/#supported-platforms)
|
* [Docker CE](https://docs.docker.com/install/#supported-platforms)
|
||||||
|
* [Podman](https://podman.io/getting-started/installation)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -38,6 +39,13 @@ util/docker_build.sh
|
|||||||
# Reads parameters as input (leave blank for all keyboards/keymaps)
|
# Reads parameters as input (leave blank for all keyboards/keymaps)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can manually set which container runtime you want to use by setting the `RUNTIME` environment variable to it's name or path.
|
||||||
|
By default docker or podman are automatically detected and docker is preferred over podman.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
RUNTIME="podman" util/docker_build.sh keyboard:keymap:target
|
||||||
|
```
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
### Why can't I flash on Windows/macOS
|
### Why can't I flash on Windows/macOS
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ The `<target>` means the following
|
|||||||
|
|
||||||
The following targets are for developers:
|
The following targets are for developers:
|
||||||
|
|
||||||
* `show-path` shows the path of the source and object files.
|
* `show_path` shows the path of the source and object files.
|
||||||
* `dump-vars` dumps the makefile variable.
|
* `dump_vars` dumps the makefile variable.
|
||||||
* `objs-size` displays the size of individual object files.
|
* `objs-size` displays the size of individual object files.
|
||||||
* `show_build_options` shows the options set in 'rules.mk'.
|
* `show_build_options` shows the options set in 'rules.mk'.
|
||||||
* `check-md5` displays the md5 checksum of the generated binary file.
|
* `check-md5` displays the md5 checksum of the generated binary file.
|
||||||
|
|||||||
@@ -155,6 +155,7 @@
|
|||||||
* [QMK への貢献](ja/contributing.md)
|
* [QMK への貢献](ja/contributing.md)
|
||||||
* [QMK ドキュメントの翻訳](ja/translating.md)
|
* [QMK ドキュメントの翻訳](ja/translating.md)
|
||||||
* [設定オプション](ja/config_options.md)
|
* [設定オプション](ja/config_options.md)
|
||||||
|
* [データ駆動型コンフィギュレーション](ja/data_driven_config.md)
|
||||||
* [Make ドキュメント](ja/getting_started_make_guide.md)
|
* [Make ドキュメント](ja/getting_started_make_guide.md)
|
||||||
* [ドキュメント ベストプラクティス](ja/documentation_best_practices.md)
|
* [ドキュメント ベストプラクティス](ja/documentation_best_practices.md)
|
||||||
* [ドキュメント テンプレート](ja/documentation_templates.md)
|
* [ドキュメント テンプレート](ja/documentation_templates.md)
|
||||||
|
|||||||
@@ -33,8 +33,11 @@ QMK は十分な容量のフラッシュメモリを備えた USB 対応 AVR ま
|
|||||||
* [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)
|
* [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)
|
||||||
* [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html)
|
* [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html)
|
||||||
* [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html)
|
* [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html)
|
||||||
|
* [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html)
|
||||||
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
|
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
|
||||||
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
|
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
|
||||||
|
* [STM32L433](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
|
||||||
|
* [STM32L443](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
|
||||||
|
|
||||||
### NXP (Kinetis)
|
### NXP (Kinetis)
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# キーボードの挙動をカスタマイズする方法
|
# キーボードの挙動をカスタマイズする方法
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 0.10.52:docs/custom_quantum_functions.md
|
original document: 0.12.41:docs/custom_quantum_functions.md
|
||||||
git diff 0.10.52 HEAD -- docs/custom_quantum_functions.md | cat
|
git diff 0.12.41 HEAD -- docs/custom_quantum_functions.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
多くの人にとって、カスタムキーボードはボタンの押下をコンピュータに送信するだけではありません。単純なボタンの押下やマクロよりも複雑なことを実行できるようにしたいでしょう。QMK にはコードを挿入したり、機能を上書きしたり、様々な状況でキーボードの挙動をカスタマイズできるフックがあります。
|
多くの人にとって、カスタムキーボードはボタンの押下をコンピュータに送信するだけではありません。単純なボタンの押下やマクロよりも複雑なことを実行できるようにしたいでしょう。QMK にはコードを挿入したり、機能を上書きしたり、様々な状況でキーボードの挙動をカスタマイズできるフックがあります。
|
||||||
@@ -190,6 +190,14 @@ void keyboard_post_init_user(void) {
|
|||||||
|
|
||||||
カスタムマトリックススキャンコードが必要な場合は、この関数を使う必要があります。また、カスタムステータス出力 (LED あるいはディスプレイなど)や、ユーザが入力していない場合でも定期的にトリガーするその他の機能のために使うことができます。
|
カスタムマトリックススキャンコードが必要な場合は、この関数を使う必要があります。また、カスタムステータス出力 (LED あるいはディスプレイなど)や、ユーザが入力していない場合でも定期的にトリガーするその他の機能のために使うことができます。
|
||||||
|
|
||||||
|
# キーボードハウスキーピング :id=keyboard-housekeeping
|
||||||
|
|
||||||
|
* キーボード/リビジョン: `void housekeeping_task_kb(void)`
|
||||||
|
* キーマップ: `void housekeeping_task_user(void)`
|
||||||
|
|
||||||
|
この関数は、全ての QMK 処理の最後に、次の繰り返しを開始する前に呼び出されます。`housekeeping_task_*` の関数が呼び出された時点で、QMK が最後のマトリックススキャンを処理したと、安全に見なすことができます -- レイヤーの状態が更新され、USB レポートが送信され、LED が更新され、表示が描画されています。
|
||||||
|
|
||||||
|
`matrix_scan_*` と同様に、これらは MCU が処理できる頻度で呼び出されます。キーボードの応答性を維持するために、これらの関数の呼び出し中にできるだけ何もしないことをお勧めします。実際に何か特別なものを実装する必要がある場合に動作を停止させる可能性があります。
|
||||||
|
|
||||||
# キーボードアイドリング/ウェイクコード
|
# キーボードアイドリング/ウェイクコード
|
||||||
|
|
||||||
|
|||||||
123
docs/ja/data_driven_config.md
Normal file
123
docs/ja/data_driven_config.md
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
# データ駆動型コンフィギュレーション
|
||||||
|
|
||||||
|
<!---
|
||||||
|
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||||
|
original document: 0.12.7:docs/data_driven_config.md
|
||||||
|
git diff 0.12.7 HEAD -- docs/data_driven_config.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
このページでは、QMK のデータ駆動型 JSON コンフィギュレーションシステムがどのように動作するかを説明します。これは、QMK 自体に取り組みたい開発者を対象としています。
|
||||||
|
|
||||||
|
## ヒストリー
|
||||||
|
|
||||||
|
これまで、QMK は、`rules.mk` と `config.h` の2つのメカニズムを組み合わせてコンフィギュレーションされてきました。
|
||||||
|
この方法は、QMK がほんの一握りのキーボードをサポートしていたときは上手く機能していましたが、今では、サポートするキーボードは1500近くまで成長しました。
|
||||||
|
`keyboards` の下だけで6000個の設定ファイルがあることが推定されます。
|
||||||
|
これらのファイルの自由形式の性質と、重複を避けるために人々が使用してきたユニークなパターンが継続的なメンテナンスを困難にしており、また、多くのキーボードが時代遅れで時には理解が難しいパターンに従っています。
|
||||||
|
|
||||||
|
また、CLI に慣れていない人に QMK のパワーを提供することにも取り組んでおり、VIA などの他のプロジェクトでは、プログラムをインストールするのと同じくらい簡単に QMK を使用できるように取り組んでいます。
|
||||||
|
これらのツールには、ユーザーが QMK を最大限に活用できるように、キーボードのレイアウト方法や使用可能なピンと機能に関する情報が必要です。
|
||||||
|
その第一歩として `info.json` を導入しました。
|
||||||
|
QMK API は、これら3つの情報源(`config.h`、` rules.mk`、および `info.json`)を、エンドユーザーツールが使用できる信頼できる単一の情報源に結合するための取り組みです。
|
||||||
|
|
||||||
|
これで、`info.json`から `rules.mk` と `config.h` の値を生成することがサポートされ、信頼できる単一の情報源を持つことができます。
|
||||||
|
これにより、自動化されたツールを使用してキーボードを保守できるため、時間と保守作業を大幅に節約できます。
|
||||||
|
|
||||||
|
## 概要
|
||||||
|
|
||||||
|
C 側では何も変わりません。
|
||||||
|
新しいルールを作成したり、定義したりする必要がある場合は、同じプロセスに従います。
|
||||||
|
|
||||||
|
1. `docs/config_options.md` に追加します。
|
||||||
|
1. 適切なコアファイルにデフォルトを設定します。
|
||||||
|
1. 必要に応じて ifdef 文を追加します。
|
||||||
|
|
||||||
|
次に、新しい構成のサポートを `info.json` に追加する必要があります。
|
||||||
|
基本的なプロセスは次のとおりです。
|
||||||
|
|
||||||
|
1. `data/schemas/keyboards.jsonschema` のスキーマに追加します
|
||||||
|
1. `data/maps` にマッピングを追加します
|
||||||
|
1. (オプションおよび非推奨)構成を抽出/生成するコードを追加します。
|
||||||
|
* `lib/python/qmk/info.py`
|
||||||
|
* `lib/python/qmk/cli/generate/config_h.py`
|
||||||
|
* `lib/python/qmk/cli/generate/rules_mk.py`
|
||||||
|
|
||||||
|
## info.json にオプションを追加する
|
||||||
|
|
||||||
|
このセクションでは、info.json に `config.h`/`rules.mk` の値のサポートを追加することについて説明します。
|
||||||
|
|
||||||
|
### スキーマに追加する
|
||||||
|
|
||||||
|
QMK では、[jsonschema](https:json-schema.org) のファイルを `data/schemas` に保持しています。
|
||||||
|
キーボード固有の `info.json` ファイルに入る値は `keyboard.jsonschema` に保持されています。
|
||||||
|
エンドユーザーが編集できるようにしたい値はすべてここに入れなければなりません。
|
||||||
|
|
||||||
|
場合によっては、新しいトップレベルキーを追加するだけで済みます。
|
||||||
|
従うべきいくつかの例は、 `keyboard_name`、`maintainer`、 `processor`、および `url` です。
|
||||||
|
これは、オプションが自己完結型で、他のオプションと直接関係がない場合に適しています。
|
||||||
|
|
||||||
|
その他の場合、1つの `object` の中に、似ているオプションを集める必要があります。
|
||||||
|
これは、機能のサポートを追加する場合に特に当てはまります。
|
||||||
|
このために従うべきいくつかの例は、`indicators`、`matrix_pins`、および `rgblight` です。
|
||||||
|
新しいオプションを統合する方法がわからない場合は、[問題を開く](https://github.com/qmk/qmk_firmware/issues/new?assignees=&labels=cli%2C+python&template=other_issues.md&title=)か、[Discord で #cli に参加](https://discord.gg/heQPAgy)して、そこで会話を始めてください。
|
||||||
|
|
||||||
|
### マッピングを追加する
|
||||||
|
|
||||||
|
ほとんどの場合、単純なマッピングを追加することができます。
|
||||||
|
これらは `data/mappings/info_config.json` と `data/mappings/info_rules.json` に JSON ファイルとして保持され、それぞれ `config.h` と `rules.mk` のマッピングを制御します。
|
||||||
|
各マッピングは `config.h` または `rules.mk` 変数名をキーとし、値は以下のキーを持つハッシュです。
|
||||||
|
|
||||||
|
* `info_key`: (必須)この値の `info.json` 内の場所。 下記参照。
|
||||||
|
* `value_type`: (オプション)デフォルトは `str`。 この変数の値の形式。 下記参照。
|
||||||
|
* `to_json`: (オプション)デフォルトは `true`。 このマッピングを info.json から除外するには、`false` に設定します
|
||||||
|
* `to_c`: (オプション)デフォルトは `true`。 このマッピングを config.h から除外するには、`false` に設定します
|
||||||
|
* `warn_duplicate`: (オプション)デフォルトは `true`。 値が両方の場所に存在する場合に警告をオフにするには、`false` に設定します
|
||||||
|
|
||||||
|
#### Info Key
|
||||||
|
|
||||||
|
info.json 内の変数をアドレス指定するために JSON ドット表記を使用します。
|
||||||
|
たとえば、`info_json["rgblight"]["split_count"]` にアクセスするには、`rgblight.split_count` を指定します。
|
||||||
|
これにより、深くネストされたキーを単純な文字列でアドレス指定できます。
|
||||||
|
|
||||||
|
内部では [Dotty Dict](https://dotty-dict.readthedocs.io/en/latest/) を使用しています。これらの文字列がオブジェクトアクセスに変換される方法についてはそのドキュメントを参照してください。
|
||||||
|
|
||||||
|
#### Value Types
|
||||||
|
|
||||||
|
デフォルトでは、すべての値を単純な文字列として扱います。
|
||||||
|
値がより複雑な場合は、次のいずれかのタイプを使用してデータをインテリジェントに解析できます。
|
||||||
|
|
||||||
|
* `array`: 文字列のコンマ区切りの配列
|
||||||
|
* `array.int`: 整数のコンマ区切り配列
|
||||||
|
* `int`: 整数
|
||||||
|
* `hex`: 16進数としてフォーマットされた数値
|
||||||
|
* `list`: 文字列のスペース区切りの配列
|
||||||
|
* `mapping`: キーと値のペアのハッシュ
|
||||||
|
|
||||||
|
### 抽出するコードを追加する
|
||||||
|
|
||||||
|
ほとんどのユースケースは、上記のマッピングファイルによって解決できます。
|
||||||
|
できない場合は、代わりに設定値を抽出するコードを書くことができます。
|
||||||
|
|
||||||
|
QMK が完全な `info.json` を生成するときはいつでも、`config.h` と `rules.mk` から情報を抽出します。
|
||||||
|
あなたの新しい設定値のためのコードを `lib/python/qmk/info.py` に追加する必要があります。
|
||||||
|
通常、これは、新しい `_extract_<feature>()` 関数を追加してから、 `_extract_config_h()` または `_extract_rules_mk()` のいずれかで関数を呼び出すことを意味します。
|
||||||
|
|
||||||
|
このファイルの編集方法がわからない場合、または Python に慣れていない場合は、[issue を開く](https://github.com/qmk/qmk_firmware/issues/new?assignees=&labels=cli%2C+python&template=other_issues.md&title=)か [Discord で #cli に参加](https://discord.gg/heQPAgy)すると、この部分を誰かが手伝ってくれるでしょう。
|
||||||
|
|
||||||
|
### 生成するコードを追加する
|
||||||
|
|
||||||
|
パズルの最後のピースは、ビルドシステムに新しいオプションを提供することです。
|
||||||
|
これは、2つのファイルを生成することによって行われます。
|
||||||
|
|
||||||
|
* `.build/obj_<keyboard>/src/info_config.h`
|
||||||
|
* `.build/obj_<keyboard>/src/rules.mk`
|
||||||
|
|
||||||
|
この2つのファイルは、次のコードによって生成されます。
|
||||||
|
|
||||||
|
* `lib/python/qmk/cli/generate/config_h.py`
|
||||||
|
* `lib/python/qmk/cli/generate/rules_mk.py`
|
||||||
|
|
||||||
|
`config.h`値の場合、ルール用の関数を記述し、その関数を `generate_config_h()` で呼び出す必要があります。
|
||||||
|
|
||||||
|
`rules.mk` の新しいトップレベルの `info.json` キーがある場合は、`lib/python/qmk/cli/generate/rules_mk.py` の上部にある `info_to_rules` にキーを追加するだけです。
|
||||||
|
それ以外の場合は、`generate_rules_mk()` で機能の新しい if ブロックを作成する必要があります。
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
# よくあるビルドの質問
|
# よくあるビルドの質問
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 0.10.33:docs/faq_build.md
|
original document: 0.12.43:docs/faq_build.md
|
||||||
git diff 0.10.33 HEAD -- docs/faq_build.md | cat
|
git diff 0.12.43 HEAD -- docs/faq_build.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
このページは QMK のビルドに関する質問を説明します。まだビルドをしていない場合は、[ビルド環境のセットアップ](ja/getting_started_build_tools.md) および [Make 手順](ja/getting_started_make_guide.md)ガイドを読むべきです。
|
このページは QMK のビルドに関する質問を説明します。まだビルドをしていない場合は、[ビルド環境のセットアップ](ja/getting_started_build_tools.md) および [Make 手順](ja/getting_started_make_guide.md)ガイドを読むべきです。
|
||||||
@@ -22,73 +22,9 @@
|
|||||||
|
|
||||||
`make` を `sudo` で実行することは一般的には良い考えでは***なく***、可能であれば前者の方法のいずれかを使うべきです。
|
`make` を `sudo` で実行することは一般的には良い考えでは***なく***、可能であれば前者の方法のいずれかを使うべきです。
|
||||||
|
|
||||||
### Linux の `udev` ルール
|
### Linux の `udev` ルール :id=linux-udev-rules
|
||||||
|
|
||||||
Linux では、ブートローダデバイスと通信するには適切な権限が必要です。ファームウェアを書き込む時に `sudo` を使うか、`/etc/udev/rules.d/` にこのファイルを配置することで、通信することができます。
|
Linux では、ブートローダデバイスと通信するには適切な権限が必要です。ファームウェアを書き込む時に `sudo` を使うか(非推奨)、`/etc/udev/rules.d/` に[このファイル](https://github.com/qmk/qmk_firmware/tree/master/util/udev/50-qmk.rules)を配置することで、通信することができます。
|
||||||
|
|
||||||
**/etc/udev/rules.d/50-qmk.rules:**
|
|
||||||
```
|
|
||||||
# Atmel DFU
|
|
||||||
### ATmega16U2
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FEF", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
### ATmega32U2
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF0", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
### ATmega16U4
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF3", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
### ATmega32U4
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF4", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
### AT90USB64
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF9", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
### AT90USB128
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FFB", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
|
|
||||||
# Input Club
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1C11", ATTRS{idProduct}=="B007", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
|
|
||||||
# STM32duino
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1EAF", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
# STM32 DFU
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="DF11", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
|
|
||||||
# BootloadHID
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DF", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
|
|
||||||
# USBAspLoader
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DC", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
|
|
||||||
# ModemManager should ignore the following devices
|
|
||||||
# Atmel SAM-BA (Massdrop)
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="6124", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
|
|
||||||
# Caterina (Pro Micro)
|
|
||||||
## Spark Fun Electronics
|
|
||||||
### Pro Micro 3V3/8MHz
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
### Pro Micro 5V/16MHz
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
### LilyPad 3V3/8MHz (and some Pro Micro clones)
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9207", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
## Pololu Electronics
|
|
||||||
### A-Star 32U4
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1FFB", ATTRS{idProduct}=="0101", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
## Arduino SA
|
|
||||||
### Leonardo
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
### Micro
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
## Adafruit Industries LLC
|
|
||||||
### Feather 32U4
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000C", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
### ItsyBitsy 32U4 3V3/8MHz
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000D", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
### ItsyBitsy 32U4 5V/16MHz
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000E", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
## dog hunter AG
|
|
||||||
### Leonardo
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
### Micro
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
```
|
|
||||||
|
|
||||||
追加が完了したら、以下を実行します:
|
追加が完了したら、以下を実行します:
|
||||||
|
|
||||||
@@ -129,9 +65,9 @@ https://github.com/tmk/tmk_keyboard/issues/150
|
|||||||
- https://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
|
- https://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
|
||||||
|
|
||||||
### キーボードに書き込んだが何も起こらない、あるいはキーの押下が登録されない - ARM (rev6 planck、clueboard 60、hs60v2 など) でも同じ (Feb 2019)
|
### キーボードに書き込んだが何も起こらない、あるいはキーの押下が登録されない - ARM (rev6 planck、clueboard 60、hs60v2 など) でも同じ (Feb 2019)
|
||||||
ARM ベースのチップ上での EEPROM の動作によって、保存された設定が無効になる場合があります。これはデフォルトレイヤに影響し、まだ調査中の特定の環境下でキーボードが使えなくなる*しれません*。EEPROM のリセットでこれが修正されます。
|
ARM ベースのチップ上での EEPROM の動作によって、保存された設定が無効になる場合があります。これはデフォルトレイヤに影響し、まだ調査中の特定の環境下でキーボードが使えなくなるかも*しれません*。EEPROM のリセットでこれが修正されます。
|
||||||
|
|
||||||
[Planck rev6 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) を使って eeprom のリセットを強制することができます。このイメージを書き込んだ後で、通常のファームウェアを書き込むと、キーボードが_通常_ の動作順序に復元されます。
|
[Planck rev6 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) を使って eeprom のリセットを強制することができます。このイメージを書き込んだ後で、通常のファームウェアを書き込むと、キーボードが _通常_ の動作順序に復元されます。
|
||||||
[Preonic rev3 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/537849497313738762/preonic_rev3_default.bin)
|
[Preonic rev3 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/537849497313738762/preonic_rev3_default.bin)
|
||||||
|
|
||||||
いずれかの形式でブートマジックが有効になっている場合は、これも実行できるはずです (実行方法の詳細については、[ブートマジックドキュメント](ja/feature_bootmagic.md)とキーボード情報を見てください)。
|
いずれかの形式でブートマジックが有効になっている場合は、これも実行できるはずです (実行方法の詳細については、[ブートマジックドキュメント](ja/feature_bootmagic.md)とキーボード情報を見てください)。
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# 触覚フィードバック
|
# 触覚フィードバック
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 0.8.123:docs/feature_haptic_feedback.md
|
original document: 0.12.41:docs/feature_haptic_feedback.md
|
||||||
git diff 0.8.123 HEAD -- docs/feature_haptic_feedback.md | cat
|
git diff 0.12.41 HEAD -- docs/feature_haptic_feedback.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
## 触覚フィードバック の rules.mk オプション
|
## 触覚フィードバック の rules.mk オプション
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
| `HPT_TOG` | 触覚フィードバックのオン/オフを切り替え |
|
| `HPT_TOG` | 触覚フィードバックのオン/オフを切り替え |
|
||||||
| `HPT_RST` | 触覚フィードバック設定をデフォルトに戻す |
|
| `HPT_RST` | 触覚フィードバック設定をデフォルトに戻す |
|
||||||
| `HPT_FBK` | キー押下またはリリースまたはその両方でフィードバックを切り替え |
|
| `HPT_FBK` | キー押下またはリリースまたはその両方でフィードバックを切り替え |
|
||||||
| `HPT_BUZ` | ソレノイドの振動のオン/オフを切り替え |
|
| `HPT_BUZ` | ソレノイドのブザー音のオン/オフを切り替え |
|
||||||
| `HPT_MODI` | 次の DRV2605L 波形に移動 |
|
| `HPT_MODI` | 次の DRV2605L 波形に移動 |
|
||||||
| `HPT_MODD` | 前の DRV2605L 波形に移動 |
|
| `HPT_MODD` | 前の DRV2605L 波形に移動 |
|
||||||
| `HPT_CONT` | 連続触覚モードのオン/オフを切り替え |
|
| `HPT_CONT` | 連続触覚モードのオン/オフを切り替え |
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
ほとんどの MCU はソレノイドのコイルを駆動するために必要な電流を供給できないため、最初に MOSFET を介してソレノイドを駆動する回路を構築する必要があります。
|
ほとんどの MCU はソレノイドのコイルを駆動するために必要な電流を供給できないため、最初に MOSFET を介してソレノイドを駆動する回路を構築する必要があります。
|
||||||
|
|
||||||
[Adafruit が提供する配線図](https://playground.arduino.cc/uploads/Learning/solenoid_driver.pdf)
|
[Adafruit が提供する配線図](https://cdn-shop.adafruit.com/product-files/412/412_solenoid_driver.pdf)
|
||||||
|
|
||||||
|
|
||||||
| 設定 | デフォルト | 説明 |
|
| 設定 | デフォルト | 説明 |
|
||||||
@@ -53,8 +53,15 @@
|
|||||||
| `SOLENOID_DEFAULT_DWELL` | `12` ms | ソレノイドのデフォルトの滞留時間を設定する。 |
|
| `SOLENOID_DEFAULT_DWELL` | `12` ms | ソレノイドのデフォルトの滞留時間を設定する。 |
|
||||||
| `SOLENOID_MIN_DWELL` | `4` ms | 滞留時間の下限を設定する。 |
|
| `SOLENOID_MIN_DWELL` | `4` ms | 滞留時間の下限を設定する。 |
|
||||||
| `SOLENOID_MAX_DWELL` | `100` ms | 滞留時間の上限を設定する。 |
|
| `SOLENOID_MAX_DWELL` | `100` ms | 滞留時間の上限を設定する。 |
|
||||||
|
| `SOLENOID_DWELL_STEP_SIZE` | `1` ms | `HPT_DWL*` キーコードが送信される時に使われるステップサイズ |
|
||||||
|
| `SOLENOID_DEFAULT_BUZZ` | `0` (無効) | HPT_RST では、この値が "1" の場合、ブザー音が "on" に設定されます |
|
||||||
|
| `SOLENOID_BUZZ_ACTUATED` | `SOLENOID_MIN_DWELL` | ソレノイドがブザー音モードの場合の動作時間 |
|
||||||
|
| `SOLENOID_BUZZ_NONACTUATED` | `SOLENOID_MIN_DWELL` | ソレノイドがブザー音モードの場合の非動作時間 |
|
||||||
|
|
||||||
?> 滞留時間とは、「プランジャー」が作動したままになる時間です。滞留時間により、ソレノイドの音が変わります。
|
* ソレノイドのブザー音がオフの場合、滞留時間は「プランジャー」が作動したままになる時間です。滞留時間により、ソレノイドの音が変わります。
|
||||||
|
* ソレノイドのブザー音がオンの場合、滞留時間は振動の長さを設定しますが、`SOLENOID_BUZZ_ACTUATED` と `SOLENOID_BUZZ_NONACTUATED` はブザー音の間の(非)動作時間を設定します。
|
||||||
|
* 現在の実装では、上記の時間設定のいずれについても、設定の精度はキーボードがマトリックスをスキャンできる速度によって影響を受ける可能性があります。
|
||||||
|
したがって、キーボードのスキャンルーチンが遅い場合は、`SOLENOID_DWELL_STEP_SIZE` をキーボードのスキャンに掛かる時間よりもわずかに小さい値に設定することをお勧めします。
|
||||||
|
|
||||||
ブートローダ実行中に一部のピンが給電されているかもしれず (例えば、STM32F303 チップ上の A13)、そうすると書き込みプロセスの間ずっとソレノイドがオン状態になることに注意してください。これはソレノイドを加熱し損傷を与えるかもしれません。ソレノイドが接続されているピンがブートローダ/DFU 実行中にソレノイドをオンにしていることが分かった場合は、他のピンを選択してください。
|
ブートローダ実行中に一部のピンが給電されているかもしれず (例えば、STM32F303 チップ上の A13)、そうすると書き込みプロセスの間ずっとソレノイドがオン状態になることに注意してください。これはソレノイドを加熱し損傷を与えるかもしれません。ソレノイドが接続されているピンがブートローダ/DFU 実行中にソレノイドをオンにしていることが分かった場合は、他のピンを選択してください。
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# レイヤー :id=layers
|
# レイヤー :id=layers
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 0.9.43:docs/feature_layers.md
|
original document: 0.12.41:docs/feature_layers.md
|
||||||
git diff 0.9.43 HEAD -- docs/feature_layers.md | cat
|
git diff 0.12.41 HEAD -- docs/feature_layers.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
QMK ファームウェアの最も強力で良く使われている機能の一つは、レイヤーを使う機能です。ほとんどの人にとって、これはラップトップやタブレットキーボードにあるのと同じように、様々なキーを可能にするファンクションキーに相当します。
|
QMK ファームウェアの最も強力で良く使われている機能の一つは、レイヤーを使う機能です。ほとんどの人にとって、これはラップトップやタブレットキーボードにあるのと同じように、様々なキーを可能にするファンクションキーに相当します。
|
||||||
@@ -24,12 +24,10 @@ QMK ファームウェアの最も強力で良く使われている機能の一
|
|||||||
|
|
||||||
### 注意事項 :id=caveats
|
### 注意事項 :id=caveats
|
||||||
|
|
||||||
現在のところ、`LT()` と `MT()` は[基本的なキーコードセット](ja/keycodes_basic.md)に制限されています。つまり、`LCTL()`、`KC_TILD` あるいは `0xFF` より大きなキーコードを使うことができません。特に、`LT` と `MT` のような二重の機能キーは16ビットキーコードを使います。4ビットは機能の識別のために使われ、次の12ビットはパラメータに分かれます。レイヤータップはレイヤーに4ビットを使います(実はレイヤータップがレイヤー 0-15 に制限されている理由です)。モッドタップも同じですが、識別子に4ビット、モッドのために4ビットが使われ、全体でキーコードに8ビットを使います。このため、使用されるキーコードは `0xFF` (0-255) に制限され、基本的なキーコードのみです。
|
現在のところ、`LT()` の `layer` 引数はレイヤー 0-15 に制限され、`kc` 引数は[基本的なキーコードセット](ja/keycodes_basic.md)に制限されています。つまり、`LCTL()`、`KC_TILD` あるいは `0xFF` より大きなキーコードを使うことができません。これは、QMK が16ビットのキーコードを使うためです。4ビットは機能の識別のために使われ、4ビットはレイヤーのために使われ、キーコードには8ビットしか残されていません。
|
||||||
|
|
||||||
これを拡張してもせいぜい複雑になるだけでしょう。32ビットキーコードに移行すると、これの多くが解決されますが、キーマップマトリックスが使用する領域が2倍になります。また、問題が起きる可能性もあります。タップしたキーコードにモディファイアを適用する必要がある場合は、[タップダンス](ja/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys)を使うことができます。
|
これを拡張してもせいぜい複雑になるだけでしょう。32ビットキーコードに移行すると、これの多くが解決されますが、キーマップマトリックスが使用する領域が2倍になります。また、問題が起きる可能性もあります。タップしたキーコードにモディファイアを適用する必要がある場合は、[タップダンス](ja/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys)を使うことができます。
|
||||||
|
|
||||||
さらに、モッドタップあるいはレイヤータップで少なくとも1つの右手用のモディファイアが指定された場合、指定された全てのモディファイアが右手用になるため、2つをうまく組み合わせて一致させることはできません。
|
|
||||||
|
|
||||||
## レイヤーとの連携 :id=working-with-layers
|
## レイヤーとの連携 :id=working-with-layers
|
||||||
|
|
||||||
レイヤーを切り替える時は注意してください。(キーボードを取り外さずに)そのレイヤーを非アクティブにすることができずレイヤーから移動できなくなる可能性があります。最も一般的な問題を避けるためのガイドラインを作成しました。
|
レイヤーを切り替える時は注意してください。(キーボードを取り外さずに)そのレイヤーを非アクティブにすることができずレイヤーから移動できなくなる可能性があります。最も一般的な問題を避けるためのガイドラインを作成しました。
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED
|
|||||||
カスタムレイヤー効果は `<keyboard>.c` 内で以下を定義することで行うことができます:
|
カスタムレイヤー効果は `<keyboard>.c` 内で以下を定義することで行うことができます:
|
||||||
|
|
||||||
void led_matrix_indicators_kb(void) {
|
void led_matrix_indicators_kb(void) {
|
||||||
led_matrix_set_index_value(index, value);
|
led_matrix_set_value(index, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
同様の関数がキーマップ内で `led_matrix_indicators_user` として動作します。
|
同様の関数がキーマップ内で `led_matrix_indicators_user` として動作します。
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# ポインティングデバイス :id=pointing-device
|
# ポインティングデバイス :id=pointing-device
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 0.9.43:docs/feature_pointing_device.md
|
original document: 0.12.41:docs/feature_pointing_device.md
|
||||||
git diff 0.9.43 HEAD -- docs/feature_pointing_device.md | cat
|
git diff 0.12.41 HEAD -- docs/feature_pointing_device.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
ポインティングデバイスは汎用的な機能の総称です: システムポインタを移動します。マウスキーのような他のオプションも確かにありますが、これは簡単に変更可能で軽量であることを目指しています。機能を制御するためにカスタムキーを実装したり、他の周辺機器から情報を収集してここに直接挿入したりできます - QMK に処理を任せてください。
|
ポインティングデバイスは汎用的な機能の総称です: システムポインタを移動します。マウスキーのような他のオプションも確かにありますが、これは簡単に変更可能で軽量であることを目指しています。機能を制御するためにカスタムキーを実装したり、他の周辺機器から情報を収集してここに直接挿入したりできます - QMK に処理を任せてください。
|
||||||
@@ -24,7 +24,7 @@ report_mouse_t (ここでは "mouseReport") が以下のプロパティを持つ
|
|||||||
* `mouseReport.y` - これは、y軸の動き(+ 上へ、- 下へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。
|
* `mouseReport.y` - これは、y軸の動き(+ 上へ、- 下へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。
|
||||||
* `mouseReport.v` - これは、垂直スクロール(+ 上へ、- 下へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。
|
* `mouseReport.v` - これは、垂直スクロール(+ 上へ、- 下へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。
|
||||||
* `mouseReport.h` - これは、水平スクロール(+ 右へ、- 左へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。
|
* `mouseReport.h` - これは、水平スクロール(+ 右へ、- 左へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。
|
||||||
* `mouseReport.buttons` - これは uint8_t で、上位の5ビットを使っています。これらのビットはマウスボタンの状態を表します - ビット 3 はマウスボタン 5、ビット 7 はマウスボタン 1 です。
|
* `mouseReport.buttons` - これは uint8_t で、8ビット全てを使っています。これらのビットはマウスボタンの状態を表します - ビット 0 はマウスボタン 1、ビット 7 はマウスボタン 8 です。
|
||||||
|
|
||||||
マウスレポートに必要な変更を行ったら、それを送信する必要があります:
|
マウスレポートに必要な変更を行ったら、それを送信する必要があります:
|
||||||
|
|
||||||
@@ -32,6 +32,10 @@ report_mouse_t (ここでは "mouseReport") が以下のプロパティを持つ
|
|||||||
|
|
||||||
マウスレポートが送信されると、x、y、v、h のいずれの値も 0 に設定されます (これは `pointing_device_send()` で行われます。この挙動を回避するためにオーバーライドすることができます)。このように、ボタンの状態は持続しますが、動きは1度だけ起こります。さらにカスタマイズするために、`pointing_device_init` と `pointing_device_task` のどちらもオーバーライドすることができます。
|
マウスレポートが送信されると、x、y、v、h のいずれの値も 0 に設定されます (これは `pointing_device_send()` で行われます。この挙動を回避するためにオーバーライドすることができます)。このように、ボタンの状態は持続しますが、動きは1度だけ起こります。さらにカスタマイズするために、`pointing_device_init` と `pointing_device_task` のどちらもオーバーライドすることができます。
|
||||||
|
|
||||||
|
さらに、デフォルトでは、`pointing_device_send()` はレポートが実際に変更された場合のみレポートを送信します。これにより、マウスレポートが継続的に送信されてホストシステムが起動されたままになることを防ぎます。この動作は、独自の `pointing_device_send()` 関数を作成することで変更できます。
|
||||||
|
|
||||||
|
また、`has_mouse_report_changed(new, old)` 関数を使って、レポートが変更されたかどうかを確認できます。(訳注:独自の `pointing_device_send()` 関数を作成する場合でも、その中で `has_mouse_report_changed(new, old)` 関数でチェックして、デフォルトの `pointing_device_send()` と類似の無駄なレポートの抑制をして、ホストシステムがスリープ状態に入れる余地を残すようにしておくのが良いでしょう。)
|
||||||
|
|
||||||
以下の例では、カスタムキーを使ってマウスをクリックし垂直および水平方向に127単位スクロールし、リリースされた時にそれを全て元に戻します - なぜならこれは完全に便利な機能だからです。いいですか、以下はひとつの例です:
|
以下の例では、カスタムキーを使ってマウスをクリックし垂直および水平方向に127単位スクロールし、リリースされた時にそれを全て元に戻します - なぜならこれは完全に便利な機能だからです。いいですか、以下はひとつの例です:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# Raw HID
|
# Raw HID
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 0.10.47:docs/feature_rawhid.md
|
original document: 0.12.41:docs/feature_rawhid.md
|
||||||
git diff 0.10.47 HEAD -- docs/feature_rawhid.md | cat
|
git diff 0.12.41 HEAD -- docs/feature_rawhid.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
Raw HID は、HID インタフェースを介して QMK とホストコンピュータ間の双方向通信を可能にします。これには、キーマップをその場で切り替えたり、RGB LED の色とモードを変更したりなど、多くの潜在的な使用方法があります。
|
Raw HID は、HID インタフェースを介して QMK とホストコンピュータ間の双方向通信を可能にします。これには、キーマップをその場で切り替えたり、RGB LED の色とモードを変更したりなど、多くの潜在的な使用方法があります。
|
||||||
@@ -34,7 +34,7 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
`raw_hid_receive` はホストから最大長 `RAW_EPSIZE` の可変サイズのパケットを受信することができます。一方、`raw_hid_send` はパケットを厳密に `RAW_EPSIZE` の長さで送信するため、長さ `RAW_EPSIZE` のデータを使う必要があります。
|
これら2つの関数は、ホストとの間で長さ `RAW_EPSIZE` バイトのパケットを送受信します (LUFA/ChibiOS/V-USB では 32、ATSAM では 64)。
|
||||||
|
|
||||||
ホスト側での作業を進める前に、raw 対応のファームウェアを書き込むようにしてください。
|
ホスト側での作業を進める前に、raw 対応のファームウェアを書き込むようにしてください。
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
設定テーブルは列/行から新しい列/行にマップするための単純な2次元配列です。Planck の `hand_swap_config` の例:
|
設定テーブルは列/行から新しい列/行にマップするための単純な2次元配列です。Planck の `hand_swap_config` の例:
|
||||||
|
|
||||||
```C
|
```C
|
||||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
|
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
|
||||||
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
|
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
|
||||||
{{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
|
{{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
# Docker クイックスタート
|
# Docker クイックスタート
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 0.9.32:docs/getting_started_docker.md
|
original document: 0.12.43:docs/getting_started_docker.md
|
||||||
git diff 0.9.32 HEAD -- docs/getting_started_docker.md | cat
|
git diff 0.12.43 HEAD -- docs/getting_started_docker.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
このプロジェクトは、プライマリオペレーティングシステムに大きな変更を加えることなくキーボードの新しいファームウェアを非常に簡単に構築することができる Docker ワークフローを含みます。これは、あなたがプロジェクトをクローンしビルドを実行した時に、他の人とまったく同じ環境と QMK ビルド基盤を持つことも保証します。これにより、人々はあなたが遭遇した問題の解決をより簡単に行えるようになります。
|
このプロジェクトは、プライマリオペレーティングシステムに大きな変更を加えることなくキーボードの新しいファームウェアを非常に簡単に構築することができる Docker ワークフローを含みます。これは、あなたがプロジェクトをクローンしビルドを実行した時に、他の人とまったく同じ環境と QMK ビルド基盤を持つことも保証します。これにより、人々はあなたが遭遇した問題の解決をより簡単に行えるようになります。
|
||||||
|
|
||||||
## 必要事項
|
## 必要事項
|
||||||
|
|
||||||
主な前提条件は動作する `docker` がインストールされていることです。
|
主な前提条件は動作する `docker` または `podman` がインストールされていることです。
|
||||||
* [Docker CE](https://docs.docker.com/install/#supported-platforms)
|
* [Docker CE](https://docs.docker.com/install/#supported-platforms)
|
||||||
|
* [Podman](https://podman.io/getting-started/installation)
|
||||||
|
|
||||||
## 使い方
|
## 使い方
|
||||||
|
|
||||||
@@ -29,7 +30,7 @@ util/docker_build.sh <keyboard>:<keymap>
|
|||||||
|
|
||||||
これは目的のキーボード/キーマップをコンパイルし、結果として書き込み用に `.hex` あるいは `.bin` ファイルを QMK ディレクトリの中に残します。`:keymap` が省略された場合は全てのキーマップが使われます。パラメータの形式は、`make` を使ってビルドする時と同じであることに注意してください。
|
これは目的のキーボード/キーマップをコンパイルし、結果として書き込み用に `.hex` あるいは `.bin` ファイルを QMK ディレクトリの中に残します。`:keymap` が省略された場合は全てのキーマップが使われます。パラメータの形式は、`make` を使ってビルドする時と同じであることに注意してください。
|
||||||
|
|
||||||
`target` を指定して Docker から直接キーボードをビルドし、_かつ_書き込むためのサポートもあります。
|
`target` を指定して Docker から直接キーボードをビルドし、_かつ_ 書き込むためのサポートもあります。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
util/docker_build.sh keyboard:keymap:target
|
util/docker_build.sh keyboard:keymap:target
|
||||||
@@ -43,10 +44,17 @@ util/docker_build.sh
|
|||||||
# パラメータを入力として読み込みます (空白にすると全てのキーボード/キーマップ)
|
# パラメータを入力として読み込みます (空白にすると全てのキーボード/キーマップ)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
`RUNTIME` 環境変数にコンテナランタイム名やパスを設定することで、使用したいコンテナランタイムを手動で設定できます。
|
||||||
|
デフォルトでは docker や podman は自動的に検出され、podman より docker が優先されます。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
RUNTIME="podman" util/docker_build.sh keyboard:keymap:target
|
||||||
|
```
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
### なぜ Windows/macOS 上で書き込めないのですか?
|
### なぜ Windows/macOS 上で書き込めないのですか?
|
||||||
|
|
||||||
Windows と macOS では、実行するために [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) が必要です。これはセットアップが面倒なので、お勧めではありません: 代わりに [QMK Toolbox](https://github.com/qmk/qmk_toolbox) を使ってください。
|
Windows と macOS では、実行するために [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) が必要です。これはセットアップが面倒なので、お勧めではありません: 代わりに [QMK Toolbox](https://github.com/qmk/qmk_toolbox) を使ってください。
|
||||||
|
|
||||||
!> Docker for Windows は[Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) を有効にする必要があります。これは、Windows 7、Windows 8 および **Windows 10 Home** のような Hyper-V を搭載していない Windows のバージョンでは機能しないことを意味します。
|
!> Docker for Windows は [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) を有効にする必要があります。これは、Windows 7、Windows 8 および **Windows 10 Home** のような Hyper-V を搭載していない Windows のバージョンでは機能しないことを意味します。
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# QMK で GitHub を使う方法
|
# QMK で GitHub を使う方法
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 0.9.43:docs/getting_started_github.md
|
original document: 0.12.43:docs/getting_started_github.md
|
||||||
git diff 0.9.43 HEAD -- docs/getting_started_github.md | cat
|
git diff 0.12.43 HEAD -- docs/getting_started_github.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
GitHub は慣れていない人には少し注意が必要です - このガイドは、QMK におけるフォーク、クローン、プルリクエストのサブミットの各ステップについて説明します。
|
GitHub は慣れていない人には少し注意が必要です - このガイドは、QMK におけるフォーク、クローン、プルリクエストのサブミットの各ステップについて説明します。
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# より詳細な `make` 手順
|
# より詳細な `make` 手順
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 0.10.33:docs/getting_started_make_guide.md
|
original document: 0.12.43:docs/getting_started_make_guide.md
|
||||||
git diff 0.10.33 HEAD -- docs/getting_started_make_guide.md | cat
|
git diff 0.12.43 HEAD -- docs/getting_started_make_guide.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
`make` コマンドの完全な構文は `<keyboard_folder>:<keymap>:<target>` です:
|
`make` コマンドの完全な構文は `<keyboard_folder>:<keymap>:<target>` です:
|
||||||
@@ -19,16 +19,32 @@
|
|||||||
`<target>` は以下を意味します
|
`<target>` は以下を意味します
|
||||||
* target が指定されない場合は、以下の `all` と同じです
|
* target が指定されない場合は、以下の `all` と同じです
|
||||||
* `all` は指定されたキーボード/リビジョン/キーマップの可能な全ての組み合わせのコンパイルを行います。例えば、`make planck/rev4:default` は1つの .hex を生成しますが、`make planck/rev4:all` は planck で利用可能な全てのキーマップについて hex を生成します。
|
* `all` は指定されたキーボード/リビジョン/キーマップの可能な全ての組み合わせのコンパイルを行います。例えば、`make planck/rev4:default` は1つの .hex を生成しますが、`make planck/rev4:all` は planck で利用可能な全てのキーマップについて hex を生成します。
|
||||||
* `flash`、`dfu`、`teensy`、`avrdude`、`dfu-util` または `bootloadHID` はファームウェアをコンパイルし、キーボードにアップロードします。コンパイルが失敗すると、何もアップロードされません。使用するプログラマはキーボードに依存します。ほとんどのキーボードでは `dfu` ですが、ChibiOS キーボードについては `dfu-util` 、標準的な Teensy については `teensy` を使います。キーボードに使うコマンドを見つけるには、キーボード固有の readme をチェックしてください。
|
* `flash`、`dfu`、`teensy`、`avrdude`、`dfu-util`、`bootloadHID` はファームウェアをコンパイルし、キーボードにアップロードします。コンパイルが失敗すると、何もアップロードされません。使用するプログラマはキーボードに依存します。ほとんどのキーボードでは `dfu` ですが、ChibiOS キーボードについては `dfu-util` 、標準的な Teensy については `teensy` を使います。キーボードに使うコマンドを見つけるには、キーボード固有の readme をチェックしてください。
|
||||||
* **注意**: 一部のオペレーティングシステムではこれらのコマンドが機能するためには root アクセスが必要です。その場合、例えば `sudo make planck/rev4:default:flash` を実行する必要があります。
|
利用可能なブートローダの詳細は[ファームウェアの書き込み](ja/flashing.md)ガイドを参照してください。
|
||||||
|
* **Note**: 一部のオペレーティングシステムでは、これらのコマンドが機能するためには特権アクセスが必要です。これは、root アクセスなしでこれらにアクセスするために [`udev ルール`](ja/faq_build.md#linux-udev-rules) を設定するか、あるいは root アクセスでコマンドを実行する (`sudo make planck/rev4:default:flash`) 必要があるかもしれないことを意味します。
|
||||||
* `clean` は、全てをゼロからビルドするためにビルド出力フォルダを掃除します。説明できない問題がある場合は、通常のコンパイルの前にこれを実行してください。
|
* `clean` は、全てをゼロからビルドするためにビルド出力フォルダを掃除します。説明できない問題がある場合は、通常のコンパイルの前にこれを実行してください。
|
||||||
|
* `distclean` は、.hex ファイルと .bin ファイルを削除します。
|
||||||
|
|
||||||
|
次のターゲットは開発者向けです:
|
||||||
|
|
||||||
|
* `show_path` ソースとオブジェクトファイルのパスを表示します。
|
||||||
|
* `dump_vars` makefile 変数をダンプします。
|
||||||
|
* `objs-size` 個々のオブジェクトファイルのサイズを表示します。
|
||||||
|
* `show_build_options` 'rules.mk' のオプションセットを表示します。
|
||||||
|
* `check-md5` 生成されたバイナリファイルの md5 チェックサムを表示します。
|
||||||
|
|
||||||
make コマンドの最後、つまり target の後に追加のオプションを追加することもできます
|
make コマンドの最後、つまり target の後に追加のオプションを追加することもできます
|
||||||
|
|
||||||
* `make COLOR=false` - カラー出力をオフ
|
* `make COLOR=false` - カラー出力をオフ
|
||||||
* `make SILENT=true` - エラー/警告以外の出力をオフ
|
* `make SILENT=true` - エラー/警告以外の出力をオフ
|
||||||
* `make VERBOSE=true` - 全ての gcc のものを出力 (デバッグする必要が無い限り面白くありません)
|
* `make VERBOSE=true` - 全ての gcc のものを出力 (デバッグする必要が無い限り面白くありません)
|
||||||
* `make EXTRAFLAGS=-E` - コンパイルせずにコードを前処理 (#define コマンドをデバッグしようとする場合に便利)
|
* `make VERBOSE_LD_CMD=yes` - -v オプションを指定して ld コマンドを実行します。
|
||||||
|
* `make VERBOSE_AS_CMD=yes` - -v オプションを指定して as コマンドを実行します。
|
||||||
|
* `make VERBOSE_C_CMD=<c_source_file>` - 指定された C ソースファイルをコンパイルするときに -v オプションを追加します。
|
||||||
|
* `make DUMP_C_MACROS=<c_source_file>` - 指定された C ソースファイルをコンパイルするときにプリプロセッサマクロをダンプします。
|
||||||
|
* `make DUMP_C_MACROS=<c_source_file> > <logfile>` - 指定された C ソースファイルをコンパイルするときにプリプロセッサマクロを `<logfile>` にダンプします。
|
||||||
|
* `make VERBOSE_C_INCLUDE=<c_source_file>` - 指定された C ソースファイルをコンパイルするときにインクルードされるファイル名をダンプします。
|
||||||
|
* `make VERBOSE_C_INCLUDE=<c_source_file> 2> <logfile>` - 指定された C ソースファイルをコンパイルするときにインクルードされるファイル名を `<logfile>` にダンプします。
|
||||||
|
|
||||||
make コマンド自体にもいくつかの追加オプションがあります。詳細は `make --help` を入力してください。最も有用なのはおそらく `-jx` です。これは複数の CPU を使ってコンパイルしたいことを指定し、`x` は使用したい CPU の数を表します。設定すると、特に多くのキーボード/キーマップをコンパイルしている場合は、コンパイル時間を大幅に短縮することができます。通常は、コンパイル中に他の作業を行うための余裕をもたせるために、持っている CPU の数より1つ少ない値に設定します。全てのオペレーティングシステムと make バージョンがオプションをサポートしているわけではないことに注意してください。
|
make コマンド自体にもいくつかの追加オプションがあります。詳細は `make --help` を入力してください。最も有用なのはおそらく `-jx` です。これは複数の CPU を使ってコンパイルしたいことを指定し、`x` は使用したい CPU の数を表します。設定すると、特に多くのキーボード/キーマップをコンパイルしている場合は、コンパイル時間を大幅に短縮することができます。通常は、コンパイル中に他の作業を行うための余裕をもたせるために、持っている CPU の数より1つ少ない値に設定します。全てのオペレーティングシステムと make バージョンがオプションをサポートしているわけではないことに注意してください。
|
||||||
|
|
||||||
@@ -104,7 +120,7 @@ make コマンド自体にもいくつかの追加オプションがあります
|
|||||||
|
|
||||||
これにより、送信したい文字に対応するニーモニックを入力することで Unicode 文字を送信することができます。キーマップファイル内にマッピングテーブルを保持する必要があります。可能な全てのコードポイント( `0x10FFFF` まで)がサポートされます。
|
これにより、送信したい文字に対応するニーモニックを入力することで Unicode 文字を送信することができます。キーマップファイル内にマッピングテーブルを保持する必要があります。可能な全てのコードポイント( `0x10FFFF` まで)がサポートされます。
|
||||||
|
|
||||||
詳細と制限については、[Unicode ページ](ja/feature_unicode.md) を見てください。
|
詳細と制限については、[Unicode ページ](ja/feature_unicode.md)を見てください。
|
||||||
|
|
||||||
`AUDIO_ENABLE`
|
`AUDIO_ENABLE`
|
||||||
|
|
||||||
@@ -116,11 +132,11 @@ C6 ピン(抽象化が必要)でオーディオ出力できます。詳細は[
|
|||||||
|
|
||||||
`API_SYSEX_ENABLE`
|
`API_SYSEX_ENABLE`
|
||||||
|
|
||||||
これにより Quantum SYSEX API を使って文字列を送信することができます (どこに?)
|
これにより Quantum SYSEX API を使って文字列を(どこかに?)送信することができます
|
||||||
|
|
||||||
`KEY_LOCK_ENABLE`
|
`KEY_LOCK_ENABLE`
|
||||||
|
|
||||||
これは [キーロック](ja/feature_key_lock.md) を有効にします。
|
これは[キーロック](ja/feature_key_lock.md)を有効にします。
|
||||||
|
|
||||||
`SPLIT_KEYBOARD`
|
`SPLIT_KEYBOARD`
|
||||||
|
|
||||||
@@ -132,7 +148,7 @@ ARM ベースの分割キーボード用の標準分割通信ドライバはま
|
|||||||
|
|
||||||
`CUSTOM_MATRIX`
|
`CUSTOM_MATRIX`
|
||||||
|
|
||||||
デフォルトのマトリックス走査ルーチンを独自のコードで置き換えます。詳細については、[カスタムマトリックスページ](ja/custom_matrix.md) を見てください。
|
デフォルトのマトリックス走査ルーチンを独自のコードで置き換えます。詳細については、[カスタムマトリックスページ](ja/custom_matrix.md)を見てください。
|
||||||
|
|
||||||
`DEBOUNCE_TYPE`
|
`DEBOUNCE_TYPE`
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# Vagrant クイックスタート
|
# Vagrant クイックスタート
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 0.9.10:docs/getting_started_vagrant.md
|
original document: 0.12.43:docs/getting_started_vagrant.md
|
||||||
git diff 0.9.10 HEAD -- docs/getting_started_vagrant.md | cat
|
git diff 0.12.43 HEAD -- docs/getting_started_vagrant.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
このプロジェクトは、プライマリオペレーティングシステムに大きな変更を加えることなくキーボードの新しいファームウェアを非常に簡単に構築することができる `Vagrantfile` を含みます。これは、あなたがプロジェクトをクローンしビルドを実行した時に、ビルドのために Vagrantfile を使っている他のユーザと全く同じ環境を持つことも保証します。これにより、人々はあなたが遭遇した問題の解決をより簡単に行えるようになります。
|
このプロジェクトは、プライマリオペレーティングシステムに大きな変更を加えることなくキーボードの新しいファームウェアを非常に簡単に構築することができる `Vagrantfile` を含みます。これは、あなたがプロジェクトをクローンしビルドを実行した時に、ビルドのために Vagrantfile を使っている他のユーザと全く同じ環境を持つことも保証します。これにより、人々はあなたが遭遇した問題の解決をより簡単に行えるようになります。
|
||||||
@@ -12,16 +12,16 @@
|
|||||||
このリポジトリ内の `Vagrantfile` を使うには、[Vagrant](https://www.vagrantup.com/) およびサポートされるプロバイダがインストールされている必要があります:
|
このリポジトリ内の `Vagrantfile` を使うには、[Vagrant](https://www.vagrantup.com/) およびサポートされるプロバイダがインストールされている必要があります:
|
||||||
|
|
||||||
* [VirtualBox](https://www.virtualbox.org/) (バージョン 5.0.12 以降)
|
* [VirtualBox](https://www.virtualbox.org/) (バージョン 5.0.12 以降)
|
||||||
* 'Vagrant を使うために最もアクセスしやすいプラットフォーム' として販売
|
* 「Vagrant を使うために最もアクセスしやすいプラットフォーム」とうたわれています。
|
||||||
* [VMware Workstation](https://www.vmware.com/products/workstation) および [Vagrant VMware プラグイン](https://www.vagrantup.com/vmware)
|
* [VMware Workstation](https://www.vmware.com/products/workstation) および [Vagrant VMware プラグイン](https://www.vagrantup.com/vmware)
|
||||||
* (有料) VMware プラグインには、ライセンスされた VMware Workstation/Fusion のコピーが必要です。
|
* (有料) VMware プラグインには、ライセンスされた VMware Workstation/Fusion のコピーが必要です。
|
||||||
* [Docker](https://www.docker.com/)
|
* [Docker](https://www.docker.com/)
|
||||||
|
|
||||||
Vagrant 以外に、適切なプロバイダがインストールされ、その後におそらくコンピュータを再起動すると、このプロジェクトをチェックアウトしたフォルダ内の任意の場所で 'vagrant up' を単純に実行することができ、このプロジェクトをビルドするのに必要な全てのツールが含まれる環境(仮想マシンあるいはコンテナ)が開始されます。Vagrant をうまく始めるためのヒントの投稿がありますが、それ以外に、以下のビルドドキュメントを参照することもできます。
|
Vagrant 以外に、適切なプロバイダがインストールされ、その後におそらくコンピュータを再起動すると、このプロジェクトをチェックアウトしたフォルダ内の任意の場所で 'vagrant up' を単純に実行することができ、このプロジェクトをビルドするのに必要な全てのツールが含まれる環境(仮想マシンあるいはコンテナ)が開始されます。Vagrant 起動時にうまく始めるためのヒントが表示されますが、それ以外に、以下のビルドドキュメントを参照することもできます。
|
||||||
|
|
||||||
## ファームウェアの書き込み
|
## ファームウェアの書き込み
|
||||||
|
|
||||||
ファームウェアを書き込む"簡単"な方法は、ホスト OS からツールを使うことです:
|
ファームウェアを書き込む「簡単な」方法は、ホスト OS からツールを使うことです:
|
||||||
|
|
||||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (推奨)
|
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (推奨)
|
||||||
* [Teensy ローダー](https://www.pjrc.com/teensy/loader.html)
|
* [Teensy ローダー](https://www.pjrc.com/teensy/loader.html)
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
<!---
|
<!---
|
||||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||||
original document: 0.10.33:docs/hardware_avr.md
|
original document: 0.12.41:docs/hardware_avr.md
|
||||||
git diff 0.10.33 HEAD -- docs/hardware_avr.md | cat
|
git diff 0.12.41 HEAD -- docs/hardware_avr.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
このページでは QMK における AVR マイコンのサポートについて説明します。AVR マイコンには、Atmel 社製の atmega32u4、atmega32u2、at90usb1286 やその他のマイコンを含みます。AVR マイコンは、簡単に動かせるよう設計された8ビットの MCU です。キーボードでよく使用される AVR マイコンには USB 機能や大きなキーボードマトリックスのためのたくさんの GPIO を搭載しています。これらは、現在、キーボードで使われる最も一般的な MCU です。
|
このページでは QMK における AVR マイコンのサポートについて説明します。AVR マイコンには、Atmel 社製の atmega32u4、atmega32u2、at90usb1286 やその他のマイコンを含みます。AVR マイコンは、簡単に動かせるよう設計された8ビットの MCU です。キーボードでよく使用される AVR マイコンには USB 機能や大きなキーボードマトリックスのためのたくさんの GPIO を搭載しています。これらは、現在、キーボードで使われる最も一般的な MCU です。
|
||||||
@@ -83,7 +83,7 @@ or open the directory in your favourite text editor.
|
|||||||
#define PRODUCT my_awesome_keyboard
|
#define PRODUCT my_awesome_keyboard
|
||||||
```
|
```
|
||||||
|
|
||||||
?> Windows や macOS では、`MANUFACTURER` と `PRODUCT` が USBデバイスのリストに表示されます。Linux 上の `lsusb` では、代わりにデフォルトで [USB ID Repository](http://www.linux-usb.org/usb-ids.html) によって維持されているリストからこれらを取得します。`lsusb -v` を使用するとデバイスから示された値を表示します。また、接続したときのカーネルログにも表示されます。
|
?> Windows や macOS では、`MANUFACTURER` と `PRODUCT` が USBデバイスのリストに表示されます。Linux 上の `lsusb` では、代わりに [USB ID Repository](http://www.linux-usb.org/usb-ids.html) によって維持されているリストの値を優先します。デフォルトでは、リストに `VENDOR_ID` / `PRODUCT_ID` を含まない場合にのみ、`MANUFACTURER` と `PRODUCT` を使います。`sudo lsusb -v` を使用するとデバイスから示された値を表示します。また、接続したときのカーネルログにも表示されます。
|
||||||
|
|
||||||
### キーボードマトリックスの設定
|
### キーボードマトリックスの設定
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,31 @@
|
|||||||
|
|
||||||
<!---
|
<!---
|
||||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||||
original document: 0.10.33:docs/hardware_keyboard_guidelines.md
|
original document: 0.12.41:docs/hardware_keyboard_guidelines.md
|
||||||
git diff 0.10.33 HEAD -- docs/hardware_keyboard_guidelines.md | cat
|
git diff 0.12.41 HEAD -- docs/hardware_keyboard_guidelines.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
QMK は開始以来、コミュニティにおけるキーボードの作成や保守に貢献しているあなたのような人たちのおかげで飛躍的に成長しました。私たちが成長するにつれて、うまくやるためのいくつかのパターンを発見しました。他の人たちがあなたの苦労の恩恵を受けやすくするため、それにあわせてもらえるようお願いします。
|
QMK は開始以来、コミュニティにおけるキーボードの作成や保守に貢献しているあなたのような人たちのおかげで飛躍的に成長しました。私たちが成長するにつれて、うまくやるためのいくつかのパターンを発見しました。他の人たちがあなたの苦労の恩恵を受けやすくするため、それにあわせてもらえるようお願いします。
|
||||||
|
|
||||||
|
## QMK Lint を使う
|
||||||
|
|
||||||
|
キーボードの問題をチェックできるツール、`qmk lint` を提供しています。キーボードとキーマップで作業をしている間は、頻繁に使うことをお勧めします。
|
||||||
|
|
||||||
|
チェックに合格した例:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ qmk lint -kb rominronin/katana60/rev2
|
||||||
|
Ψ Lint check passed!
|
||||||
|
```
|
||||||
|
|
||||||
|
チェックに失敗した例:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ qmk lint -kb clueboard/66/rev3
|
||||||
|
☒ Missing keyboards/clueboard/66/rev3/readme.md
|
||||||
|
☒ Lint check failed!
|
||||||
|
```
|
||||||
|
|
||||||
## あなたのキーボード/プロジェクトの名前を決める
|
## あなたのキーボード/プロジェクトの名前を決める
|
||||||
|
|
||||||
キーボードの名前は全て小文字で、アルファベット、数字、アンダースコア(`_`)のみで構成されています。アンダースコア(`_`)で始めてはいけません。スラッシュ(`/`)はサブフォルダの区切り文字として使用されます。
|
キーボードの名前は全て小文字で、アルファベット、数字、アンダースコア(`_`)のみで構成されています。アンダースコア(`_`)で始めてはいけません。スラッシュ(`/`)はサブフォルダの区切り文字として使用されます。
|
||||||
|
|||||||
574
docs/ja/keycodes.md
Normal file
574
docs/ja/keycodes.md
Normal file
@@ -0,0 +1,574 @@
|
|||||||
|
# キーコードの概要
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 0.11.64:docs/keycodes.md
|
||||||
|
git diff 0.11.64 HEAD -- docs/keycodes.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
[キーマップ](ja/keymap.md) を定義するときは、それぞれのキーに有効な定義が必要です。このページは、QMK で使えるキーコードに相当するシンボルについて記述しています。
|
||||||
|
|
||||||
|
このページは参照のみです。それぞれのキーの種類毎のリンク先のページに、それぞれのキーの機能についてもっと詳細に記載しています。
|
||||||
|
|
||||||
|
## 基本的なキーコード :id=basic-keycodes
|
||||||
|
|
||||||
|
[基本的なキーコード](ja/keycodes_basic.md) も見てください。
|
||||||
|
|
||||||
|
?> 訳注: 以下の説明は、OS のキーボード配列の設定が「US」の場合のものです。OS のキーボード配列の設定が「JIS」の場合、一部のキーは下の表と異なる文字が入力されます。例えば、`KC_LBRC` は、OS のキーボード配列の設定が US であれば「`[` または `{`」が入力されますが、JIS の場合「`@` または <code>`</code>」が入力されます。
|
||||||
|
?> これは、OS がキーボードから送信されたキーコードを解釈する際に、キーボード配列の設定によって対応する文字を変えるためです。もし、OS のキーボード配列の設定を JIS にする場合、`#include "keymap_jp.h"` を `keymap.c` に追加すると`JP_AT` のような JIS キーボードのキーキャップに対応したキーを指定できます。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明 |Windows |macOS |Linux<sup>1</sup>|
|
||||||
|
|-----------------------|------------------------------|-----------------------------------------|-------------|-------------|-----------------|
|
||||||
|
|`KC_NO` |`XXXXXXX` |このキーを無視します (何もしません) 。 |*N/A* |*N/A* |*N/A* |
|
||||||
|
|`KC_TRANSPARENT` |`KC_TRNS`, `_______` | 次に低いレイヤーの非透過キーを使う |*N/A* |*N/A* |*N/A* |
|
||||||
|
|`KC_A` | |`a` と `A` |✔ |✔ |✔ |
|
||||||
|
|`KC_B` | |`b` と `B` |✔ |✔ |✔ |
|
||||||
|
|`KC_C` | |`c` と `C` |✔ |✔ |✔ |
|
||||||
|
|`KC_D` | |`d` と `D` |✔ |✔ |✔ |
|
||||||
|
|`KC_E` | |`e` と `E` |✔ |✔ |✔ |
|
||||||
|
|`KC_F` | |`f` と `F` |✔ |✔ |✔ |
|
||||||
|
|`KC_G` | |`g` と `G` |✔ |✔ |✔ |
|
||||||
|
|`KC_H` | |`h` と `H` |✔ |✔ |✔ |
|
||||||
|
|`KC_I` | |`i` と `I` |✔ |✔ |✔ |
|
||||||
|
|`KC_J` | |`j` と `J` |✔ |✔ |✔ |
|
||||||
|
|`KC_K` | |`k` と `K` |✔ |✔ |✔ |
|
||||||
|
|`KC_L` | |`l` と `L` |✔ |✔ |✔ |
|
||||||
|
|`KC_M` | |`m` と `M` |✔ |✔ |✔ |
|
||||||
|
|`KC_N` | |`n` と `N` |✔ |✔ |✔ |
|
||||||
|
|`KC_O` | |`o` と `O` |✔ |✔ |✔ |
|
||||||
|
|`KC_P` | |`p` と `P` |✔ |✔ |✔ |
|
||||||
|
|`KC_Q` | |`q` と `Q` |✔ |✔ |✔ |
|
||||||
|
|`KC_R` | |`r` と `R` |✔ |✔ |✔ |
|
||||||
|
|`KC_S` | |`s` と `S` |✔ |✔ |✔ |
|
||||||
|
|`KC_T` | |`t` と `T` |✔ |✔ |✔ |
|
||||||
|
|`KC_U` | |`u` と `U` |✔ |✔ |✔ |
|
||||||
|
|`KC_V` | |`v` と `V` |✔ |✔ |✔ |
|
||||||
|
|`KC_W` | |`w` と `W` |✔ |✔ |✔ |
|
||||||
|
|`KC_X` | |`x` と `X` |✔ |✔ |✔ |
|
||||||
|
|`KC_Y` | |`y` と `Y` |✔ |✔ |✔ |
|
||||||
|
|`KC_Z` | |`z` と `Z` |✔ |✔ |✔ |
|
||||||
|
|`KC_1` | |`1` と `!` |✔ |✔ |✔ |
|
||||||
|
|`KC_2` | |`2` と `@` |✔ |✔ |✔ |
|
||||||
|
|`KC_3` | |`3` と `#` |✔ |✔ |✔ |
|
||||||
|
|`KC_4` | |`4` と `$` |✔ |✔ |✔ |
|
||||||
|
|`KC_5` | |`5` と `%` |✔ |✔ |✔ |
|
||||||
|
|`KC_6` | |`6` と `^` |✔ |✔ |✔ |
|
||||||
|
|`KC_7` | |`7` と `&` |✔ |✔ |✔ |
|
||||||
|
|`KC_8` | |`8` と `*` |✔ |✔ |✔ |
|
||||||
|
|`KC_9` | |`9` と `(` |✔ |✔ |✔ |
|
||||||
|
|`KC_0` | |`0` と `)` |✔ |✔ |✔ |
|
||||||
|
|`KC_ENTER` |`KC_ENT` |Return (Enter) |✔ |✔ |✔ |
|
||||||
|
|`KC_ESCAPE` |`KC_ESC` |Escape |✔ |✔ |✔ |
|
||||||
|
|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) |✔ |✔ |✔ |
|
||||||
|
|`KC_TAB` | |Tab |✔ |✔ |✔ |
|
||||||
|
|`KC_SPACE` |`KC_SPC` |Spacebar |✔ |✔ |✔ |
|
||||||
|
|`KC_MINUS` |`KC_MINS` |`-` と `_` |✔ |✔ |✔ |
|
||||||
|
|`KC_EQUAL` |`KC_EQL` |`=` と `+` |✔ |✔ |✔ |
|
||||||
|
|`KC_LBRACKET` |`KC_LBRC` |`[` と `{` |✔ |✔ |✔ |
|
||||||
|
|`KC_RBRACKET` |`KC_RBRC` |`]` と `}` |✔ |✔ |✔ |
|
||||||
|
|`KC_BSLASH` |`KC_BSLS` |`\` と `\|` |✔ |✔ |✔ |
|
||||||
|
|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` と `~` |✔ |✔ |✔ |
|
||||||
|
|`KC_SCOLON` |`KC_SCLN` |`;` と `:` |✔ |✔ |✔ |
|
||||||
|
|`KC_QUOTE` |`KC_QUOT` |`'` と `"` |✔ |✔ |✔ |
|
||||||
|
|`KC_GRAVE` |`KC_GRV`, `KC_ZKHK` |<code>`</code> と `~`, JIS 全角/半角 |✔ |✔ |✔ |
|
||||||
|
|`KC_COMMA` |`KC_COMM` |`,` と `<` |✔ |✔ |✔ |
|
||||||
|
|`KC_DOT` | |`.` と `>` |✔ |✔ |✔ |
|
||||||
|
|`KC_SLASH` |`KC_SLSH` |`/` と `?` |✔ |✔ |✔ |
|
||||||
|
|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS` |Caps Lock |✔ |✔ |✔ |
|
||||||
|
|`KC_F1` | |F1 |✔ |✔ |✔ |
|
||||||
|
|`KC_F2` | |F2 |✔ |✔ |✔ |
|
||||||
|
|`KC_F3` | |F3 |✔ |✔ |✔ |
|
||||||
|
|`KC_F4` | |F4 |✔ |✔ |✔ |
|
||||||
|
|`KC_F5` | |F5 |✔ |✔ |✔ |
|
||||||
|
|`KC_F6` | |F6 |✔ |✔ |✔ |
|
||||||
|
|`KC_F7` | |F7 |✔ |✔ |✔ |
|
||||||
|
|`KC_F8` | |F8 |✔ |✔ |✔ |
|
||||||
|
|`KC_F9` | |F9 |✔ |✔ |✔ |
|
||||||
|
|`KC_F10` | |F10 |✔ |✔ |✔ |
|
||||||
|
|`KC_F11` | |F11 |✔ |✔ |✔ |
|
||||||
|
|`KC_F12` | |F12 |✔ |✔ |✔ |
|
||||||
|
|`KC_PSCREEN` |`KC_PSCR` |Print Screen |✔ |✔<sup>2</sup>|✔ |
|
||||||
|
|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD` |Scroll Lock, 画面の明るさダウン (macOS) |✔ |✔<sup>2</sup>|✔ |
|
||||||
|
|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, 画面の明るさアップ (macOS) |✔ |✔<sup>2</sup>|✔ |
|
||||||
|
|`KC_INSERT` |`KC_INS` |Insert |✔ | |✔ |
|
||||||
|
|`KC_HOME` | |Home |✔ |✔ |✔ |
|
||||||
|
|`KC_PGUP` | |Page Up |✔ |✔ |✔ |
|
||||||
|
|`KC_DELETE` |`KC_DEL` |Forward Delete |✔ |✔ |✔ |
|
||||||
|
|`KC_END` | |End |✔ |✔ |✔ |
|
||||||
|
|`KC_PGDOWN` |`KC_PGDN` |Page Down |✔ |✔ |✔ |
|
||||||
|
|`KC_RIGHT` |`KC_RGHT` |右矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_LEFT` | |左矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_DOWN` | |下矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_UP` | |上矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_NUMLOCK` |`KC_NLCK` |テンキー Num Lock と Clear |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_SLASH` |`KC_PSLS` |テンキー `/` |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_ASTERISK` |`KC_PAST` |テンキー `*` |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_MINUS` |`KC_PMNS` |テンキー `-` |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_PLUS` |`KC_PPLS` |テンキー `+` |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_ENTER` |`KC_PENT` |テンキー Enter |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_1` |`KC_P1` |テンキー `1` と End |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_2` |`KC_P2` |テンキー `2` と下矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_3` |`KC_P3` |テンキー `3` と Page Down |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_4` |`KC_P4` |テンキー `4` と左矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_5` |`KC_P5` |テンキー `5` |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_6` |`KC_P6` |テンキー `6` と右矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_7` |`KC_P7` |テンキー `7` と Home |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_8` |`KC_P8` |テンキー `8` と上矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_9` |`KC_P9` |テンキー `9` と Page Up |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_0` |`KC_P0` |テンキー `0` と Insert |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_DOT` |`KC_PDOT` |テンキー `.` と Delete |✔ |✔ |✔ |
|
||||||
|
|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` と `\|` |✔ |✔ |✔ |
|
||||||
|
|`KC_APPLICATION` |`KC_APP` |アプリケーションキー (Windows コンテキストメニューキー) |✔ | |✔ |
|
||||||
|
|`KC_POWER` | |システム電源 | |✔<sup>3</sup>|✔ |
|
||||||
|
|`KC_KP_EQUAL` |`KC_PEQL` |テンキー `=` |✔ |✔ |✔ |
|
||||||
|
|`KC_F13` | |F13 |✔ |✔ |✔ |
|
||||||
|
|`KC_F14` | |F14 |✔ |✔ |✔ |
|
||||||
|
|`KC_F15` | |F15 |✔ |✔ |✔ |
|
||||||
|
|`KC_F16` | |F16 |✔ |✔ |✔ |
|
||||||
|
|`KC_F17` | |F17 |✔ |✔ |✔ |
|
||||||
|
|`KC_F18` | |F18 |✔ |✔ |✔ |
|
||||||
|
|`KC_F19` | |F19 |✔ |✔ |✔ |
|
||||||
|
|`KC_F20` | |F20 |✔ | |✔ |
|
||||||
|
|`KC_F21` | |F21 |✔ | |✔ |
|
||||||
|
|`KC_F22` | |F22 |✔ | |✔ |
|
||||||
|
|`KC_F23` | |F23 |✔ | |✔ |
|
||||||
|
|`KC_F24` | |F24 |✔ | |✔ |
|
||||||
|
|`KC_EXECUTE` |`KC_EXEC` |Execute | | |✔ |
|
||||||
|
|`KC_HELP` | |Help | | |✔ |
|
||||||
|
|`KC_MENU` | |Menu | | |✔ |
|
||||||
|
|`KC_SELECT` |`KC_SLCT` |Select | | |✔ |
|
||||||
|
|`KC_STOP` | |Stop | | |✔ |
|
||||||
|
|`KC_AGAIN` |`KC_AGIN` |Again | | |✔ |
|
||||||
|
|`KC_UNDO` | |アンドゥ | | |✔ |
|
||||||
|
|`KC_CUT` | |カット | | |✔ |
|
||||||
|
|`KC_COPY` | |コピー | | |✔ |
|
||||||
|
|`KC_PASTE` |`KC_PSTE` |ペースト | | |✔ |
|
||||||
|
|`KC_FIND` | |検索 | | |✔ |
|
||||||
|
|`KC__MUTE` | |ミュート | |✔ |✔ |
|
||||||
|
|`KC__VOLUP` | |音量アップ | |✔ |✔ |
|
||||||
|
|`KC__VOLDOWN` | |音量ダウン | |✔ |✔ |
|
||||||
|
|`KC_LOCKING_CAPS` |`KC_LCAP` |Caps Lock のロック |✔ |✔ | |
|
||||||
|
|`KC_LOCKING_NUM` |`KC_LNUM` |Num Lock のロック |✔ |✔ | |
|
||||||
|
|`KC_LOCKING_SCROLL` |`KC_LSCR` |Scroll Lock のロック |✔ |✔ | |
|
||||||
|
|`KC_KP_COMMA` |`KC_PCMM` |テンキー `,` | | |✔ |
|
||||||
|
|`KC_KP_EQUAL_AS400` | |AS/400 キーボードのテンキー `=` | | | |
|
||||||
|
|`KC_INT1` |`KC_RO` |JIS `\` と `_` |✔ | |✔ |
|
||||||
|
|`KC_INT2` |`KC_KANA` |JIS カタカナ/ひらがな |✔ | |✔ |
|
||||||
|
|`KC_INT3` |`KC_JYEN` |JIS `¥` と `\|` |✔ | |✔ |
|
||||||
|
|`KC_INT4` |`KC_HENK` |JIS 変換 |✔ | |✔ |
|
||||||
|
|`KC_INT5` |`KC_MHEN` |JIS 無変換 |✔ | |✔ |
|
||||||
|
|`KC_INT6` | |JIS テンキー `,` | | |✔ |
|
||||||
|
|`KC_INT7` | |International 7 | | | |
|
||||||
|
|`KC_INT8` | |International 8 | | | |
|
||||||
|
|`KC_INT9` | |International 9 | | | |
|
||||||
|
|`KC_LANG1` |`KC_HAEN` |ハングル/英語 | | |✔ |
|
||||||
|
|`KC_LANG2` |`KC_HANJ` |韓文漢字 | | |✔ |
|
||||||
|
|`KC_LANG3` | |JIS カタカナ | | |✔ |
|
||||||
|
|`KC_LANG4` | |JIS ひらがな | | |✔ |
|
||||||
|
|`KC_LANG5` | |JIS 全角/半角 | | |✔ |
|
||||||
|
|`KC_LANG6` | |Language 6 | | | |
|
||||||
|
|`KC_LANG7` | |Language 7 | | | |
|
||||||
|
|`KC_LANG8` | |Language 8 | | | |
|
||||||
|
|`KC_LANG9` | |Language 9 | | | |
|
||||||
|
|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | | | |
|
||||||
|
|`KC_SYSREQ` | |SysReq/Attention | | | |
|
||||||
|
|`KC_CANCEL` | |Cancel | | | |
|
||||||
|
|`KC_CLEAR` |`KC_CLR` |Clear | | |✔ |
|
||||||
|
|`KC_PRIOR` | |Prior | | | |
|
||||||
|
|`KC_RETURN` | |Return | | | |
|
||||||
|
|`KC_SEPARATOR` | |Separator | | | |
|
||||||
|
|`KC_OUT` | |Out | | | |
|
||||||
|
|`KC_OPER` | |Oper | | | |
|
||||||
|
|`KC_CLEAR_AGAIN` | |Clear/Again | | | |
|
||||||
|
|`KC_CRSEL` | |CrSel/Props | | | |
|
||||||
|
|`KC_EXSEL` | |ExSel | | | |
|
||||||
|
|`KC_LCTRL` |`KC_LCTL` |左 Control |✔ |✔ |✔ |
|
||||||
|
|`KC_LSHIFT` |`KC_LSFT` |左 Shift |✔ |✔ |✔ |
|
||||||
|
|`KC_LALT` |`KC_LOPT` |左 Alt (Option) |✔ |✔ |✔ |
|
||||||
|
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN` |左 GUI (Windows/Command/Meta key) |✔ |✔ |✔ |
|
||||||
|
|`KC_RCTRL` |`KC_RCTL` |右 Control |✔ |✔ |✔ |
|
||||||
|
|`KC_RSHIFT` |`KC_RSFT` |右 Shift |✔ |✔ |✔ |
|
||||||
|
|`KC_RALT` |`KC_ROPT`, `KC_ALGR` |右 Alt (Option/AltGr) |✔ |✔ |✔ |
|
||||||
|
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN` |右 GUI (Windows/Command/Meta key) |✔ |✔ |✔ |
|
||||||
|
|`KC_SYSTEM_POWER` |`KC_PWR` |システム電源オフ |✔ |✔<sup>3</sup>|✔ |
|
||||||
|
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |システムスリープ |✔ |✔<sup>3</sup>|✔ |
|
||||||
|
|`KC_SYSTEM_WAKE` |`KC_WAKE` |システムスリープ解除 | |✔<sup>3</sup>|✔ |
|
||||||
|
|`KC_AUDIO_MUTE` |`KC_MUTE` |ミュート |✔ |✔ |✔ |
|
||||||
|
|`KC_AUDIO_VOL_UP` |`KC_VOLU` |音量アップ |✔ |✔<sup>4</sup>|✔ |
|
||||||
|
|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |音量ダウン |✔ |✔<sup>4</sup>|✔ |
|
||||||
|
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |次の曲へ |✔ |✔<sup>5</sup>|✔ |
|
||||||
|
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |前の曲へ |✔ |✔<sup>5</sup>|✔ |
|
||||||
|
|`KC_MEDIA_STOP` |`KC_MSTP` |再生停止 |✔ | |✔ |
|
||||||
|
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |再生/一時停止 |✔ |✔ |✔ |
|
||||||
|
|`KC_MEDIA_SELECT` |`KC_MSEL` |Media Player 起動 |✔ | |✔ |
|
||||||
|
|`KC_MEDIA_EJECT` |`KC_EJCT` |イジェクト | |✔ |✔ |
|
||||||
|
|`KC_MAIL` | |メール起動 |✔ | |✔ |
|
||||||
|
|`KC_CALCULATOR` |`KC_CALC` |電卓起動 |✔ | |✔ |
|
||||||
|
|`KC_MY_COMPUTER` |`KC_MYCM` |マイコンピュータを開く |✔ | |✔ |
|
||||||
|
|`KC_WWW_SEARCH` |`KC_WSCH` |ブラウザ検索 |✔ | |✔ |
|
||||||
|
|`KC_WWW_HOME` |`KC_WHOM` |ブラウザホーム画面 |✔ | |✔ |
|
||||||
|
|`KC_WWW_BACK` |`KC_WBAK` |ブラウザ戻る |✔ | |✔ |
|
||||||
|
|`KC_WWW_FORWARD` |`KC_WFWD` |ブラウザ進む |✔ | |✔ |
|
||||||
|
|`KC_WWW_STOP` |`KC_WSTP` |ブラウザ読み込み中止 |✔ | |✔ |
|
||||||
|
|`KC_WWW_REFRESH` |`KC_WREF` |ブラウザ再読み込み |✔ | |✔ |
|
||||||
|
|`KC_WWW_FAVORITES` |`KC_WFAV` |ブラウザお気に入り |✔ | |✔ |
|
||||||
|
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |次の曲へ |✔ |✔<sup>5</sup>|✔ |
|
||||||
|
|`KC_MEDIA_REWIND` |`KC_MRWD` |前の曲へ |✔<sup>6</sup>|✔<sup>5</sup>|✔ |
|
||||||
|
|`KC_BRIGHTNESS_UP` |`KC_BRIU` |画面の明るさアップ |✔ |✔ |✔ |
|
||||||
|
|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |画面の明るさダウン |✔ |✔ |✔ |
|
||||||
|
|
||||||
|
<sup>1. Linux カーネル HID ドライバは [ほぼ全てのキーコード](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c) を識別しますが、デフォルトの関連付けは デスクトップ環境/ウィンドウマネージャによって決まります。</sup><br/>
|
||||||
|
<sup>2. F13-F15 として取り扱われます。</sup><br/>
|
||||||
|
<sup>3. 約3秒間押していると、プロンプトが表示されます。</sup><br/>
|
||||||
|
<sup>4. Shift と Option を押していると、ボリュームレベルの細かいコントロールが可能になります。</sup><br/>
|
||||||
|
<sup>5. iTunes では、タップすると1曲全体がスキップされます。押していると曲の中で早送り/巻き戻しになります。</sup><br/>
|
||||||
|
<sup>6. Windows Media Player は巻き戻しキーを識別しませんが、VLC では早送り/巻き戻しキーで再生速度が変更されます。</sup>
|
||||||
|
|
||||||
|
## Quantum キーコード :id=quantum-keycodes
|
||||||
|
|
||||||
|
[Quantum キーコード](ja/quantum_keycodes.md#qmk-keycodes) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明 |
|
||||||
|
|--------------|-----------|---------------------------------------------------------|
|
||||||
|
|`RESET` | |ファームウエア書き込みのためにキーボードをブートローダーモードにします |
|
||||||
|
|`DEBUG` | |デバッグモードを切り替えます |
|
||||||
|
|`EEPROM_RESET`|`EEP_RST` |キーボードの EEPROM (不揮発メモリ) を再初期化します |
|
||||||
|
|
||||||
|
## オーディオキー :id=audio-keys
|
||||||
|
|
||||||
|
[オーディオ](ja/feature_audio.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明 |
|
||||||
|
|----------------|------------|---------------------------------------|
|
||||||
|
|`AU_ON` | |オーディオモードオン |
|
||||||
|
|`AU_OFF` | |オーディオモードオフ |
|
||||||
|
|`AU_TOG` | |オーディオモードを切り替えます |
|
||||||
|
|`CLICKY_TOGGLE` |`CK_TOGG` |オーディオクリックモードを切り替えます |
|
||||||
|
|`CLICKY_UP` |`CK_UP` |クリック音の周波数を増やします |
|
||||||
|
|`CLICKY_DOWN` |`CK_DOWN` |クリック音の周波数を減らします |
|
||||||
|
|`CLICKY_RESET` |`CK_RST` |周波数をデフォルトに再設定します |
|
||||||
|
|`MU_ON` | |音楽モードをオンにします |
|
||||||
|
|`MU_OFF` | |音楽モードをオフにします |
|
||||||
|
|`MU_TOG` | |音楽モードを切り替えます |
|
||||||
|
|`MU_MOD` | |音楽モードを循環します |
|
||||||
|
|
||||||
|
## バックライト :id=backlighting
|
||||||
|
|
||||||
|
[バックライト](ja/feature_backlight.md) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|---------|-------------------------------------|
|
||||||
|
|`BL_TOGG`|バックライトをオンあるいはオフにする |
|
||||||
|
|`BL_STEP`|バックライトレベルを循環する |
|
||||||
|
|`BL_ON` |バックライトを最大輝度にセットする |
|
||||||
|
|`BL_OFF` |バックライトをオフにする |
|
||||||
|
|`BL_INC` |バックライトのレベルを上げる |
|
||||||
|
|`BL_DEC` |バックライトのレベルを下げる |
|
||||||
|
|`BL_BRTG`|バックライトの明滅動作を切り替える |
|
||||||
|
|
||||||
|
## ブートマジック :id=bootmagic
|
||||||
|
|
||||||
|
[ブートマジック](ja/feature_bootmagic.md) も見てください。
|
||||||
|
|
||||||
|
| キー | エイリアス| 説明 |
|
||||||
|
|------------------------------------|-----------|-------------------------------------------------------|
|
||||||
|
| `MAGIC_SWAP_CONTROL_CAPSLOCK` | `CL_SWAP` | Caps Lock と左 Control の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_CONTROL_CAPSLOCK` | `CL_NORM` | Caps Lock と左 Control の入れ替えの解除 |
|
||||||
|
| `MAGIC_CAPSLOCK_TO_CONTROL` | `CL_CTRL` | Caps Lock を Control として扱う |
|
||||||
|
| `MAGIC_UNCAPSLOCK_TO_CONTROL` | `CL_CAPS` | Caps Lock を Control として扱うことを止める |
|
||||||
|
| `MAGIC_SWAP_LCTL_LGUI` | `LCG_SWP` | 左 Control と GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_LCTL_LGUI` | `LCG_NRM` | 左 Control と GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_SWAP_RCTL_RGUI` | `RCG_SWP` | 右 Control と GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_RCTL_RGUI` | `RCG_NRM` | 右 Control と GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_SWAP_CTL_GUI` | `CG_SWAP` | 両側の Control と GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_CTL_GUI` | `CG_NORM` | 両側の Control と GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_TOGGLE_CTL_GUI` | `CG_TOGG` | 両側の Control と GUI の入れ替えの切り替え |
|
||||||
|
| `MAGIC_SWAP_LALT_LGUI` | `LAG_SWP` | 左 Alt と GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_LALT_LGUI` | `LAG_NRM` | 左 Alt と GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_SWAP_RALT_RGUI` | `RAG_SWP` | 右 Alt と GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_RALT_RGUI` | `RAG_NRM` | 右 Alt と GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_SWAP_ALT_GUI` | `AG_SWAP` | 両側の Alt と GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_ALT_GUI` | `AG_NORM` | 両側の Alt と GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_TOGGLE_ALT_GUI` | `AG_TOGG` | 両側の Alt と GUI の入れ替えの切り替え |
|
||||||
|
| `MAGIC_NO_GUI` | `GUI_OFF` | GUI キーを無効にする |
|
||||||
|
| `MAGIC_UNNO_GUI` | `GUI_ON` | GUI キーを有効にする |
|
||||||
|
| `MAGIC_SWAP_GRAVE_ESC` | `GE_SWAP` | <code>`</code> とエスケープの入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_GRAVE_ESC` | `GE_NORM` | <code>`</code> とエスケープの入れ替えを解除 |
|
||||||
|
| `MAGIC_SWAP_BACKSLASH_BACKSPACE` | `BS_SWAP` | `\` と Backspace を入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_BACKSLASH_BACKSPACE` | `BS_NORM` | `\` と Backspace の入れ替えを解除する |
|
||||||
|
| `MAGIC_HOST_NKRO` | `NK_ON` | N キーロールオーバーを有効にする |
|
||||||
|
| `MAGIC_UNHOST_NKRO` | `NK_OFF` | N キーロールオーバーを無効にする |
|
||||||
|
| `MAGIC_TOGGLE_NKRO` | `NK_TOGG` | N キーロールオーバーの有効・無効を切り替え |
|
||||||
|
| `MAGIC_EE_HANDS_LEFT` | `EH_LEFT` | 分割キーボードのマスター側を左手に設定(`EE_HANDS` 用) |
|
||||||
|
| `MAGIC_EE_HANDS_RIGHT` | `EH_RGHT` | 分割キーボードのマスター側を右手に設定(`EE_HANDS` 用) |
|
||||||
|
|
||||||
|
## Bluetooth :id=bluetooth
|
||||||
|
|
||||||
|
[Bluetooth](ja/feature_bluetooth.md) も見てください。
|
||||||
|
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|----------|--------------------------------------|
|
||||||
|
|`OUT_AUTO`|USB と Bluetooth を自動的に切り替える |
|
||||||
|
|`OUT_USB` |USB のみ |
|
||||||
|
|`OUT_BT` |Bluetooth のみ |
|
||||||
|
|
||||||
|
## 動的マクロ :id=dynamic-macros
|
||||||
|
|
||||||
|
[動的マクロ](ja/feature_dynamic_macros.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明 |
|
||||||
|
|-----------------|---------|-------------------------------------|
|
||||||
|
|`DYN_REC_START1` |`DM_REC1`|マクロ 1 の記録を開始します |
|
||||||
|
|`DYN_REC_START2` |`DM_REC2`|マクロ 2 の記録を開始します |
|
||||||
|
|`DYN_MACRO_PLAY1`|`DM_PLY1`|マクロ 1 を再生します |
|
||||||
|
|`DYN_MACRO_PLAY2`|`DM_PLY2`|マクロ 2 を再生します |
|
||||||
|
|`DYN_REC_STOP` |`DM_RSTP`|現在記録中のマクロの記録を終了します |
|
||||||
|
|
||||||
|
## グレイブエスケープ :id=grave-escape
|
||||||
|
|
||||||
|
[グレイブエスケープ](ja/feature_grave_esc.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明 |
|
||||||
|
|-----------|---------|------------------------------------------------------------------|
|
||||||
|
|`GRAVE_ESC`|`KC_GESC`|押された場合に Escape。Shift あるいは GUI が押されたままの場合は <code>`</code>|
|
||||||
|
|
||||||
|
## キーロック :id=key-lock
|
||||||
|
|
||||||
|
[キーロック](ja/feature_key_lock.md) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|---------|--------------------------------------------------|
|
||||||
|
|`KC_LOCK`|キーが再び押されるまで次のキーを押したままにします |
|
||||||
|
|
||||||
|
## レイヤー切り替え :id=layer-switching
|
||||||
|
|
||||||
|
[レイヤー切り替え](ja/feature_layers.md#switching-and-toggling-layers) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|----------------|--------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
|`DF(layer)` |指定されたレイヤーを基本 (デフォルト) レイヤーに設定する |
|
||||||
|
|`MO(layer)` |キーを押したら一時的に `layer` を切り替える。(切り替え先のレイヤーには `KC_TRNS` が必要です) |
|
||||||
|
|`OSL(layer)` |次のキーが押されるまで、一時的にレイヤーをアクティブにします。詳細は [ワンショットキー](ja/one_shot_keys.md) のとおり。 |
|
||||||
|
|`LM(layer, mod)`|`mod` がアクティブな状態で (MO のように) 一時的にレイヤーをアクティブにします。ここでは、`mod` は mods_bit のことです。Mod については [こちら](ja/mod_tap.md) で見ることができます。実装例: `LM(LAYER_1, MOD_LALT)` |
|
||||||
|
|`LT(layer, kc)` |押していると `layer` をオンにし、タップすると `kc` になります。 |
|
||||||
|
|`TG(layer)` |`layer` のオン・オフを切り替え |
|
||||||
|
|`TO(layer)` |`layer` をオンにして、デフォルトレイヤーを除く他のレイヤーをオフにします。 |
|
||||||
|
|`TT(layer)` |複数回タップしない限り `MO` のように動作し、複数回タップすると `layer` をオンにトグルします。 |
|
||||||
|
|
||||||
|
## リーダーキー :id=leader-key
|
||||||
|
|
||||||
|
[リーダーキー](ja/feature_leader_key.md) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|---------|-------------------------------|
|
||||||
|
|`KC_LEAD`|リーダーキーのシーケンスを開始 |
|
||||||
|
|
||||||
|
## マウスキー :id=mouse-keys
|
||||||
|
|
||||||
|
[マウスキー](ja/feature_mouse_keys.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明 |
|
||||||
|
|----------------|---------|-------------------------|
|
||||||
|
|`KC_MS_UP` |`KC_MS_U`|マウスカーソルを上に移動 |
|
||||||
|
|`KC_MS_DOWN` |`KC_MS_D`|マウスカーソルを下に移動 |
|
||||||
|
|`KC_MS_LEFT` |`KC_MS_L`|マウスカーソルを左に移動 |
|
||||||
|
|`KC_MS_RIGHT` |`KC_MS_R`|マウスカーソルを右に移動 |
|
||||||
|
|`KC_MS_BTN1` |`KC_BTN1`|ボタン1を押す |
|
||||||
|
|`KC_MS_BTN2` |`KC_BTN2`|ボタン2を押す |
|
||||||
|
|`KC_MS_BTN3` |`KC_BTN3`|ボタン3を押す |
|
||||||
|
|`KC_MS_BTN4` |`KC_BTN4`|ボタン4を押す |
|
||||||
|
|`KC_MS_BTN5` |`KC_BTN5`|ボタン5を押す |
|
||||||
|
|`KC_MS_WH_UP` |`KC_WH_U`|ホイールを向こう側に回転 |
|
||||||
|
|`KC_MS_WH_DOWN` |`KC_WH_D`|ホイールを手前側に回転 |
|
||||||
|
|`KC_MS_WH_LEFT` |`KC_WH_L`|ホイールを左に倒す |
|
||||||
|
|`KC_MS_WH_RIGHT`|`KC_WH_R`|ホイールを右に倒す |
|
||||||
|
|`KC_MS_ACCEL0` |`KC_ACL0`|速度を0に設定 |
|
||||||
|
|`KC_MS_ACCEL1` |`KC_ACL1`|速度を1に設定 |
|
||||||
|
|`KC_MS_ACCEL2` |`KC_ACL2`|速度を2に設定 |
|
||||||
|
|
||||||
|
## 修飾キー :id=modifiers
|
||||||
|
|
||||||
|
[修飾キー](ja/feature_advanced_keycodes.md#modifier-keys) も見てください。
|
||||||
|
|
||||||
|
| キー | エイリアス | 説明 |
|
||||||
|
|------------|---------------------------------|---------------------------------------------------------------|
|
||||||
|
| `LCTL(kc)` | `C(kc)` | 左 Control を押しながら `kc` を押します。 |
|
||||||
|
| `LSFT(kc)` | `S(kc)` | 左 Shift を押しながら `kc` を押します。 |
|
||||||
|
| `LALT(kc)` | `A(kc)`, `LOPT(kc)` | 左 Alt を押しながら `kc`を押します。 |
|
||||||
|
| `LGUI(kc)` | `G(kc)`, `LCMD(kc)`, `LWIN(kc)` | 左 GUI を押しながら `kc` を押します。 |
|
||||||
|
| `RCTL(kc)` | | 右 Control を押しながら `kc` を押します。 |
|
||||||
|
| `RSFT(kc)` | | 右 Shift を押しながら `kc` を押します。 |
|
||||||
|
| `RALT(kc)` | `ROPT(kc)`, `ALGR(kc)` | 右 Alt (AltGr) を押しながら `kc` を押します。 |
|
||||||
|
| `RGUI(kc)` | `RCMD(kc)`, `LWIN(kc)` | 右 GUI を押しながら `kc` を押します。 |
|
||||||
|
| `SGUI(kc)` | `SCMD(kc)`, `SWIN(kc)` | 左 Shift と GUI を押しながら `kc` を押します。 |
|
||||||
|
| `LCA(kc)` | | 左 Control と Alt を押しながら `kc` を押します。 |
|
||||||
|
| `LSA(kc)` | | 左 Shift と Alt を押しながら `kc` を押します。 |
|
||||||
|
| `RSA(kc)` |`SAGR(kc)` | 右 Shift と Alt (AltGr) を押しながら `kc` を押します。 |
|
||||||
|
| `RCS(kc)` | | 右 Control と Shift を押しながら `kc` を押します。 |
|
||||||
|
| `LCAG(kc)` | | 左 Control、Alt、GUI を押しながら `kc` を押します。 |
|
||||||
|
| `MEH(kc)` | | 左 Control、Shift、Alt を押しながら `kc` を押します。 |
|
||||||
|
| `HYPR(kc)` | | 左 Control、Shift、Alt、GUI を押しながら `kc` を押します。 |
|
||||||
|
| `KC_MEH` | | 左 Control、Shift、Alt |
|
||||||
|
| `KC_HYPR` | | 左 Control、Shift、Alt、GUI |
|
||||||
|
|
||||||
|
|
||||||
|
## モッドタップキー :id=mod-tap-keys
|
||||||
|
|
||||||
|
[モッドタップキー](ja/mod_tap.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス | 説明 |
|
||||||
|
|--------------|-------------------------------------------------------------------|------------------------------------------------------------------------|
|
||||||
|
| `MT(mod, kc)`| |押したままの場合は `mod` 、タップした場合は `kc` |
|
||||||
|
| `LCTL_T(kc)` | `CTL_T(kc)` | 押したままの場合は左 Control、タップした場合は `kc` |
|
||||||
|
| `LSFT_T(kc)` | `SFT_T(kc)` | 押したままの場合は左 Shift、タップした場合は `kc` |
|
||||||
|
| `LALT_T(kc)` | `LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` | 押したままの場合は左 Alt、タップした場合は `kc` |
|
||||||
|
| `LGUI_T(kc)` | `LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)` | 押したままの場合は左 GUI、タップした場合は `kc` |
|
||||||
|
| `RCTL_T(kc)` | | 押したままの場合は右 Control、タップした場合は `kc` |
|
||||||
|
| `RSFT_T(kc)` | | 押したままの場合は右 Shift、タップした場合は `kc` |
|
||||||
|
| `RALT_T(kc)` | `ROPT_T(kc)`, `ALGR_T(kc)` | 押したままの場合は右 Alt (AltGr) 、タップした場合は `kc` |
|
||||||
|
| `RGUI_T(kc)` | `RCMD_T(kc)`, `RWIN_T(kc)` | 押したままの場合は右 GUI、タップした場合は `kc` |
|
||||||
|
| `SGUI_T(kc)` | `SCMD_T(kc)`, `SWIN_T(kc)` | 押したままの場合は左 Shift と GUI、タップした場合は `kc` |
|
||||||
|
| `LCA_T(kc)` | | 押したままの場合は左 Control と Alt、タップした場合は `kc` |
|
||||||
|
| `LSA_T(kc)` | | 押したままの場合は左 Shift と Alt、タップした場合は `kc` |
|
||||||
|
| `RSA_T(kc)` |`SAGR_T(kc)` | 押したままの場合は右 Shift と Alt (AltGr) 、タップした場合は `kc` |
|
||||||
|
| `RCS_T(kc)` | | 押したままの場合は右 Control と Shift、タップした場合は `kc` |
|
||||||
|
| `LCAG_T(kc)` | | 押したままの場合は左 Control、Alt、GUI、タップした場合は `kc` |
|
||||||
|
| `RCAG_T(kc)` | | 押したままの場合は右 Control、Alt、GUI、タップした場合は `kc` |
|
||||||
|
| `C_S_T(kc)` | | 押したままの場合は左 Control と Shift、タップした場合は `kc` |
|
||||||
|
| `MEH_T(kc)` | | 押したままの場合は左 Control、Shift、Alt、タップした場合は `kc` |
|
||||||
|
| `HYPR_T(kc)` | `ALL_T(kc)` | 押したままの場合は左 Control、Shift、Alt、GUI、タップした場合は `kc` - より詳しくは[ここ](https://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)を見てください |
|
||||||
|
|
||||||
|
## RGB ライト :id=rgb-lighting
|
||||||
|
|
||||||
|
[RGB ライト](ja/feature_rgblight.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス|説明 |
|
||||||
|
|-------------------|----------|---------------------------------------------------------------------|
|
||||||
|
|`RGB_TOG` | |RGB ライトのオン・オフを切り替え |
|
||||||
|
|`RGB_MODE_FORWARD` |`RGB_MOD` |RGB モードを順送りで変更し、Shift を押していると逆順で変更します。 |
|
||||||
|
|`RGB_MODE_REVERSE` |`RGB_RMOD`|RGB モードを逆順で変更し、Shift を押していると順送りで変更します。 |
|
||||||
|
|`RGB_HUI` | |色相 (HUE) を増加させ、Shift を押していると減少させます。 |
|
||||||
|
|`RGB_HUD` | |色相 (HUE) を減少させ、Shift を押していると増加させます。 |
|
||||||
|
|`RGB_SAI` | |彩度 (SAT) を増加させ、Shift を押していると減少させます。 |
|
||||||
|
|`RGB_SAD` | |彩度 (SAT) を減少させ、Shift を押していると増加させます。 |
|
||||||
|
|`RGB_VAI` | |明度 (VAL/brightness) を増加させ、Shift を押していると減少させます。 |
|
||||||
|
|`RGB_VAD` | |明度 (VAL/brightness) を減少させ、Shift を押していると増加させます。 |
|
||||||
|
|`RGB_MODE_PLAIN` |`RGB_M_P `|静止(動き無し) モードに固定します |
|
||||||
|
|`RGB_MODE_BREATHE` |`RGB_M_B` |明滅アニメーションモード |
|
||||||
|
|`RGB_MODE_RAINBOW` |`RGB_M_R` |レインボーアニメーションモード |
|
||||||
|
|`RGB_MODE_SWIRL` |`RGB_M_SW`|渦巻アニメーションモード |
|
||||||
|
|`RGB_MODE_SNAKE` |`RGB_M_SN`|スネークアニメーションモード |
|
||||||
|
|`RGB_MODE_KNIGHT` |`RGB_M_K` |「ナイトライダー」アニメーションモード |
|
||||||
|
|`RGB_MODE_XMAS` |`RGB_M_X` |クリスマスアニメーションモード |
|
||||||
|
|`RGB_MODE_GRADIENT`|`RGB_M_G` |固定階調アニメーションモード |
|
||||||
|
|`RGB_MODE_RGBTEST` |`RGB_M_T` |赤、緑、青のテストアニメーションモード |
|
||||||
|
|
||||||
|
## RGB マトリックスライト :id=rgb-matrix-lighting
|
||||||
|
|
||||||
|
[RGB マトリックスライト](ja/feature_rgb_matrix.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス|説明 |
|
||||||
|
|-------------------|----------|--------------------------------------------------------------------------------------------------------|
|
||||||
|
|`RGB_TOG` | |RGB ライトのオン・オフを切り替え |
|
||||||
|
|`RGB_MODE_FORWARD` |`RGB_MOD` |RGB モードを順送りで変更し、Shift を押していると逆順で変更します。 |
|
||||||
|
|`RGB_MODE_REVERSE` |`RGB_RMOD`|RGB モードを逆順で変更し、Shift を押していると順送りで変更します。 |
|
||||||
|
|`RGB_HUI` | |色相 (HUE) を増加させ、Shift を押していると減少させます。 |
|
||||||
|
|`RGB_HUD` | |色相 (HUE) を減少させ、Shift を押していると増加させます。 |
|
||||||
|
|`RGB_SAI` | |彩度 (SAT) を増加させ、Shift を押していると減少させます。 |
|
||||||
|
|`RGB_SAD` | |彩度 (SAT) を減少させ、Shift を押していると増加させます。 |
|
||||||
|
|`RGB_VAI` | |明度 (VAL/brightness) を増加させ、Shift を押していると減少させます。 |
|
||||||
|
|`RGB_VAD` | |明度 (VAL/brightness) を減少させ、Shift を押していると増加させます。 |
|
||||||
|
|`RGB_SPI` | |エフェクトのスピード (EEPROM はまだサポートしていません) を増加させ、Shift を押していると減少させます。 |
|
||||||
|
|`RGB_SPD` | |エフェクトのスピード (EEPROM はまだサポートしていません) を減少させ、Shift を押していると増加させます。 |
|
||||||
|
|
||||||
|
## 感熱式プリンタ :id=thermal-printer
|
||||||
|
|
||||||
|
[感熱式プリンタ](ja/feature_thermal_printer.md) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|-----------|---------------------------------|
|
||||||
|
|`PRINT_ON` |ユーザが入力した全ての印刷を開始 |
|
||||||
|
|`PRINT_OFF`|ユーザが入力した全ての印刷を停止 |
|
||||||
|
|
||||||
|
## US ANSI シフト済シンボル :id=us-ansi-shifted-symbols
|
||||||
|
|
||||||
|
[US ANSI シフト済シンボル](ja/keycodes_us_ansi_shifted.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明|
|
||||||
|
|------------------------|-------------------|-----------|
|
||||||
|
|`KC_TILDE` |`KC_TILD` |`~` |
|
||||||
|
|`KC_EXCLAIM` |`KC_EXLM` |`!` |
|
||||||
|
|`KC_AT` | |`@` |
|
||||||
|
|`KC_HASH` | |`#` |
|
||||||
|
|`KC_DOLLAR` |`KC_DLR` |`$` |
|
||||||
|
|`KC_PERCENT` |`KC_PERC` |`%` |
|
||||||
|
|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` |
|
||||||
|
|`KC_AMPERSAND` |`KC_AMPR` |`&` |
|
||||||
|
|`KC_ASTERISK` |`KC_ASTR` |`*` |
|
||||||
|
|`KC_LEFT_PAREN` |`KC_LPRN` |`(` |
|
||||||
|
|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` |
|
||||||
|
|`KC_UNDERSCORE` |`KC_UNDS` |`_` |
|
||||||
|
|`KC_PLUS` | |`+` |
|
||||||
|
|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` |
|
||||||
|
|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` |
|
||||||
|
|`KC_PIPE` | |`\|` |
|
||||||
|
|`KC_COLON` |`KC_COLN` |`:` |
|
||||||
|
|`KC_DOUBLE_QUOTE` |`KC_DQUO`, `KC_DQT`|`"` |
|
||||||
|
|`KC_LEFT_ANGLE_BRACKET` |`KC_LABK`, `KC_LT` |`<` |
|
||||||
|
|`KC_RIGHT_ANGLE_BRACKET`|`KC_RABK`, `KC_GT` |`>` |
|
||||||
|
|`KC_QUESTION` |`KC_QUES` |`?` |
|
||||||
|
|
||||||
|
## ワンショットキー :id=one-shot-keys
|
||||||
|
|
||||||
|
[ワンショットキー](ja/one_shot_keys.md) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|------------|--------------------------------|
|
||||||
|
|`OSM(mod)` | 次のキーが押されるまで、`mod` を押したままにします |
|
||||||
|
|`OSL(layer)`| 次のキーが押されるまで、一時的にレイヤーをアクティブにします |
|
||||||
|
|
||||||
|
## Space Cadet :id=space-cadet
|
||||||
|
|
||||||
|
[Space Cadet](ja/feature_space_cadet.md) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|-----------|-------------------------------------------|
|
||||||
|
|`KC_LCPO` |押したままの場合は左 Control、タップした場合は `(` |
|
||||||
|
|`KC_RCPC` |押したままの場合は右 Control、タップした場合は `)` |
|
||||||
|
|`KC_LSPO` |押したままの場合は左 Shift、タップした場合は `(`、 |
|
||||||
|
|`KC_RSPC` |押したままの場合は右 Shift、タップした場合は `)`、 |
|
||||||
|
|`KC_LAPO` |押したままの場合は左 Alt、タップした場合は `(`、 |
|
||||||
|
|`KC_RAPC` |押したままの場合は右 Alt、タップした場合は `)`、 |
|
||||||
|
|`KC_SFTENT`|押したままの場合は右 Shift、タップした場合は Enter |
|
||||||
|
|
||||||
|
## スワップハンド :id=swap-hands
|
||||||
|
|
||||||
|
[スワップハンド](ja/feature_swap_hands.md) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|-------------|----------------------------------------------------------------------------------|
|
||||||
|
| `SH_T(key)` | タップで `key` を送信する。押している時に一時的に入れ替え。 |
|
||||||
|
| `SH_ON` | 入れ替えをオンにして、そのままにする。 |
|
||||||
|
| `SH_OFF` | 入れ替えをオフにして、そのままにする。既知の状態に戻るのに適しています。 |
|
||||||
|
| `SH_MON` | 押すとスワップハンドし、放すと通常に戻る (一時的)。 |
|
||||||
|
| `SH_MOFF` | 一時的に入れ替えをオフする。 |
|
||||||
|
| `SH_TG` | キーを押すたびにオンとオフを切り替える。 |
|
||||||
|
| `SH_TT` | タップで切り替える。押している時に一時的に切り替える。 |
|
||||||
|
| `SH_OS` | ワンショットスワップハンド: 押している時あるいは次のキーを押すまで切り替える。 |
|
||||||
|
|
||||||
|
## ユニコードサポート :id=unicode-support
|
||||||
|
|
||||||
|
[ユニコードサポート](ja/feature_unicode.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明 |
|
||||||
|
|----------------------|-----------|----------------------------------------------------------------------|
|
||||||
|
|`UC(c)` | |コードポイント `c` のユニコードを送信 |
|
||||||
|
|`X(i)` | |`unicode_map` のインデックス `i` のユニコードを送信 |
|
||||||
|
|`XP(i, j)` | |Shift/Capsが有効なら、インデックス `i` または `j` のユニコードを送信 |
|
||||||
|
|`UNICODE_MODE_FORWARD`|`UC_MOD` |ユニコード入力方式を順送りで選択 |
|
||||||
|
|`UNICODE_MODE_REVERSE`|`UC_RMOD` |ユニコード入力方式を逆順で選択 |
|
||||||
|
|`UNICODE_MODE_OSX` |`UC_M_OS` |ユニコード入力方式を macOS 方式に切り替え |
|
||||||
|
|`UNICODE_MODE_LNX` |`UC_M_LN` |ユニコード入力方式を Linux 方式に切り替え |
|
||||||
|
|`UNICODE_MODE_WIN` |`UC_M_WI` |ユニコード入力方式を Windows 方式に切り替え |
|
||||||
|
|`UNICODE_MODE_BSD` |`UC_M_BS` |ユニコード入力方式を BSD 方式に切り替え (実装されていません) |
|
||||||
|
|`UNICODE_MODE_WINC` |`UC_M_WC` |ユニコード入力方式を WinCompose を使う Windows 方式に切り替え |
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
# モッドタップ
|
# モッドタップ
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 0.9.34:docs/mod_tap.md
|
original document: 0.10.36:docs/mod_tap.md
|
||||||
git diff 0.9.34 HEAD -- docs/mod_tap.md | cat
|
git diff 0.10.36 HEAD -- docs/mod_tap.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
モッドタップキー `MT(mod, kc)` は、押したままの時にモディファイアのように機能し、タップされた時に通常のキーのように振舞います。別の言い方をすると、タップした時に Escape を送信しますが、押したままの時に Control あるいは Shift キーとして機能するキーを持つことができます。
|
モッドタップキー `MT(mod, kc)` は、押したままの時にモディファイアのように機能し、タップされた時に通常のキーのように振舞います。別の言い方をすると、タップした時に Escape を送信しますが、押したままの時に Control あるいは Shift キーとして機能するキーを持つことができます。
|
||||||
@@ -32,23 +32,26 @@ MT(MOD_LCTL | MOD_LSFT, KC_ESC)
|
|||||||
|
|
||||||
便利なように、QMK はキーマップで一般的な組み合わせをよりコンパクトにするためのモッドタップショートカットを含んでいます:
|
便利なように、QMK はキーマップで一般的な組み合わせをよりコンパクトにするためのモッドタップショートカットを含んでいます:
|
||||||
|
|
||||||
| キー | エイリアス | 説明 |
|
| キー | エイリアス | 説明 |
|
||||||
|--------------|-----------------------------|-------------------------------------------------------------|
|
| ------------ | ----------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||||
| `LCTL_T(kc)` | `CTL_T(kc)` | 押したままの場合は左 Control、タップした場合は `kc` |
|
| `LCTL_T(kc)` | `CTL_T(kc)` | 押したままの場合は左 Control、タップした場合は `kc` |
|
||||||
| `LSFT_T(kc)` | `SFT_T(kc)` | 押したままの場合は左 Shift、タップした場合は `kc` |
|
| `LSFT_T(kc)` | `SFT_T(kc)` | 押したままの場合は左 Shift、タップした場合は `kc` |
|
||||||
| `LALT_T(kc)` | `LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` | 押したままの場合は左 Alt、タップした場合は `kc` |
|
| `LALT_T(kc)` | `LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` | 押したままの場合は左 Alt、タップした場合は `kc` |
|
||||||
| `LGUI_T(kc)` | `LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)` | 押したままの場合は左 GUI、タップした場合は `kc` |
|
| `LGUI_T(kc)` | `LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)` | 押したままの場合は左 GUI、タップした場合は `kc` |
|
||||||
| `RCTL_T(kc)` | | 押したままの場合は右 Control、タップした場合は `kc` |
|
| `RCTL_T(kc)` | | 押したままの場合は右 Control、タップした場合は `kc` |
|
||||||
| `RSFT_T(kc)` | | 押したままの場合は右 Shift、タップした場合は `kc` |
|
| `RSFT_T(kc)` | | 押したままの場合は右 Shift、タップした場合は `kc` |
|
||||||
| `RALT_T(kc)` | `ROPT_T(kc)`, `ALGR_T(kc)` | 押したままの場合は右 Alt、タップした場合は `kc` |
|
| `RALT_T(kc)` | `ROPT_T(kc)`, `ALGR_T(kc)` | 押したままの場合は右 Alt、タップした場合は `kc` |
|
||||||
| `RGUI_T(kc)` | `RCMD_T(kc)`, `RWIN_T(kc)` | 押したままの場合は右 GUI、タップした場合は `kc` |
|
| `RGUI_T(kc)` | `RCMD_T(kc)`, `RWIN_T(kc)` | 押したままの場合は右 GUI、タップした場合は `kc` |
|
||||||
| `SGUI_T(kc)` | `SCMD_T(kc)`, `SWIN_T(kc)` | 押したままの場合は左 Shift と左 GUI、タップした場合は `kc` |
|
| `SGUI_T(kc)` | `SCMD_T(kc)`, `SWIN_T(kc)` | 押したままの場合は左 Shift と左 GUI、タップした場合は `kc` |
|
||||||
| `LCA_T(kc)` | | 押したままの場合は左 Control と左 Alt、タップした場合は `kc` |
|
| `LCA_T(kc)` | | 押したままの場合は左 Control と左 Alt、タップした場合は `kc` |
|
||||||
| `LCAG_T(kc)` | | 押したままの場合は左 Control、左 Alt と左 GUI、タップした場合は `kc` |
|
| `LSA_T(kc)` | | 押したままの場合は左 Shift と Alt、タップした場合は `kc` |
|
||||||
| `RCAG_T(kc)` | | 押したままの場合は右 Control、右 Alt と右 GUI、タップした場合は `kc` |
|
| `RSA_T(kc)` | `SAGR_T(kc)` | 押したままの場合は右 Shift と Alt (AltGr)、タップした場合は `kc` |
|
||||||
| `C_S_T(kc)` | | 押したままの場合は左 Control と左 Shift、タップした場合は `kc` |
|
| `RCS_T(kc)` | | 押したままの場合は右 Control と Shift、タップした場合は `kc` |
|
||||||
| `MEH_T(kc)` | | 押したままの場合は左 Control、左 Shift と左 Alt、タップした場合は `kc` |
|
| `LCAG_T(kc)` | | 押したままの場合は左 Control、左 Alt と左 GUI、タップした場合は `kc` |
|
||||||
| `HYPR_T(kc)` | `ALL_T(kc)` | 押したままの場合は左 Control、左 Shift、左 Alt と左 GUI、タップした場合は `kc` - より詳しくは[ここ](https://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)を見てください |
|
| `RCAG_T(kc)` | | 押したままの場合は右 Control、右 Alt と右 GUI、タップした場合は `kc` |
|
||||||
|
| `C_S_T(kc)` | | 押したままの場合は左 Control と左 Shift、タップした場合は `kc` |
|
||||||
|
| `MEH_T(kc)` | | 押したままの場合は左 Control、左 Shift と左 Alt、タップした場合は `kc` |
|
||||||
|
| `HYPR_T(kc)` | `ALL_T(kc)` | 押したままの場合は左 Control、左 Shift、左 Alt と左 GUI、タップした場合は `kc` - より詳しくは[ここ](https://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)を見てください |
|
||||||
|
|
||||||
## 注意事項
|
## 注意事項
|
||||||
|
|
||||||
@@ -57,3 +60,7 @@ MT(MOD_LCTL | MOD_LSFT, KC_ESC)
|
|||||||
さらに、Windows でリモートデスクトップ接続を使う場合に、問題が発生する場合があります。これらのコードはシフトを非常に高速に送信するため、リモートデスクトップはコードを見逃すかもしれません。
|
さらに、Windows でリモートデスクトップ接続を使う場合に、問題が発生する場合があります。これらのコードはシフトを非常に高速に送信するため、リモートデスクトップはコードを見逃すかもしれません。
|
||||||
|
|
||||||
これを修正するには、リモートデスクトップ接続を開き、「オプションの表示」を開き、「ローカル リソース」タブを開きます。キーボードセクションで、ドロップダウンを「このコンピューター」に変更します。これにより問題が修正され、キャラクタが正しく動作するようになります。
|
これを修正するには、リモートデスクトップ接続を開き、「オプションの表示」を開き、「ローカル リソース」タブを開きます。キーボードセクションで、ドロップダウンを「このコンピューター」に変更します。これにより問題が修正され、キャラクタが正しく動作するようになります。
|
||||||
|
|
||||||
|
## 他のリソース
|
||||||
|
|
||||||
|
モッドタップの動作を調整する追加フラグについては、[タップホールド設定オプション](ja/tap_hold.md)を参照してください。
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# QMK 初心者ガイド
|
# QMK チュートリアル
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||||
original document: 0.9.0:docs/newbs.md
|
original document: 0.12.45:docs/newbs.md
|
||||||
git diff 0.9.0 HEAD -- docs/newbs.md | cat
|
git diff 0.12.45 HEAD -- docs/newbs.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
キーボードには、コンピュータ入っているものと似たようなプロセッサが入っています。
|
キーボードには、コンピュータ入っているものと似たようなプロセッサが入っています。
|
||||||
@@ -19,20 +19,16 @@ QMK は、簡単なことは簡単に、そして、難しいことを可能な
|
|||||||
QMK は[多くの趣味のキーボード](https://qmk.fm/keyboards/)をサポートしています。
|
QMK は[多くの趣味のキーボード](https://qmk.fm/keyboards/)をサポートしています。
|
||||||
現在使用しているキーボードが QMK を実行できない場合、QMK を実行できるキーボードの選択肢はたくさんあります。
|
現在使用しているキーボードが QMK を実行できない場合、QMK を実行できるキーボードの選択肢はたくさんあります。
|
||||||
|
|
||||||
## このガイドは私のためにあるのでしょうか?
|
?> **このガイドは私のためにあるのでしょうか?**<br>
|
||||||
|
もし、プログラミングの考え方に抵抗があるのであれば、代わりに[私たちのオンライン GUI](ja/newbs_building_firmware_configurator.md) を見てみてください。
|
||||||
このガイドは、ソースコードを使ってキーボードのファームウェアを構築したいと考えている人に適しています。
|
|
||||||
もしあなたがすでにプログラマーであれば、このプロセスはとても身近で簡単に理解できるでしょう。
|
|
||||||
もし、プログラミングの考え方に抵抗があるのであれば、代わりに[私たちのオンラインGUI](ja/newbs_building_firmware_configurator.md)を見てみてください。
|
|
||||||
|
|
||||||
## 概要
|
## 概要
|
||||||
|
|
||||||
このガイドには4つの主要なセクションがあります。
|
このガイドは、ソースコードを使ってキーボードのファームウェアを構築したいと考えている人に適しています。 もしあなたがすでにプログラマーであれば、このプロセスはとても身近で簡単に理解できるでしょう。このガイドには3つの主要なセクションがあります:
|
||||||
|
|
||||||
1. [環境設定](ja/newbs_getting_started.md)
|
1. [環境設定](ja/newbs_getting_started.md)
|
||||||
2. [コマンドラインを使用して初めてのファームウェアを構築する](ja/newbs_building_firmware.md)
|
2. [コマンドラインを使用して初めてのファームウェアを構築する](ja/newbs_building_firmware.md)
|
||||||
3. [ファームウェアを書きこむ](ja/newbs_flashing.md)
|
3. [ファームウェアを書きこむ](ja/newbs_flashing.md)
|
||||||
4. [テストとデバッグ](ja/newbs_testing_debugging.md)
|
|
||||||
|
|
||||||
このガイドは、これまでソフトウェアをコンパイルしたことがない人を支援することに特化しています。
|
このガイドは、これまでソフトウェアをコンパイルしたことがない人を支援することに特化しています。
|
||||||
その観点から選択と推奨を行います。
|
その観点から選択と推奨を行います。
|
||||||
@@ -41,8 +37,4 @@ QMK は[多くの趣味のキーボード](https://qmk.fm/keyboards/)をサポ
|
|||||||
|
|
||||||
## 追加のリソース
|
## 追加のリソース
|
||||||
|
|
||||||
このガイドの他にも、QMK の学習に役立つリソースがいくつかあります。[学習リソース](ja/newbs_learn_more_resources.md)のページにまとめました。
|
このガイドの他にも、QMK の学習に役立つリソースがいくつかあります。[シラバス](ja/syllabus.md)と[学習リソース](ja/newbs_learn_more_resources.md)のページにまとめました。
|
||||||
|
|
||||||
## オープンソース
|
|
||||||
|
|
||||||
QMKは GNU General Public License でリリースされているオープンソース・ソフトウェアです。
|
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
<!---
|
<!---
|
||||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||||
original document: 0.9.0:docs/newbs_building_firmware_configurator.md
|
original document: 0.12.45:docs/newbs_building_firmware_configurator.md
|
||||||
git diff 0.9.0 HEAD -- docs/newbs_building_firmware_configurator.md | cat
|
git diff 0.12.45 HEAD -- docs/newbs_building_firmware_configurator.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
[](https://config.qmk.fm/)
|
[](https://config.qmk.fm/)
|
||||||
|
|
||||||
[QMK Configurator](https://config.qmk.fm) は、QMKファームウェアの hex ファイルを生成するオンライングラフィカルユーザーインターフェイスです。
|
[QMK Configurator](https://config.qmk.fm) は、QMKファームウェアの `.hex` や `.bin` ファイルを生成するオンライングラフィカルユーザーインターフェイスです。
|
||||||
|
|
||||||
[ビデオチュートリアル](https://www.youtube.com/watch?v=-imgglzDMdY) を見てください。
|
[ビデオチュートリアル](https://www.youtube.com/watch?v=-imgglzDMdY) を見てください。
|
||||||
多くの人は、それが自分のキーボードのプログラミングを始めるのに十分な情報であることに気づくでしょう。
|
多くの人は、それが自分のキーボードのプログラミングを始めるのに十分な情報であることに気づくでしょう。
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
# ファームウェアを書きこむ
|
# ファームウェアを書き込む
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||||
original document: 0.9.44:docs/newbs_flashing.md
|
original document: 0.12.45:docs/newbs_flashing.md
|
||||||
git diff 0.9.44 HEAD -- docs/newbs_flashing.md | cat
|
git diff 0.12.45 HEAD -- docs/newbs_flashing.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
カスタムファームウェアは出来たので、キーボードに書き込みたくなるでしょう/フラッシュしたくなるでしょう。
|
カスタムファームウェアは出来たので、いよいよキーボードへの書き込み(フラッシュ)です。
|
||||||
|
|
||||||
## キーボードを DFU (Bootloader) モードにする
|
## キーボードを DFU (Bootloader) モードにする
|
||||||
|
|
||||||
@@ -50,18 +50,22 @@ Finder またはエクスプローラーでファームウェアのファイル
|
|||||||
|
|
||||||
Windows か macOS を使用している場合、現在のフォルダをエクスプローラーか Finder で簡単に開くためのコマンドがあります。
|
Windows か macOS を使用している場合、現在のフォルダをエクスプローラーか Finder で簡単に開くためのコマンドがあります。
|
||||||
|
|
||||||
#### Windows
|
<!-- tabs:start -->
|
||||||
|
|
||||||
|
#### ** Windows **
|
||||||
|
|
||||||
```
|
```
|
||||||
start .
|
start .
|
||||||
```
|
```
|
||||||
|
|
||||||
#### macOS
|
#### ** macOS **
|
||||||
|
|
||||||
```
|
```
|
||||||
open .
|
open .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<!-- tabs:end -->
|
||||||
|
|
||||||
ファームウェアファイルは常に以下の命名形式に従っています:
|
ファームウェアファイルは常に以下の命名形式に従っています:
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -117,11 +121,13 @@ QMK Toolbox の `Flash` ボタンをクリックします。次のような出
|
|||||||
|
|
||||||
WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time.
|
WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time.
|
||||||
|
|
||||||
この場合、あなたは明示的にブートローダを指定する方法を使わなければなりません。詳細は、[ファームウェアのフラッシュ](ja/flashing.md) ガイドを参照してください。
|
この場合、あなたは明示的にブートローダを指定する方法を使わなければなりません。詳細は、[ファームウェアのフラッシュ](ja/flashing.md)ガイドを参照してください。
|
||||||
|
|
||||||
## テストしましょう!
|
## テストしましょう!
|
||||||
|
|
||||||
おめでとうございます! カスタムファームウェアがキーボードにプログラムされました!
|
おめでとうございます!カスタムファームウェアがキーボードにプログラムされ、テストする準備ができました!
|
||||||
|
|
||||||
使ってみて、すべてがあなたの望むように動作するかどうか確認してください。
|
少し運が良ければ全てが完璧に機能しますが、そうでない場合は何が問題なのかを理解するのに役立つ手順があります。
|
||||||
この初心者ガイドを完全なものにするために [テストとデバッグ](ja/newbs_testing_debugging.md) を書いたので、ファームウェアの検証とカスタム機能のトラブルシューティング方法について学ぶには、こちらをご覧ください。
|
通常、キーボードのテストは非常に簡単です。全てのキーをひとつずつ押して、期待するキーが送信されることを確認します。例え QMK で動作していない場合でも、[QMK Configurator](https://config.qmk.fm/#/test/) のテストモードを使用すると、キーボードをチェックできます。
|
||||||
|
|
||||||
|
まだ動作しませんか?詳細については FAQ トピックを参照するか、[Discord でチャット](https://discord.gg/Uq7gcHh)してください。
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
<!---
|
<!---
|
||||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||||
original document: 0.9.0:docs/newbs_learn_more_resources.md
|
original document: 0.12.45:docs/newbs_learn_more_resources.md
|
||||||
git diff 0.9.0 HEAD -- docs/newbs_learn_more_resources.md | cat
|
git diff 0.12.45 HEAD -- docs/newbs_learn_more_resources.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
これらのリソースは、QMK コミュニティの新しいメンバーに、初心者向けドキュメントで提供されている情報に対する理解を深めることを目的としています。
|
これらのリソースは、QMK コミュニティの新しいメンバーに、初心者向けドキュメントで提供されている情報に対する理解を深めることを目的としています。
|
||||||
|
|
||||||
## QMK に関するリソース:
|
## QMK に関するリソース
|
||||||
|
|
||||||
### 英語 :id=english-resources-qmk
|
### 英語 :id=english-resources-qmk
|
||||||
|
|
||||||
@@ -18,17 +18,35 @@
|
|||||||
|
|
||||||
_日本語のリソース情報を募集中です。_
|
_日本語のリソース情報を募集中です。_
|
||||||
|
|
||||||
## コマンドラインに関するリソース:
|
## コマンドラインに関するリソース :id=command-line-resources
|
||||||
|
|
||||||
### 英語 :id=english-resources-cli
|
### 英語 :id=english-resources-cli
|
||||||
|
|
||||||
* [Good General Tutorial on Command Line](https://www.codecademy.com/learn/learn-the-command-line)
|
* [Good General Tutorial on Command Line](https://www.codecademy.com/learn/learn-the-command-line)
|
||||||
|
* [Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)<br>
|
||||||
|
* [Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
|
||||||
|
|
||||||
### 日本語 :id=japanese-resources-cli
|
### 日本語 :id=japanese-resources-cli
|
||||||
|
|
||||||
_日本語のリソース情報を募集中です。_
|
_日本語のリソース情報を募集中です。_
|
||||||
|
|
||||||
## Git に関するリソース:
|
## テキストエディタに関するリソース :id=text-editor-resources
|
||||||
|
|
||||||
|
どのテキストエディタを使えば良いか分かりませんか?
|
||||||
|
|
||||||
|
### 英語 :id=english-resources-text-editor
|
||||||
|
|
||||||
|
* [a great introduction to the subject](https://learntocodewith.me/programming/basics/text-editors/)
|
||||||
|
|
||||||
|
### 日本語 :id=japanese-resources-text-editor
|
||||||
|
|
||||||
|
_日本語のリソース情報を募集中です。_
|
||||||
|
|
||||||
|
コーディング用に特別に作成されたエディタ:
|
||||||
|
* [Sublime Text](https://www.sublimetext.com/)
|
||||||
|
* [VS Code](https://code.visualstudio.com/)
|
||||||
|
|
||||||
|
## Git に関するリソース
|
||||||
|
|
||||||
### 英語 :id=english-resources-git
|
### 英語 :id=english-resources-git
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# ワンショットキー
|
# ワンショットキー
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 0.9.34:docs/one_shot_keys.md
|
original document: 0.12.41:docs/one_shot_keys.md
|
||||||
git diff 0.9.34 HEAD -- docs/one_shot_keys.md | cat
|
git diff 0.12.41 HEAD -- docs/one_shot_keys.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
ワンショットキーは次のキーが押されるまでアクティブのままになり、そのあと放されるキーです。これにより一度に1つ以上のキーを押すことなく、キーボードの組み合わせを入力することができます。これらのキーは通常「スティッキーキー」あるいは「デッドキー」と呼ばれます。
|
ワンショットキーは次のキーが押されるまでアクティブのままになり、そのあと放されるキーです。これにより一度に1つ以上のキーを押すことなく、キーボードの組み合わせを入力することができます。これらのキーは通常「スティッキーキー」あるいは「デッドキー」と呼ばれます。
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
ワンショットレイヤーについては、キーを押した時に `set_oneshot_layer(LAYER, ONESHOT_START)` を呼び出し、キーを放した時に `clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED)` を呼び出す必要があります。ワンショットをキャンセルする場合は、`reset_oneshot_layer()` を呼び出してください。
|
ワンショットレイヤーについては、キーを押した時に `set_oneshot_layer(LAYER, ONESHOT_START)` を呼び出し、キーを放した時に `clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED)` を呼び出す必要があります。ワンショットをキャンセルする場合は、`reset_oneshot_layer()` を呼び出してください。
|
||||||
|
|
||||||
ワンショットモッドについては、設定するためには `set_oneshot_mods(MOD)` を呼び出し、キャンセルするためには `clear_oneshot_mods()` を呼び出す必要があります。
|
ワンショットモッドについては、設定するためには `set_oneshot_mods(MOD_BIT(KC_*))` を呼び出し、キャンセルするためには `clear_oneshot_mods()` を呼び出す必要があります。
|
||||||
|
|
||||||
!> リモートデスクトップ接続で OSM 変換に問題がある場合は、設定を開いて「ローカル リソース」タブに移動し、キーボードセクションでドロップダウンを「このコンピューター」に変更することで修正することができます。これにより問題が修正され、OSM がリモートデスクトップ上で適切に動作するようになります。
|
!> リモートデスクトップ接続で OSM 変換に問題がある場合は、設定を開いて「ローカル リソース」タブに移動し、キーボードセクションでドロップダウンを「このコンピューター」に変更することで修正することができます。これにより問題が修正され、OSM がリモートデスクトップ上で適切に動作するようになります。
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# キーボードをより良くするための便利なコア関数のリスト
|
# キーボードをより良くするための便利なコア関数のリスト
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 0.10.33:docs/ref_functions.md
|
original document: 0.12.41:docs/ref_functions.md
|
||||||
git diff 0.10.33 HEAD -- docs/ref_functions.md | cat
|
git diff 0.12.41 HEAD -- docs/ref_functions.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
QMK には、信じられないほど便利な、またはあなたが望んでいた機能を少し追加する、隠された関数がたくさんあります。特定の機能に固有の関数はそれぞれの機能のページにあるため、ここには含まれていません。
|
QMK には、信じられないほど便利な、またはあなたが望んでいた機能を少し追加する、隠された関数がたくさんあります。特定の機能に固有の関数はそれぞれの機能のページにあるため、ここには含まれていません。
|
||||||
@@ -98,7 +98,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
|||||||
|
|
||||||
## EEPROM (永続ストレージ)の消去
|
## EEPROM (永続ストレージ)の消去
|
||||||
|
|
||||||
オーディオ、RGB アンダーグロー、バックライト、キーの動作に問題がある場合は、EEPROM (永続的な設定のストレージ)をリセットすることができます。ブートマジックはこれを行う方法の1つですが、有効になっていない場合はカスタムマクロを使って行うことができます。
|
オーディオ、RGB アンダーグロー、バックライト、キーの動作に問題がある場合は、EEPROM (永続的な設定のストレージ)をリセットすることができます。EEPROM を強制的にリセットするには、[`EEP_RST` キーコード](ja/quantum_keycodes.md)あるいは[ブートマジック](ja/feature_bootmagic.md)機能を使います。それらのいずれも選択肢にない場合は、カスタムマクロを使って行うことができます。
|
||||||
|
|
||||||
EEPROM を消去するには、関数またはマクロから `eeconfig_init()` を実行し、ほとんどの設定をデフォルトにリセットします。
|
EEPROM を消去するには、関数またはマクロから `eeconfig_init()` を実行し、ほとんどの設定をデフォルトにリセットします。
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# タップホールド設定オプション
|
# タップホールド設定オプション
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 0.10.33:docs/tap_hold.md
|
original document: 0.12.41:docs/tap_hold.md
|
||||||
git diff 0.10.33 HEAD -- docs/tap_hold.md | cat
|
git diff 0.12.41 HEAD -- docs/tap_hold.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
タップホールドオプションは素晴らしいものですが、問題が無いわけではありません。デフォルト設定を適切なものにしようとしましたが、一部の人にとってまだ問題を引き起こすかもしれません。
|
タップホールドオプションは素晴らしいものですが、問題が無いわけではありません。デフォルト設定を適切なものにしようとしましたが、一部の人にとってまだ問題を引き起こすかもしれません。
|
||||||
@@ -92,7 +92,7 @@ bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
|
|||||||
#define IGNORE_MOD_TAP_INTERRUPT
|
#define IGNORE_MOD_TAP_INTERRUPT
|
||||||
```
|
```
|
||||||
|
|
||||||
許容ホールドと同様に、これは高速なタイピストのためのファームウェアの処理方法を変更します。モッドタップキーを押し、他のキーを押し、モッドタップキーを放し、通常のキーを放すと、通常は両方のキーのタッピング機能が出力されます。これはローリングコンボキーには望ましくないかもしれません。
|
許容ホールドと同様に、これは高速なタイピストのためのファームウェアの処理方法を変更します。モッドタップキーを押し、他のキーを押し、モッドタップキーを放し、通常のキーを放すと、`TAPPING_TERM` 内で押された場合でも、通常はモッドと通常のキーが出力されます。これは、ローリングコンボキーや、頻繁に使用するキー(例えば、`RCTL_T(KC_QUOT)`)にモッドタップを使う高速なタイピストには望ましくない場合があります。
|
||||||
|
|
||||||
`モッドタップ割り込みの無視`を設定するには、両方のキーを `TAPPING_TERM` の間ホールドすると、(その修飾キーの)ホールド機能を実行する必要があります。
|
`モッドタップ割り込みの無視`を設定するには、両方のキーを `TAPPING_TERM` の間ホールドすると、(その修飾キーの)ホールド機能を実行する必要があります。
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
|
|||||||
- `SFT_T(KC_A)` を放す
|
- `SFT_T(KC_A)` を放す
|
||||||
- `KC_X` を放す
|
- `KC_X` を放す
|
||||||
|
|
||||||
通常、これは `X` (`SHIFT`+`x`) を送信します。`モッドタップ割り込みの無視` を有効にすると、ホールドアクションを登録するには、両方のキーを `TAPPING_TERM` の間ホールドする必要があります。この場合、素早いタップは `ax` を送信しますが、両方をホールドすると、`X` (`SHIFT`+`x`) を出力します。
|
通常、これは大文字の `X` (`SHIFT`+`x`)、またはモッド + キーを送信します。`モッドタップ割り込みの無視` を有効にすると、ホールドアクションを登録するには、両方のキーを `TAPPING_TERM` の間ホールドする必要があります。この場合、素早いタップは `ax` を送信しますが、両方をホールドすると、大文字の `X` (`SHIFT`+`x`) を出力します。
|
||||||
|
|
||||||
|
|
||||||
?> __注意__: これはモディファイアにのみ関係し、レイヤー切り替えキーには関係しません。
|
?> __注意__: これはモディファイアにのみ関係し、レイヤー切り替えキーには関係しません。
|
||||||
@@ -137,8 +137,7 @@ bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
|
|||||||
#define TAPPING_FORCE_HOLD
|
#define TAPPING_FORCE_HOLD
|
||||||
```
|
```
|
||||||
|
|
||||||
タップの後でユーザがキーをホールドすると、ホールド機能がアクティブになるのではなく、デフォルトでタッピング機能が繰り返されます。これにより、デュアルロールキーのタッピング機能を自動繰り返しする機能を維持することができます。
|
タップの後でユーザがキーをホールドすると、ホールド機能がアクティブになるのではなく、デフォルトでタッピング機能が繰り返されます。これにより、デュアルロールキーのタッピング機能を自動繰り返しする機能を維持することができます。`TAPPING_FORCE_HOLD` は、デュアルロールキーをタップした後ホールドした場合、ユーザがホールド機能をアクティブにする機能を削除します。
|
||||||
`TAPPING_FORCE_HOLD` は、デュアルロールキーをタップした後ホールドした場合、ユーザがホールド機能をアクティブにする機能を削除します。
|
|
||||||
|
|
||||||
例:
|
例:
|
||||||
|
|
||||||
@@ -185,6 +184,25 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) {
|
|||||||
|
|
||||||
例えば、他のキーを押すことなく `LT(2, KC_SPACE)` を押したり放したりしても何も起こりません。これを有効にすると、代わりに `KC_SPACE` を送信します。
|
例えば、他のキーを押すことなく `LT(2, KC_SPACE)` を押したり放したりしても何も起こりません。これを有効にすると、代わりに `KC_SPACE` を送信します。
|
||||||
|
|
||||||
|
この機能をより細かく制御するために、以下を `config.h` に追加することができます:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define RETRO_TAPPING_PER_KEY
|
||||||
|
```
|
||||||
|
|
||||||
|
そして、以下の関数をキーマップに追加します:
|
||||||
|
|
||||||
|
```c
|
||||||
|
bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case LT(2, KC_SPACE):
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## キー別の関数にキーレコードを含めるのはなぜですか?
|
## キー別の関数にキーレコードを含めるのはなぜですか?
|
||||||
|
|
||||||
「キー別」の関数全てにキーレコードを含んでいることに気付いたかもしれません。そしてなぜそうしたのか不思議に思っているかもしれません。
|
「キー別」の関数全てにキーレコードを含んでいることに気付いたかもしれません。そしてなぜそうしたのか不思議に思っているかもしれません。
|
||||||
|
|||||||
@@ -381,26 +381,29 @@ See also: [Mouse Keys](feature_mouse_keys.md)
|
|||||||
|
|
||||||
See also: [Modifier Keys](feature_advanced_keycodes.md#modifier-keys)
|
See also: [Modifier Keys](feature_advanced_keycodes.md#modifier-keys)
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|----------|-------------------------------|------------------------------------------------------|
|
|----------|----------------------------------|------------------------------------------------------|
|
||||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
||||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||||
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|
||||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)` |Hold Left GUI and press `kc` |
|
||||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||||
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt (AltGr) and press `kc` |
|
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt (AltGr) and press `kc` |
|
||||||
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|
||||||
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|
|`LSG(kc)` |`SGUI(kc)`, `SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and Left GUI and press `kc` |
|
||||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
|`LAG(kc)` | |Hold Left Alt and Left GUI and press `kc` |
|
||||||
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|
|`RSG(kc)` | |Hold Right Shift and Right GUI and press `kc` |
|
||||||
|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` |
|
|`RAG(kc)` | |Hold Right Alt and Right GUI and press `kc` |
|
||||||
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||||
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|
||||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` |
|
||||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` |
|
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|
||||||
|`KC_MEH` | |Left Control, Shift and Alt |
|
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
||||||
|`KC_HYPR` | |Left Control, Shift, Alt and GUI |
|
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
||||||
|
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` |
|
||||||
|
|`KC_MEH` | |Left Control, Shift and Alt |
|
||||||
|
|`KC_HYPR` | |Left Control, Shift, Alt and GUI |
|
||||||
|
|
||||||
## Mod-Tap Keys :id=mod-tap-keys
|
## Mod-Tap Keys :id=mod-tap-keys
|
||||||
|
|
||||||
@@ -417,7 +420,10 @@ See also: [Mod-Tap](mod_tap.md)
|
|||||||
|`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped |
|
|`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped |
|
||||||
|`RALT_T(kc)` |`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt (AltGr) when held, `kc` when tapped |
|
|`RALT_T(kc)` |`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt (AltGr) when held, `kc` when tapped |
|
||||||
|`RGUI_T(kc)` |`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI 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 |
|
|`LSG_T(kc)` |`SGUI_T(kc)`, `SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||||
|
|`LAG_T(kc)` | |Left Alt and GUI when held, `kc` when tapped |
|
||||||
|
|`RSG_T(kc)` | |Right Shift and GUI when held, `kc` when tapped |
|
||||||
|
|`RAG_T(kc)` | |Right Alt and GUI when held, `kc` when tapped |
|
||||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||||
|`LSA_T(kc)` | |Left Shift and Left Alt when held, `kc` when tapped |
|
|`LSA_T(kc)` | |Left Shift and Left Alt when held, `kc` when tapped |
|
||||||
|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped |
|
|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped |
|
||||||
@@ -516,6 +522,9 @@ See also: [One Shot Keys](one_shot_keys.md)
|
|||||||
|------------|----------------------------------|
|
|------------|----------------------------------|
|
||||||
|`OSM(mod)` |Hold `mod` for one keypress |
|
|`OSM(mod)` |Hold `mod` for one keypress |
|
||||||
|`OSL(layer)`|Switch to `layer` for one keypress|
|
|`OSL(layer)`|Switch to `layer` for one keypress|
|
||||||
|
|`OS_ON` |Turns One Shot keys on |
|
||||||
|
|`OS_OFF` |Turns One Shot keys off |
|
||||||
|
|`OS_TOGG` |Toggles One Shot keys status |
|
||||||
|
|
||||||
## Space Cadet :id=space-cadet
|
## Space Cadet :id=space-cadet
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,10 @@ For convenience, QMK includes some Mod-Tap shortcuts to make common combinations
|
|||||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||||
|`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
|`RALT_T(kc)`|`ROPT_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 |
|
|`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 |
|
|`LSG_T(kc)` |`SGUI_T(kc)`, `SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||||
|
|`LAG_T(kc)` | |Left Alt and GUI when held, `kc` when tapped |
|
||||||
|
|`RSG_T(kc)` | |Right Shift and GUI when held, `kc` when tapped |
|
||||||
|
|`RAG_T(kc)` | |Right Alt and GUI when held, `kc` when tapped |
|
||||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||||
|`LSA_T(kc)` | |Left Shift and Alt when held, `kc` when tapped |
|
|`LSA_T(kc)` | |Left Shift and Alt when held, `kc` when tapped |
|
||||||
|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped |
|
|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped |
|
||||||
@@ -50,11 +53,13 @@ For convenience, QMK includes some Mod-Tap shortcuts to make common combinations
|
|||||||
|
|
||||||
## Caveats
|
## Caveats
|
||||||
|
|
||||||
Unfortunately, these keycodes cannot be used in Mod-Taps or Layer-Taps, since any modifiers specified in the keycode are ignored.
|
Currently, the `kc` argument of `MT()` is limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. This is because QMK uses 16-bit keycodes, of which 3 bits are used for the function identifier, 1 bit for selecting right or left mods, and 4 bits to tell which mods are used, leaving only 8 bits for the keycode. Additionally, if at least one right-handed modifier is specified in a Mod-Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two - for example, Left Control and Right Shift would become Right Control and Right Shift.
|
||||||
|
|
||||||
Additionally, you may run into issues when using Remote Desktop Connection on Windows. Because these codes send shift very fast, Remote Desktop may miss the codes.
|
Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
||||||
|
|
||||||
To fix this, open Remote Desktop Connection, click on "Show Options", open the the "Local Resources" tab. In the keyboard section, change the drop down to "On this Computer". This will fix the issue, and allow the characters to work correctly.
|
You may also run into issues when using Remote Desktop Connection on Windows. Because these keycodes send key events faster than a human, Remote Desktop could miss them.
|
||||||
|
To fix this, open Remote Desktop Connection, click on "Show Options", open the the "Local Resources" tab, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue, and allow the characters to work correctly.
|
||||||
|
It can also be mitigated by increasing [`TAP_CODE_DELAY`](config_options.md#behaviors-that-can-be-configured).
|
||||||
|
|
||||||
## Other Resources
|
## Other Resources
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ 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.
|
Once you have located your firmware file, drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored.
|
||||||
|
|
||||||
### Flash Your Keyboard
|
### Flash Your Keyboard
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ Install the QMK CLI by running:
|
|||||||
|
|
||||||
### ** Linux/WSL **
|
### ** Linux/WSL **
|
||||||
|
|
||||||
|
?> **Note for WSL users**: By default, the installation process will clone the QMK repository into your WSL home directory, but if you have cloned manually, ensure that it is located inside the WSL instance instead of the Windows filesystem (ie. not in `/mnt`), as accessing it is currently [extremely slow](https://github.com/microsoft/WSL/issues/4197).
|
||||||
|
|
||||||
#### Prerequisites
|
#### Prerequisites
|
||||||
|
|
||||||
You will need to install Git and Python. It's very likely that you already have both, but if not, one of the following commands should install them:
|
You will need to install Git and Python. It's very likely that you already have both, but if not, one of the following commands should install them:
|
||||||
@@ -102,19 +104,13 @@ You can also try the `qmk-git` package from AUR:
|
|||||||
|
|
||||||
### ** FreeBSD **
|
### ** FreeBSD **
|
||||||
|
|
||||||
#### Prerequisites
|
|
||||||
|
|
||||||
You will need to install Git and Python. It's possible that you already have both, but if not, run the following commands to install them:
|
|
||||||
|
|
||||||
pkg install git python3
|
|
||||||
|
|
||||||
Make sure that `$HOME/.local/bin` is added to your `$PATH` so that locally installed Python packages are available.
|
|
||||||
|
|
||||||
#### Installation
|
#### Installation
|
||||||
|
|
||||||
Install the QMK CLI by running:
|
Install the FreeBSD package for QMK CLI by running:
|
||||||
|
|
||||||
python3 -m pip install --user qmk
|
pkg install -g "py*-qmk"
|
||||||
|
|
||||||
|
NOTE: remember to follow the instructions printed at the end of installation (use `pkg info -Dg "py*-qmk"` to show them again).
|
||||||
|
|
||||||
<!-- tabs:end -->
|
<!-- tabs:end -->
|
||||||
|
|
||||||
@@ -160,17 +156,11 @@ After installing QMK you can set it up with this command:
|
|||||||
|
|
||||||
In most situations you will want to answer `y` to all of the prompts.
|
In most situations you will want to answer `y` to all of the prompts.
|
||||||
|
|
||||||
?>**Note on FreeBSD**:
|
|
||||||
It is suggested to run `qmk setup` as a non-`root` user to start with, but this will likely identify packages that need to be installed to your
|
|
||||||
base system using `pkg`. However the installation will probably fail when run as an unprivileged user.
|
|
||||||
To manually install the base dependencies, run `./util/qmk_install.sh` either as `root`, or with `sudo`.
|
|
||||||
Once that completes, re-run `qmk setup` to complete the setup and checks.
|
|
||||||
|
|
||||||
<!-- tabs:end -->
|
<!-- tabs:end -->
|
||||||
|
|
||||||
?> The qmk home folder can be specified at setup with `qmk setup -H <path>`, and modified afterwards using the [cli configuration](cli_configuration.md?id=single-key-example) and the variable `user.qmk_home`. For all available options run `qmk setup --help`.
|
?> The qmk home folder can be specified at setup with `qmk setup -H <path>`, and modified afterwards using the [cli configuration](cli_configuration.md?id=single-key-example) and the variable `user.qmk_home`. For all available options run `qmk setup --help`.
|
||||||
|
|
||||||
?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create your own fork and use `qmk setup <github_username>/qmk_firmware` to clone your personal fork. If you don't know what that means you can safely ignore this message.
|
?> If you already know how to use GitHub, [we recommend that you follow these instructions](getting_started_github.md) and use `qmk setup <github_username>/qmk_firmware` to clone your personal fork. If you don't know what that means you can safely ignore this message.
|
||||||
|
|
||||||
## 4. Test Your Build Environment
|
## 4. Test Your Build Environment
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,13 @@ You can control the behavior of one shot keys by defining these in `config.h`:
|
|||||||
|
|
||||||
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](mod_tap.md), not the `KC_*` codes.
|
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](mod_tap.md), not the `KC_*` codes.
|
||||||
* `OSL(layer)` - momentary switch to *layer*.
|
* `OSL(layer)` - momentary switch to *layer*.
|
||||||
|
* `OS_ON` - Turns on One Shot keys.
|
||||||
|
* `OS_OFF` - Turns off One Shot keys. OSM act as regular mod keys, OSL act like `MO`.
|
||||||
|
* `ON_TOGG` - Toggles the one shot key status.
|
||||||
|
|
||||||
Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
|
Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
|
||||||
|
|
||||||
For one shot layers, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`.
|
For one shot layers, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `clear_oneshot_layer_state(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`.
|
||||||
|
|
||||||
For one shot mods, you need to call `set_oneshot_mods(MOD_BIT(KC_*))` to set it, or `clear_oneshot_mods()` to cancel it.
|
For one shot mods, you need to call `set_oneshot_mods(MOD_BIT(KC_*))` to set it, or `clear_oneshot_mods()` to cancel it.
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ This is the most important plugin as it will allow Eclipse to _understand_ AVR C
|
|||||||
### [ANSI Escape in Console](https://marketplace.eclipse.org/content/ansi-escape-console)
|
### [ANSI Escape in Console](https://marketplace.eclipse.org/content/ansi-escape-console)
|
||||||
This plugin is necessary to properly display the colored build output generated by the QMK makefile.
|
This plugin is necessary to properly display the colored build output generated by the QMK makefile.
|
||||||
|
|
||||||
1. Open <kbd><kbd>Help</kbd> > <kbd>Eclipse Marketplace…</kbd></kbd>
|
1. Open <kbd>Help</kbd> > <kbd>Eclipse Marketplace…</kbd>
|
||||||
2. Search for _ANSI Escape in Console_
|
2. Search for _ANSI Escape in Console_
|
||||||
3. Click the <samp>Install</samp> button of the plugin
|
3. Click the <samp>Install</samp> button of the plugin
|
||||||
4. Follow the instructions and agree again with the security warning for unsigned content.
|
4. Follow the instructions and agree again with the security warning for unsigned content.
|
||||||
@@ -59,7 +59,7 @@ Once both plugins are installed, restart Eclipse as prompted.
|
|||||||
|
|
||||||
# Configure Eclipse for QMK
|
# Configure Eclipse for QMK
|
||||||
## Importing the Project
|
## Importing the Project
|
||||||
1. Click <kbd><kbd>File</kbd> > <kbd>New</kbd> > <kbd>Makefile Project with Existing Code</kbd></kbd>
|
1. Click <kbd>File</kbd> > <kbd>New</kbd> > <kbd>Makefile Project with Existing Code</kbd>
|
||||||
2. On the next screen:
|
2. On the next screen:
|
||||||
* Select the directory where you cloned the repository as _Existing Code Location_;
|
* Select the directory where you cloned the repository as _Existing Code Location_;
|
||||||
* (Optional) Give a different name to the project¹, e.g. _QMK_ or _Quantum_;
|
* (Optional) Give a different name to the project¹, e.g. _QMK_ or _Quantum_;
|
||||||
@@ -73,16 +73,18 @@ Once both plugins are installed, restart Eclipse as prompted.
|
|||||||
¹ There might be issues for importing the project with a custom name. If it does not work properly, try leaving the default project name (i.e. the name of the directory, probably `qmk_firmware`).
|
¹ There might be issues for importing the project with a custom name. If it does not work properly, try leaving the default project name (i.e. the name of the directory, probably `qmk_firmware`).
|
||||||
|
|
||||||
## Build Your Keyboard
|
## Build Your Keyboard
|
||||||
We will now configure a make target that cleans the project and builds the keymap of your choice.
|
|
||||||
|
|
||||||
1. On the right side of the screen, select the <kbd>Make Target</kbd> tab
|
We will now change the default make target of the the project from `all` to the
|
||||||
2. Expand the folder structure to the keyboard of your choice, e.g. `qmk_firmware/keyboards/ergodox`
|
specific keyboard and keymap combination we are working on,
|
||||||
3. Right-click on the keyboard folder and select <kbd>New…</kbd> (or select the folder and click the <kbd>New Make Target</kbd> icon above the tree)
|
e.g. `kinesis/kint36:stapelberg`. This way, project-wide actions like cleaning
|
||||||
4. Choose a name for your build target, e.g. _clean \<your keymap\>_
|
and building the project will complete quickly, instead of taking a long time or
|
||||||
5. Make Target: this is the arguments that you give to `make` when building from the command line. If your target name does not match these arguments, uncheck <kbd>Same as target name</kbd> and input the correct arguments, e.g. `clean <your keymap>`
|
outright locking up Eclipse.
|
||||||
6. Leave the other options checked and click <kbd>OK</kbd>. Your make target will now appear under the selected keyboard.
|
|
||||||
7. (Optional) Toggle the <kbd>Hide Empty Folders</kbd> icon button above the targets tree to only show your build target.
|
1. Focus an editor tab within the project
|
||||||
8. Double-click the build target you created to trigger a build.
|
2. Open the `Project` > `Properties` window, then select the `C/C++ Build` list
|
||||||
9. Select the <kbd>Console</kbd> view at the bottom to view the running build.
|
entry and switch to the `Behavior` tab.
|
||||||
|
3. Change the default `Make build target` text fields for all enabled builds
|
||||||
|
from `all` to e.g. `kinesis/kint41:stapelberg`.
|
||||||
|
4. Verify your setup works by selecting `Project` > `Clean...`.
|
||||||
|
|
||||||
[1]: https://en.wikipedia.org/wiki/Eclipse_(software)
|
[1]: https://en.wikipedia.org/wiki/Eclipse_(software)
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
|
|||||||
- bare minimum required code for a board to boot into QMK should be present
|
- bare minimum required code for a board to boot into QMK should be present
|
||||||
- initialisation code for the matrix and critical devices
|
- initialisation code for the matrix and critical devices
|
||||||
- mirroring existing functionality of a commercial board (like custom keycodes and special animations etc.) should be handled through non-`default` keymaps
|
- mirroring existing functionality of a commercial board (like custom keycodes and special animations etc.) should be handled through non-`default` keymaps
|
||||||
|
- VIAL-related files or changes will not be accepted, as they are not used by QMK firmware (no VIAL-specific core code has been submitted or merged)
|
||||||
- `keyboard.c`
|
- `keyboard.c`
|
||||||
- empty `xxxx_xxxx_kb()` or other weak-defined default implemented functions removed
|
- empty `xxxx_xxxx_kb()` or other weak-defined default implemented functions removed
|
||||||
- commented-out functions removed too
|
- commented-out functions removed too
|
||||||
@@ -94,6 +95,8 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
|
|||||||
- standard layouts preferred in these keymaps, if possible
|
- standard layouts preferred in these keymaps, if possible
|
||||||
- submitters can have a personal (or bells-and-whistles) keymap showcasing capabilities in the same PR but it shouldn't be embedded in the 'default' keymap
|
- submitters can have a personal (or bells-and-whistles) keymap showcasing capabilities in the same PR but it shouldn't be embedded in the 'default' keymap
|
||||||
- submitters can also have a "manufacturer-matching" keymap that mirrors existing functionality of the commercial product, if porting an existing board
|
- submitters can also have a "manufacturer-matching" keymap that mirrors existing functionality of the commercial product, if porting an existing board
|
||||||
|
- Do not include VIA json files in the PR. These do not belong in the QMK repository as they are not used by QMK firmware -- they belong in the [VIA Keyboard Repo](https://github.com/the-via/keyboards)
|
||||||
|
|
||||||
|
|
||||||
Also, specific to ChibiOS:
|
Also, specific to ChibiOS:
|
||||||
- **strong** preference to using existing ChibiOS board definitions.
|
- **strong** preference to using existing ChibiOS board definitions.
|
||||||
@@ -127,3 +130,9 @@ There are instructions on how to keep your fork updated here:
|
|||||||
|
|
||||||
Thanks for contributing!
|
Thanks for contributing!
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Review Process
|
||||||
|
|
||||||
|
In general, we want to see two (or more) approvals that are meaningful (e.g. that have inspected code) before a PR will be considered for merge. These reviews are not limited to collaborators -- any community member willing to put in the time is welcomed (and encouraged). The only difference is that your checkmark won't be green, and that's fine!
|
||||||
|
|
||||||
|
Additionally, PR reviews are something that is done in our free time. We are not paid nor compensated for the time we spend reviewing, as it is a labor of love. As such, this means that it can take time for us to get to your Pull Request. Things like family, or life can get in the way of us getting to PRs, and burnout is a serious concern. The QMK firmware repository averages 200 PRs opened and 200 PRs merged every month, so please have patience.
|
||||||
|
|||||||
@@ -3,16 +3,18 @@ This driver powers the [Split Keyboard](feature_split_keyboard.md) feature.
|
|||||||
|
|
||||||
?> Serial in this context should be read as **sending information one bit at a time**, rather than implementing UART/USART/RS485/RS232 standards.
|
?> Serial in this context should be read as **sending information one bit at a time**, rather than implementing UART/USART/RS485/RS232 standards.
|
||||||
|
|
||||||
All drivers in this category have the following characteristics:
|
Drivers in this category have the following characteristics:
|
||||||
* Provides data and signaling over a single conductor
|
* bit bang and USART Half-duplex provide data and signaling over a single conductor
|
||||||
* Limited to single master, single slave
|
* USART Full-duplex provide data and signaling over two conductors
|
||||||
|
* They are all limited to single master and single slave communication scheme
|
||||||
|
|
||||||
## Supported Driver Types
|
## Supported Driver Types
|
||||||
|
|
||||||
| | AVR | ARM |
|
| | AVR | ARM |
|
||||||
|-------------------|--------------------|--------------------|
|
| ----------------- | ------------------ | ------------------ |
|
||||||
| bit bang | :heavy_check_mark: | :heavy_check_mark: |
|
| bit bang | :heavy_check_mark: | :heavy_check_mark: |
|
||||||
| USART Half-duplex | | :heavy_check_mark: |
|
| USART Half-duplex | | :heavy_check_mark: |
|
||||||
|
| USART Full-duplex | | :heavy_check_mark: |
|
||||||
|
|
||||||
## Driver configuration
|
## Driver configuration
|
||||||
|
|
||||||
@@ -42,7 +44,7 @@ Configure the driver via your config.h:
|
|||||||
Along with the generic options above, you must also turn on the `PAL_USE_CALLBACKS` feature in your halconf.h.
|
Along with the generic options above, you must also turn on the `PAL_USE_CALLBACKS` feature in your halconf.h.
|
||||||
|
|
||||||
### USART Half-duplex
|
### USART Half-duplex
|
||||||
Targeting STM32 boards where communication is offloaded to a USART hardware device. The advantage is that this provides fast and accurate timings. `SOFT_SERIAL_PIN` for this driver is the configured USART TX pin. **The TX pin must have appropriate pull-up resistors**. To configure it, add this to your rules.mk:
|
Targeting STM32 boards where communication is offloaded to a USART hardware device. The advantage over bitbang is that this provides fast and accurate timings. `SERIAL_PIN_TX` for this driver is the configured USART TX pin. As this Pin is configured in open-drain mode an **external pull-up resistor is needed to keep the line high** (resistor values of 1.5k to 8.2k are known to work). To configure it, add this to your rules.mk:
|
||||||
|
|
||||||
```make
|
```make
|
||||||
SERIAL_DRIVER = usart
|
SERIAL_DRIVER = usart
|
||||||
@@ -50,7 +52,8 @@ SERIAL_DRIVER = usart
|
|||||||
|
|
||||||
Configure the hardware via your config.h:
|
Configure the hardware via your config.h:
|
||||||
```c
|
```c
|
||||||
#define SOFT_SERIAL_PIN B6 // USART TX pin
|
#define SOFT_SERIAL_PIN B6 // USART TX pin
|
||||||
|
//#define USART1_REMAP // Remap USART TX and RX pins on STM32F103 MCUs, see table below.
|
||||||
#define SELECT_SOFT_SERIAL_SPEED 1 // or 0, 2, 3, 4, 5
|
#define SELECT_SOFT_SERIAL_SPEED 1 // or 0, 2, 3, 4, 5
|
||||||
// 0: about 460800 baud
|
// 0: about 460800 baud
|
||||||
// 1: about 230400 baud (default)
|
// 1: about 230400 baud (default)
|
||||||
@@ -58,7 +61,7 @@ Configure the hardware via your config.h:
|
|||||||
// 3: about 57600 baud
|
// 3: about 57600 baud
|
||||||
// 4: about 38400 baud
|
// 4: about 38400 baud
|
||||||
// 5: about 19200 baud
|
// 5: about 19200 baud
|
||||||
#define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1
|
#define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1
|
||||||
#define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
|
#define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
|
||||||
#define SERIAL_USART_TIMEOUT 100 // USART driver timeout. default 100
|
#define SERIAL_USART_TIMEOUT 100 // USART driver timeout. default 100
|
||||||
```
|
```
|
||||||
@@ -68,3 +71,140 @@ You must also enable the ChibiOS `SERIAL` feature:
|
|||||||
* In your board's mcuconf.h: `#define STM32_SERIAL_USE_USARTn TRUE` (where 'n' matches the peripheral number of your selected USART on the MCU)
|
* In your board's mcuconf.h: `#define STM32_SERIAL_USE_USARTn TRUE` (where 'n' matches the peripheral number of your selected USART on the MCU)
|
||||||
|
|
||||||
Do note that the configuration required is for the `SERIAL` peripheral, not the `UART` peripheral.
|
Do note that the configuration required is for the `SERIAL` peripheral, not the `UART` peripheral.
|
||||||
|
|
||||||
|
### USART Full-duplex
|
||||||
|
Targeting STM32 boards where communication is offloaded to a USART hardware device. The advantage over bitbang is that this provides fast and accurate timings. USART Full-Duplex requires two conductors **without** pull-up resistors instead of one conductor with a pull-up resistor unlike the Half-duplex driver, but it is more efficent as it uses DMA transfers, which can result in even faster transmission speeds.
|
||||||
|
|
||||||
|
#### Pin configuration
|
||||||
|
|
||||||
|
`SERIAL_USART_TX_PIN` is the USART `TX` pin, `SERIAL_USART_RX_PIN` is the USART `RX` pin. No external pull-up resistors are needed as the `TX` pin operates in push-pull mode. To use this driver the usart peripherals `TX` and `RX` pins must be configured with the correct Alternate-functions. If you are using a Proton-C everything is already setup, same is true for STM32F103 MCUs. For MCUs which are using a modern flexible GPIO configuration you have to specify these by setting `SERIAL_USART_TX_PAL_MODE` and `SERIAL_USART_RX_PAL_MODE`. Refeer to the corresponding datasheets of your MCU or find those settings in the table below.
|
||||||
|
|
||||||
|
#### Connecting the halves and Pin Swap
|
||||||
|
Please note that `TX` of the master half has to be connected with the `RX` pin of the slave half and `RX` of the master half has to be connected with the `TX` pin of the slave half! Usually this pin swap has to be done outside of the MCU e.g. with cables or on the pcb. Some MCUs like the STM32F303 used on the Proton-C allow this pin swap directly inside the MCU, this feature can be enabled using `#define SERIAL_USART_PIN_SWAP` in your config.h.
|
||||||
|
|
||||||
|
#### Setup
|
||||||
|
To use the driver, add this to your rules.mk:
|
||||||
|
|
||||||
|
```make
|
||||||
|
SERIAL_DRIVER = usart_duplex
|
||||||
|
```
|
||||||
|
|
||||||
|
Next configure the hardware via your config.h:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define SERIAL_USART_TX_PIN B6 // USART TX pin
|
||||||
|
#define SERIAL_USART_RX_PIN B7 // USART RX pin
|
||||||
|
//#define USART1_REMAP // Remap USART TX and RX pins on STM32F103 MCUs, see table below.
|
||||||
|
//#define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve.
|
||||||
|
// Check if this feature is necessary with your keyboard design and available on the mcu.
|
||||||
|
#define SELECT_SOFT_SERIAL_SPEED 1 // or 0, 2, 3, 4, 5
|
||||||
|
// 0: 460800 baud
|
||||||
|
// 1: 230400 baud (default)
|
||||||
|
// 2: 115200 baud
|
||||||
|
// 3: 57600 baud
|
||||||
|
// 4: 38400 baud
|
||||||
|
// 5: 19200 baud
|
||||||
|
#define SERIAL_USART_DRIVER UARTD1 // USART driver of TX and RX pin. default: UARTD1
|
||||||
|
#define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
|
||||||
|
#define SERIAL_USART_RX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
|
||||||
|
#define SERIAL_USART_TIMEOUT 100 // USART driver timeout. default 100
|
||||||
|
```
|
||||||
|
|
||||||
|
You must also enable the ChibiOS `UART` with blocking api feature:
|
||||||
|
* In your board's halconf.h: `#define HAL_USE_UART TRUE` and `#define UART_USE_WAIT TRUE`
|
||||||
|
* In your board's mcuconf.h: `#define STM32_UART_USE_USARTn TRUE` (where 'n' matches the peripheral number of your selected USART on the MCU)
|
||||||
|
|
||||||
|
Do note that the configuration required is for the `UART` peripheral, not the `SERIAL` peripheral.
|
||||||
|
|
||||||
|
#### Pins for USART Peripherals with Alternate Functions for selected STM32 MCUs
|
||||||
|
|
||||||
|
##### STM32F303 / Proton-C [Datasheet](https://www.st.com/resource/en/datasheet/stm32f303cc.pdf)
|
||||||
|
|
||||||
|
Pin Swap available: :heavy_check_mark:
|
||||||
|
|
||||||
|
| Pin | Function | Mode |
|
||||||
|
| ---------- | -------- | ---- |
|
||||||
|
| **USART1** | | |
|
||||||
|
| PA9 | TX | AF7 |
|
||||||
|
| PA10 | RX | AF7 |
|
||||||
|
| PB6 | TX | AF7 |
|
||||||
|
| PB7 | RX | AF7 |
|
||||||
|
| PC4 | TX | AF7 |
|
||||||
|
| PC5 | RX | AF7 |
|
||||||
|
| PE0 | TX | AF7 |
|
||||||
|
| PE1 | RX | AF7 |
|
||||||
|
| **USART2** | | |
|
||||||
|
| PA2 | TX | AF7 |
|
||||||
|
| PA3 | RX | AF7 |
|
||||||
|
| PA14 | TX | AF7 |
|
||||||
|
| PA15 | RX | AF7 |
|
||||||
|
| PB3 | TX | AF7 |
|
||||||
|
| PB4 | RX | AF7 |
|
||||||
|
| PD5 | TX | AF7 |
|
||||||
|
| PD6 | RX | AF7 |
|
||||||
|
| **USART3** | | |
|
||||||
|
| PB10 | TX | AF7 |
|
||||||
|
| PB11 | RX | AF7 |
|
||||||
|
| PC10 | TX | AF7 |
|
||||||
|
| PC11 | RX | AF7 |
|
||||||
|
| PD8 | TX | AF7 |
|
||||||
|
| PD9 | RX | AF7 |
|
||||||
|
|
||||||
|
##### STM32F072 [Datasheet](https://www.st.com/resource/en/datasheet/stm32f072c8.pdf)
|
||||||
|
|
||||||
|
Pin Swap available: :heavy_check_mark:
|
||||||
|
|
||||||
|
| Pin | Function | Mode |
|
||||||
|
| ------ | -------- | ---- |
|
||||||
|
| USART1 | | |
|
||||||
|
| PA9 | TX | AF1 |
|
||||||
|
| PA10 | RX | AF1 |
|
||||||
|
| PB6 | TX | AF0 |
|
||||||
|
| PB7 | RX | AF0 |
|
||||||
|
| USART2 | | |
|
||||||
|
| PA2 | TX | AF1 |
|
||||||
|
| PA3 | RX | AF1 |
|
||||||
|
| PA14 | TX | AF1 |
|
||||||
|
| PA15 | RX | AF1 |
|
||||||
|
| USART3 | | |
|
||||||
|
| PB10 | TX | AF4 |
|
||||||
|
| PB11 | RX | AF4 |
|
||||||
|
| PC4 | TX | AF1 |
|
||||||
|
| PC5 | RX | AF1 |
|
||||||
|
| PC10 | TX | AF1 |
|
||||||
|
| PC11 | RX | AF1 |
|
||||||
|
| PD8 | TX | AF0 |
|
||||||
|
| PD9 | RX | AF0 |
|
||||||
|
| USART4 | | |
|
||||||
|
| PA0 | TX | AF4 |
|
||||||
|
| PA1 | RX | AF4 |
|
||||||
|
|
||||||
|
##### STM32F103 Medium Density (C8-CB) [Datasheet](https://www.st.com/resource/en/datasheet/stm32f103c8.pdf)
|
||||||
|
|
||||||
|
Pin Swap available: N/A
|
||||||
|
|
||||||
|
TX Pin is always Alternate Function Push-Pull, RX Pin is always regular input pin for any USART peripheral. **For STM32F103 no additional Alternate Function configuration is necessary. QMK is already configured.**
|
||||||
|
|
||||||
|
Pin remapping:
|
||||||
|
|
||||||
|
The pins of USART Peripherals use default Pins that can be remapped to use other pins using the AFIO registers. Default pins are marked **bold**. Add the appropriate defines to your config.h file.
|
||||||
|
|
||||||
|
| Pin | Function | Mode | USART_REMAP |
|
||||||
|
| ---------- | -------- | ---- | ------------------- |
|
||||||
|
| **USART1** | | | |
|
||||||
|
| **PA9** | TX | AFPP | |
|
||||||
|
| **PA10** | RX | IN | |
|
||||||
|
| PB6 | TX | AFPP | USART1_REMAP |
|
||||||
|
| PB7 | RX | IN | USART1_REMAP |
|
||||||
|
| **USART2** | | | |
|
||||||
|
| **PA2** | TX | AFPP | |
|
||||||
|
| **PA3** | RX | IN | |
|
||||||
|
| PD5 | TX | AFPP | USART2_REMAP |
|
||||||
|
| PD6 | RX | IN | USART2_REMAP |
|
||||||
|
| **USART3** | | | |
|
||||||
|
| **PB10** | TX | AFPP | |
|
||||||
|
| **PB11** | RX | IN | |
|
||||||
|
| PC10 | TX | AFPP | USART3_PARTIALREMAP |
|
||||||
|
| PC11 | RX | IN | USART3_PARTIALREMAP |
|
||||||
|
| PD8 | TX | AFPP | USART3_FULLREMAP |
|
||||||
|
| PD9 | RX | IN | USART3_FULLREMAP |
|
||||||
|
|||||||
@@ -72,20 +72,41 @@ WS2812_DRIVER = spi
|
|||||||
Configure the hardware via your config.h:
|
Configure the hardware via your config.h:
|
||||||
```c
|
```c
|
||||||
#define WS2812_SPI SPID1 // default: SPID1
|
#define WS2812_SPI SPID1 // default: SPID1
|
||||||
#define WS2812_SPI_MOSI_PAL_MODE 5 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
|
#define WS2812_SPI_MOSI_PAL_MODE 5 // MOSI pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
|
||||||
|
#define WS2812_SPI_SCK_PIN B3 // Required for F072, may be for others -- SCK pin, see the respective datasheet for the appropriate values for your MCU. default: unspecified
|
||||||
|
#define WS2812_SPI_SCK_PAL_MODE 5 // SCK pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
|
||||||
```
|
```
|
||||||
|
|
||||||
You must also turn on the SPI feature in your halconf.h and mcuconf.h
|
You must also turn on the SPI feature in your halconf.h and mcuconf.h
|
||||||
|
|
||||||
|
#### Circular Buffer Mode
|
||||||
|
Some boards may flicker while in the normal buffer mode. To fix this issue, circular buffer mode may be used to rectify the issue.
|
||||||
|
|
||||||
|
By default, the circular buffer mode is disabled.
|
||||||
|
|
||||||
|
To enable this alternative buffer mode, place this into your `config.h` file:
|
||||||
|
```c
|
||||||
|
#define WS2812_SPI_USE_CIRCULAR_BUFFER
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Setting baudrate with divisor
|
||||||
|
To adjust the baudrate at which the SPI peripheral is configured, users will need to derive the target baudrate from the clock tree provided by STM32CubeMX.
|
||||||
|
|
||||||
|
Only divisors of 2, 4, 8, 16, 32, 64, 128 and 256 are supported by hardware.
|
||||||
|
|
||||||
|
|Define |Default|Description |
|
||||||
|
|--------------------|-------|-------------------------------------|
|
||||||
|
|`WS2812_SPI_DIVISOR`|`16` |SPI source clock peripheral divisor |
|
||||||
|
|
||||||
#### Testing Notes
|
#### Testing Notes
|
||||||
|
|
||||||
While not an exhaustive list, the following table provides the scenarios that have been partially validated:
|
While not an exhaustive list, the following table provides the scenarios that have been partially validated:
|
||||||
|
|
||||||
| | SPI1 | SPI2 | SPI3 |
|
| | SPI1 | SPI2 | SPI3 |
|
||||||
|-|-|-|-|
|
|------|---------------------------------------------|-----------------------------------------|-----------------------|
|
||||||
| f072 | ? | B15 :heavy_check_mark: | N/A |
|
| f072 | ? | B15 :heavy_check_mark: (needs SCK: B13) | N/A |
|
||||||
| f103 | A7 :heavy_check_mark: | B15 :heavy_check_mark: | N/A |
|
| f103 | A7 :heavy_check_mark: | B15 :heavy_check_mark: | N/A |
|
||||||
| f303 | A7 :heavy_check_mark: B5 :heavy_check_mark: | B15 :heavy_check_mark: | B5 :heavy_check_mark: |
|
| f303 | A7 :heavy_check_mark: B5 :heavy_check_mark: | B15 :heavy_check_mark: | B5 :heavy_check_mark: |
|
||||||
|
|
||||||
*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.*
|
*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.*
|
||||||
|
|
||||||
@@ -102,11 +123,14 @@ Configure the hardware via your config.h:
|
|||||||
#define WS2812_PWM_DRIVER PWMD2 // default: PWMD2
|
#define WS2812_PWM_DRIVER PWMD2 // default: PWMD2
|
||||||
#define WS2812_PWM_CHANNEL 2 // default: 2
|
#define WS2812_PWM_CHANNEL 2 // default: 2
|
||||||
#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
|
#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
|
||||||
|
//#define WS2812_PWM_COMPLEMENTARY_OUTPUT // Define for a complementary timer output (TIMx_CHyN); omit for a normal timer output (TIMx_CHy).
|
||||||
#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
|
#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
|
||||||
#define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
|
#define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
|
||||||
#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU.
|
#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Note that using a complementary timer output (TIMx_CHyN) is possible only for advanced-control timers (TIM1, TIM8, TIM20 on STM32), and the `STM32_PWM_USE_ADVANCED` option in mcuconf.h must be set to `TRUE`. Complementary outputs of general-purpose timers are not supported due to ChibiOS limitations.
|
||||||
|
|
||||||
You must also turn on the PWM feature in your halconf.h and mcuconf.h
|
You must also turn on the PWM feature in your halconf.h and mcuconf.h
|
||||||
|
|
||||||
#### Testing Notes
|
#### Testing Notes
|
||||||
|
|||||||
@@ -28,8 +28,14 @@
|
|||||||
# define F_SCL 400000UL // SCL frequency
|
# define F_SCL 400000UL // SCL frequency
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef I2C_START_RETRY_COUNT
|
||||||
|
# define I2C_START_RETRY_COUNT 20
|
||||||
|
#endif // I2C_START_RETRY_COUNT
|
||||||
|
|
||||||
#define TWBR_val (((F_CPU / F_SCL) - 16) / 2)
|
#define TWBR_val (((F_CPU / F_SCL) - 16) / 2)
|
||||||
|
|
||||||
|
#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
|
||||||
|
|
||||||
void i2c_init(void) {
|
void i2c_init(void) {
|
||||||
TWSR = 0; /* no prescaler */
|
TWSR = 0; /* no prescaler */
|
||||||
TWBR = (uint8_t)TWBR_val;
|
TWBR = (uint8_t)TWBR_val;
|
||||||
@@ -47,7 +53,7 @@ void i2c_init(void) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
i2c_status_t i2c_start(uint8_t address, uint16_t timeout) {
|
static i2c_status_t i2c_start_impl(uint8_t address, uint16_t timeout) {
|
||||||
// reset TWI control register
|
// reset TWI control register
|
||||||
TWCR = 0;
|
TWCR = 0;
|
||||||
// transmit START condition
|
// transmit START condition
|
||||||
@@ -86,6 +92,17 @@ i2c_status_t i2c_start(uint8_t address, uint16_t timeout) {
|
|||||||
return I2C_STATUS_SUCCESS;
|
return I2C_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
i2c_status_t i2c_start(uint8_t address, uint16_t timeout) {
|
||||||
|
// Retry i2c_start_impl a bunch times in case the remote side has interrupts disabled.
|
||||||
|
uint16_t timeout_timer = timer_read();
|
||||||
|
uint16_t time_slice = MAX(1, (timeout == (I2C_TIMEOUT_INFINITE)) ? 5 : (timeout / (I2C_START_RETRY_COUNT))); // if it's infinite, wait 1ms between attempts, otherwise split up the entire timeout into the number of retries
|
||||||
|
i2c_status_t status;
|
||||||
|
do {
|
||||||
|
status = i2c_start_impl(address, time_slice);
|
||||||
|
} while ((status < 0) && ((timeout == I2C_TIMEOUT_INFINITE) || (timer_elapsed(timeout_timer) < timeout)));
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
i2c_status_t i2c_write(uint8_t data, uint16_t timeout) {
|
i2c_status_t i2c_write(uint8_t data, uint16_t timeout) {
|
||||||
// load data into data register
|
// load data into data register
|
||||||
TWDR = data;
|
TWDR = data;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
* GitHub repository: https://github.com/g4lvanix/I2C-slave-lib
|
* GitHub repository: https://github.com/g4lvanix/I2C-slave-lib
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <util/twi.h>
|
#include <util/twi.h>
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
@@ -24,6 +25,12 @@
|
|||||||
|
|
||||||
#include "i2c_slave.h"
|
#include "i2c_slave.h"
|
||||||
|
|
||||||
|
#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
|
||||||
|
# include "transactions.h"
|
||||||
|
|
||||||
|
static volatile bool is_callback_executor = false;
|
||||||
|
#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
|
||||||
|
|
||||||
volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT];
|
volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT];
|
||||||
|
|
||||||
static volatile uint8_t buffer_address;
|
static volatile uint8_t buffer_address;
|
||||||
@@ -48,11 +55,14 @@ ISR(TWI_vect) {
|
|||||||
case TW_SR_SLA_ACK:
|
case TW_SR_SLA_ACK:
|
||||||
// The device is now a slave receiver
|
// The device is now a slave receiver
|
||||||
slave_has_register_set = false;
|
slave_has_register_set = false;
|
||||||
|
#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
|
||||||
|
is_callback_executor = false;
|
||||||
|
#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TW_SR_DATA_ACK:
|
case TW_SR_DATA_ACK:
|
||||||
// This device is a slave receiver and has received data
|
// This device is a slave receiver and has received data
|
||||||
// First byte is the location then the bytes will be writen in buffer with auto-incriment
|
// First byte is the location then the bytes will be writen in buffer with auto-increment
|
||||||
if (!slave_has_register_set) {
|
if (!slave_has_register_set) {
|
||||||
buffer_address = TWDR;
|
buffer_address = TWDR;
|
||||||
|
|
||||||
@@ -60,10 +70,25 @@ ISR(TWI_vect) {
|
|||||||
ack = 0;
|
ack = 0;
|
||||||
buffer_address = 0;
|
buffer_address = 0;
|
||||||
}
|
}
|
||||||
slave_has_register_set = true; // address has been receaved now fill in buffer
|
slave_has_register_set = true; // address has been received now fill in buffer
|
||||||
|
|
||||||
|
#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
|
||||||
|
// Work out if we're attempting to execute a callback
|
||||||
|
is_callback_executor = buffer_address == split_transaction_table[I2C_EXECUTE_CALLBACK].initiator2target_offset;
|
||||||
|
#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
|
||||||
} else {
|
} else {
|
||||||
i2c_slave_reg[buffer_address] = TWDR;
|
i2c_slave_reg[buffer_address] = TWDR;
|
||||||
buffer_address++;
|
buffer_address++;
|
||||||
|
|
||||||
|
#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
|
||||||
|
// If we're intending to execute a transaction callback, do so, as we've just received the transaction ID
|
||||||
|
if (is_callback_executor) {
|
||||||
|
split_transaction_desc_t *trans = &split_transaction_table[split_shmem->transaction_id];
|
||||||
|
if (trans->slave_callback) {
|
||||||
|
trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,18 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define I2C_SLAVE_REG_COUNT 30
|
#ifndef I2C_SLAVE_REG_COUNT
|
||||||
|
|
||||||
|
# if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
|
||||||
|
# include "transport.h"
|
||||||
|
# define I2C_SLAVE_REG_COUNT sizeof(split_shared_memory_t)
|
||||||
|
# else // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
|
||||||
|
# define I2C_SLAVE_REG_COUNT 30
|
||||||
|
# endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
|
||||||
|
|
||||||
|
#endif // I2C_SLAVE_REG_COUNT
|
||||||
|
|
||||||
|
_Static_assert(I2C_SLAVE_REG_COUNT < 256, "I2C target registers must be single byte");
|
||||||
|
|
||||||
extern volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT];
|
extern volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT];
|
||||||
|
|
||||||
|
|||||||
@@ -224,15 +224,8 @@
|
|||||||
# define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY / 2)
|
# define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY / 2)
|
||||||
|
|
||||||
# define SLAVE_INT_WIDTH_US 1
|
# define SLAVE_INT_WIDTH_US 1
|
||||||
# ifndef SERIAL_USE_MULTI_TRANSACTION
|
# define SLAVE_INT_ACK_WIDTH_UNIT 2
|
||||||
# define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY
|
# define SLAVE_INT_ACK_WIDTH 4
|
||||||
# else
|
|
||||||
# define SLAVE_INT_ACK_WIDTH_UNIT 2
|
|
||||||
# define SLAVE_INT_ACK_WIDTH 4
|
|
||||||
# endif
|
|
||||||
|
|
||||||
static SSTD_t *Transaction_table = NULL;
|
|
||||||
static uint8_t Transaction_table_size = 0;
|
|
||||||
|
|
||||||
inline static void serial_delay(void) ALWAYS_INLINE;
|
inline static void serial_delay(void) ALWAYS_INLINE;
|
||||||
inline static void serial_delay(void) { _delay_us(SERIAL_DELAY); }
|
inline static void serial_delay(void) { _delay_us(SERIAL_DELAY); }
|
||||||
@@ -259,16 +252,12 @@ inline static void serial_low(void) { writePinLow(SOFT_SERIAL_PIN); }
|
|||||||
inline static void serial_high(void) ALWAYS_INLINE;
|
inline static void serial_high(void) ALWAYS_INLINE;
|
||||||
inline static void serial_high(void) { writePinHigh(SOFT_SERIAL_PIN); }
|
inline static void serial_high(void) { writePinHigh(SOFT_SERIAL_PIN); }
|
||||||
|
|
||||||
void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) {
|
void soft_serial_initiator_init(void) {
|
||||||
Transaction_table = sstd_table;
|
|
||||||
Transaction_table_size = (uint8_t)sstd_table_size;
|
|
||||||
serial_output();
|
serial_output();
|
||||||
serial_high();
|
serial_high();
|
||||||
}
|
}
|
||||||
|
|
||||||
void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) {
|
void soft_serial_target_init(void) {
|
||||||
Transaction_table = sstd_table;
|
|
||||||
Transaction_table_size = (uint8_t)sstd_table_size;
|
|
||||||
serial_input_with_pullup();
|
serial_input_with_pullup();
|
||||||
|
|
||||||
// Enable INT0-INT7
|
// Enable INT0-INT7
|
||||||
@@ -395,19 +384,14 @@ static inline uint8_t nibble_bits_count(uint8_t bits) {
|
|||||||
|
|
||||||
// interrupt handle to be used by the target device
|
// interrupt handle to be used by the target device
|
||||||
ISR(SERIAL_PIN_INTERRUPT) {
|
ISR(SERIAL_PIN_INTERRUPT) {
|
||||||
# ifndef SERIAL_USE_MULTI_TRANSACTION
|
|
||||||
serial_low();
|
|
||||||
serial_output();
|
|
||||||
SSTD_t *trans = Transaction_table;
|
|
||||||
# else
|
|
||||||
// recive transaction table index
|
// recive transaction table index
|
||||||
uint8_t tid, bits;
|
uint8_t tid, bits;
|
||||||
uint8_t pecount = 0;
|
uint8_t pecount = 0;
|
||||||
sync_recv();
|
sync_recv();
|
||||||
bits = serial_read_chunk(&pecount, 7);
|
bits = serial_read_chunk(&pecount, 8);
|
||||||
tid = bits >> 3;
|
tid = bits >> 3;
|
||||||
bits = (bits & 7) != nibble_bits_count(tid);
|
bits = (bits & 7) != (nibble_bits_count(tid) & 7);
|
||||||
if (bits || pecount > 0 || tid > Transaction_table_size) {
|
if (bits || pecount > 0 || tid > NUM_TOTAL_TRANSACTIONS) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
serial_delay_half1();
|
serial_delay_half1();
|
||||||
@@ -415,18 +399,22 @@ ISR(SERIAL_PIN_INTERRUPT) {
|
|||||||
serial_high(); // response step1 low->high
|
serial_high(); // response step1 low->high
|
||||||
serial_output();
|
serial_output();
|
||||||
_delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT * SLAVE_INT_ACK_WIDTH);
|
_delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT * SLAVE_INT_ACK_WIDTH);
|
||||||
SSTD_t *trans = &Transaction_table[tid];
|
split_transaction_desc_t *trans = &split_transaction_table[tid];
|
||||||
serial_low(); // response step2 ack high->low
|
serial_low(); // response step2 ack high->low
|
||||||
# endif
|
|
||||||
|
// If the transaction has a callback, we can execute it now
|
||||||
|
if (trans->slave_callback) {
|
||||||
|
trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans));
|
||||||
|
}
|
||||||
|
|
||||||
// target send phase
|
// target send phase
|
||||||
if (trans->target2initiator_buffer_size > 0) serial_send_packet((uint8_t *)trans->target2initiator_buffer, trans->target2initiator_buffer_size);
|
if (trans->target2initiator_buffer_size > 0) serial_send_packet((uint8_t *)split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size);
|
||||||
// target switch to input
|
// target switch to input
|
||||||
change_sender2reciver();
|
change_sender2reciver();
|
||||||
|
|
||||||
// target recive phase
|
// target recive phase
|
||||||
if (trans->initiator2target_buffer_size > 0) {
|
if (trans->initiator2target_buffer_size > 0) {
|
||||||
if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, trans->initiator2target_buffer_size)) {
|
if (serial_recive_packet((uint8_t *)split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size)) {
|
||||||
*trans->status = TRANSACTION_ACCEPTED;
|
*trans->status = TRANSACTION_ACCEPTED;
|
||||||
} else {
|
} else {
|
||||||
*trans->status = TRANSACTION_DATA_ERROR;
|
*trans->status = TRANSACTION_DATA_ERROR;
|
||||||
@@ -448,14 +436,12 @@ ISR(SERIAL_PIN_INTERRUPT) {
|
|||||||
// TRANSACTION_NO_RESPONSE
|
// TRANSACTION_NO_RESPONSE
|
||||||
// TRANSACTION_DATA_ERROR
|
// TRANSACTION_DATA_ERROR
|
||||||
// this code is very time dependent, so we need to disable interrupts
|
// this code is very time dependent, so we need to disable interrupts
|
||||||
# ifndef SERIAL_USE_MULTI_TRANSACTION
|
|
||||||
int soft_serial_transaction(void) {
|
|
||||||
SSTD_t *trans = Transaction_table;
|
|
||||||
# else
|
|
||||||
int soft_serial_transaction(int sstd_index) {
|
int soft_serial_transaction(int sstd_index) {
|
||||||
if (sstd_index > Transaction_table_size) return TRANSACTION_TYPE_ERROR;
|
if (sstd_index > NUM_TOTAL_TRANSACTIONS) return TRANSACTION_TYPE_ERROR;
|
||||||
SSTD_t *trans = &Transaction_table[sstd_index];
|
split_transaction_desc_t *trans = &split_transaction_table[sstd_index];
|
||||||
# endif
|
|
||||||
|
if (!trans->status) return TRANSACTION_TYPE_ERROR; // not registered
|
||||||
|
|
||||||
cli();
|
cli();
|
||||||
|
|
||||||
// signal to the target that we want to start a transaction
|
// signal to the target that we want to start a transaction
|
||||||
@@ -463,27 +449,11 @@ int soft_serial_transaction(int sstd_index) {
|
|||||||
serial_low();
|
serial_low();
|
||||||
_delay_us(SLAVE_INT_WIDTH_US);
|
_delay_us(SLAVE_INT_WIDTH_US);
|
||||||
|
|
||||||
# ifndef SERIAL_USE_MULTI_TRANSACTION
|
|
||||||
// wait for the target response
|
|
||||||
serial_input_with_pullup();
|
|
||||||
_delay_us(SLAVE_INT_RESPONSE_TIME);
|
|
||||||
|
|
||||||
// check if the target is present
|
|
||||||
if (serial_read_pin()) {
|
|
||||||
// target failed to pull the line low, assume not present
|
|
||||||
serial_output();
|
|
||||||
serial_high();
|
|
||||||
*trans->status = TRANSACTION_NO_RESPONSE;
|
|
||||||
sei();
|
|
||||||
return TRANSACTION_NO_RESPONSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
# else
|
|
||||||
// send transaction table index
|
// send transaction table index
|
||||||
int tid = (sstd_index << 3) | (7 & nibble_bits_count(sstd_index));
|
int tid = (sstd_index << 3) | (7 & nibble_bits_count(sstd_index));
|
||||||
sync_send();
|
sync_send();
|
||||||
_delay_sub_us(TID_SEND_ADJUST);
|
_delay_sub_us(TID_SEND_ADJUST);
|
||||||
serial_write_chunk(tid, 7);
|
serial_write_chunk(tid, 8);
|
||||||
serial_delay_half1();
|
serial_delay_half1();
|
||||||
|
|
||||||
// wait for the target response (step1 low->high)
|
// wait for the target response (step1 low->high)
|
||||||
@@ -504,12 +474,11 @@ int soft_serial_transaction(int sstd_index) {
|
|||||||
}
|
}
|
||||||
_delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT);
|
_delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT);
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
|
|
||||||
// initiator recive phase
|
// initiator recive phase
|
||||||
// if the target is present syncronize with it
|
// if the target is present syncronize with it
|
||||||
if (trans->target2initiator_buffer_size > 0) {
|
if (trans->target2initiator_buffer_size > 0) {
|
||||||
if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, trans->target2initiator_buffer_size)) {
|
if (!serial_recive_packet((uint8_t *)split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size)) {
|
||||||
serial_output();
|
serial_output();
|
||||||
serial_high();
|
serial_high();
|
||||||
*trans->status = TRANSACTION_DATA_ERROR;
|
*trans->status = TRANSACTION_DATA_ERROR;
|
||||||
@@ -523,7 +492,7 @@ int soft_serial_transaction(int sstd_index) {
|
|||||||
|
|
||||||
// initiator send phase
|
// initiator send phase
|
||||||
if (trans->initiator2target_buffer_size > 0) {
|
if (trans->initiator2target_buffer_size > 0) {
|
||||||
serial_send_packet((uint8_t *)trans->initiator2target_buffer, trans->initiator2target_buffer_size);
|
serial_send_packet((uint8_t *)split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
// always, release the line when not in use
|
// always, release the line when not in use
|
||||||
@@ -534,9 +503,8 @@ int soft_serial_transaction(int sstd_index) {
|
|||||||
return TRANSACTION_END;
|
return TRANSACTION_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifdef SERIAL_USE_MULTI_TRANSACTION
|
|
||||||
int soft_serial_get_and_clean_status(int sstd_index) {
|
int soft_serial_get_and_clean_status(int sstd_index) {
|
||||||
SSTD_t *trans = &Transaction_table[sstd_index];
|
split_transaction_desc_t *trans = &split_transaction_table[sstd_index];
|
||||||
cli();
|
cli();
|
||||||
int retval = *trans->status;
|
int retval = *trans->status;
|
||||||
*trans->status = 0;
|
*trans->status = 0;
|
||||||
@@ -544,8 +512,6 @@ int soft_serial_get_and_clean_status(int sstd_index) {
|
|||||||
sei();
|
sei();
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Helix serial.c history
|
// Helix serial.c history
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
// /////////////////////////////////////////////////////////////////
|
|
||||||
// Need Soft Serial defines in config.h
|
|
||||||
// /////////////////////////////////////////////////////////////////
|
|
||||||
// ex.
|
|
||||||
// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6
|
|
||||||
// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5
|
|
||||||
// // 1: about 137kbps (default)
|
|
||||||
// // 2: about 75kbps
|
|
||||||
// // 3: about 39kbps
|
|
||||||
// // 4: about 26kbps
|
|
||||||
// // 5: about 20kbps
|
|
||||||
//
|
|
||||||
// //// USE simple API (using signle-type transaction function)
|
|
||||||
// /* nothing */
|
|
||||||
// //// USE flexible API (using multi-type transaction function)
|
|
||||||
// #define SERIAL_USE_MULTI_TRANSACTION
|
|
||||||
//
|
|
||||||
// /////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// Soft Serial Transaction Descriptor
|
|
||||||
typedef struct _SSTD_t {
|
|
||||||
uint8_t *status;
|
|
||||||
uint8_t initiator2target_buffer_size;
|
|
||||||
uint8_t *initiator2target_buffer;
|
|
||||||
uint8_t target2initiator_buffer_size;
|
|
||||||
uint8_t *target2initiator_buffer;
|
|
||||||
} SSTD_t;
|
|
||||||
#define TID_LIMIT(table) (sizeof(table) / sizeof(SSTD_t))
|
|
||||||
|
|
||||||
// initiator is transaction start side
|
|
||||||
void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size);
|
|
||||||
// target is interrupt accept side
|
|
||||||
void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size);
|
|
||||||
|
|
||||||
// initiator resullt
|
|
||||||
#define TRANSACTION_END 0
|
|
||||||
#define TRANSACTION_NO_RESPONSE 0x1
|
|
||||||
#define TRANSACTION_DATA_ERROR 0x2
|
|
||||||
#define TRANSACTION_TYPE_ERROR 0x4
|
|
||||||
#ifndef SERIAL_USE_MULTI_TRANSACTION
|
|
||||||
int soft_serial_transaction(void);
|
|
||||||
#else
|
|
||||||
int soft_serial_transaction(int sstd_index);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// target status
|
|
||||||
// *SSTD_t.status has
|
|
||||||
// initiator:
|
|
||||||
// TRANSACTION_END
|
|
||||||
// or TRANSACTION_NO_RESPONSE
|
|
||||||
// or TRANSACTION_DATA_ERROR
|
|
||||||
// target:
|
|
||||||
// TRANSACTION_DATA_ERROR
|
|
||||||
// or TRANSACTION_ACCEPTED
|
|
||||||
#define TRANSACTION_ACCEPTED 0x8
|
|
||||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
|
||||||
int soft_serial_get_and_clean_status(int sstd_index);
|
|
||||||
#endif
|
|
||||||
@@ -14,10 +14,8 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <avr/io.h>
|
|
||||||
|
|
||||||
#include "spi_master.h"
|
#include "spi_master.h"
|
||||||
#include "quantum.h"
|
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
#if defined(__AVR_AT90USB162__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
#if defined(__AVR_AT90USB162__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
||||||
|
|||||||
@@ -16,7 +16,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "quantum.h"
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include "gpio.h"
|
||||||
|
|
||||||
typedef int16_t spi_status_t;
|
typedef int16_t spi_status_t;
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user