mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-05 14:08:39 +00:00
Compare commits
1020 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
20b5dd80bd | ||
![]() |
25c7533092 | ||
![]() |
50038882e0 | ||
![]() |
6f5e88277b | ||
![]() |
63df056013 | ||
![]() |
6f1d5f73a4 | ||
![]() |
994d94140e | ||
![]() |
fa72d4aa5a | ||
![]() |
88a7fa762f | ||
![]() |
cd0c089b49 | ||
![]() |
5bdc5c1190 | ||
![]() |
a972b26274 | ||
![]() |
8c2ae4a470 | ||
![]() |
fca31693df | ||
![]() |
fae8132295 | ||
![]() |
6835ae8209 | ||
![]() |
c5d81a84a0 | ||
![]() |
361810dca8 | ||
![]() |
53ff8a31b6 | ||
![]() |
63c16f4b63 | ||
![]() |
7d79412f99 | ||
![]() |
57dde3ddba | ||
![]() |
8afbd649f0 | ||
![]() |
30b90de7c9 | ||
![]() |
30e413f985 | ||
![]() |
6a9617b1c6 | ||
![]() |
ad01e3c03a | ||
![]() |
9cfcd49406 | ||
![]() |
f26e6fca8a | ||
![]() |
0e31d85b8e | ||
![]() |
84a713b05c | ||
![]() |
9aaa491bc0 | ||
![]() |
9fcda95363 | ||
![]() |
2908c0f927 | ||
![]() |
598384bc10 | ||
![]() |
ac82cd1ba7 | ||
![]() |
31f5229191 | ||
![]() |
2f65ab183d | ||
![]() |
8350d7e607 | ||
![]() |
e7bb975482 | ||
![]() |
a6be48681a | ||
![]() |
e9944bfc8e | ||
![]() |
9303b42e69 | ||
![]() |
042a450e24 | ||
![]() |
2cf6bfe9ac | ||
![]() |
2917e55bd4 | ||
![]() |
55d4c9b162 | ||
![]() |
904b1b3f99 | ||
![]() |
0310eafdcf | ||
![]() |
f2459997ba | ||
![]() |
9f0aac22e9 | ||
![]() |
3cf752f83f | ||
![]() |
087fa37b7a | ||
![]() |
4a04c7265e | ||
![]() |
9584db055b | ||
![]() |
38ab86e8f2 | ||
![]() |
7636fdbbd0 | ||
![]() |
cee0a33396 | ||
![]() |
ee0a2b7dab | ||
![]() |
91c133f4e0 | ||
![]() |
b0805e38b9 | ||
![]() |
2480e5d69a | ||
![]() |
056ecb1463 | ||
![]() |
9bfaf66792 | ||
![]() |
f0f991dd89 | ||
![]() |
bceffdefca | ||
![]() |
86225ccc9b | ||
![]() |
13d288116f | ||
![]() |
a9bbf9ee5c | ||
![]() |
ed659aa3a8 | ||
![]() |
b9b67e9614 | ||
![]() |
35b44ac699 | ||
![]() |
61d851af65 | ||
![]() |
7c3d2d5f64 | ||
![]() |
d837ab586a | ||
![]() |
9a91b42e92 | ||
![]() |
c73514a2b7 | ||
![]() |
ac642de9d7 | ||
![]() |
7d8a20b07f | ||
![]() |
894fa0902f | ||
![]() |
a14d539ad6 | ||
![]() |
510a8d3339 | ||
![]() |
2018df1a61 | ||
![]() |
365b863578 | ||
![]() |
5b22ddf526 | ||
![]() |
c776c1ce82 | ||
![]() |
ccaacde4d6 | ||
![]() |
5836d1a06a | ||
![]() |
fd359e23e8 | ||
![]() |
4aef0318aa | ||
![]() |
8209304904 | ||
![]() |
6bbe2366ec | ||
![]() |
3be81a2daf | ||
![]() |
586a5e8d1d | ||
![]() |
383a3c1e08 | ||
![]() |
e2352d4fbf | ||
![]() |
3a2acd4475 | ||
![]() |
ee15d2fe5e | ||
![]() |
a01dc4dd48 | ||
![]() |
4764e77121 | ||
![]() |
cfcf0fd36b | ||
![]() |
dcb2627237 | ||
![]() |
fe8942e55c | ||
![]() |
8e0d9e2637 | ||
![]() |
81ae0fb10e | ||
![]() |
e659bc4467 | ||
![]() |
e3541853a9 | ||
![]() |
0ea6cf719e | ||
![]() |
c9d23f50f6 | ||
![]() |
c5c35f5f4b | ||
![]() |
6b584a23c0 | ||
![]() |
6bb3fbd4e0 | ||
![]() |
9e0b244a34 | ||
![]() |
4b7fcf0af0 | ||
![]() |
22b9303e2a | ||
![]() |
e956c11bc9 | ||
![]() |
cbc5de67be | ||
![]() |
9cb1d36974 | ||
![]() |
0a5d302622 | ||
![]() |
6c24e28b8d | ||
![]() |
d19805f9de | ||
![]() |
4beb5e72f8 | ||
![]() |
5f0a2e078f | ||
![]() |
feac994f6f | ||
![]() |
4931510ad3 | ||
![]() |
d6215ad6af | ||
![]() |
eba4cb7a04 | ||
![]() |
85ea963931 | ||
![]() |
492a16308a | ||
![]() |
17200f4712 | ||
![]() |
eb903c7623 | ||
![]() |
c58921c64c | ||
![]() |
9fc3e26f70 | ||
![]() |
e9f44ee96d | ||
![]() |
9cb80d68e2 | ||
![]() |
4932f9566a | ||
![]() |
97c6b8143c | ||
![]() |
3b9e4967b8 | ||
![]() |
7c57104b51 | ||
![]() |
846598541b | ||
![]() |
c68597d9ad | ||
![]() |
5ffec5d9b0 | ||
![]() |
a8eaf0b666 | ||
![]() |
4f484bc1c9 | ||
![]() |
a1fa70f94d | ||
![]() |
d8f0faabda | ||
![]() |
818042b2c3 | ||
![]() |
8910f9b87e | ||
![]() |
9dd3e08fdd | ||
![]() |
b3bcafcc4b | ||
![]() |
b8f08d936d | ||
![]() |
dd37245373 | ||
![]() |
eab41f7b38 | ||
![]() |
cca3dcc5ec | ||
![]() |
12e66330c5 | ||
![]() |
d91c9858c5 | ||
![]() |
8a0997709b | ||
![]() |
0e1a731446 | ||
![]() |
57ef8a54e4 | ||
![]() |
1add90a6d2 | ||
![]() |
e4230c84d0 | ||
![]() |
1485cc1d26 | ||
![]() |
4ea3bbdb4c | ||
![]() |
bad839e6ac | ||
![]() |
3aec9a4354 | ||
![]() |
163ddd5d15 | ||
![]() |
dc7cc26dff | ||
![]() |
a6e46b99b9 | ||
![]() |
ab197af2ea | ||
![]() |
1226c69f4f | ||
![]() |
8a1e656099 | ||
![]() |
56f266173c | ||
![]() |
2dfdafbd5b | ||
![]() |
5fe0fe3756 | ||
![]() |
cc0d4b6513 | ||
![]() |
23b1889241 | ||
![]() |
6cd001e337 | ||
![]() |
e4f26a9fcc | ||
![]() |
9cda36238f | ||
![]() |
52630f6611 | ||
![]() |
2ec1ab2b35 | ||
![]() |
557745ba9f | ||
![]() |
f229d22416 | ||
![]() |
98ac32b417 | ||
![]() |
eeb6443767 | ||
![]() |
c1a6ca46a7 | ||
![]() |
7c5428b56d | ||
![]() |
d9983082c2 | ||
![]() |
41d5d3e655 | ||
![]() |
e6b91549e3 | ||
![]() |
58898f77e3 | ||
![]() |
c2f4c4e29e | ||
![]() |
a7c61f2947 | ||
![]() |
d1feb8744a | ||
![]() |
6d1b45fb84 | ||
![]() |
2c2e103457 | ||
![]() |
7235c93827 | ||
![]() |
bb53635f33 | ||
![]() |
af37bb2f78 | ||
![]() |
4c675a83ba | ||
![]() |
7b0356d1d4 | ||
![]() |
6eb89ae906 | ||
![]() |
b781cbf7e2 | ||
![]() |
a14518bf57 | ||
![]() |
f74f0ac06b | ||
![]() |
a9a46adba0 | ||
![]() |
c51dfef958 | ||
![]() |
8b1862330a | ||
![]() |
dc6b341cf9 | ||
![]() |
155660ff9d | ||
![]() |
6e25220eed | ||
![]() |
16546ee06f | ||
![]() |
1620d78e73 | ||
![]() |
fc54d62111 | ||
![]() |
f5422a70b6 | ||
![]() |
e3b3c1ef82 | ||
![]() |
bba871df2f | ||
![]() |
5bbad3147c | ||
![]() |
2bac7cf414 | ||
![]() |
b7c76fda31 | ||
![]() |
d5a76e899d | ||
![]() |
dd05bf0d96 | ||
![]() |
95e68c4ae8 | ||
![]() |
d299d0e72d | ||
![]() |
6fddb31c4c | ||
![]() |
53b043d4ef | ||
![]() |
7b51f050d7 | ||
![]() |
7730dc3e5c | ||
![]() |
0740e84d63 | ||
![]() |
c917888262 | ||
![]() |
0b54e7f5ae | ||
![]() |
8cac6088c6 | ||
![]() |
1548f4c24f | ||
![]() |
b9f426ae1e | ||
![]() |
52b0ad649c | ||
![]() |
c9d0f210bc | ||
![]() |
7aaef16266 | ||
![]() |
28874a9f33 | ||
![]() |
319ff649ab | ||
![]() |
92f6d6ec02 | ||
![]() |
9fdc276260 | ||
![]() |
9113f3387a | ||
![]() |
0bd453b527 | ||
![]() |
b697e1bff3 | ||
![]() |
833ec84921 | ||
![]() |
53ad7375c7 | ||
![]() |
5fd400faa9 | ||
![]() |
f2a0b0ee20 | ||
![]() |
18525aa17b | ||
![]() |
ac3d9ab761 | ||
![]() |
2fc727c154 | ||
![]() |
d76cc09ed6 | ||
![]() |
2c0323bc98 | ||
![]() |
7fbe6c3594 | ||
![]() |
55f3cd37af | ||
![]() |
d0f3c0576c | ||
![]() |
7d9070c514 | ||
![]() |
534cd9d45e | ||
![]() |
2f5bb2506a | ||
![]() |
3e2fd64279 | ||
![]() |
5b4b471a4f | ||
![]() |
b8217eeff4 | ||
![]() |
dcc363390f | ||
![]() |
62eed0e4a3 | ||
![]() |
c8bdc75e1d | ||
![]() |
39d3d92364 | ||
![]() |
b669d115c2 | ||
![]() |
7ff96877d2 | ||
![]() |
c6cdd5422f | ||
![]() |
d6ca4e555a | ||
![]() |
d8aa018995 | ||
![]() |
08dab374da | ||
![]() |
dbd33782f2 | ||
![]() |
1d703a476a | ||
![]() |
f5a9758cea | ||
![]() |
f07e2cdd9d | ||
![]() |
f2c32b3ea4 | ||
![]() |
92d47a55d4 | ||
![]() |
41f3f01167 | ||
![]() |
a8c4af5a45 | ||
![]() |
858c09f370 | ||
![]() |
179d64d33c | ||
![]() |
eac4bab342 | ||
![]() |
a8466df62d | ||
![]() |
cb64a886e9 | ||
![]() |
dbabfb082c | ||
![]() |
607876187d | ||
![]() |
7f3539aa76 | ||
![]() |
4ad0bbd672 | ||
![]() |
85172f4f85 | ||
![]() |
b702c08825 | ||
![]() |
ec3e065f0d | ||
![]() |
3c15c48e6a | ||
![]() |
49d8f1c5ed | ||
![]() |
5cdf47a79e | ||
![]() |
3f1aab0c2e | ||
![]() |
43edc83998 | ||
![]() |
dd60038eeb | ||
![]() |
716ff76f5b | ||
![]() |
eef94b0b40 | ||
![]() |
309a400b3e | ||
![]() |
c2c3aa4f08 | ||
![]() |
392121b10e | ||
![]() |
0533362e82 | ||
![]() |
4df4fa7c26 | ||
![]() |
66f13e4972 | ||
![]() |
bb11df6b7a | ||
![]() |
e236f1eba1 | ||
![]() |
847ade44fc | ||
![]() |
7044dafe59 | ||
![]() |
fd1a0d6753 | ||
![]() |
c2c9d9b386 | ||
![]() |
05f15b789f | ||
![]() |
7e2223f822 | ||
![]() |
3b5381d689 | ||
![]() |
aee6785476 | ||
![]() |
363aa8aa2e | ||
![]() |
ef2961798c | ||
![]() |
3e861c2fd5 | ||
![]() |
f113f1927f | ||
![]() |
27ee425892 | ||
![]() |
89357b96d4 | ||
![]() |
16843bc8c9 | ||
![]() |
7854746704 | ||
![]() |
245b3376d6 | ||
![]() |
2c703b1528 | ||
![]() |
90a6fea4e8 | ||
![]() |
e45290a62e | ||
![]() |
1d3a19757c | ||
![]() |
cf9f6bbd91 | ||
![]() |
41df0dc9a7 | ||
![]() |
30dc34d529 | ||
![]() |
e899cb8940 | ||
![]() |
80e489e122 | ||
![]() |
29d1abff07 | ||
![]() |
b546da0a19 | ||
![]() |
f357bd0ccc | ||
![]() |
685d4c2f97 | ||
![]() |
535c2f60a9 | ||
![]() |
65eaab8a1a | ||
![]() |
18f3cd1123 | ||
![]() |
e45ce2dcb3 | ||
![]() |
137456e5b1 | ||
![]() |
ec59147507 | ||
![]() |
074b78700a | ||
![]() |
432674781a | ||
![]() |
4e41beeaa6 | ||
![]() |
00733f4b87 | ||
![]() |
19753788c1 | ||
![]() |
54a8abd785 | ||
![]() |
d6ad9787a0 | ||
![]() |
e2e387f8f8 | ||
![]() |
039cc8c932 | ||
![]() |
004826e1b8 | ||
![]() |
f445a7f971 | ||
![]() |
13e1388f2d | ||
![]() |
fe56fffe7d | ||
![]() |
d069a42c07 | ||
![]() |
029234f1f1 | ||
![]() |
ddf49e8b21 | ||
![]() |
371922ad61 | ||
![]() |
f868a3bb86 | ||
![]() |
5329a80f6c | ||
![]() |
32bb8f6b8a | ||
![]() |
1683d3a559 | ||
![]() |
b79a4cfeba | ||
![]() |
44d9ad95b7 | ||
![]() |
fad967af4c | ||
![]() |
20e18d15e3 | ||
![]() |
83af62322c | ||
![]() |
2d77f9cbb9 | ||
![]() |
c9a0436422 | ||
![]() |
fca03e15b9 | ||
![]() |
bc98b0d9eb | ||
![]() |
38261920a9 | ||
![]() |
f9881793e3 | ||
![]() |
04b9b62bdc | ||
![]() |
b2bbbc2dfc | ||
![]() |
6169cd52ba | ||
![]() |
101b998ac2 | ||
![]() |
7b65b7e948 | ||
![]() |
4c1164c469 | ||
![]() |
e555e42aae | ||
![]() |
38da7795f4 | ||
![]() |
8c10b60c5f | ||
![]() |
c8fca10f0d | ||
![]() |
1f6002db3f | ||
![]() |
07017871e5 | ||
![]() |
f4949fdd32 | ||
![]() |
750f8ec94e | ||
![]() |
49c32021db | ||
![]() |
76d807fe7d | ||
![]() |
bf1fedc05e | ||
![]() |
5960d0349c | ||
![]() |
0afaed8535 | ||
![]() |
688343f218 | ||
![]() |
4d421ee31c | ||
![]() |
91683d56fa | ||
![]() |
9ee207acac | ||
![]() |
0bb457e573 | ||
![]() |
364aeeec53 | ||
![]() |
2e3b99f7f1 | ||
![]() |
bcfba27101 | ||
![]() |
b45b223389 | ||
![]() |
7b754e1a5a | ||
![]() |
a3f53aeaa1 | ||
![]() |
6c4639bfac | ||
![]() |
67cc5cebc0 | ||
![]() |
8892c50336 | ||
![]() |
9128ed50c2 | ||
![]() |
1f43495922 | ||
![]() |
21dfa29c28 | ||
![]() |
4c960ad7c4 | ||
![]() |
a08287b0a0 | ||
![]() |
af83c6a4cb | ||
![]() |
e54c8df453 | ||
![]() |
c2b8a47604 | ||
![]() |
07ec609fad | ||
![]() |
a66e75609e | ||
![]() |
f3534f999f | ||
![]() |
22564d8ee7 | ||
![]() |
736140439d | ||
![]() |
725aa5b820 | ||
![]() |
06f196c589 | ||
![]() |
9bb259b660 | ||
![]() |
ab3dbd8daa | ||
![]() |
1954ad1fd8 | ||
![]() |
3276c4c56a | ||
![]() |
3a1ce56aed | ||
![]() |
2f24ed1046 | ||
![]() |
50a4b3510b | ||
![]() |
57bf00f28f | ||
![]() |
b25338a809 | ||
![]() |
78923cb884 | ||
![]() |
a860d9d628 | ||
![]() |
b5464cf20a | ||
![]() |
383e508bc5 | ||
![]() |
3f3fa07918 | ||
![]() |
ad49db8cd2 | ||
![]() |
d3fe6a0588 | ||
![]() |
af4697cba5 | ||
![]() |
b7bb923962 | ||
![]() |
0f5928fdf4 | ||
![]() |
ba4b3d9d72 | ||
![]() |
aa660c1eb7 | ||
![]() |
12b2e0ac73 | ||
![]() |
bd642d08ab | ||
![]() |
7f2882832e | ||
![]() |
32f18cf616 | ||
![]() |
1745f202cc | ||
![]() |
115e49b2af | ||
![]() |
e64313cdb3 | ||
![]() |
066525ab9e | ||
![]() |
e1bcb40e90 | ||
![]() |
0b023ef67c | ||
![]() |
800ec55dfc | ||
![]() |
e5dc2253e2 | ||
![]() |
6531d64ac7 | ||
![]() |
f9f3afd767 | ||
![]() |
c70b419ec0 | ||
![]() |
bccf263cd0 | ||
![]() |
e094cd42b5 | ||
![]() |
598cb82655 | ||
![]() |
74f51009a8 | ||
![]() |
122525ee61 | ||
![]() |
c037d4bb30 | ||
![]() |
66f45c9e2e | ||
![]() |
2cf697d0c8 | ||
![]() |
4c0ff7b7ea | ||
![]() |
db5afb05cf | ||
![]() |
2db4ad2133 | ||
![]() |
b3ad561b4f | ||
![]() |
ee8860a733 | ||
![]() |
966e2660cf | ||
![]() |
109b2ae0bd | ||
![]() |
b91ffba4be | ||
![]() |
01ac8a6051 | ||
![]() |
f88f042c04 | ||
![]() |
e0e80c0dc1 | ||
![]() |
34084b4ee6 | ||
![]() |
f3e61afdc7 | ||
![]() |
2cda124bc1 | ||
![]() |
951285de67 | ||
![]() |
56c2487223 | ||
![]() |
c5f847a900 | ||
![]() |
d6a446bf95 | ||
![]() |
31808df294 | ||
![]() |
cfd118d158 | ||
![]() |
20031ab982 | ||
![]() |
6d2cb1d9ac | ||
![]() |
d8c62e4238 | ||
![]() |
357d930f5a | ||
![]() |
8d7cc11d72 | ||
![]() |
18f78b6735 | ||
![]() |
120089d917 | ||
![]() |
d2bbfb9058 | ||
![]() |
ee13228486 | ||
![]() |
ea819268f3 | ||
![]() |
e0834cfda9 | ||
![]() |
c206650ed0 | ||
![]() |
e446eddca9 | ||
![]() |
0cc62459a7 | ||
![]() |
29bcffb3f3 | ||
![]() |
01bf8e1643 | ||
![]() |
03de0c8575 | ||
![]() |
1cd336dde4 | ||
![]() |
cc52ac5b16 | ||
![]() |
efbc4d2295 | ||
![]() |
67eeb889ba | ||
![]() |
25285a1c5a | ||
![]() |
f1451b4b04 | ||
![]() |
5fd68266f5 | ||
![]() |
b736f25e85 | ||
![]() |
d28fb63fac | ||
![]() |
6ec7ccec63 | ||
![]() |
791b9cc652 | ||
![]() |
e2480a299e | ||
![]() |
692c4e7508 | ||
![]() |
f1c7b813aa | ||
![]() |
a00532759b | ||
![]() |
5dab2ef12a | ||
![]() |
a67c930e9e | ||
![]() |
56d750659a | ||
![]() |
169d46ce83 | ||
![]() |
1ad941e984 | ||
![]() |
809c9258c1 | ||
![]() |
c8d365f5da | ||
![]() |
957e44231a | ||
![]() |
aef36ada02 | ||
![]() |
878774b24e | ||
![]() |
8c02748c81 | ||
![]() |
37b9715cbc | ||
![]() |
94823176c5 | ||
![]() |
92b74e2d36 | ||
![]() |
72e9939143 | ||
![]() |
4c75285816 | ||
![]() |
d77e55d31e | ||
![]() |
31e78d22b4 | ||
![]() |
ea7792b6c6 | ||
![]() |
b1d6005c52 | ||
![]() |
064f682103 | ||
![]() |
32d6a8b7ec | ||
![]() |
0c335270bd | ||
![]() |
62a02af915 | ||
![]() |
3173924421 | ||
![]() |
a89183591c | ||
![]() |
d0ca713eb4 | ||
![]() |
abba393f57 | ||
![]() |
87021371e6 | ||
![]() |
da887ea412 | ||
![]() |
2a02df84b6 | ||
![]() |
25aa474246 | ||
![]() |
c7ebb0f950 | ||
![]() |
a8a02455f5 | ||
![]() |
6cfb85f32f | ||
![]() |
0b7df9f2ef | ||
![]() |
d281cd5c40 | ||
![]() |
69ab37fca1 | ||
![]() |
024f0455de | ||
![]() |
6198fed566 | ||
![]() |
3e1f388bda | ||
![]() |
7bcf3e2781 | ||
![]() |
5ad5c230d6 | ||
![]() |
dc7d0c7b74 | ||
![]() |
afcf3a2878 | ||
![]() |
ee9a20ff37 | ||
![]() |
5eb5b6074c | ||
![]() |
19f48fa922 | ||
![]() |
c02de0932a | ||
![]() |
17c84f24cd | ||
![]() |
a07d1f22aa | ||
![]() |
23ce0b43b6 | ||
![]() |
4549dcd21f | ||
![]() |
7da585917b | ||
![]() |
cf001300b3 | ||
![]() |
63028dde82 | ||
![]() |
7ad924bae5 | ||
![]() |
a4ff8b91f7 | ||
![]() |
63cde006c5 | ||
![]() |
d331e274b3 | ||
![]() |
349e0012ba | ||
![]() |
68b6de60e0 | ||
![]() |
f10e9586df | ||
![]() |
4cdcbdb861 | ||
![]() |
cf8e10533b | ||
![]() |
927ef81363 | ||
![]() |
6fc43ddaf6 | ||
![]() |
0759adeaf1 | ||
![]() |
43a1ea3035 | ||
![]() |
af14e672c9 | ||
![]() |
2b3803eb5e | ||
![]() |
4580d3a730 | ||
![]() |
0ce45eb0b7 | ||
![]() |
85c3c5926c | ||
![]() |
323fa19e2d | ||
![]() |
de0e025472 | ||
![]() |
b032867236 | ||
![]() |
c8e232907f | ||
![]() |
994592f985 | ||
![]() |
4d5b7dea14 | ||
![]() |
4d5eeb3d7d | ||
![]() |
4edfa97e03 | ||
![]() |
5f154f0a00 | ||
![]() |
94f8b758b3 | ||
![]() |
f0db2c0512 | ||
![]() |
8ea690a1b3 | ||
![]() |
b07b4bb97b | ||
![]() |
5b897ce223 | ||
![]() |
da33dfec55 | ||
![]() |
a4316ba486 | ||
![]() |
da83f04a30 | ||
![]() |
9987f9dcff | ||
![]() |
ad73553aa9 | ||
![]() |
00d8f0c082 | ||
![]() |
a729d852fe | ||
![]() |
da7aece043 | ||
![]() |
ed56a6859f | ||
![]() |
ba2ad57ca8 | ||
![]() |
677b89768b | ||
![]() |
7960302242 | ||
![]() |
de315c54eb | ||
![]() |
a6fe0320f5 | ||
![]() |
78ab926cc8 | ||
![]() |
b28982e329 | ||
![]() |
0965e5203e | ||
![]() |
8e1c3f410d | ||
![]() |
2aedbf872b | ||
![]() |
afd7bf5f09 | ||
![]() |
402235eeb4 | ||
![]() |
b2d033ffe8 | ||
![]() |
ae91af95e2 | ||
![]() |
4b0c6dc50d | ||
![]() |
9a23fad36b | ||
![]() |
718fddf44c | ||
![]() |
d2ff66a985 | ||
![]() |
7260fc3eef | ||
![]() |
437c86c9c1 | ||
![]() |
d54360b1d8 | ||
![]() |
fe4549839e | ||
![]() |
1d930ebe45 | ||
![]() |
fcb60b1601 | ||
![]() |
3aa7fbcd79 | ||
![]() |
82f434a4d4 | ||
![]() |
d8fd33dd5e | ||
![]() |
bd484f18bd | ||
![]() |
9f6362e4df | ||
![]() |
57c93c13cc | ||
![]() |
e719f5b0b5 | ||
![]() |
9da308a0cd | ||
![]() |
47cd5b5622 | ||
![]() |
0e39f1faf4 | ||
![]() |
dd8cedc361 | ||
![]() |
51a2ce6145 | ||
![]() |
11d27cec1e | ||
![]() |
7a445d9167 | ||
![]() |
ff32643641 | ||
![]() |
dbd4ce19e9 | ||
![]() |
9ff064ae50 | ||
![]() |
c3c07eff51 | ||
![]() |
69c4cfb238 | ||
![]() |
36709d6a30 | ||
![]() |
1ab9e5d1c9 | ||
![]() |
f4b3b576a0 | ||
![]() |
dc1d24a4fe | ||
![]() |
0be483c762 | ||
![]() |
cb719757c2 | ||
![]() |
d172d6bec6 | ||
![]() |
90b07a5be4 | ||
![]() |
af21fa63e5 | ||
![]() |
dde035b963 | ||
![]() |
e7b3991b97 | ||
![]() |
1ce3971c90 | ||
![]() |
48e79cbe29 | ||
![]() |
68dafc8382 | ||
![]() |
e0d9cc945f | ||
![]() |
7aa839915e | ||
![]() |
78dc7bacfa | ||
![]() |
fa6bcfd10c | ||
![]() |
1254e76e29 | ||
![]() |
166706a32c | ||
![]() |
948d6efcfb | ||
![]() |
fe60cbd928 | ||
![]() |
f94963e6b7 | ||
![]() |
4b74c9056b | ||
![]() |
e74a95bf26 | ||
![]() |
bae1144a9f | ||
![]() |
eb5748e8bf | ||
![]() |
bdc0880ca5 | ||
![]() |
fc70c9ac9e | ||
![]() |
937b86d030 | ||
![]() |
cc9b0eb109 | ||
![]() |
046595f521 | ||
![]() |
8341068299 | ||
![]() |
a553dcba5a | ||
![]() |
5cab5e4a4e | ||
![]() |
d8145c8464 | ||
![]() |
81d7e7d4c8 | ||
![]() |
30ac7d403e | ||
![]() |
6ea408da10 | ||
![]() |
1132646b2f | ||
![]() |
9eb71e9719 | ||
![]() |
9ea56f03a1 | ||
![]() |
07be7b8d69 | ||
![]() |
baae936b47 | ||
![]() |
a6845036e2 | ||
![]() |
4c4a174dbe | ||
![]() |
8b62a0af74 | ||
![]() |
7277f09bba | ||
![]() |
94ca84d271 | ||
![]() |
52f2f6d8ea | ||
![]() |
9fed4f7948 | ||
![]() |
c0a6935fb3 | ||
![]() |
b483a90a90 | ||
![]() |
cb76e71109 | ||
![]() |
8392667ac4 | ||
![]() |
4a9e16b394 | ||
![]() |
71d1c02a9b | ||
![]() |
4e73b0b8d7 | ||
![]() |
2ee0dc7793 | ||
![]() |
9298f9d586 | ||
![]() |
356b489d98 | ||
![]() |
4c2dafc652 | ||
![]() |
285099de0d | ||
![]() |
cb74c8dc46 | ||
![]() |
52f4a38cb3 | ||
![]() |
f02430b131 | ||
![]() |
9d1a08e38a | ||
![]() |
9b879b1267 | ||
![]() |
2709744cdd | ||
![]() |
207bcd788a | ||
![]() |
e6c638bed1 | ||
![]() |
89bcdde927 | ||
![]() |
d3e1aaf5e2 | ||
![]() |
0cc15e117d | ||
![]() |
5bff9d6181 | ||
![]() |
7e5ccd50dc | ||
![]() |
80d082055b | ||
![]() |
c8222043fc | ||
![]() |
fa86b10138 | ||
![]() |
2aa5e44640 | ||
![]() |
42f895a4bc | ||
![]() |
f4cdc9117c | ||
![]() |
d7d20e2511 | ||
![]() |
4757140107 | ||
![]() |
c622423668 | ||
![]() |
b7d43ee253 | ||
![]() |
565c670ca4 | ||
![]() |
aee4e4650b | ||
![]() |
be0d49ba63 | ||
![]() |
0f2a7b6210 | ||
![]() |
cb7255755b | ||
![]() |
1a0b5aee63 | ||
![]() |
26650731d1 | ||
![]() |
1631f7cd79 | ||
![]() |
09e5885e45 | ||
![]() |
b4be711af1 | ||
![]() |
430151dd51 | ||
![]() |
175db1a549 | ||
![]() |
5ad103fa51 | ||
![]() |
188ed682e3 | ||
![]() |
897ceac26c | ||
![]() |
3e67cc9c80 | ||
![]() |
bd38273f6f | ||
![]() |
7b8eed9f29 | ||
![]() |
88198a9606 | ||
![]() |
6895c4510e | ||
![]() |
70407a1b67 | ||
![]() |
3fa32867ad | ||
![]() |
72b7067489 | ||
![]() |
48a89ad864 | ||
![]() |
a5ab2412ab | ||
![]() |
78ae28f24c | ||
![]() |
b6ed990d58 | ||
![]() |
aa660d61ea | ||
![]() |
d2e24354e1 | ||
![]() |
6b70b6a990 | ||
![]() |
daa5cee065 | ||
![]() |
33a87c132c | ||
![]() |
087d00f769 | ||
![]() |
26d348b6d1 | ||
![]() |
5210f94a56 | ||
![]() |
f1536a3f54 | ||
![]() |
3815067377 | ||
![]() |
114565fe81 | ||
![]() |
e9d755b6f4 | ||
![]() |
a3e1d9a8cc | ||
![]() |
02f405708b | ||
![]() |
916c4d799d | ||
![]() |
bc59e093ec | ||
![]() |
7935f563e9 | ||
![]() |
5fc4a664dc | ||
![]() |
8e1be7c792 | ||
![]() |
7a9fb7c96b | ||
![]() |
8cb413b6b7 | ||
![]() |
b66a9af352 | ||
![]() |
fb91d9008b | ||
![]() |
1219da753b | ||
![]() |
107d8031e5 | ||
![]() |
1a070d6f6f | ||
![]() |
e966854a65 | ||
![]() |
3961e14209 | ||
![]() |
d18df8ef7a | ||
![]() |
933701c212 | ||
![]() |
5f58a8f842 | ||
![]() |
4fd5ee410c | ||
![]() |
93b850048a | ||
![]() |
f64d4242ad | ||
![]() |
1bbb49585e | ||
![]() |
597ff7aee9 | ||
![]() |
15822a8e44 | ||
![]() |
aa67e3cedb | ||
![]() |
7f3921bcb3 | ||
![]() |
b529d5923f | ||
![]() |
fb0d4e96e8 | ||
![]() |
c93975ac94 | ||
![]() |
ba59b2d97e | ||
![]() |
4a5c948561 | ||
![]() |
087fbe0628 | ||
![]() |
9e79bb1491 | ||
![]() |
1fc9eabd08 | ||
![]() |
7b5f02aa6a | ||
![]() |
b20a87e3cc | ||
![]() |
396f97068b | ||
![]() |
5fbd25db62 | ||
![]() |
05351ce8b3 | ||
![]() |
525b3deadf | ||
![]() |
308bec28bb | ||
![]() |
76ea366abd | ||
![]() |
5c44d40a0c | ||
![]() |
479139f9d4 | ||
![]() |
e0caf94323 | ||
![]() |
d8c503f3ac | ||
![]() |
088dfb7db5 | ||
![]() |
3c2343664c | ||
![]() |
83b35bf6f6 | ||
![]() |
8765751f70 | ||
![]() |
c33434c0d6 | ||
![]() |
07ba06d0b6 | ||
![]() |
b6280f979c | ||
![]() |
15fbe6e233 | ||
![]() |
7371209ffb | ||
![]() |
d28b2c395b | ||
![]() |
bb30ff5f71 | ||
![]() |
bc5c67b3b2 | ||
![]() |
ea02a3ea23 | ||
![]() |
29fcb64bb4 | ||
![]() |
70cc193d14 | ||
![]() |
aab5f349a2 | ||
![]() |
a7b6292010 | ||
![]() |
8e66f65c77 | ||
![]() |
23549791eb | ||
![]() |
dd3803f334 | ||
![]() |
015bf30d9b | ||
![]() |
9609a47c3e | ||
![]() |
661106bac4 | ||
![]() |
bd0a888133 | ||
![]() |
d272111d46 | ||
![]() |
0b528d2e36 | ||
![]() |
cc6043ca29 | ||
![]() |
fffc5237a7 | ||
![]() |
992a63c0f2 | ||
![]() |
25659acb1c | ||
![]() |
07cb997b6d | ||
![]() |
ac634aa455 | ||
![]() |
6b2a3492b7 | ||
![]() |
dcd64062d2 | ||
![]() |
4148aeee19 | ||
![]() |
1f78b62cd6 | ||
![]() |
9f82d14eb9 | ||
![]() |
b710e21efb | ||
![]() |
9334986bd9 | ||
![]() |
f2824bca02 | ||
![]() |
5023f55856 | ||
![]() |
6d15f5a5b7 | ||
![]() |
ea1fd96c84 | ||
![]() |
1eea91f5f8 | ||
![]() |
9546b180b9 | ||
![]() |
2265e4ce41 | ||
![]() |
cbc5a08c40 | ||
![]() |
78f79ca6cc | ||
![]() |
f1dbf72e09 | ||
![]() |
c71b60c82a | ||
![]() |
47c6d201aa | ||
![]() |
f6438e42af | ||
![]() |
242c1da2c2 | ||
![]() |
be1876aa76 | ||
![]() |
1ef6777723 | ||
![]() |
d3b6552fb7 | ||
![]() |
ce3ea49743 | ||
![]() |
811c583636 | ||
![]() |
173d1b7571 | ||
![]() |
98f977e95c | ||
![]() |
1832b59266 | ||
![]() |
1bfe5b5723 | ||
![]() |
038c12d59a | ||
![]() |
3d23a80c83 | ||
![]() |
f56884b253 | ||
![]() |
d4e695a136 | ||
![]() |
2013f4fb83 | ||
![]() |
508cc7e56b | ||
![]() |
8958a4f78b | ||
![]() |
429971997c | ||
![]() |
e898a8ecc8 | ||
![]() |
b6e8516d6d | ||
![]() |
2077226fc2 | ||
![]() |
cfafa97227 | ||
![]() |
3d73110795 | ||
![]() |
727707ef0b | ||
![]() |
2a3af90d9f | ||
![]() |
73e5a7fafe | ||
![]() |
eceb2a4810 | ||
![]() |
b34dfeecdf | ||
![]() |
01458037de | ||
![]() |
461f95ce0b | ||
![]() |
f4bc404aa2 | ||
![]() |
b70e68ac5b | ||
![]() |
e4d849ed95 | ||
![]() |
4f193d6dc2 | ||
![]() |
934d35ea3f | ||
![]() |
a76a607a2b | ||
![]() |
9aec284f42 | ||
![]() |
3a0f7865da | ||
![]() |
b11d770bea | ||
![]() |
5a63aa29a9 | ||
![]() |
ab63ff8d2e | ||
![]() |
00e4079d5a | ||
![]() |
4d88634f07 | ||
![]() |
5ea3b1ea4d | ||
![]() |
c497a19e7b | ||
![]() |
7e07bdbde3 | ||
![]() |
60e5277a8f | ||
![]() |
96ec98b1ad | ||
![]() |
7a31ef8284 | ||
![]() |
0c2b0c7cc1 | ||
![]() |
42ea9460fe | ||
![]() |
e9daf0606f | ||
![]() |
be2c7aac31 | ||
![]() |
c5780647d8 | ||
![]() |
26fb063be3 | ||
![]() |
e81e75c147 | ||
![]() |
3e96e8a6a1 | ||
![]() |
c0f63ca9dc | ||
![]() |
f30f12ec81 | ||
![]() |
5987f67989 | ||
![]() |
20b3ac49b7 | ||
![]() |
619081559b | ||
![]() |
4a1f701d9f | ||
![]() |
de9331c50c | ||
![]() |
3b05183deb | ||
![]() |
75677655ad | ||
![]() |
c7ea65c6d3 | ||
![]() |
4ee571b257 | ||
![]() |
07dcbd23fd | ||
![]() |
cefc09ae7d | ||
![]() |
a543ad4c1d | ||
![]() |
6bdf7482b1 | ||
![]() |
415d38ba9e | ||
![]() |
9abbbe7089 | ||
![]() |
f407f3e8de | ||
![]() |
92ccc9a7b8 | ||
![]() |
f40ded7894 | ||
![]() |
fd664fe85b | ||
![]() |
fe113ebad5 | ||
![]() |
6a3c66776c | ||
![]() |
8edb67b082 | ||
![]() |
e26283e9e5 | ||
![]() |
8deb405292 | ||
![]() |
4d665a99ae | ||
![]() |
4627cab49d | ||
![]() |
e5f606558e | ||
![]() |
f379f05c1e | ||
![]() |
1524d29cfb | ||
![]() |
30efce5584 | ||
![]() |
a5b0f4de35 | ||
![]() |
20696a9efe | ||
![]() |
ee43856ff7 | ||
![]() |
14c5160b1a | ||
![]() |
000e749853 | ||
![]() |
7c0610b411 | ||
![]() |
b6d74b9bb9 | ||
![]() |
5e8594db82 | ||
![]() |
6c9b69a4b6 | ||
![]() |
5412229603 | ||
![]() |
e2e0f5d6d1 | ||
![]() |
21b63d9243 | ||
![]() |
d73d30aa84 | ||
![]() |
585f140052 | ||
![]() |
a4958a532d | ||
![]() |
df50260300 | ||
![]() |
55ed97af1e | ||
![]() |
07bf8522ca | ||
![]() |
1fdf3c84fe | ||
![]() |
9312b9db6c | ||
![]() |
707f4efd99 | ||
![]() |
e7a5fee1f3 | ||
![]() |
ddc3d3b64b | ||
![]() |
d90dc05ddb | ||
![]() |
7583136d73 | ||
![]() |
2dea401a8e | ||
![]() |
4c7c7747a3 | ||
![]() |
5810bb67e4 | ||
![]() |
cb9e59152e | ||
![]() |
db5bb7dbbf | ||
![]() |
c534c3e734 | ||
![]() |
f9e8d25e2e | ||
![]() |
e256468e48 | ||
![]() |
84a8aabe5b | ||
![]() |
d5486265b8 | ||
![]() |
738b072bb0 | ||
![]() |
99b6e918ea | ||
![]() |
9aa748df2a | ||
![]() |
fe3d75922b | ||
![]() |
7d0a471051 | ||
![]() |
786eb4e73d | ||
![]() |
4c71b329a2 | ||
![]() |
60153e7bbc | ||
![]() |
945f2f5916 | ||
![]() |
d4cd5dda5c | ||
![]() |
964d7060e1 | ||
![]() |
6037cede2c |
24
.clang_complete
Normal file
24
.clang_complete
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
-I.
|
||||
-I./drivers
|
||||
-I./drivers/avr
|
||||
-I./keyboards/ergodox_ez
|
||||
-I./keyboards/ergodox_ez/keymaps/vim
|
||||
-I./lib
|
||||
-I./lib/lufa
|
||||
-I./quantum
|
||||
-I./quantum/api
|
||||
-I./quantum/audio
|
||||
-I./quantum/keymap_extras
|
||||
-I./quantum/process_keycode
|
||||
-I./quantum/serial_link
|
||||
-I./quantum/template
|
||||
-I./quantum/tools
|
||||
-I./quantum/visualizer
|
||||
-I./tmk_core
|
||||
-I./tmk_core/common
|
||||
-I./tmk_core/common/debug.h
|
||||
-I./tmk_core/protocol
|
||||
-I./tmk_core/protocol/lufa
|
||||
-I./util
|
||||
-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
|
36
.editorconfig
Normal file
36
.editorconfig
Normal file
@@ -0,0 +1,36 @@
|
||||
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# We recommend you to keep these unchanged
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
indent_size = 4
|
||||
|
||||
# Make these match what we have in .gitattributes
|
||||
[*.mk]
|
||||
end_of_line = lf
|
||||
|
||||
[Makefile]
|
||||
end_of_line = lf
|
||||
|
||||
[*.sh]
|
||||
end_of_line = lf
|
||||
|
||||
# The gitattributes file will handle the line endings conversion properly according to the operating system settings for other files
|
||||
|
||||
|
||||
# We don't have gitattributes properly for these
|
||||
# So if the user have for example core.autocrlf set to true
|
||||
# the line endings would be wrong.
|
||||
[lib/**]
|
||||
end_of_line = unset
|
26
.gitignore
vendored
26
.gitignore
vendored
@@ -4,6 +4,7 @@
|
||||
*.eep
|
||||
*.elf
|
||||
*.hex
|
||||
*.qmk
|
||||
!util/bootloader.hex
|
||||
!quantum/tools/eeprom_reset.hex
|
||||
*.log
|
||||
@@ -21,9 +22,20 @@ build/
|
||||
quantum/version.h
|
||||
.idea/
|
||||
CMakeLists.txt
|
||||
cmake-build-debug
|
||||
.DS_STORE
|
||||
/util/wsl_downloaded
|
||||
/util/win_downloaded
|
||||
/keyboards/*/Makefile
|
||||
/keyboards/*/*/Makefile
|
||||
/keyboards/*/*/*/Makefile
|
||||
/keyboards/*/*/*/*/Makefile
|
||||
/keyboards/*/*/*/*/*/Makefile
|
||||
/keyboards/*/keymaps/Makefile
|
||||
/keyboards/*/*/keymaps/Makefile
|
||||
/keyboards/*/*/*/keymaps/Makefile
|
||||
/keyboards/*/*/*/*/keymaps/Makefile
|
||||
/keyboards/*/*/*/*/*/keymaps/Makefile
|
||||
|
||||
# Eclipse/PyCharm/Other IDE Settings
|
||||
.cproject
|
||||
@@ -34,11 +46,23 @@ CMakeLists.txt
|
||||
*.stackdump
|
||||
util/Win_Check_Output.txt
|
||||
# Let these ones be user specific, since we have so many different configurations
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/launch.json
|
||||
.vscode/tasks.json
|
||||
.vscode/last.sql
|
||||
.vscode/temp.sql
|
||||
.stfolder
|
||||
.tags
|
||||
|
||||
# ignore image files
|
||||
*.png
|
||||
*.jpg
|
||||
*.gif
|
||||
*.gif
|
||||
|
||||
# Do not ignore MiniDox left/right hand eeprom files
|
||||
!keyboards/minidox/*.eep
|
||||
|
||||
# things travis sees
|
||||
secrets.tar
|
||||
id_rsa_*
|
||||
/.vs
|
1
.gitmodules
vendored
1
.gitmodules
vendored
@@ -4,6 +4,7 @@
|
||||
[submodule "lib/chibios-contrib"]
|
||||
path = lib/chibios-contrib
|
||||
url = https://github.com/qmk/ChibiOS-Contrib
|
||||
branch = k-type-fix
|
||||
[submodule "lib/ugfx"]
|
||||
path = lib/ugfx
|
||||
url = https://github.com/qmk/uGFX
|
||||
|
@@ -11,14 +11,14 @@ env:
|
||||
global:
|
||||
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
|
||||
before_install:
|
||||
- wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||
- wget http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||
install:
|
||||
- tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||
- export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
|
||||
before_script:
|
||||
- avr-gcc --version
|
||||
script:
|
||||
- make test AUTOGEN=false
|
||||
- make test:all AUTOGEN=false
|
||||
- bash util/travis_build.sh
|
||||
addons:
|
||||
apt:
|
||||
@@ -29,6 +29,7 @@ addons:
|
||||
- binutils-arm-none-eabi
|
||||
- libnewlib-arm-none-eabi
|
||||
- diffutils
|
||||
- dos2unix
|
||||
after_success:
|
||||
bash util/travis_compiled_push.sh
|
||||
notifications:
|
||||
@@ -37,4 +38,4 @@ notifications:
|
||||
- https://webhooks.gitter.im/e/afce403d65f143dfac09
|
||||
on_success: always # options: [always|never|change] default: always
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
on_start: never # options: [always|never|change] default: always
|
||||
on_start: never # options: [always|never|change] default: always
|
||||
|
6
.vscode/extensions.json
vendored
Normal file
6
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// Suggested extensions
|
||||
{
|
||||
"recommendations": [
|
||||
"EditorConfig.EditorConfig"
|
||||
]
|
||||
}
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@@ -1,5 +1,7 @@
|
||||
// Place your settings in this file to overwrite default and user settings.
|
||||
{
|
||||
// Unofficially, QMK uses spaces for indentation
|
||||
"editor.insertSpaces": true,
|
||||
// Configure glob patterns for excluding files and folders.
|
||||
"files.exclude": {
|
||||
"**/.build": true,
|
||||
|
@@ -25,4 +25,4 @@ ENV keymap=default
|
||||
|
||||
VOLUME /qmk
|
||||
WORKDIR /qmk
|
||||
CMD make clean; make;
|
||||
CMD make clean ; make keyboard=${keyboard} subproject=${subproject} keymap=${keymap}
|
||||
|
339
LICENSE
Normal file
339
LICENSE
Normal file
@@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
377
Makefile
377
Makefile
@@ -19,6 +19,13 @@ endif
|
||||
# Otherwise the [OK], [ERROR] and [WARN] messages won't be displayed correctly
|
||||
override SILENT := false
|
||||
|
||||
ifndef SUB_IS_SILENT
|
||||
QMK_VERSION := $(shell git describe --abbrev=0 --tags 2>/dev/null)
|
||||
ifneq ($(QMK_VERSION),)
|
||||
$(info QMK Firmware $(QMK_VERSION))
|
||||
endif
|
||||
endif
|
||||
|
||||
ON_ERROR := error_occurred=1
|
||||
|
||||
BREAK_ON_ERRORS = no
|
||||
@@ -60,80 +67,94 @@ $(eval $(call NEXT_PATH_ELEMENT))
|
||||
# It's really a very simple if else chain, if you squint enough,
|
||||
# but the makefile syntax makes it very verbose.
|
||||
# If we are in a subfolder of keyboards
|
||||
ifeq ($(CURRENT_PATH_ELEMENT),keyboards)
|
||||
$(eval $(call NEXT_PATH_ELEMENT))
|
||||
KEYBOARD := $(CURRENT_PATH_ELEMENT)
|
||||
$(eval $(call NEXT_PATH_ELEMENT))
|
||||
# If we are in a subfolder of keymaps, or in other words in a keymap
|
||||
# folder
|
||||
ifeq ($(CURRENT_PATH_ELEMENT),keymaps)
|
||||
$(eval $(call NEXT_PATH_ELEMENT))
|
||||
KEYMAP := $(CURRENT_PATH_ELEMENT)
|
||||
# else if we are not in the keyboard folder itself
|
||||
else ifneq ($(CURRENT_PATH_ELEMENT),)
|
||||
# the we can assume it's a subproject, as no other folders
|
||||
# should have make files in them
|
||||
SUBPROJECT := $(CURRENT_PATH_ELEMENT)
|
||||
$(eval $(call NEXT_PATH_ELEMENT))
|
||||
# if we are inside a keymap folder of a subproject
|
||||
ifeq ($(CURRENT_PATH_ELEMENT),keymaps)
|
||||
$(eval $(call NEXT_PATH_ELEMENT))
|
||||
KEYMAP := $(CURRENT_PATH_ELEMENT)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
#
|
||||
# *** No longer needed **
|
||||
#
|
||||
# ifeq ($(CURRENT_PATH_ELEMENT),keyboards)
|
||||
# $(eval $(call NEXT_PATH_ELEMENT))
|
||||
# KEYBOARD := $(CURRENT_PATH_ELEMENT)
|
||||
# $(eval $(call NEXT_PATH_ELEMENT))
|
||||
# # If we are in a subfolder of keymaps, or in other words in a keymap
|
||||
# # folder
|
||||
# ifeq ($(CURRENT_PATH_ELEMENT),keymaps)
|
||||
# $(eval $(call NEXT_PATH_ELEMENT))
|
||||
# KEYMAP := $(CURRENT_PATH_ELEMENT)
|
||||
# # else if we are not in the keyboard folder itself
|
||||
# else ifneq ($(CURRENT_PATH_ELEMENT),)
|
||||
# # the we can assume it's a subproject, as no other folders
|
||||
# # should have make files in them
|
||||
# SUBPROJECT := $(CURRENT_PATH_ELEMENT)
|
||||
# $(eval $(call NEXT_PATH_ELEMENT))
|
||||
# # if we are inside a keymap folder of a subproject
|
||||
# ifeq ($(CURRENT_PATH_ELEMENT),keymaps)
|
||||
# $(eval $(call NEXT_PATH_ELEMENT))
|
||||
# KEYMAP := $(CURRENT_PATH_ELEMENT)
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
define GET_KEYBOARDS
|
||||
All_RULES_MK := $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/rules.mk))
|
||||
All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/rules.mk))
|
||||
All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/rules.mk))
|
||||
All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/*/rules.mk))
|
||||
|
||||
KEYMAPS_MK := $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/keymaps/*/rules.mk))
|
||||
KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/keymaps/*/rules.mk))
|
||||
KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/keymaps/*/rules.mk))
|
||||
KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/*/keymaps/*/rules.mk))
|
||||
|
||||
KEYBOARDS := $$(sort $$(filter-out $$(KEYMAPS_MK), $$(All_RULES_MK)))
|
||||
endef
|
||||
|
||||
$(eval $(call GET_KEYBOARDS))
|
||||
|
||||
# Only consider folders with makefiles, to prevent errors in case there are extra folders
|
||||
KEYBOARDS := $(notdir $(patsubst %/Makefile,%,$(wildcard $(ROOT_DIR)/keyboards/*/Makefile)))
|
||||
#KEYBOARDS += $(patsubst $(ROOD_DIR)/keyboards/%/rules.mk,%,$(wildcard $(ROOT_DIR)/keyboards/*/*/rules.mk))
|
||||
|
||||
list-keyboards:
|
||||
echo $(KEYBOARDS)
|
||||
exit 0
|
||||
|
||||
define PRINT_KEYBOARD
|
||||
$(info $(PRINTING_KEYBOARD))
|
||||
endef
|
||||
|
||||
generate-keyboards-file:
|
||||
$(foreach PRINTING_KEYBOARD,$(KEYBOARDS),$(eval $(call PRINT_KEYBOARD)))
|
||||
exit 0
|
||||
|
||||
#Compatibility with the old make variables, anything you specify directly on the command line
|
||||
# always overrides the detected folders
|
||||
ifdef keyboard
|
||||
KEYBOARD := $(keyboard)
|
||||
endif
|
||||
ifdef sub
|
||||
SUBPROJECT := $(sub)
|
||||
endif
|
||||
ifdef subproject
|
||||
SUBPROJECT := $(subproject)
|
||||
endif
|
||||
ifdef keymap
|
||||
KEYMAP := $(keymap)
|
||||
endif
|
||||
|
||||
# Uncomment these for debugging
|
||||
#$(info Keyboard: $(KEYBOARD))
|
||||
#$(info Keymap: $(KEYMAP))
|
||||
#$(info Subproject: $(SUBPROJECT))
|
||||
#$(info Keyboards: $(KEYBOARDS))
|
||||
# $(info Keyboard: $(KEYBOARD))
|
||||
# $(info Keymap: $(KEYMAP))
|
||||
# $(info Subproject: $(SUBPROJECT))
|
||||
# $(info Keyboards: $(KEYBOARDS))
|
||||
|
||||
|
||||
# Set the default goal depending on where we are running make from
|
||||
# this handles the case where you run make without any arguments
|
||||
.DEFAULT_GOAL := all
|
||||
.DEFAULT_GOAL := all:all
|
||||
ifneq ($(KEYMAP),)
|
||||
ifeq ($(SUBPROJECT),)
|
||||
# Inside a keymap folder, just build the keymap, with the
|
||||
# default subproject
|
||||
.DEFAULT_GOAL := $(KEYBOARD)-$(KEYMAP)
|
||||
else
|
||||
# Inside a subproject keyamp folder, build the keymap
|
||||
# for that subproject
|
||||
.DEFAULT_GOAL := $(KEYBOARD)-$(SUBPROJECT)-$(KEYMAP)
|
||||
endif
|
||||
else ifneq ($(SUBPROJECT),)
|
||||
# Inside a subproject folder, build all keymaps for that subproject
|
||||
.DEFAULT_GOAL := $(KEYBOARD)-$(SUBPROJECT)-allkm
|
||||
.DEFAULT_GOAL := $(KEYBOARD):$(KEYMAP)
|
||||
else ifneq ($(KEYBOARD),)
|
||||
# Inside a keyboard folder, build all keymaps for all subprojects
|
||||
# Note that this is different from the old behaviour, which would
|
||||
# build only the default keymap of the default keyboard
|
||||
.DEFAULT_GOAL := $(KEYBOARD)-allsp-allkm
|
||||
.DEFAULT_GOAL := $(KEYBOARD):all
|
||||
endif
|
||||
|
||||
|
||||
# Compare the start of the RULE variable with the first argument($1)
|
||||
# If the rules equals $1 or starts with $1-, RULE_FOUND is set to true
|
||||
# If the rules equals $1 or starts with $1:, RULE_FOUND is set to true
|
||||
# and $1 is removed from the RULE variable
|
||||
# Otherwise the RULE_FOUND variable is set to false, and RULE left as it was
|
||||
# The function is a bit tricky, since there's no built in $(startswith) function
|
||||
@@ -142,10 +163,10 @@ define COMPARE_AND_REMOVE_FROM_RULE_HELPER
|
||||
RULE:=
|
||||
RULE_FOUND := true
|
||||
else
|
||||
STARTDASH_REMOVED=$$(subst START$1-,,START$$(RULE))
|
||||
ifneq ($$(STARTDASH_REMOVED),START$$(RULE))
|
||||
STARTCOLON_REMOVED=$$(subst START$1:,,START$$(RULE))
|
||||
ifneq ($$(STARTCOLON_REMOVED),START$$(RULE))
|
||||
RULE_FOUND := true
|
||||
RULE := $$(STARTDASH_REMOVED)
|
||||
RULE := $$(STARTCOLON_REMOVED)
|
||||
else
|
||||
RULE_FOUND := false
|
||||
endif
|
||||
@@ -224,14 +245,14 @@ define PARSE_ALL_IN_LIST
|
||||
endef
|
||||
|
||||
# The entry point for rule parsing
|
||||
# parses a rule in the format <keyboard>-<subproject>-<keymap>-<target>
|
||||
# parses a rule in the format <keyboard>:<keymap>:<target>
|
||||
# but this particular function only deals with the first <keyboard> part
|
||||
define PARSE_RULE
|
||||
RULE := $1
|
||||
COMMANDS :=
|
||||
# If the rule starts with allkb, then continue the parsing from
|
||||
# If the rule starts with all, then continue the parsing from
|
||||
# PARSE_ALL_KEYBOARDS
|
||||
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,allkb),true)
|
||||
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true)
|
||||
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,test),true)
|
||||
$$(eval $$(call PARSE_TEST))
|
||||
@@ -245,35 +266,107 @@ define PARSE_RULE
|
||||
$$(eval $$(call PARSE_KEYBOARD,$$(KEYBOARD)))
|
||||
else
|
||||
$$(info make: *** No rule to make target '$1'. Stop.)
|
||||
# Notice the tab instead of spaces below!
|
||||
exit 1
|
||||
$$(info |)
|
||||
$$(info | QMK's make format recently changed to use folder locations and colons:)
|
||||
$$(info | make project_folder:keymap[:target])
|
||||
$$(info | Examples:)
|
||||
$$(info | make planck/rev4:default:dfu)
|
||||
$$(info | make planck:default)
|
||||
$$(info |)
|
||||
endif
|
||||
endef
|
||||
|
||||
# $1 = Keyboard
|
||||
# Parses a rule in the format <subproject>-<keymap>-<target>
|
||||
# Parses a rule in the format <keymap>:<target>
|
||||
# the keyboard is already known when entering this function
|
||||
define PARSE_KEYBOARD
|
||||
# If we want to compile the default subproject, then we need to
|
||||
# include the correct makefile to determine the actual name of it
|
||||
CURRENT_KB := $1
|
||||
# A subproject is any keyboard subfolder with a makefile
|
||||
SUBPROJECTS := $$(notdir $$(patsubst %/Makefile,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/*/Makefile)))
|
||||
# if the rule starts with allsp, then continue with looping over all subprojects
|
||||
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,allsp),true)
|
||||
$$(eval $$(call PARSE_ALL_SUBPROJECTS))
|
||||
# A special case for matching the defaultsp (default subproject)
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,defaultsp),true)
|
||||
$$(eval $$(call PARSE_SUBPROJECT,defaultsp))
|
||||
# If the rule starts with the name of a known subproject
|
||||
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(SUBPROJECTS)),true)
|
||||
$$(eval $$(call PARSE_SUBPROJECT,$$(MATCHED_ITEM)))
|
||||
# Try to use the SUBPROJECT variable, which is either determined by the
|
||||
# directory which invoked make, or passed as an argument to make
|
||||
else ifneq ($$(SUBPROJECT),)
|
||||
$$(eval $$(call PARSE_SUBPROJECT,$$(SUBPROJECT)))
|
||||
# If there's no matching subproject, we assume it's the default
|
||||
# This will allow you to leave the subproject part of the target out
|
||||
|
||||
# KEYBOARD_FOLDERS := $$(subst /, , $(CURRENT_KB))
|
||||
|
||||
DEFAULT_FOLDER := $$(CURRENT_KB)
|
||||
|
||||
# We assume that every rules.mk will contain the full default value
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/rules.mk)
|
||||
ifneq ($$(DEFAULT_FOLDER),$$(CURRENT_KB))
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(DEFAULT_FOLDER)/rules.mk)
|
||||
endif
|
||||
CURRENT_KB := $$(DEFAULT_FOLDER)
|
||||
|
||||
# 5/4/3/2/1
|
||||
KEYBOARD_FOLDER_PATH_1 := $$(CURRENT_KB)
|
||||
KEYBOARD_FOLDER_PATH_2 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_1)))
|
||||
KEYBOARD_FOLDER_PATH_3 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_2)))
|
||||
KEYBOARD_FOLDER_PATH_4 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_3)))
|
||||
KEYBOARD_FOLDER_PATH_5 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_4)))
|
||||
KEYBOARD_FOLDER_1 := $$(notdir $$(KEYBOARD_FOLDER_PATH_1))
|
||||
KEYBOARD_FOLDER_2 := $$(notdir $$(KEYBOARD_FOLDER_PATH_2))
|
||||
KEYBOARD_FOLDER_3 := $$(notdir $$(KEYBOARD_FOLDER_PATH_3))
|
||||
KEYBOARD_FOLDER_4 := $$(notdir $$(KEYBOARD_FOLDER_PATH_4))
|
||||
KEYBOARD_FOLDER_5 := $$(notdir $$(KEYBOARD_FOLDER_PATH_5))
|
||||
|
||||
KEYMAPS :=
|
||||
# get a list of all keymaps
|
||||
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_1)/keymaps/*/.)))
|
||||
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_2)/keymaps/*/.)))
|
||||
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_3)/keymaps/*/.)))
|
||||
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/keymaps/*/.)))
|
||||
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/keymaps/*/.)))
|
||||
# this might be needed, but in a different form
|
||||
#KEYMAPS := $$(sort $$(filter-out $$(KEYBOARD_FOLDER_1) $$(KEYBOARD_FOLDER_2) \
|
||||
$$(KEYBOARD_FOLDER_3) $$(KEYBOARD_FOLDER_4) $$(KEYBOARD_FOLDER_5), $$(KEYMAPS)))
|
||||
|
||||
KEYBOARD_LAYOUTS :=
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_5)/rules.mk)","")
|
||||
LAYOUTS :=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_5)/rules.mk)
|
||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_4)/rules.mk)","")
|
||||
LAYOUTS :=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_4)/rules.mk)
|
||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_3)/rules.mk)","")
|
||||
LAYOUTS :=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_3)/rules.mk)
|
||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_2)/rules.mk)","")
|
||||
LAYOUTS :=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_2)/rules.mk)
|
||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_1)/rules.mk)","")
|
||||
LAYOUTS :=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_1)/rules.mk)
|
||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||
endif
|
||||
|
||||
LAYOUT_KEYMAPS :=
|
||||
$$(foreach LAYOUT,$$(KEYBOARD_LAYOUTS),$$(eval LAYOUT_KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/layouts/*/$$(LAYOUT)/*/.)))))
|
||||
|
||||
KEYMAPS := $$(sort $$(KEYMAPS) $$(LAYOUT_KEYMAPS))
|
||||
|
||||
# if the rule after removing the start of it is empty (we haven't specified a kemap or target)
|
||||
# compile all the keymaps
|
||||
ifeq ($$(RULE),)
|
||||
$$(eval $$(call PARSE_ALL_KEYMAPS))
|
||||
# The same if all was specified
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true)
|
||||
$$(eval $$(call PARSE_ALL_KEYMAPS))
|
||||
# Try to match the specified keyamp with the list of known keymaps
|
||||
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYMAPS)),true)
|
||||
$$(eval $$(call PARSE_KEYMAP,$$(MATCHED_ITEM)))
|
||||
# Otherwise try to match the keymap from the current folder, or arguments to the make command
|
||||
else ifneq ($$(KEYMAP),)
|
||||
$$(eval $$(call PARSE_KEYMAP,$$(KEYMAP)))
|
||||
# Otherwise, make all keymaps, again this is consistent with how it works without
|
||||
# any arguments
|
||||
else
|
||||
$$(eval $$(call PARSE_SUBPROJECT,))
|
||||
$$(eval $$(call PARSE_ALL_KEYMAPS))
|
||||
endif
|
||||
endef
|
||||
|
||||
@@ -286,74 +379,19 @@ endef
|
||||
# $1 Subproject
|
||||
# When entering this, the keyboard and subproject are known, so now we need
|
||||
# to determine which keymaps are going to get compiled
|
||||
define PARSE_SUBPROJECT
|
||||
# If we want to compile the default subproject, then we need to
|
||||
# include the correct makefile to determine the actual name of it
|
||||
CURRENT_SP := $1
|
||||
ifeq ($$(CURRENT_SP),)
|
||||
CURRENT_SP := defaultsp
|
||||
endif
|
||||
ifeq ($$(CURRENT_SP),defaultsp)
|
||||
SUBPROJECT_DEFAULT=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/Makefile)
|
||||
CURRENT_SP := $$(SUBPROJECT_DEFAULT)
|
||||
endif
|
||||
# If current subproject is empty (the default was not defined), and we have a list of subproject
|
||||
# then make all of them
|
||||
ifeq ($$(CURRENT_SP),)
|
||||
ifneq ($$(SUBPROJECTS),)
|
||||
CURRENT_SP := allsp
|
||||
endif
|
||||
endif
|
||||
# The special allsp is handled later
|
||||
ifneq ($$(CURRENT_SP),allsp)
|
||||
# get a list of all keymaps
|
||||
KEYMAPS := $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/keymaps/*/.)))
|
||||
ifneq ($$(CURRENT_SP),)
|
||||
# if the subproject is defined, then also look for keymaps inside the subproject folder
|
||||
SP_KEYMAPS := $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/$$(CURRENT_SP)/keymaps/*/.)))
|
||||
KEYMAPS := $$(sort $$(KEYMAPS) $$(SP_KEYMAPS))
|
||||
endif
|
||||
# if the rule after removing the start of it is empty (we haven't specified a kemap or target)
|
||||
# compile all the keymaps
|
||||
ifeq ($$(RULE),)
|
||||
$$(eval $$(call PARSE_ALL_KEYMAPS))
|
||||
# The same if allkm was specified
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,allkm),true)
|
||||
$$(eval $$(call PARSE_ALL_KEYMAPS))
|
||||
# Try to match the specified keyamp with the list of known keymaps
|
||||
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYMAPS)),true)
|
||||
$$(eval $$(call PARSE_KEYMAP,$$(MATCHED_ITEM)))
|
||||
# Otherwise try to match the keymap from the current folder, or arguments to the make command
|
||||
else ifneq ($$(KEYMAP),)
|
||||
$$(eval $$(call PARSE_KEYMAP,$$(KEYMAP)))
|
||||
# No matching keymap found, so we assume that the rest of the rule is the target
|
||||
# If we haven't been able to parse out a subproject, then make all of them
|
||||
# This is consistent with running make without any arguments from the keyboard
|
||||
# folder
|
||||
else ifeq ($1,)
|
||||
$$(eval $$(call PARSE_ALL_SUBPROJECTS))
|
||||
# Otherwise, make all keymaps, again this is consistent with how it works without
|
||||
# any arguments
|
||||
else
|
||||
$$(eval $$(call PARSE_ALL_KEYMAPS))
|
||||
endif
|
||||
else
|
||||
# As earlier mentioned when allsb is specified, we call our self recursively
|
||||
# for all of the subprojects
|
||||
$$(eval $$(call PARSE_ALL_IN_LIST,PARSE_SUBPROJECT,$(SUBPROJECTS)))
|
||||
endif
|
||||
endef
|
||||
# define PARSE_SUBPROJECT
|
||||
|
||||
# endef
|
||||
|
||||
# If we want to parse all subprojects, but the keyboard doesn't have any,
|
||||
# then use defaultsp instead
|
||||
define PARSE_ALL_SUBPROJECTS
|
||||
ifeq ($$(SUBPROJECTS),)
|
||||
$$(eval $$(call PARSE_SUBPROJECT,defaultsp))
|
||||
else
|
||||
$$(eval $$(call PARSE_ALL_IN_LIST,PARSE_SUBPROJECT,$$(SUBPROJECTS)))
|
||||
endif
|
||||
endef
|
||||
# define PARSE_ALL_SUBPROJECTS
|
||||
# ifeq ($$(SUBPROJECTS),)
|
||||
# $$(eval $$(call PARSE_SUBPROJECT,defaultsp))
|
||||
# else
|
||||
# $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_SUBPROJECT,$$(SUBPROJECTS)))
|
||||
# endif
|
||||
# endef
|
||||
|
||||
# $1 Keymap
|
||||
# This is the meat of compiling a keyboard, when entering this, everything is known
|
||||
@@ -363,21 +401,18 @@ endef
|
||||
define PARSE_KEYMAP
|
||||
CURRENT_KM = $1
|
||||
# The rest of the rule is the target
|
||||
# Remove the leading "-" from the target, as it acts as a separator
|
||||
MAKE_TARGET := $$(patsubst -%,%,$$(RULE))
|
||||
# Remove the leading ":" from the target, as it acts as a separator
|
||||
MAKE_TARGET := $$(patsubst :%,%,$$(RULE))
|
||||
# We need to generate an unique indentifer to append to the COMMANDS list
|
||||
COMMAND := COMMAND_KEYBOARD_$$(CURRENT_KB)_SUBPROJECT_$(CURRENT_SP)_KEYMAP_$$(CURRENT_KM)
|
||||
CURRENT_KB_UNDER := $$(subst /,_,$$(CURRENT_KB))
|
||||
COMMAND := COMMAND_KEYBOARD_$$(CURRENT_KB_UNDER)_KEYMAP_$$(CURRENT_KM)
|
||||
# If we are compiling a keyboard without a subproject, we want to display just the name
|
||||
# of the keyboard, otherwise keyboard/subproject
|
||||
ifeq ($$(CURRENT_SP),)
|
||||
KB_SP := $(CURRENT_KB)
|
||||
else
|
||||
KB_SP := $(CURRENT_KB)/$$(CURRENT_SP)
|
||||
endif
|
||||
KB_SP := $$(CURRENT_KB)
|
||||
# Format it in bold
|
||||
KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR)
|
||||
# Specify the variables that we are passing forward to submake
|
||||
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) SUBPROJECT=$$(CURRENT_SP) KEYMAP=$$(CURRENT_KM)
|
||||
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM)
|
||||
# And the first part of the make command
|
||||
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET)
|
||||
# The message to display
|
||||
@@ -419,7 +454,7 @@ define BUILD_TEST
|
||||
MAKE_TARGET := $2
|
||||
COMMAND := $1
|
||||
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET)
|
||||
MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS=$$(FULL_TESTS)
|
||||
MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS="$$(FULL_TESTS)"
|
||||
MAKE_MSG := $$(MSG_MAKE_TEST)
|
||||
$$(eval $$(call BUILD))
|
||||
ifneq ($$(MAKE_TARGET),clean)
|
||||
@@ -438,8 +473,8 @@ endef
|
||||
|
||||
define PARSE_TEST
|
||||
TESTS :=
|
||||
TEST_NAME := $$(firstword $$(subst -, ,$$(RULE)))
|
||||
TEST_TARGET := $$(subst $$(TEST_NAME),,$$(subst $$(TEST_NAME)-,,$$(RULE)))
|
||||
TEST_NAME := $$(firstword $$(subst :, ,$$(RULE)))
|
||||
TEST_TARGET := $$(subst $$(TEST_NAME),,$$(subst $$(TEST_NAME):,,$$(RULE)))
|
||||
ifeq ($$(TEST_NAME),all)
|
||||
MATCHED_TESTS := $$(TEST_LIST)
|
||||
else
|
||||
@@ -487,11 +522,6 @@ if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi;
|
||||
|
||||
endef
|
||||
|
||||
# Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps
|
||||
SUBPROJECTS := $(notdir $(patsubst %/Makefile,%,$(wildcard ./*/Makefile)))
|
||||
.PHONY: $(SUBPROJECTS)
|
||||
$(SUBPROJECTS): %: %-allkm
|
||||
|
||||
# Let's match everything, we handle all the rule parsing ourselves
|
||||
.PHONY: %
|
||||
%:
|
||||
@@ -499,6 +529,9 @@ $(SUBPROJECTS): %: %-allkm
|
||||
cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
|
||||
# Check if the submodules are dirty, and display a warning if they are
|
||||
ifndef SKIP_GIT
|
||||
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --init lib/chibios; fi
|
||||
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --init lib/chibios-contrib; fi
|
||||
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --init lib/ugfx; fi
|
||||
git submodule status --recursive 2>/dev/null | \
|
||||
while IFS= read -r x; do \
|
||||
case "$$x" in \
|
||||
@@ -519,22 +552,32 @@ endif
|
||||
$(foreach TEST,$(TESTS),$(RUN_TEST))
|
||||
if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
|
||||
|
||||
# These no longer work because of the colon system
|
||||
|
||||
# All should compile everything
|
||||
.PHONY: all
|
||||
all: all-keyboards test-all
|
||||
# .PHONY: all
|
||||
# all: all-keyboards test-all
|
||||
|
||||
# Define some shortcuts, mostly for compatibility with the old syntax
|
||||
.PHONY: all-keyboards
|
||||
all-keyboards: allkb-allsp-allkm
|
||||
# .PHONY: all-keyboards
|
||||
# all-keyboards: all\:all\:all
|
||||
|
||||
.PHONY: all-keyboards-defaults
|
||||
all-keyboards-defaults: allkb-allsp-default
|
||||
# .PHONY: all-keyboards-defaults
|
||||
# all-keyboards-defaults: all\:default
|
||||
|
||||
.PHONY: test
|
||||
test: test-all
|
||||
# .PHONY: test
|
||||
# test: test-all
|
||||
|
||||
.PHONY: test-clean
|
||||
test-clean: test-all-clean
|
||||
# .PHONY: test-clean
|
||||
# test-clean: test-all-clean
|
||||
|
||||
lib/%:
|
||||
git submodule sync $?
|
||||
git submodule update --init $?
|
||||
|
||||
git-submodule:
|
||||
git submodule sync --recursive
|
||||
git submodule update --init --recursive
|
||||
|
||||
ifdef SKIP_VERSION
|
||||
SKIP_GIT := yes
|
||||
|
1
autocomplete.sh
Normal file
1
autocomplete.sh
Normal file
File diff suppressed because one or more lines are too long
15
book.json
15
book.json
@@ -3,15 +3,13 @@
|
||||
"summary": "_summary.md"
|
||||
},
|
||||
"plugins" : [
|
||||
"anchors",
|
||||
"edit-link",
|
||||
"forkmegithub",
|
||||
"git-author",
|
||||
"hints",
|
||||
"numbered-headings",
|
||||
"page-toc",
|
||||
"terminal",
|
||||
"toolbar"
|
||||
"toolbar",
|
||||
"bulk-redirect"
|
||||
],
|
||||
"pluginsConfig": {
|
||||
"edit-link": {
|
||||
@@ -25,6 +23,11 @@
|
||||
"page-toc": {
|
||||
"selector": ".markdown-section h1, .markdown-section h2"
|
||||
},
|
||||
"terminal": {
|
||||
"copyButtons": true,
|
||||
"fade": false,
|
||||
"style": "flat"
|
||||
},
|
||||
"toolbar": {
|
||||
"buttons": [
|
||||
{
|
||||
@@ -33,6 +36,10 @@
|
||||
"url": "https://github.com/qmk/qmk_firmware"
|
||||
}
|
||||
]
|
||||
},
|
||||
"bulk-redirect": {
|
||||
"basepath": "/",
|
||||
"redirectsFile": "docs/redirects.json"
|
||||
}
|
||||
},
|
||||
"root": "./docs/"
|
||||
|
62
bootloader.mk
Normal file
62
bootloader.mk
Normal file
@@ -0,0 +1,62 @@
|
||||
# Copyright 2017 Jack Humbert
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# If it's possible that multiple bootloaders can be used for one project,
|
||||
# you can leave this unset, and the correct size will be selected
|
||||
# automatically.
|
||||
#
|
||||
# Sets the bootloader defined in the keyboard's/keymap's rules.mk
|
||||
# Current options:
|
||||
# atmel-dfu
|
||||
# lufa-dfu
|
||||
# qmk-dfu
|
||||
# halfkay
|
||||
# caterina
|
||||
# bootloadHID
|
||||
#
|
||||
# BOOTLOADER_SIZE can still be defined manually, but it's recommended
|
||||
# you add any possible configuration to this list
|
||||
|
||||
ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
|
||||
OPT_DEFS += -DBOOTLOADER_DFU
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_LUFA_DFU
|
||||
OPT_DEFS += -DBOOTLOADER_DFU
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_QMK_DFU
|
||||
OPT_DEFS += -DBOOTLOADER_DFU
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), halfkay)
|
||||
OPT_DEFS += -DBOOTLOADER_HALFKAY
|
||||
BOOTLOADER_SIZE = 512
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), caterina)
|
||||
OPT_DEFS += -DBOOTLOADER_CATERINA
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), bootloadHID)
|
||||
OPT_DEFS += -DBOOTLOADER_BOOTLOADHID
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
|
||||
ifdef BOOTLOADER_SIZE
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE))
|
||||
endif
|
@@ -21,12 +21,13 @@ $(TEST)_SRC= \
|
||||
$(TEST_PATH)/keymap.c \
|
||||
$(TMK_COMMON_SRC) \
|
||||
$(QUANTUM_SRC) \
|
||||
$(SRC) \
|
||||
tests/test_common/matrix.c \
|
||||
tests/test_common/test_driver.cpp \
|
||||
tests/test_common/keyboard_report_util.cpp \
|
||||
tests/test_common/test_fixture.cpp
|
||||
$(TEST)_SRC += $(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp))
|
||||
|
||||
$(TEST)_DEFS=$(TMK_COMMON_DEFS)
|
||||
$(TEST)_DEFS=$(TMK_COMMON_DEFS) $(OPT_DEFS)
|
||||
$(TEST)_CONFIG=$(TEST_PATH)/config.h
|
||||
VPATH+=$(TOP_DIR)/tests/test_common
|
@@ -6,18 +6,26 @@ endif
|
||||
|
||||
include common.mk
|
||||
|
||||
ifneq ($(SUBPROJECT),)
|
||||
TARGET ?= $(KEYBOARD)_$(SUBPROJECT)_$(KEYMAP)
|
||||
KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)_$(SUBPROJECT)
|
||||
else
|
||||
TARGET ?= $(KEYBOARD)_$(KEYMAP)
|
||||
KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)
|
||||
endif
|
||||
# 5/4/3/2/1
|
||||
KEYBOARD_FOLDER_PATH_1 := $(KEYBOARD)
|
||||
KEYBOARD_FOLDER_PATH_2 := $(patsubst %/,%,$(dir $(KEYBOARD_FOLDER_PATH_1)))
|
||||
KEYBOARD_FOLDER_PATH_3 := $(patsubst %/,%,$(dir $(KEYBOARD_FOLDER_PATH_2)))
|
||||
KEYBOARD_FOLDER_PATH_4 := $(patsubst %/,%,$(dir $(KEYBOARD_FOLDER_PATH_3)))
|
||||
KEYBOARD_FOLDER_PATH_5 := $(patsubst %/,%,$(dir $(KEYBOARD_FOLDER_PATH_4)))
|
||||
KEYBOARD_FOLDER_1 := $(notdir $(KEYBOARD_FOLDER_PATH_1))
|
||||
KEYBOARD_FOLDER_2 := $(notdir $(KEYBOARD_FOLDER_PATH_2))
|
||||
KEYBOARD_FOLDER_3 := $(notdir $(KEYBOARD_FOLDER_PATH_3))
|
||||
KEYBOARD_FOLDER_4 := $(notdir $(KEYBOARD_FOLDER_PATH_4))
|
||||
KEYBOARD_FOLDER_5 := $(notdir $(KEYBOARD_FOLDER_PATH_5))
|
||||
|
||||
KEYBOARD_FILESAFE := $(subst /,_,$(KEYBOARD))
|
||||
|
||||
TARGET ?= $(KEYBOARD_FILESAFE)_$(KEYMAP)
|
||||
KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD_FILESAFE)
|
||||
|
||||
# Force expansion
|
||||
TARGET := $(TARGET)
|
||||
|
||||
|
||||
MASTER ?= left
|
||||
ifdef master
|
||||
MASTER = $(master)
|
||||
@@ -31,110 +39,199 @@ $(error MASTER does not have a valid value(left/right))
|
||||
endif
|
||||
endif
|
||||
|
||||
KEYBOARD_PATH := keyboards/$(KEYBOARD)
|
||||
KEYBOARD_C := $(KEYBOARD_PATH)/$(KEYBOARD).c
|
||||
KEYBOARD_PATHS :=
|
||||
|
||||
ifneq ("$(wildcard $(KEYBOARD_C))","")
|
||||
include $(KEYBOARD_PATH)/rules.mk
|
||||
else
|
||||
$(error "$(KEYBOARD_C)" does not exist)
|
||||
KEYBOARD_PATH_1 := keyboards/$(KEYBOARD_FOLDER_PATH_1)
|
||||
KEYBOARD_PATH_2 := keyboards/$(KEYBOARD_FOLDER_PATH_2)
|
||||
KEYBOARD_PATH_3 := keyboards/$(KEYBOARD_FOLDER_PATH_3)
|
||||
KEYBOARD_PATH_4 := keyboards/$(KEYBOARD_FOLDER_PATH_4)
|
||||
KEYBOARD_PATH_5 := keyboards/$(KEYBOARD_FOLDER_PATH_5)
|
||||
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/rules.mk)","")
|
||||
KEYBOARD_PATHS += $(KEYBOARD_PATH_5)
|
||||
include $(KEYBOARD_PATH_5)/rules.mk
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_4)/rules.mk)","")
|
||||
KEYBOARD_PATHS += $(KEYBOARD_PATH_4)
|
||||
include $(KEYBOARD_PATH_4)/rules.mk
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_3)/rules.mk)","")
|
||||
KEYBOARD_PATHS += $(KEYBOARD_PATH_3)
|
||||
include $(KEYBOARD_PATH_3)/rules.mk
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_2)/rules.mk)","")
|
||||
KEYBOARD_PATHS += $(KEYBOARD_PATH_2)
|
||||
include $(KEYBOARD_PATH_2)/rules.mk
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/rules.mk)","")
|
||||
KEYBOARD_PATHS += $(KEYBOARD_PATH_1)
|
||||
include $(KEYBOARD_PATH_1)/rules.mk
|
||||
endif
|
||||
|
||||
ifneq ($(SUBPROJECT),)
|
||||
SUBPROJECT_PATH := keyboards/$(KEYBOARD)/$(SUBPROJECT)
|
||||
SUBPROJECT_C := $(SUBPROJECT_PATH)/$(SUBPROJECT).c
|
||||
ifneq ("$(wildcard $(SUBPROJECT_C))","")
|
||||
OPT_DEFS += -DSUBPROJECT_$(SUBPROJECT)
|
||||
include $(SUBPROJECT_PATH)/rules.mk
|
||||
else
|
||||
$(error "$(SUBPROJECT_PATH)/$(SUBPROJECT).c" does not exist)
|
||||
endif
|
||||
KEYBOARD_SRC :=
|
||||
|
||||
KEYBOARD_C_1 := $(KEYBOARD_PATH_1)/$(KEYBOARD_FOLDER_1).c
|
||||
KEYBOARD_C_2 := $(KEYBOARD_PATH_2)/$(KEYBOARD_FOLDER_2).c
|
||||
KEYBOARD_C_3 := $(KEYBOARD_PATH_3)/$(KEYBOARD_FOLDER_3).c
|
||||
KEYBOARD_C_4 := $(KEYBOARD_PATH_4)/$(KEYBOARD_FOLDER_4).c
|
||||
KEYBOARD_C_5 := $(KEYBOARD_PATH_5)/$(KEYBOARD_FOLDER_5).c
|
||||
|
||||
ifneq ("$(wildcard $(KEYBOARD_C_5))","")
|
||||
KEYBOARD_SRC += $(KEYBOARD_C_5)
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_C_4))","")
|
||||
KEYBOARD_SRC += $(KEYBOARD_C_4)
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_C_3))","")
|
||||
KEYBOARD_SRC += $(KEYBOARD_C_3)
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_C_2))","")
|
||||
KEYBOARD_SRC += $(KEYBOARD_C_2)
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_C_1))","")
|
||||
KEYBOARD_SRC += $(KEYBOARD_C_1)
|
||||
endif
|
||||
|
||||
# We can assume a ChibiOS target When MCU_FAMILY is defined, since it's not used for LUFA
|
||||
OPT_DEFS += -DKEYBOARD_$(KEYBOARD_FILESAFE)
|
||||
|
||||
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/$(KEYBOARD_FOLDER_1).h)","")
|
||||
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_1).h
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_2)/$(KEYBOARD_FOLDER_2).h)","")
|
||||
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_2).h
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_3)/$(KEYBOARD_FOLDER_3).h)","")
|
||||
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_3).h
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_4)/$(KEYBOARD_FOLDER_4).h)","")
|
||||
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_4).h
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/$(KEYBOARD_FOLDER_5).h)","")
|
||||
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_5).h
|
||||
endif
|
||||
|
||||
# We can assume a ChibiOS target When MCU_FAMILY is defined , since it's not used for LUFA
|
||||
ifdef MCU_FAMILY
|
||||
FIRMWARE_FORMAT=bin
|
||||
PLATFORM=CHIBIOS
|
||||
else
|
||||
PLATFORM=AVR
|
||||
FIRMWARE_FORMAT=hex
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),CHIBIOS)
|
||||
include $(TMK_PATH)/protocol/chibios.mk
|
||||
include $(TMK_PATH)/chibios.mk
|
||||
OPT_OS = chibios
|
||||
ifneq ("$(wildcard $(SUBPROJECT_PATH)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(SUBPROJECT_PATH)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(SUBPROJECT_PATH)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(SUBPROJECT_PATH)/boards/$(BOARD)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_5)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_5)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_5)/boards/$(BOARD)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_4)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_4)/boards/$(BOARD)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_3)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_3)/boards/$(BOARD)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_2)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_2)/boards/$(BOARD)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_1)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h
|
||||
endif
|
||||
endif
|
||||
|
||||
CONFIG_H = $(KEYBOARD_PATH)/config.h
|
||||
ifneq ($(SUBPROJECT),)
|
||||
ifneq ("$(wildcard $(SUBPROJECT_C))","")
|
||||
CONFIG_H = $(SUBPROJECT_PATH)/config.h
|
||||
endif
|
||||
CONFIG_H :=
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/config.h)","")
|
||||
CONFIG_H += $(KEYBOARD_PATH_5)/config.h
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_4)/config.h)","")
|
||||
CONFIG_H += $(KEYBOARD_PATH_4)/config.h
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_3)/config.h)","")
|
||||
CONFIG_H += $(KEYBOARD_PATH_3)/config.h
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_2)/config.h)","")
|
||||
CONFIG_H += $(KEYBOARD_PATH_2)/config.h
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/config.h)","")
|
||||
CONFIG_H += $(KEYBOARD_PATH_1)/config.h
|
||||
endif
|
||||
|
||||
# Save the defines and includes here, so we don't include any keymap specific ones
|
||||
PROJECT_DEFS := $(OPT_DEFS)
|
||||
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(SUBPROJECT_PATH) $(KEYBOARD_PATH)
|
||||
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS)
|
||||
PROJECT_CONFIG := $(CONFIG_H)
|
||||
|
||||
MAIN_KEYMAP_PATH := $(KEYBOARD_PATH)/keymaps/$(KEYMAP)
|
||||
MAIN_KEYMAP_C := $(MAIN_KEYMAP_PATH)/keymap.c
|
||||
SUBPROJ_KEYMAP_PATH := $(SUBPROJECT_PATH)/keymaps/$(KEYMAP)
|
||||
SUBPROJ_KEYMAP_C := $(SUBPROJ_KEYMAP_PATH)/keymap.c
|
||||
ifneq ("$(wildcard $(SUBPROJ_KEYMAP_C))","")
|
||||
-include $(SUBPROJ_KEYMAP_PATH)/Makefile
|
||||
KEYMAP_C := $(SUBPROJ_KEYMAP_C)
|
||||
KEYMAP_PATH := $(SUBPROJ_KEYMAP_PATH)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_C))","")
|
||||
-include $(MAIN_KEYMAP_PATH)/Makefile
|
||||
KEYMAP_C := $(MAIN_KEYMAP_C)
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH)
|
||||
MAIN_KEYMAP_PATH_1 := $(KEYBOARD_PATH_1)/keymaps/$(KEYMAP)
|
||||
MAIN_KEYMAP_PATH_2 := $(KEYBOARD_PATH_2)/keymaps/$(KEYMAP)
|
||||
MAIN_KEYMAP_PATH_3 := $(KEYBOARD_PATH_3)/keymaps/$(KEYMAP)
|
||||
MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP)
|
||||
MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)
|
||||
|
||||
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_5)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_4)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_3)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_2)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_1)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
||||
else ifneq ($(LAYOUTS),)
|
||||
include build_layout.mk
|
||||
else
|
||||
$(error "$(MAIN_KEYMAP_C)/keymap.c" does not exist)
|
||||
$(error Could not find keymap)
|
||||
# this state should never be reached
|
||||
endif
|
||||
|
||||
# User space stuff
|
||||
USER_PATH := users/$(KEYMAP)
|
||||
-include $(USER_PATH)/rules.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)","")
|
||||
CONFIG_H = $(KEYMAP_PATH)/config.h
|
||||
CONFIG_H += $(KEYMAP_PATH)/config.h
|
||||
endif
|
||||
|
||||
# # project specific files
|
||||
SRC += $(KEYBOARD_C) \
|
||||
SRC += $(KEYBOARD_SRC) \
|
||||
$(KEYMAP_C) \
|
||||
$(QUANTUM_SRC)
|
||||
|
||||
ifneq ($(SUBPROJECT),)
|
||||
SRC += $(SUBPROJECT_C)
|
||||
endif
|
||||
|
||||
# Optimize size but this may cause error "relocation truncated to fit"
|
||||
#EXTRALDFLAGS = -Wl,--relax
|
||||
|
||||
# Search Path
|
||||
VPATH += $(KEYMAP_PATH)
|
||||
ifneq ($(SUBPROJECT),)
|
||||
VPATH += $(SUBPROJECT_PATH)
|
||||
endif
|
||||
VPATH += $(KEYBOARD_PATH)
|
||||
VPATH += $(KEYBOARD_PATHS)
|
||||
VPATH += $(COMMON_VPATH)
|
||||
VPATH += $(USER_PATH)
|
||||
|
||||
include common_features.mk
|
||||
include $(TMK_PATH)/protocol.mk
|
||||
include $(TMK_PATH)/common.mk
|
||||
include bootloader.mk
|
||||
|
||||
SRC += $(TMK_COMMON_SRC)
|
||||
OPT_DEFS += $(TMK_COMMON_DEFS)
|
||||
@@ -149,30 +246,38 @@ endif
|
||||
include $(TMK_PATH)/avr.mk
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),CHIBIOS)
|
||||
include $(TMK_PATH)/protocol/chibios.mk
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||
VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer
|
||||
VISUALIZER_PATH = $(QUANTUM_PATH)/visualizer
|
||||
include $(VISUALIZER_PATH)/visualizer.mk
|
||||
endif
|
||||
|
||||
ALL_CONFIGS := $(PROJECT_CONFIG) $(CONFIG_H)
|
||||
|
||||
OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
|
||||
$(KEYMAP_OUTPUT)_SRC := $(SRC)
|
||||
$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
|
||||
$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) \
|
||||
-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(QMK_KEYBOARD_H)\" -DQMK_KEYBOARD_CONFIG_H=\"$(KEYBOARD_PATH_1)/config.h\" \
|
||||
-DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\" \
|
||||
-DQMK_SUBPROJECT -DQMK_SUBPROJECT_H -DQMK_SUBPROJECT_CONFIG_H
|
||||
$(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS)
|
||||
$(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H)
|
||||
$(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) $(GFXSRC)
|
||||
$(KEYBOARD_OUTPUT)_DEFS := $(PROJECT_DEFS) $(GFXDEFS)
|
||||
$(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) $(GFXINC)
|
||||
$(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
|
||||
$(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
|
||||
|
||||
# Default target.
|
||||
all: build sizeafter
|
||||
all: build check-size
|
||||
|
||||
# Change the build target to build a HEX file or a library.
|
||||
build: elf hex
|
||||
build: elf cpfirmware
|
||||
#build: elf hex eep lss sym
|
||||
#build: lib
|
||||
|
||||
|
||||
include $(TMK_PATH)/rules.mk
|
||||
|
||||
|
18
build_layout.mk
Normal file
18
build_layout.mk
Normal file
@@ -0,0 +1,18 @@
|
||||
LAYOUTS_PATH := layouts
|
||||
LAYOUTS_REPOS := $(patsubst %/,%,$(sort $(dir $(wildcard $(LAYOUTS_PATH)/*/))))
|
||||
|
||||
define SEARCH_LAYOUTS_REPO
|
||||
LAYOUT_KEYMAP_PATH := $$(LAYOUTS_REPO)/$$(LAYOUT)/$$(KEYMAP)
|
||||
LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c
|
||||
ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","")
|
||||
-include $$(LAYOUT_KEYMAP_PATH)/rules.mk
|
||||
KEYMAP_C := $$(LAYOUT_KEYMAP_C)
|
||||
KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH)
|
||||
endif
|
||||
endef
|
||||
|
||||
define SEARCH_LAYOUTS
|
||||
$$(foreach LAYOUTS_REPO,$$(LAYOUTS_REPOS),$$(eval $$(call SEARCH_LAYOUTS_REPO)))
|
||||
endef
|
||||
|
||||
$(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS)))
|
@@ -34,7 +34,11 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||
OPT_DEFS += -DAUDIO_ENABLE
|
||||
MUSIC_ENABLE := 1
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
||||
SRC += $(QUANTUM_DIR)/audio/audio.c
|
||||
ifeq ($(PLATFORM),AVR)
|
||||
SRC += $(QUANTUM_DIR)/audio/audio.c
|
||||
else
|
||||
SRC += $(QUANTUM_DIR)/audio/audio_arm.c
|
||||
endif
|
||||
SRC += $(QUANTUM_DIR)/audio/voices.c
|
||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||
endif
|
||||
@@ -54,6 +58,12 @@ ifeq ($(strip $(COMBO_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(STENO_ENABLE)), yes)
|
||||
OPT_DEFS += -DSTENO_ENABLE
|
||||
VIRTSER_ENABLE := yes
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VIRTSER_ENABLE)), yes)
|
||||
OPT_DEFS += -DVIRTSER_ENABLE
|
||||
endif
|
||||
@@ -63,6 +73,12 @@ ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/fauxclicky.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
|
||||
OPT_DEFS += -DPOINTING_DEVICE_ENABLE
|
||||
OPT_DEFS += -DMOUSE_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/pointing_device.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UCIS_ENABLE)), yes)
|
||||
OPT_DEFS += -DUCIS_ENABLE
|
||||
UNICODE_COMMON = yes
|
||||
@@ -87,10 +103,14 @@ endif
|
||||
|
||||
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_ENABLE
|
||||
SRC += ws2812.c
|
||||
SRC += $(QUANTUM_DIR)/rgblight.c
|
||||
CIE1931_CURVE = yes
|
||||
LED_BREATHING_TABLE = yes
|
||||
ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
|
||||
else
|
||||
SRC += ws2812.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
||||
@@ -98,12 +118,22 @@ ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(KEY_LOCK_ENABLE)), yes)
|
||||
OPT_DEFS += -DKEY_LOCK_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_key_lock.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(PRINTING_ENABLE)), yes)
|
||||
OPT_DEFS += -DPRINTING_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
|
||||
SRC += $(TMK_DIR)/protocol/serial_uart.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
|
||||
OPT_DEFS += -DAUTO_SHIFT_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
|
||||
SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
|
||||
OPT_DEFS += $(SERIAL_DEFS)
|
||||
@@ -125,6 +155,9 @@ endif
|
||||
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||
CIE1931_CURVE = yes
|
||||
endif
|
||||
ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
|
||||
OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -142,6 +175,15 @@ ifeq ($(strip $(LED_TABLES)), yes)
|
||||
SRC += $(QUANTUM_DIR)/led_tables.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(TERMINAL_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_terminal.c
|
||||
OPT_DEFS += -DTERMINAL_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(USB_HID_ENABLE)), yes)
|
||||
include $(TMK_DIR)/protocol/usb_hid.mk
|
||||
endif
|
||||
|
||||
QUANTUM_SRC:= \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
@@ -150,4 +192,4 @@ QUANTUM_SRC:= \
|
||||
|
||||
ifndef CUSTOM_MATRIX
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
|
||||
endif
|
||||
endif
|
||||
|
@@ -4,22 +4,22 @@
|
||||
|
||||
QMK (*Quantum Mechanical Keyboard*) is an open source community that maintains QMK Firmware, QMK Flasher, qmk.fm, and these docs. QMK Firmware is a keyboard firmware based on the [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). It has also been ported to ARM chips using ChibiOS. You can use it to power your own hand-wired or custom keyboard PCB.
|
||||
|
||||
## How to get it {#how-to-get-it}
|
||||
## How to Get It {#how-to-get-it}
|
||||
|
||||
If you plan on contributing a keymap, keyboard, or features to QMK, the easiest thing to do is [fork the repo through Github](https://github.com/qmk/qmk_firmware#fork-destination-box), and clone your repo locally to make your changes, push them, then open a [Pull Request](https://github.com/qmk/qmk_firmware/pulls) from your fork.
|
||||
|
||||
Otherwise, you can either download it directly ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), or clone it via git (`git@github.com:qmk/qmk_firmware.git`), or https (`https://github.com/qmk/qmk_firmware.git`).
|
||||
|
||||
## How to compile {#how-to-compile}
|
||||
## How to Compile {#how-to-compile}
|
||||
|
||||
Before you are able to compile, you'll need to [install an environment](build_environment_setup.md) for AVR or/and ARM development. Once that is complete, you'll use the `make` command to build a keyboard and keymap with the following notation:
|
||||
Before you are able to compile, you'll need to [install an environment](getting_started_build_tools.md) for AVR or/and ARM development. Once that is complete, you'll use the `make` command to build a keyboard and keymap with the following notation:
|
||||
|
||||
make planck-rev4-default
|
||||
make planck/rev4:default
|
||||
|
||||
This would build the `rev4` revision of the `planck` with the `default` keymap. Not all keyboards have revisions (also called subprojects), in which case, it can be omitted:
|
||||
This would build the `rev4` revision of the `planck` with the `default` keymap. Not all keyboards have revisions (also called subprojects or folders), in which case, it can be omitted:
|
||||
|
||||
make preonic-default
|
||||
make preonic:default
|
||||
|
||||
## How to customize {#how-to-customize}
|
||||
## How to Customize {#how-to-customize}
|
||||
|
||||
QMK has lots of [features](features/README.md) to explore, and a good deal of [reference documentation](reference/README.md) to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md).
|
||||
QMK has lots of [features](features.md) to explore, and a good deal of [reference documentation](http://docs.qmk.fm) to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md).
|
||||
|
101
docs/_summary.md
101
docs/_summary.md
@@ -1,45 +1,80 @@
|
||||
* [Getting started](README.md)
|
||||
* [QMK Overview](qmk_overview.md)
|
||||
* [Build Environment Setup](build_environment_setup.md)
|
||||
* [Vagrant Guide](vagrant_guide.md)
|
||||
* [Make instructions](make_instructions.md)
|
||||
* [FAQ: Creating a Keymap](faq_keymap.md)
|
||||
* [FAQ: Compiling QMK](faq_build.md)
|
||||
* [How to Github](how_to_github.md)
|
||||
* [Getting Started](README.md)
|
||||
* [QMK Introduction](getting_started_introduction.md)
|
||||
* [Install Build Tools](getting_started_build_tools.md)
|
||||
* Alternative: [Vagrant Guide](getting_started_vagrant.md)
|
||||
* [Build/Compile Instructions](getting_started_make_guide.md)
|
||||
* [Flashing Instructions](flashing.md)
|
||||
* [Contributing to QMK](contributing.md)
|
||||
* [How to Use Github](getting_started_github.md)
|
||||
|
||||
* [Features](features/README.md)
|
||||
* [Layer switching](key_functions.md)
|
||||
* [Leader Key](leader_key.md)
|
||||
* [Macros](macros.md)
|
||||
* [Dynamic Macros](dynamic_macros.md)
|
||||
* [Space Cadet](space_cadet_shift.md)
|
||||
* [Tap Dance](tap_dance.md)
|
||||
* [Mouse keys](mouse_keys.md)
|
||||
* [Unicode](unicode.md)
|
||||
* [FAQ](faq.md)
|
||||
* [General FAQ](faq_general.md)
|
||||
* [Build/Compile QMK](faq_build.md)
|
||||
* [Debugging/Troubleshooting QMK](faq_debug.md)
|
||||
* [Keymap](faq_keymap.md)
|
||||
|
||||
* [Hardware](hardware.md)
|
||||
* [Keyboard Guidelines](hardware_keyboard_guidelines.md)
|
||||
* [AVR Processors](hardware_avr.md)
|
||||
* ARM Processors (TBD)
|
||||
* [Drivers](hardware_drivers.md)
|
||||
|
||||
* [Features](features.md)
|
||||
* [Advanced Keycodes](feature_advanced_keycodes.md)
|
||||
* [Audio](feature_audio.md)
|
||||
* [Auto Shift](feature_auto_shift.md)
|
||||
* [Backlight](feature_backlight.md)
|
||||
* [Bootmagic](feature_bootmagic.md)
|
||||
* [Dynamic Macros](feature_dynamic_macros.md)
|
||||
* [Grave Escape](feature_grave_esc.md)
|
||||
* [Key Lock](feature_key_lock.md)
|
||||
* [Layouts](feature_layouts.md)
|
||||
* [Leader Key](feature_leader_key.md)
|
||||
* [Macros](feature_macros.md)
|
||||
* [Mouse Keys](feature_mouse_keys.md)
|
||||
* [Pointing Device](feature_pointing_device.md)
|
||||
* [PS/2 Mouse](feature_ps2_mouse.md)
|
||||
* [RGB Lighting](feature_rgblight.md)
|
||||
* [Space Cadet](feature_space_cadet.md)
|
||||
* [Stenography](feature_stenography.md)
|
||||
* [Tap Dance](feature_tap_dance.md)
|
||||
* [Terminal](feature_terminal.md)
|
||||
* [Thermal Printer](feature_thermal_printer.md)
|
||||
* [Unicode](feature_unicode.md)
|
||||
* [Userspace](feature_userspace.md)
|
||||
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Backlight](feature_backlight.md#backlight-keycodes)
|
||||
* [Basic](keycodes_basic.md)
|
||||
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
|
||||
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
|
||||
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
||||
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys)
|
||||
* [Mod Tap](feature_advanced_keycodes.md#mod-tap)
|
||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||
* [Quantum](quantum_keycodes.md)
|
||||
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
||||
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes)
|
||||
* [Stenography](feature_stenography.md#keycode-reference)
|
||||
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
|
||||
* Reference
|
||||
* [Glossary](glossary.md)
|
||||
* [Keymap overview](keymap.md)
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Basic Keycodes](basic_keycodes.md)
|
||||
* [Quantum Keycodes](quantum_keycodes.md)
|
||||
* [The `config.h` File](config_options.md)
|
||||
* [Config Options](config_options.md)
|
||||
* [Customizing Functionality](custom_quantum_functions.md)
|
||||
* [Documentation Best Practices](documentation_best_practices.md)
|
||||
* [Documentation Templates](documentation_templates.md)
|
||||
* [Glossary](glossary.md)
|
||||
* [Keymap Overview](keymap.md)
|
||||
* [Unit Testing](unit_testing.md)
|
||||
|
||||
|
||||
* For Makers and Modders
|
||||
* [Adding a keyboard to QMK](adding_a_keyboard_to_qmk.md)
|
||||
* [Adding features to QMK](adding_features_to_qmk.md)
|
||||
* [Hand Wiring Guide](hand_wiring.md)
|
||||
* [ISP flashing guide](isp_flashing_guide.md)
|
||||
* [Modding your keyboard](modding_your_keyboard.md)
|
||||
* [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md)
|
||||
* [Hand Wiring Guide](hand_wire.md)
|
||||
* [ISP Flashing Guide](isp_flashing_guide.md)
|
||||
|
||||
* For a Deeper Understanding
|
||||
* [How Keyboards Work](basic_how_keyboards_work.md)
|
||||
* [How Keyboards Work](how_keyboards_work.md)
|
||||
* [Understanding QMK](understanding_qmk.md)
|
||||
|
||||
|
||||
* Other Topics
|
||||
* [General FAQ](faq.md)
|
||||
* [Using Eclipse with QMK](eclipse.md)
|
||||
|
@@ -1,35 +0,0 @@
|
||||
# Adding your keyboard to QMK
|
||||
|
||||
We welcome all keyboard projects into QMK, but ask that you try to stick to a couple guidelines that help us keep things organised and consistent.
|
||||
|
||||
## Naming your directory/project
|
||||
|
||||
All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Dashes (`-`) aren't allow by our build system, and will confuse it with keymaps/subprojects. Your directory and your `.h` and `.c` files should have exactly the same name. Subprojects/revision should follow the same format.
|
||||
|
||||
## `readme.md`
|
||||
|
||||
All projects need to have a `readme.md` file that explains what the keyboard is, who made it, where it is available, and links to move information (template coming).
|
||||
|
||||
## Image/Hardware files
|
||||
|
||||
In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (imgur) and linking them in the readme.md is the preferred method.
|
||||
|
||||
Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be store, and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `/<keyboard>/` (name follows the same format as above) which are served at `http://qmk.fm/<keyboard>/`, and pages are generated from `/_pages/<keyboard>/` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example.
|
||||
|
||||
## Non-production/handwired projects
|
||||
|
||||
We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder!
|
||||
|
||||
## Warnings as errors
|
||||
|
||||
When developing your keyboard, keep in mind that all warnings will be treated as errors - these small warnings can build-up and cause larger errors down the road (and keeping them is generally a bad practice).
|
||||
|
||||
## Licenses
|
||||
|
||||
If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, it this format:
|
||||
|
||||
Copyright 2017 Your Name <your@email.com>
|
||||
|
||||
## Technical details
|
||||
|
||||
If you're looking for more information on making your keyboard work with QMK, [check out this guide](porting_your_keyboard_to_qmk.md)!
|
@@ -1,16 +0,0 @@
|
||||
# How To Add Features To QMK
|
||||
|
||||
If you have an idea for a custom feature or extra hardware connection, we'd love to accept it into QMK!
|
||||
|
||||
Before you put a lot of work into building your new feature you should make sure you are implementing it in the best way. You can get a basic understanding of QMK by reading [Understaning QMK](understanding_qmk.html), which will take you on a tour of the QMK program flow. From here you should talk to us to get a sense of the best way to implement your idea. There are two main ways to do this:
|
||||
|
||||
* [Chat on Gitter](https://gitter.im/qmk/qmk_firmware)
|
||||
* [Open an Issue](https://github.com/qmk/qmk_firmware/issues/new)
|
||||
|
||||
Once you have implemented your new feature you will generally submit a [pull request](https://github.com/qmk/qmk_firmware/pulls). Here are some things to keep in mind when creating one:
|
||||
|
||||
* **Disabled by default** - memory is a pretty limited on most chips QMK supports, and it's important that current keymaps aren't broken, so please allow your feature to be turned **on**, rather than being turned off. If you think it should be on by default, or reduces the size of the code, please talk with us about it.
|
||||
* **Compile locally before submitting** - hopefully this one is obvious, but things need to compile! Our Travis system will catch any issues, but it's generally faster for you to compile a few keyboards locally instead of waiting for the results to come back.
|
||||
* **Consider subprojects and different chip-bases** - there are several keyboards that have subprojects that have allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled in one that doesn't work.
|
||||
* **Explain your feature** - Document it in `docs/`, either as a new file or as part of an existing file. If you don't document it other people won't be able to benefit from your hard work.
|
||||
* **Don't refactor code** - to maintain a clear vision of how things are laid out in QMK, we try to plan out refactors in-depth, and have a collaborator make the changes. If you have an idea for refactoring, or suggestions, [open an issue](https://github.com/qmk/qmk_firmware/issues).
|
@@ -1,186 +0,0 @@
|
||||
# Basic keycodes
|
||||
|
||||
## Letters and Numbers
|
||||
|
||||
|KC_1|KC_2|KC_3|KC_4|KC_5|KC_6|KC_7|KC_8|
|
||||
|----|----|----|----|----|----|----|----|
|
||||
|KC_9|KC_0|KC_F1|KC_F2|KC_F3|KC_F4|KC_F5|KC_F6|
|
||||
|KC_F7|KC_F8|KC_F9|KC_F10|KC_F11|KC_F12|KC_F13|KC_F14|
|
||||
|KC_F15|KC_F16|KC_F17|KC_F18|KC_F19|KC_F20|KC_F21|KC_F22|
|
||||
|KC_F23|KC_F24|KC_A|KC_B|KC_C|KC_D|KC_E|KC_F|
|
||||
|KC_G|KC_H|KC_I|KC_J|KC_K|KC_L|KC_M|KC_N|
|
||||
|KC_O|KC_P|KC_Q|KC_R|KC_S|KC_T|KC_U|KC_V|
|
||||
|KC_W|KC_X|KC_Y|KC_Z|||||
|
||||
|
||||
## Punctuation
|
||||
|
||||
|Long Name|Short Name|Description|
|
||||
|---------|----------|-----------|
|
||||
|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|`-` and `_`|
|
||||
|KC_EQUAL|KC_EQL|`=` and `+`|
|
||||
|KC_LBRACKET|KC_LBRC|`[` and `{`|
|
||||
|KC_RBRACKET|KC_RBRC|`]` and `}`|
|
||||
|KC_BSLASH|KC_BSLS|`\` and <code>|</code> |
|
||||
|KC_NONUS_HASH|KC_NUHS|Non-US `#` and `~`|
|
||||
|KC_NONUS_BSLASH|KC_NUBS|Non-US `\` and <code>|</code> |
|
||||
|KC_INT1|KC_RO|JIS `\` and <code>|</code> |
|
||||
|KC_INT2|KC_KANA|International216|
|
||||
|KC_INT3|KC_JYEN|Yen Symbol (`¥`)|
|
||||
|KC_SCOLON|KC_SCLN|`;` and `:`|
|
||||
|KC_QUOTE|KC_QUOT|`‘` and `“`|
|
||||
|KC_GRAVE|KC_GRV|Grave Accent and Tilde|
|
||||
|KC_COMMA|KC_COMM|`,` and `<`|
|
||||
|KC_DOT||`.` and `>`|
|
||||
|KC_SLASH|KC_SLSH|`/` and `?`|
|
||||
|KC_CAPSLOCK|KC_CAPS|Caps Lock|
|
||||
|
||||
## Modifiers
|
||||
|
||||
|Long Name|Short Name|Description|
|
||||
|---------|----------|-----------|
|
||||
|KC_LCTRL|KC_LCTL|LeftControl|
|
||||
|KC_LSHIFT|KC_LSFT|LeftShift|
|
||||
|KC_LALT||LeftAlt|
|
||||
|KC_LGUI||Left GUI(Windows/Apple/Meta key)|
|
||||
|KC_RCTRL|KC_RCTL|RightControl|
|
||||
|KC_RSHIFT|KC_RSFT|RightShift|
|
||||
|KC_RALT||RightAlt|
|
||||
|KC_RGUI||Right GUI(Windows/Apple/Meta key)|
|
||||
|KC_LOCKING_CAPS||Locking Caps Lock|
|
||||
|KC_LOCKING_NUM||Locking Num Lock|
|
||||
|KC_LOCKING_SCROLL||Locking Scroll Lock|
|
||||
|KC_INT4|KC_HENK|JIS Henken|
|
||||
|KC_INT5|KC_MHEN|JIS Muhenken|
|
||||
|
||||
## Commands
|
||||
|
||||
|Long Name|Short Name|Description|
|
||||
|---------|----------|-----------|
|
||||
|KC_PSCREEN|KC_PSCR|PrintScreen|
|
||||
|KC_SCROLLLOCK|KC_SLCK|Scroll Lock|
|
||||
|KC_PAUSE|KC_PAUS|Pause|
|
||||
|KC_INSERT|KC_INS|Insert|
|
||||
|KC_HOME||Home|
|
||||
|KC_PGUP||PageUp|
|
||||
|KC_DELETE|KC_DEL|Delete Forward|
|
||||
|KC_END||End|
|
||||
|KC_PGDOWN|KC_PGDN|PageDown|
|
||||
|KC_RIGHT|KC_RGHT|RightArrow|
|
||||
|KC_LEFT||LeftArrow|
|
||||
|KC_DOWN||DownArrow|
|
||||
|KC_UP||UpArrow|
|
||||
|KC_APPLICATION|KC_APP|Application|
|
||||
|KC_POWER||Power|
|
||||
|KC_EXECUTE||Execute|
|
||||
|KC_HELP||Help|
|
||||
|KC_MENU||Menu|
|
||||
|KC_SELECT||Select|
|
||||
|KC_AGAIN||Again|
|
||||
|KC_UNDO||Undo|
|
||||
|KC_CUT||Cut|
|
||||
|KC_COPY||Copy|
|
||||
|KC_PASTE||Paste|
|
||||
|KC_FIND||Find|
|
||||
|KC_ALT_ERASE||Alternate Erase|
|
||||
|KC_SYSREQ||SysReq/Attention|
|
||||
|KC_CANCEL||Cancel|
|
||||
|KC_CLEAR||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_SYSTEM_POWER|KC_PWR|System Power Down|
|
||||
|KC_SYSTEM_SLEEP|KC_SLEP|System Sleep|
|
||||
|KC_SYSTEM_WAKE|KC_WAKE|System Wake|
|
||||
|KC_MAIL|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||
|
||||
|
||||
## Media Keys
|
||||
|
||||
Windows and Mac use different key codes for next track and previous track. Make sure you choose the keycode that corresponds to your OS.
|
||||
|
||||
|Long Name|Short Name|Description|
|
||||
|---------|----------|-----------|
|
||||
|KC_STOP||Stop|
|
||||
|KC__MUTE||Mute|
|
||||
|KC__VOLUP||Volume Up|
|
||||
|KC__VOLDOWN||Volume Down|
|
||||
|KC_AUDIO_MUTE|KC_MUTE||
|
||||
|KC_AUDIO_VOL_UP|KC_VOLU||
|
||||
|KC_AUDIO_VOL_DOWN|KC_VOLD||
|
||||
|KC_MEDIA_NEXT_TRACK|KC_MNXT|Next Track (Windows)|
|
||||
|KC_MEDIA_PREV_TRACK|KC_MPRV|Previous Track (Windows)|
|
||||
|KC_MEDIA_FAST_FORWARD|KC_MFFD|Next Track (macOS)|
|
||||
|KC_MEDIA_REWIND|KC_MRWD|Previous Track (macOS)|
|
||||
|KC_MEDIA_STOP|KC_MSTP||
|
||||
|KC_MEDIA_PLAY_PAUSE|KC_MPLY||
|
||||
|KC_MEDIA_SELECT|KC_MSEL||
|
||||
|
||||
## Numpad
|
||||
|
||||
|Long Name|Short Name|Description|
|
||||
|---------|----------|-----------|
|
||||
|KC_NUMLOCK|KC_NLCK|Keypad Num Lock and Clear|
|
||||
|KC_KP_SLASH|KC_PSLS|Keypad /|
|
||||
|KC_KP_ASTERISK|KC_PAST|Keypad *|
|
||||
|KC_KP_MINUS|KC_PMNS|Keypad -|
|
||||
|KC_KP_PLUS|KC_PPLS|Keypad +|
|
||||
|KC_KP_ENTER|KC_PENT|Keypad ENTER|
|
||||
|KC_KP_1|KC_P1|Keypad 1 and End|
|
||||
|KC_KP_2|KC_P2|Keypad 2 and Down Arrow|
|
||||
|KC_KP_3|KC_P3|Keypad 3 and PageDn|
|
||||
|KC_KP_4|KC_P4|Keypad 4 and Left Arrow|
|
||||
|KC_KP_5|KC_P5|Keypad 5|
|
||||
|KC_KP_6|KC_P6|Keypad 6 and Right Arrow|
|
||||
|KC_KP_7|KC_P7|Keypad 7 and Home|
|
||||
|KC_KP_8|KC_P8|Keypad 8 and Up Arrow|
|
||||
|KC_KP_9|KC_P9|Keypad 9 and PageUp|
|
||||
|KC_KP_0|KC_P0|Keypad 0 and Insert|
|
||||
|KC_KP_DOT|KC_PDOT|Keypad . and Delete|
|
||||
|KC_KP_EQUAL|KC_PEQL|Keypad =|
|
||||
|KC_KP_COMMA|KC_PCMM|Keypad Comma|
|
||||
|KC_KP_EQUAL_AS400||Keypad Equal Sign|
|
||||
|
||||
## Special Keys
|
||||
|
||||
|Long Name|Short Name|Description|
|
||||
|---------|----------|-----------|
|
||||
|KC_NO||Ignore this key. (NOOP) |
|
||||
|
||||
## Mousekey
|
||||
|
||||
|Long Name|Short Name|Description|
|
||||
|---------|----------|-----------|
|
||||
|KC_MS_UP|KC_MS_U|Mouse Cursor Up|
|
||||
|KC_MS_DOWN|KC_MS_D|Mouse Cursor Down|
|
||||
|KC_MS_LEFT|KC_MS_L|Mouse Cursor Left|
|
||||
|KC_MS_RIGHT|KC_MS_R|Mouse Cursor Right|
|
||||
|KC_MS_BTN1|KC_BTN1|Mouse Button 1|
|
||||
|KC_MS_BTN2|KC_BTN2|Mouse Button 2|
|
||||
|KC_MS_BTN3|KC_BTN3|Mouse Button 3|
|
||||
|KC_MS_BTN4|KC_BTN4|Mouse Button 4|
|
||||
|KC_MS_BTN5|KC_BTN5|Mouse Button 5|
|
||||
|KC_MS_WH_UP|KC_WH_U|Mouse Wheel Up|
|
||||
|KC_MS_WH_DOWN|KC_WH_D|Mouse Wheel Down|
|
||||
|KC_MS_WH_LEFT|KC_WH_L|Mouse Wheel Left|
|
||||
|KC_MS_WH_RIGHT|KC_WH_R|Mouse Wheel Right|
|
||||
|KC_MS_ACCEL0|KC_ACL0|Mouse Acceleration 0|
|
||||
|KC_MS_ACCEL1|KC_ACL1|Mouse Acceleration 1|
|
||||
|KC_MS_ACCEL2|KC_ACL2|Mouse Acceleration 2|
|
@@ -4,4 +4,4 @@ A QMK collaborator is a keyboard maker/designer that is interested in helping QM
|
||||
* **Maintain the your keyboard's directory** - this may just require an initial setup to get your keyboard working, but it could also include accommodating changes made to QMK's core.
|
||||
* **Approve and merge your keyboard's keymap pull requests** - we like to encourage users to contribute their keymaps for others to see and work from when creating their own.
|
||||
|
||||
If you feel you meet these requirements, shoot us an email at hello@qmk.fm with an introduction and some links to your keyboard!
|
||||
If you feel you meet these requirements, shoot us an email at hello@qmk.fm with an introduction and some links to your keyboard!
|
||||
|
@@ -22,4 +22,4 @@ You can also use any ARM processor that [ChibiOS](http://www.chibios.org) suppor
|
||||
* [Kinetis MKL26Z64](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/l-series-ultra-low-power-m0-plus/kinetis-kl2x-48-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x)
|
||||
* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf)
|
||||
* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf)
|
||||
* [Kinetis MK20DX256](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/k-series-performance-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72)
|
||||
* [Kinetis MK20DX256](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/k-series-performance-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72)
|
||||
|
@@ -1,133 +1,221 @@
|
||||
# The `config.h` file
|
||||
# Configuring QMK
|
||||
|
||||
This is a c header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere (namely keymaps). This file can exist at a couple different levels:
|
||||
QMK is nearly infinitely configurable. Wherever possible we err on the side of allowing users to customize their keyboard, even at the expense of code size. That level of flexibility makes for a daunting configuration experience, however.
|
||||
|
||||
There are two main types of configuration files in QMK- `config.h` and `rules.mk`. These files exist at various levels in QMK and all files of the same type are combined to build the final configuration. The levels, from lowest priority to highest priority, are:
|
||||
|
||||
* QMK Default
|
||||
* Keyboard
|
||||
* Folders (Up to 5 levels deep)
|
||||
* Keymap
|
||||
|
||||
## QMK Default
|
||||
|
||||
Every available setting in QMK has a default. If that setting is not set at the Keyboard, Folder, or Keymap level this is the setting that will be used.
|
||||
|
||||
## Keyboard
|
||||
|
||||
```c
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
This level contains config options that should apply to the whole keyboard. Some settings won't change in revisions, or most keymaps. Other settings are merely defaults for this keyboard and can be overridden by folders and/or keymaps.
|
||||
|
||||
#include "config_common.h"
|
||||
## Folders
|
||||
|
||||
// config options
|
||||
|
||||
#ifdef SUBPROJECT_<subproject>
|
||||
#include "<subproject>/config.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
```
|
||||
|
||||
This file contains config options that should apply to the whole keyboard, and won't change in subprojects, or most keymaps. The suproject block here only applies to keyboards with subprojects.
|
||||
|
||||
## Subproject
|
||||
|
||||
```c
|
||||
#ifndef <subproject>_CONFIG_H
|
||||
#define <subproject>_CONFIG_H
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
// config options
|
||||
|
||||
#endif
|
||||
```
|
||||
|
||||
For keyboards that have subprojects, this file contains config options that should apply to only that subproject, and won't change in most keymaps.
|
||||
Some keyboards have folders and sub-folders to allow for different hardware configurations. Most keyboards only go 1 folder deep, but QMK supports structures up to 5 folders deep. Each folder can have its own `config.h` and `rules.mk` files that are incorporated into the final configuration.
|
||||
|
||||
## Keymap
|
||||
|
||||
```c
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
This level contains all of the options for that particular keymap. If you wish to override a previous declaration, you can use `#undef <variable>` to undefine it, where you can then redefine it without an error.
|
||||
|
||||
#include "../../config.h"
|
||||
# The `config.h` File
|
||||
|
||||
// config options
|
||||
This is a C header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere. The `config.h` file shouldn't be including other `config.h` files, or anything besides this:
|
||||
|
||||
#endif
|
||||
```
|
||||
#include "config_common.h"
|
||||
|
||||
This file contains all of the options for that particular keymap. If you wish to override a previous declaration, you can use `#undef <variable>` to undefine it, where you can then redefine it without an error.
|
||||
## `config.h` Options
|
||||
|
||||
# Config Options
|
||||
### Hardware Options
|
||||
* `#define VENDOR_ID 0x1234`
|
||||
* defines your VID, and for most DIY projects, can be whatever you want
|
||||
* `#define PRODUCT_ID 0x5678`
|
||||
* defines your PID, and for most DIY projects, can be whatever you want
|
||||
* `#define DEVICE_VER 0`
|
||||
* defines the device version (often used for revisions)
|
||||
* `#define MANUFACTURER Me`
|
||||
* generally who/whatever brand produced the board
|
||||
* `#define PRODUCT Board`
|
||||
* the name of the keyboard
|
||||
* `#define DESCRIPTION a keyboard`
|
||||
* a short description of what the keyboard is
|
||||
* `#define MATRIX_ROWS 5`
|
||||
* the number of rows in your keyboard's matrix
|
||||
* `#define MATRIX_COLS 15`
|
||||
* the number of columns in your keyboard's matrix
|
||||
* `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }`
|
||||
* pins of the rows, from top to bottom
|
||||
* `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }`
|
||||
* pins of the columns, from left to right
|
||||
* `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }`
|
||||
* pins unused by the keyboard for reference
|
||||
* `#define MATRIX_HAS_GHOST`
|
||||
* define is matrix has ghost (unlikely)
|
||||
* `#define DIODE_DIRECTION COL2ROW`
|
||||
* COL2ROW or ROW2COL - how your matrix is configured. COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows.
|
||||
* `#define AUDIO_VOICES`
|
||||
* turns on the alternate audio voices (to cycle through)
|
||||
* `#define C6_AUDIO`
|
||||
* enables audio on pin C6
|
||||
* `#define B5_AUDIO`
|
||||
* enables audio on pin B5 (duophony is enable if both are enabled)
|
||||
* `#define BACKLIGHT_PIN B7`
|
||||
* pin of the backlight - B5, B6, B7 use PWM, others use softPWM
|
||||
* `#define BACKLIGHT_LEVELS 3`
|
||||
* number of levels your backlight will have (maximum 15 excluding off)
|
||||
* `#define BACKLIGHT_BREATHING`
|
||||
* enables backlight breathing (only works with backlight pins B5, B6 and B7)
|
||||
* `#define BREATHING_PERIOD 6`
|
||||
* the length of one backlight "breath" in seconds
|
||||
* `#define DEBOUNCING_DELAY 5`
|
||||
* the delay when reading the value of the pin (5 is default)
|
||||
* `#define LOCKING_SUPPORT_ENABLE`
|
||||
* mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
|
||||
* `#define LOCKING_RESYNC_ENABLE`
|
||||
* tries to keep switch state consistent with keyboard LED state
|
||||
* `#define IS_COMMAND() ( keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) )`
|
||||
* key combination that allows the use of magic commands (useful for debugging)
|
||||
|
||||
```c
|
||||
#define VENDOR_ID 0x1234 // defines your VID, and for most DIY projects, can be whatever you want
|
||||
#define PRODUCT_ID 0x5678 // defines your PID, and for most DIY projects, can be whatever you want
|
||||
#define DEVICE_VER 0 // defines the device version (often used for revisions)
|
||||
### Features That Can Be Disabled
|
||||
|
||||
#define MANUFACTURER Me // generally who/whatever brand produced the board
|
||||
#define PRODUCT Board // the name of the keyboard
|
||||
#define DESCRIPTION a keyboard // a short description of what the keyboard is
|
||||
If you define these options you will disable the associated feature, which can save on code size.
|
||||
|
||||
#define MATRIX_ROWS 5 // the number of rows in your keyboard's matrix
|
||||
#define MATRIX_COLS 15 // the number of columns in your keyboard's matrix
|
||||
* `#define NO_DEBUG`
|
||||
* disable debugging
|
||||
* `#define NO_PRINT`
|
||||
* disable printing/debugging using hid_listen
|
||||
* `#define NO_ACTION_LAYER`
|
||||
* disable layers
|
||||
* `#define NO_ACTION_TAPPING`
|
||||
* disable tap dance and other tapping features
|
||||
* `#define NO_ACTION_ONESHOT`
|
||||
* disable one-shot modifiers
|
||||
* `#define NO_ACTION_MACRO`
|
||||
* disable all macro handling
|
||||
* `#define NO_ACTION_FUNCTION`
|
||||
* disable the action function (deprecated)
|
||||
|
||||
#define MATRIX_ROW_PINS { D0, D5, B5, B6 } // pins of the rows, from top to bottom
|
||||
#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } // pins of the columns, from left to right
|
||||
#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 } // pins unused by the keyboard for reference
|
||||
#define MATRIX_HAS_GHOST // define is matrix has ghost (unlikely)
|
||||
#define DIODE_DIRECTION COL2ROW // COL2ROW or ROW2COL - how your matrix is configured
|
||||
// COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows
|
||||
### Features That Can Be Enabled
|
||||
|
||||
#define AUDIO_VOICES // turns on the alternate audio voices (to cycle through)
|
||||
#define C6_AUDIO // enables audio on pin C6
|
||||
#define B5_AUDIO // enables audio on pin B5 (duophony is enable if both are enabled)
|
||||
If you define these options you will enable the associated feature, which may increase your code size.
|
||||
|
||||
#define BACKLIGHT_PIN B7 // pin of the backlight - B5, B6, B7 use PWM, others use softPWM
|
||||
#define BACKLIGHT_LEVELS 3 // number of levels your backlight will have (not including off)
|
||||
* `#define FORCE_NKRO`
|
||||
* NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots.
|
||||
* `#define PREVENT_STUCK_MODIFIERS`
|
||||
* when switching layers, this will release all mods
|
||||
|
||||
#define DEBOUNCING_DELAY 5 // the delay when reading the value of the pin (5 is default)
|
||||
### Behaviors That Can Be Configured
|
||||
|
||||
#define LOCKING_SUPPORT_ENABLE // mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
|
||||
#define LOCKING_RESYNC_ENABLE // tries to keep switch state consistent with keyboard LED state
|
||||
* `#define TAPPING_TERM 200`
|
||||
* how long before a tap becomes a hold
|
||||
* `#define RETRO_TAPPING`
|
||||
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
|
||||
* `#define TAPPING_TOGGLE 2`
|
||||
* how many taps before triggering the toggle
|
||||
* `#define PERMISSIVE_HOLD`
|
||||
* makes tap and hold keys work better for fast typers who don't want tapping term set above 500
|
||||
* `#define LEADER_TIMEOUT 300`
|
||||
* how long before the leader key times out
|
||||
* `#define ONESHOT_TIMEOUT 300`
|
||||
* how long before oneshot times out
|
||||
* `#define ONESHOT_TAP_TOGGLE 2`
|
||||
* how many taps before oneshot toggle is triggered
|
||||
* `#define IGNORE_MOD_TAP_INTERRUPT`
|
||||
* makes it possible to do rolling combos (zx) with keys that convert to other keys on hold
|
||||
* `#define QMK_KEYS_PER_SCAN 4`
|
||||
* Allows sending more than one key per scan. By default, only one key event gets
|
||||
sent via `process_record()` per scan. This has little impact on most typing, but
|
||||
if you're doing a lot of chords, or your scan rate is slow to begin with, you can
|
||||
have some delay in processing key events. Each press and release is a separate
|
||||
event. For a keyboard with 1ms or so scan times, even a very fast typist isn't
|
||||
going to produce the 500 keystrokes a second needed to actually get more than a
|
||||
few ms of delay from this. But if you're doing chording on something with 3-4ms
|
||||
scan times? You probably want this.
|
||||
|
||||
#define IS_COMMAND() ( \ // key combination that allows the use of magic commands (useful for debugging)
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
### RGB Light Configuration
|
||||
|
||||
// the following options can save on file size at the expense of that feature
|
||||
#define NO_DEBUG // disable debuging (saves on file size)
|
||||
#define NO_PRINT // disable printing (saves of file size)
|
||||
#define NO_ACTION_LAYER // no layers
|
||||
#define NO_ACTION_TAPPING // no tapping for layers/mods
|
||||
#define NO_ACTION_ONESHOT // no oneshot for layers/mods
|
||||
#define NO_ACTION_MACRO // no macros
|
||||
#define NO_ACTION_FUNCTION // no functions
|
||||
* `#define RGB_DI_PIN D7`
|
||||
* pin the DI on the ws2812 is hooked-up to
|
||||
* `#define RGBLIGHT_ANIMATIONS`
|
||||
* run RGB animations
|
||||
* `#define RGBLED_NUM 15`
|
||||
* number of LEDs
|
||||
* `#define RGBLIGHT_HUE_STEP 12`
|
||||
* units to step when in/decreasing hue
|
||||
* `#define RGBLIGHT_SAT_STEP 25`
|
||||
* units to step when in/decreasing saturation
|
||||
* `#define RGBLIGHT_VAL_STEP 12`
|
||||
* units to step when in/decreasing value (brightness)
|
||||
* `#define RGBW_BB_TWI`
|
||||
* bit-bangs TWI to EZ RGBW LEDs (only required for Ergodox EZ)
|
||||
|
||||
#define FORCE_NKRO // NKRO by default requires to be turned on, this forces it to be on always
|
||||
### Mouse Key Options
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS // when switching layers, this will release all mods
|
||||
* `#define MOUSEKEY_INTERVAL 20`
|
||||
* `#define MOUSEKEY_DELAY 0`
|
||||
* `#define MOUSEKEY_TIME_TO_MAX 60`
|
||||
* `#define MOUSEKEY_MAX_SPEED 7`
|
||||
* `#define MOUSEKEY_WHEEL_DELAY 0`
|
||||
|
||||
#define TAPPING_TERM 200 // how long before a tap becomes a hold
|
||||
#define TAPPING_TOGGLE 2 // how many taps before triggering the toggle
|
||||
# The `rules.mk` File
|
||||
|
||||
#define PERMISSIVE_HOLD // makes tap and hold keys work better for fast typers who don't want tapping term set above 500
|
||||
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.
|
||||
|
||||
#define LEADER_TIMEOUT 300 // how long before the leader key times out
|
||||
## `rules.mk` Options
|
||||
|
||||
#define ONESHOT_TIMEOUT 300 // how long before oneshot times out
|
||||
#define ONESHOT_TAP_TOGGLE 2 // how many taps before oneshot toggle is triggered
|
||||
### Build Options
|
||||
|
||||
#define IGNORE_MOD_TAP_INTERRUPT // makes it possible to do rolling combos (zx) with keys that convert to other keys on hold
|
||||
* `DEFAULT_FOLDER`
|
||||
* Used to specify a default folder when a keyboard has more than one sub-folder.
|
||||
* `SRC`
|
||||
* Used to add files to the compilation/linking list.
|
||||
* `LAYOUTS`
|
||||
* A list of [layouts](feature_layouts.md) this keyboard supports.
|
||||
|
||||
// ws2812 options
|
||||
#define RGB_DI_PIN D7 // pin the DI on the ws2812 is hooked-up to
|
||||
#define RGBLIGHT_ANIMATIONS // run RGB animations
|
||||
#define RGBLED_NUM 15 // number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue
|
||||
#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation
|
||||
#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness)
|
||||
### AVR MCU Options
|
||||
* `MCU = atmega32u4`
|
||||
* `F_CPU = 16000000`
|
||||
* `ARCH = AVR8`
|
||||
* `F_USB = $(F_CPU)`
|
||||
* `OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT`
|
||||
* `BOOTLOADER = atmel-dfu` with the following options:
|
||||
* `atmel-dfu`
|
||||
* `lufa-dfu`
|
||||
* `qmk-dfu`
|
||||
* `halfkay`
|
||||
* `caterina`
|
||||
* `bootloadHID`
|
||||
|
||||
#define RGBW_BB_TWI // bit-bangs twi to EZ RGBW LEDs (only required for Ergodox EZ)
|
||||
### Feature Options
|
||||
|
||||
// mousekey options (self-describing)
|
||||
#define MOUSEKEY_INTERVAL 20
|
||||
#define MOUSEKEY_DELAY 0
|
||||
#define MOUSEKEY_TIME_TO_MAX 60
|
||||
#define MOUSEKEY_MAX_SPEED 7
|
||||
#define MOUSEKEY_WHEEL_DELAY 0
|
||||
Use these to enable or disable building certain features. The more you have enabled the bigger your firmware will be, and you run the risk of building a firmware too large for your MCU.
|
||||
|
||||
```
|
||||
* `BOOTMAGIC_ENABLE`
|
||||
* Virtual DIP switch configuration(+1000)
|
||||
* `MOUSEKEY_ENABLE`
|
||||
* Mouse keys(+4700)
|
||||
* `EXTRAKEY_ENABLE`
|
||||
* Audio control and System control(+450)
|
||||
* `CONSOLE_ENABLE`
|
||||
* Console for debug(+400)
|
||||
* `COMMAND_ENABLE`
|
||||
* Commands for debug and configuration
|
||||
* `NKRO_ENABLE`
|
||||
* USB N-Key Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
* `AUDIO_ENABLE`
|
||||
* Enable the audio subsystem.
|
||||
* `RGBLIGHT_ENABLE`
|
||||
* Enable keyboard underlight functionality
|
||||
* `MIDI_ENABLE`
|
||||
* MIDI controls
|
||||
* `UNICODE_ENABLE`
|
||||
* Unicode
|
||||
* `BLUETOOTH_ENABLE`
|
||||
* Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
152
docs/contributing.md
Normal file
152
docs/contributing.md
Normal file
@@ -0,0 +1,152 @@
|
||||
# How to Contribute
|
||||
|
||||
👍🎉 First off, thanks for taking the time to read this and contribute! 🎉👍
|
||||
|
||||
Third-party contributions help us grow and improve QMK. We want to make the pull request and contribution process useful and easy for both contributors and maintainers. To this end we've put together some guidelines for contributors to help your pull request be accepted without major changes.
|
||||
|
||||
* [Project Overview](#project-overview)
|
||||
* [Coding Conventions](#coding-conventions)
|
||||
* [General Guidelines](#general-guidelines)
|
||||
* [What does the Code of Conduct mean for me?](#what-does-the-code-of-conduct-mean-for-me)
|
||||
|
||||
## I Don't Want to Read This Whole Thing! I Just Have a Question!
|
||||
|
||||
If you'd like to ask questions about QMK you can do so on the [OLKB Subreddit](https://reddit.com/r/olkb) or on [Gitter](https://gitter.im/qmk/qmk_firmware).
|
||||
|
||||
Please keep these things in mind:
|
||||
|
||||
* It may take several hours for someone to respond to your question. Please be patient!
|
||||
* Everyone involved with QMK is donating their time and energy. We don't get paid to work on or answer questions about QMK.
|
||||
* Try to ask your question so it's as easy to answer as possible. If you're not sure how to do that these are some good guides:
|
||||
* https://opensource.com/life/16/10/how-ask-technical-questions
|
||||
* http://www.catb.org/esr/faqs/smart-questions.html
|
||||
|
||||
# Project Overview
|
||||
|
||||
QMK is largely written in C, with specific features and parts written in C++. It targets embedded processors found in keyboards, particularly AVR ([LUFA](http://www.fourwalledcubicle.com/LUFA.php)) and ARM ([ChibiOS](http://www.chibios.com)). If you are already well versed in Arduino programming you'll find a lot of the concepts and limitations familiar. Prior experience with Arduino is not required to successfully contribute to QMK.
|
||||
|
||||
<!-- FIXME: We should include a list of resources for learning C here. -->
|
||||
|
||||
# Where Can I Go for Help?
|
||||
|
||||
If you need help you can [open an issue](https://github.com/qmk/qmk_firmware/issues) or [chat on gitter](http://gitter.im/QMK/qmk_firmware).
|
||||
|
||||
# How Do I Make a Contribution?
|
||||
|
||||
Never made an open source contribution before? Wondering how contributions work in QMK? Here's a quick rundown!
|
||||
|
||||
0. Sign up for a [GitHub](https://github.com) account.
|
||||
1. Put together a keymap to contribute, [find an issue](https://github.com/qmk/qmk_firmware/issues) you are interested in addressing, or [a feature](https://github.com/qmk/qmk_firmware/issues?q=is%3Aopen+is%3Aissue+label%3Afeature) you would like to add.
|
||||
2. Fork the repository associated with the issue to your GitHub account. This means that you will have a copy of the repository under `your-GitHub-username/qmk_firmware`.
|
||||
3. Clone the repository to your local machine using `git clone https://github.com/github-username/repository-name.git`.
|
||||
4. If you're working on a new feature consider opening an issue to talk with us about the work you're about to undertake.
|
||||
5. Create a new branch for your fix using `git checkout -b branch-name-here`.
|
||||
6. Make the appropriate changes for the issue you are trying to address or the feature that you want to add.
|
||||
7. Use `git add insert-paths-of-changed-files-here` to add the file contents of the changed files to the "snapshot" git uses to manage the state of the project, also known as the index.
|
||||
8. Use `git commit -m "Insert a short message of the changes made here"` to store the contents of the index with a descriptive message.
|
||||
9. Push the changes to your repository on GitHub using `git push origin branch-name-here`.
|
||||
10. Submit a pull request to [QMK Firmware](https://github.com/qmk/qmk_firmware/pull/new/master).
|
||||
11. Title the pull request with a short description of the changes made and the issue or bug number associated with your change. For example, you can title an issue like so "Added more log outputting to resolve #4352".
|
||||
12. In the description of the pull request explain the changes that you made, any issues you think exist with the pull request you made, and any questions you have for the maintainer. It's OK if your pull request is not perfect (no pull request is), the reviewer will be able to help you fix any problems and improve it!
|
||||
13. Wait for the pull request to be reviewed by a maintainer.
|
||||
14. Make changes to the pull request if the reviewing maintainer recommends them.
|
||||
15. Celebrate your success after your pull request is merged!
|
||||
|
||||
# Coding Conventions
|
||||
|
||||
Most of our style is pretty easy to pick up on, but right now it's not entirely consistent. You should match the style of the code surrounding your change, but if that code is inconsistent or unclear use the following guidelines:
|
||||
|
||||
* We indent using two spaces (soft tabs)
|
||||
* We use One True Brace Style
|
||||
* Opening Brace: At the end of the same line as the statement that opens the block
|
||||
* Closing Brace: Lined up with the first character of the statement that opens the block
|
||||
* Else If: Place the closing brace at the beginning of the line and the next opening brace at the end of the same line.
|
||||
* Optional Braces: Always include optional braces.
|
||||
* Good: if (condition) { return false; }
|
||||
* Bad: if (condition) return false;
|
||||
* We use C style comments: `/* */`
|
||||
* Think of them as a story describing the feature
|
||||
* Use them liberally to explain why particular decisions were made.
|
||||
* Do not write obvious comments
|
||||
* If you not sure if a comment is obvious, go ahead and include it.
|
||||
* In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns.
|
||||
|
||||
# General Guidelines
|
||||
|
||||
We have a few different types of changes in QMK, each requiring a different level of rigor. We'd like you to keep the following guidelines in mind no matter what type of change you're making.
|
||||
|
||||
* Separate PR's into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature.
|
||||
* Check for unnecessary whitespace with `git diff --check` before committing.
|
||||
* Make sure your code change actually compiles.
|
||||
* Keymaps: Make sure that `make keyboard:your_new_keymap` does not return an error
|
||||
* Keyboards: Make sure that `make keyboard:all` does not return any errors
|
||||
* Core: Make sure that `make all` does not return any errors.
|
||||
* Make sure commit messages are understandable on their own. You should put a short description (no more than 70 characters) on the first line, the second line should be empty, and on the 3rd and later lines you should describe your commit in detail, if required. Example:
|
||||
|
||||
```
|
||||
Adjust the fronzlebop for the kerpleplork
|
||||
|
||||
The kerpleplork was intermittently failing with error code 23. The root cause was the fronzlebop setting, which causes the kerpleplork to activate every N iterations.
|
||||
|
||||
Limited experimentation on the devices I have available shows that 7 is high enough to avoid confusing the kerpleplork, but I'd like to get some feedback from people with ARM devices to be sure.
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation is one of the easiest ways to get started contributing to QMK. Finding places where the documentation is wrong or incomplete and fixing those is easy! We also very badly need someone to edit our documentation, so if you have editing skills but aren't sure where or how to jump in please [reach out for help](#where-can-i-go-for-help)!
|
||||
|
||||
You'll find all our documentation in the `qmk_firmware/docs` directory, or if you'd rather use a web based workflow you can click "Suggest An Edit" at the top of each page on http://docs.qmk.fm/.
|
||||
|
||||
## Keymaps
|
||||
|
||||
Most first-time QMK contributors start with their personal keymaps. We try to keep keymap standards pretty casual (keymaps, after all, reflect the personality of their creators) but we do ask that you follow these guidelines to make it easier for others to discover and learn from your keymap.
|
||||
|
||||
* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#).
|
||||
* All Keymap PR's are squashed, so if you care about how your commits are squashed you should do it yourself
|
||||
* Do not lump features in with keymap PR's. Submit the feature first and then a second PR for the keymap.
|
||||
* Do not include `Makefile`s in your keymap folder (they're no longer used)
|
||||
* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `)
|
||||
|
||||
## Keyboards
|
||||
|
||||
Keyboards are the raison d'être for QMK. Some keyboards are community maintained, while others are maintained by the people responsible for making a particular keyboard. The `readme.md` should tell you who maintains a particular keyboard. If you have questions relating to a particular keyboard you can [Open An Issue](https://github.com/qmk/qmk_firmware/issues) and tag the maintainer in your question.
|
||||
|
||||
We also ask that you follow these guidelines:
|
||||
|
||||
* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#).
|
||||
* Keep the number of commits reasonable or we will squash your PR
|
||||
* Do not lump core features in with new keyboards. Submit the feature first and then submit a separate PR for the keyboard.
|
||||
* Name `.c`/`.h` file after the immediate parent folder, eg `/keyboards/<kb1>/<kb2>/<kb2>.[ch]`
|
||||
* Do not include `Makefile`s in your keyboard folder (they're no longer used)
|
||||
* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `)
|
||||
|
||||
## Quantum/TMK Core
|
||||
|
||||
Before you put a lot of work into building your new feature you should make sure you are implementing it in the best way. You can get a basic understanding of QMK by reading [Understanding QMK](understanding_qmk.md), which will take you on a tour of the QMK program flow. From here you should talk to us to get a sense of the best way to implement your idea. There are two main ways to do this:
|
||||
|
||||
* [Chat on Gitter](https://gitter.im/qmk/qmk_firmware)
|
||||
* [Open an Issue](https://github.com/qmk/qmk_firmware/issues/new)
|
||||
|
||||
Feature and Bug Fix PR's affect all keyboards. We are also in the process of restructuring QMK. For this reason it is especially important for significant changes to be discussed before implementation has happened. If you open a PR without talking to us first please be prepared to do some significant rework if your choices do not mesh well with our planned direction.
|
||||
|
||||
Here are some things to keep in mind when working on your feature or bug fix.
|
||||
|
||||
* **Disabled by default** - memory is a pretty limited on most chips QMK supports, and it's important that current keymaps aren't broken, so please allow your feature to be turned **on**, rather than being turned off. If you think it should be on by default, or reduces the size of the code, please talk with us about it.
|
||||
* **Compile locally before submitting** - hopefully this one is obvious, but things need to compile! Our Travis system will catch any issues, but it's generally faster for you to compile a few keyboards locally instead of waiting for the results to come back.
|
||||
* **Consider revisions and different chip-bases** - there are several keyboards that have revisions that allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled on platforms it doesn't work on.
|
||||
* **Explain your feature** - Document it in `docs/`, either as a new file or as part of an existing file. If you don't document it other people won't be able to benefit from your hard work.
|
||||
|
||||
We also ask that you follow these guidelines:
|
||||
|
||||
* Keep the number of commits reasonable or we will squash your PR
|
||||
* Do not lump keyboards or keymaps in with core changes. Submit your core changes first.
|
||||
* Write [Unit Tests](http://docs.qmk.fm/unit_testing.html) for your feature
|
||||
* Follow the style of the file you are editing. If the style is unclear or there are mixed styles you should conform to the [coding conventions](#coding-conventions) above.
|
||||
|
||||
## Refactoring
|
||||
|
||||
To maintain a clear vision of how things are laid out in QMK we try to plan out refactors in-depth and have a collaborator make the changes. If you have an idea for refactoring, or suggestions, [open an issue](https://github.com/qmk/qmk_firmware/issues), we'd love to talk about how QMK can be improved.
|
||||
|
||||
# What Does the Code of Conduct Mean for Me?
|
||||
|
||||
Our [Code of Conduct](https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) means that you are responsible for treating everyone on the project with respect and courtesy regardless of their identity. If you are the victim of any inappropriate behavior or comments as described in our Code of Conduct, we are here for you and will do the best to ensure that the abuser is reprimanded appropriately, per our code.
|
@@ -1,8 +1,8 @@
|
||||
# How To Customize Your Keyboard's Behavior
|
||||
# How to Customize Your Keyboard's Behavior
|
||||
|
||||
For a lot of people a custom keyboard is about more than sending button presses to your computer. You want to be able to do things that are more complex than simple button presses and macros. QMK has hooks that allow you to inject code, override functionality, and otherwise customize how your keyboard behaves in different situations.
|
||||
For a lot of people a custom keyboard is about more than sending button presses to your computer. You want to be able to do things that are more complex than simple button presses and macros. QMK has hooks that allow you to inject code, override functionality, and otherwise customize how your keyboard behaves in different situations.
|
||||
|
||||
This page does not assume any special knowledge about QMK, but reading [Understanding QMK](understanding_qmk.html) will help you understand what is going on at a more fundamental level.
|
||||
This page does not assume any special knowledge about QMK, but reading [Understanding QMK](understanding_qmk.md) will help you understand what is going on at a more fundamental level.
|
||||
|
||||
## A Word on Core vs Keyboards vs Keymap
|
||||
|
||||
@@ -34,13 +34,13 @@ enum my_keycodes {
|
||||
};
|
||||
```
|
||||
|
||||
## Programming The Behavior Of Any Keycode
|
||||
## Programming the Behavior of Any Keycode
|
||||
|
||||
When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_record_kb()' and `process_record_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up you to send any key up or down events that are required.
|
||||
When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_record_kb()` and `process_record_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up to you to send any key up or down events that are required.
|
||||
|
||||
These function are called every time a key is pressed or released.
|
||||
|
||||
### Example `process_record_user()` implementation
|
||||
### Example `process_record_user()` Implementation
|
||||
|
||||
This example does two things. It defines the behavior for a custom keycode called `FOO`, and it supplements our Enter key by playing a tone whenever it is pressed.
|
||||
|
||||
@@ -60,18 +60,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
PLAY_NOTE_ARRAY(tone_qwerty);
|
||||
}
|
||||
return true; // Let QMK send the enter press/release events
|
||||
default:
|
||||
return true; // Process all other keycodes normally
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### `process_record_*` Function documentation
|
||||
### `process_record_*` Function Documentation
|
||||
|
||||
* Keyboard/Revision: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)`
|
||||
* Keyboard/Revision: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)`
|
||||
* Keymap: `bool process_record_user(uint16_t keycode, keyrecord_t *record)`
|
||||
|
||||
The `keycode` argument is whatever is defined in your keymap, eg `MO(1)`, `KC_L`, etc. You should use a `switch...case` block to handle these events.
|
||||
|
||||
The `record` argument contains infomation about the actual press:
|
||||
The `record` argument contains information about the actual press:
|
||||
|
||||
```
|
||||
keyrecord_t record {
|
||||
@@ -96,7 +98,7 @@ This allows you to control the 5 LED's defined as part of the USB Keyboard spec.
|
||||
* `USB_LED_COMPOSE`
|
||||
* `USB_LED_KANA`
|
||||
|
||||
### Example `led_set_kb()` implementation
|
||||
### Example `led_set_kb()` Implementation
|
||||
|
||||
```
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
@@ -128,16 +130,16 @@ void led_set_kb(uint8_t usb_led) {
|
||||
}
|
||||
```
|
||||
|
||||
### `led_set_*` Function documentation
|
||||
### `led_set_*` Function Documentation
|
||||
|
||||
* Keyboard/Revision: `void led_set_kb(uint8_t usb_led)`
|
||||
* Keyboard/Revision: `void led_set_kb(uint8_t usb_led)`
|
||||
* Keymap: `void led_set_user(uint8_t usb_led)`
|
||||
|
||||
# Matrix Initialization Code
|
||||
|
||||
Before a keyboard can be used the hardware must be initialized. QMK handles initialization of the keyboard matrix itself, but if you have other hardware like LED's or i²c controllers you will need to set up that hardware before it can be used.
|
||||
|
||||
### Example `matrix_init_kb()` implementation
|
||||
### Example `matrix_init_kb()` Implementation
|
||||
|
||||
This example, at the keyboard level, sets up B1, B2, and B3 as LED pins.
|
||||
|
||||
@@ -153,20 +155,20 @@ void matrix_init_kb(void) {
|
||||
}
|
||||
```
|
||||
|
||||
### `matrix_init_*` Function documentation
|
||||
### `matrix_init_*` Function Documentation
|
||||
|
||||
* Keyboard/Revision: `void matrix_init_kb(void)`
|
||||
* Keyboard/Revision: `void matrix_init_kb(void)`
|
||||
* Keymap: `void matrix_init_user(void)`
|
||||
|
||||
# Matrix Scanning Code
|
||||
|
||||
Whenever possible you should customize your keyboard by using `process_record_*()` and hooking into events that way, to ensure that your code does not have a negative performance impact on your keyboard. However, in rare cases it is necessary to hook into the matrix scanning. Be extremely careful with the performance of code in these functions, as it will be called at least 10 times per second.
|
||||
|
||||
### Example `matrix_scan_*` implementation
|
||||
### Example `matrix_scan_*` Implementation
|
||||
|
||||
This example has been deliberately omitted. You should understand enough about QMK internals to write this without an example before hooking into such a performance sensitive area. If you need help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) or [chat with us on gitter](https://gitter.im/qmk/qmk_firmware).
|
||||
|
||||
### `matrix_scan_*` Function documentation
|
||||
### `matrix_scan_*` Function Documentation
|
||||
|
||||
* Keyboard/Revision: `void matrix_scan_kb(void)`
|
||||
* Keymap: `void matrix_scan_user(void)`
|
||||
|
@@ -4,7 +4,7 @@ This page exists to document best practices when writing documentation for QMK.
|
||||
|
||||
# Page Opening
|
||||
|
||||
Your documentation page should generally start with an H1 heading, followed by a 1 paragrah description of what the user will find on this page. Keep in mind that this heading and paragraph will sit next to the Table of Contents, so keep the heading short and avoid long strings with no whitespace.
|
||||
Your documentation page should generally start with an H1 heading, followed by a 1 paragraph description of what the user will find on this page. Keep in mind that this heading and paragraph will sit next to the Table of Contents, so keep the heading short and avoid long strings with no whitespace.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -22,6 +22,14 @@ Your page should generally have multiple "H1" headings. Only H1 and H2 headings
|
||||
|
||||
You can have styled hint blocks drawn around text to draw attention to it.
|
||||
|
||||
```
|
||||
{% hint style='info' %}
|
||||
This uses `hint style='info'`
|
||||
{% endhint %}
|
||||
```
|
||||
|
||||
### Examples:
|
||||
|
||||
{% hint style='info' %}
|
||||
This uses `hint style='info'`
|
||||
{% endhint %}
|
||||
@@ -37,3 +45,53 @@ This uses `hint style='danger'`
|
||||
{% hint style='working' %}
|
||||
This uses `hint style='working'`
|
||||
{% endhint %}
|
||||
|
||||
# Styled Terminal Blocks
|
||||
|
||||
You can present styled terminal blocks by including special tokens inside your text block.
|
||||
|
||||
```
|
||||
\`\`\`
|
||||
**[terminal]
|
||||
**[prompt foo@joe]**[path ~]**[delimiter $ ]**[command ./myscript]
|
||||
Normal output line. Nothing special here...
|
||||
But...
|
||||
You can add some colors. What about a warning message?
|
||||
**[warning [WARNING] The color depends on the theme. Could look normal too]
|
||||
What about an error message?
|
||||
**[error [ERROR] This is not the error you are looking for]
|
||||
\`\`\`
|
||||
```
|
||||
|
||||
### Example
|
||||
|
||||
```
|
||||
**[terminal]
|
||||
**[prompt foo@joe]**[path ~]**[delimiter $ ]**[command ./myscript]
|
||||
Normal output line. Nothing special here...
|
||||
But...
|
||||
You can add some colors. What about a warning message?
|
||||
**[warning [WARNING] The color depends on the theme. Could look normal too]
|
||||
What about an error message?
|
||||
**[error [ERROR] This is not the error you are looking for]
|
||||
```
|
||||
|
||||
# Documenting Features
|
||||
|
||||
If you create a new feature for QMK, create a documentation page for it. It doesn't have to be very long, a few sentences describing your feature and a table listing any relevant keycodes is enough. Here is a basic template:
|
||||
|
||||
```markdown
|
||||
# My Cool Feature
|
||||
|
||||
This page describes my cool feature. You can use my cool feature to make coffee and order cream and sugar to be delivered via drone.
|
||||
|
||||
## My Cool Feature Keycodes
|
||||
|
||||
|Long Name|Short Name|Description|
|
||||
|---------|----------|-----------|
|
||||
|KC_COFFEE||Make Coffee|
|
||||
|KC_CREAM||Order Cream|
|
||||
|KC_SUGAR||Order Sugar|
|
||||
```
|
||||
|
||||
Place your documentation into `docs/feature_<my_cool_feature>.md`, and add that file to the appropriate place in `docs/_summary.md`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page.
|
||||
|
42
docs/documentation_templates.md
Normal file
42
docs/documentation_templates.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Documentation Templates
|
||||
|
||||
This page documents the templates you should use when submitting new Keymaps and Keyboards to QMK.
|
||||
|
||||
## Keymap `readme.md` Template
|
||||
|
||||
Most keymaps have an image depicting the layout. You can use [Keyboard Layout Editor](http://keyboard-layout-editor.com) to create an image. Upload it to [Imgur](http://imgur.com) or another hosting service, please do not include images in your Pull Request.
|
||||
|
||||
Below the image you should write a short description to help people understand your keymap.
|
||||
|
||||
```
|
||||

|
||||
|
||||
# Default Clueboard Layout
|
||||
|
||||
This is the default layout that comes flashed on every Clueboard. For the most
|
||||
part it's a straightforward and easy to follow layout. The only unusual key is
|
||||
the key in the upper left, which sends Escape normally, but Grave when any of
|
||||
the Ctrl, Alt, or GUI modifiers are held down.
|
||||
```
|
||||
|
||||
## Keyboard `readme.md` Template
|
||||
|
||||
```
|
||||
# Planck
|
||||
|
||||

|
||||
|
||||
A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/planck/)
|
||||
|
||||
Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert)
|
||||
Hardware Supported: Planck PCB rev1, rev2, rev3, rev4, Teensy 2.0
|
||||
Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make planck/rev4:default
|
||||
|
||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||
```
|
||||
|
||||
There needs to be two spaces at the end of the `Keyboard Maintainer` and `Hardware Supported` lines for it to render correctly with Markdown.
|
@@ -1,4 +1,4 @@
|
||||
# Setting Up Eclipse for QMK Development
|
||||
# Setting up Eclipse for QMK Development
|
||||
|
||||
[Eclipse](https://en.wikipedia.org/wiki/Eclipse_(software)) is an open-source [Integrated Development Environment](https://en.wikipedia.org/wiki/Integrated_development_environment) (IDE) widely used for Java development, but with an extensible plugin system that allows to customize it for other languages and usages.
|
||||
|
||||
@@ -16,16 +16,16 @@ The purpose of the is page is to document how to set-up Eclipse for developing A
|
||||
Note that this set-up has been tested on Ubuntu 16.04 only for the moment.
|
||||
|
||||
# Prerequisites
|
||||
## Build environment
|
||||
## Build Environment
|
||||
Before starting, you must have followed the [Getting Started](home.md#getting-started) section corresponding to your system. In particular, you must have been able to build the firmware with [the `make` command](../#the-make-command).
|
||||
|
||||
## Java
|
||||
Eclipse is a Java application, so you will need to install Java 8 or more recent to be able to run it. You may choose between the JRE or the JDK, the latter being useful if you intend to do Java development.
|
||||
|
||||
# Install Eclipse and its plugins
|
||||
# Install Eclipse and Its Plugins
|
||||
Eclipse comes in [several flavours](http://www.eclipse.org/downloads/eclipse-packages/) depending on the target usage that you will have. There is no package comprising the AVR stack, so we will need to start from Eclipse CDT (C/C++ Development Tooling) and install the necessary plugins.
|
||||
|
||||
## Download and install Eclipse CDT
|
||||
## Download and Install Eclipse CDT
|
||||
If you already have Eclipse CDT on your system, you can skip this step. However it is advised to keep it up-to-date for better support.
|
||||
|
||||
If you have another Eclipse package installed, it is normally possible to [install the CDT plugin over it](https://eclipse.org/cdt/downloads.php). However it is probably better to reinstall it from scratch to keep it light and avoid the clutter of tools that you don't need for the projects you will be working on.
|
||||
@@ -41,10 +41,10 @@ When you are prompted with the Workspace Selector, select a directory that will
|
||||
|
||||
Once started, click the <kbd>Workbench</kbd> button at the top right to switch to the workbench view (there is a also checkbox at the bottom to skip the welcome screen at startup).
|
||||
|
||||
## Install the necessary plugins
|
||||
## Install the Necessary Plugins
|
||||
Note: you do not need to restart Eclipse after installing each plugin. Simply restart once all plugins are installed.
|
||||
|
||||
### [The AVR plugin](http://avr-eclipse.sourceforge.net/)
|
||||
### [The AVR Plugin](http://avr-eclipse.sourceforge.net/)
|
||||
This is the most important plugin as it will allow Eclipse to _understand_ AVR C code. Follow [the instructions for using the update site](http://avr-eclipse.sourceforge.net/wiki/index.php/Plugin_Download#Update_Site), and agree with the security warning for unsigned content.
|
||||
|
||||
### [ANSI Escape in Console](https://marketplace.eclipse.org/content/ansi-escape-console)
|
||||
@@ -58,7 +58,7 @@ This plugin is necessary to properly display the colored build output generated
|
||||
Once both plugins are installed, restart Eclipse as prompted.
|
||||
|
||||
# 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>
|
||||
2. On the next screen:
|
||||
* Select the directory where you cloned the repository as _Existing Code Location_;
|
||||
@@ -72,7 +72,7 @@ Once both plugins are installed, restart Eclipse as prompted.
|
||||
|
||||
¹ There might be issues for importing the project with a custom name. If it does not work properly, try leaving the default project name (i.e. the name of the directory, probably `qmk_firmware`).
|
||||
|
||||
## Build your keyboard
|
||||
## 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
|
||||
|
216
docs/faq.md
216
docs/faq.md
@@ -1,214 +1,6 @@
|
||||
# Frequently Asked Questions
|
||||
|
||||
## What is QMK?
|
||||
|
||||
[QMK](https://github.com/qmk), short for Quantum Mechanical Keyboard, is a group of people building tools for custom keyboards. We started with the [QMK firmware](https://github.com/qmk/qmk_firmware), a heavily modified fork of [TMK](https://github.com/tmk/tmk_keyboard).
|
||||
|
||||
## What Differences Are There Between QMK and TMK?
|
||||
|
||||
TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert's](https://github.com/jackhumbert) fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK.
|
||||
|
||||
From a technical standpoint QMK builds upon TMK by adding several new features. Most notably QMK has expanded the number of available keycodes and uses these to implement advanced features like `S()`, `LCTL()`, and `MO()`. You can see a complete list of these keycodes in [Quantum Keycodes](quantum_keycodes.html).
|
||||
|
||||
From a project and community management standpoint TMK maintains all the officially supported keyboards by himself, with a bit of community support. Separate community maintained forks exist or can be created for other keyboards. Only a few keymaps are provided by default, so users typically don't share keymaps with each other. QMK encourages sharing of both keyboards and keymaps through a centrally managed repository, accepting all pull requests that follows the quality standards. These are mostly community maintained, but the QMK team also helps when necessary.
|
||||
|
||||
Both approaches have their merits and their drawbacks, and code flows freely between TMK and QMK when it makes sense.
|
||||
|
||||
# Debug Console
|
||||
## hid_listen can't recognize device
|
||||
When debug console of your device is not ready you will see like this:
|
||||
|
||||
```
|
||||
Waiting for device:.........
|
||||
```
|
||||
|
||||
once the device is pluged in then *hid_listen* finds it you will get this message:
|
||||
|
||||
```
|
||||
Waiting for new device:.........................
|
||||
Listening:
|
||||
```
|
||||
|
||||
If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes` in [Makefile]
|
||||
|
||||
You may need privilege to access the device on OS like Linux.
|
||||
- try `sudo hid_listen`
|
||||
|
||||
## Can't get message on console
|
||||
Check:
|
||||
- *hid_listen* finds your device. See above.
|
||||
- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).
|
||||
- set `debug_enable=true` usually in `matrix_init()` in **matrix.c**.
|
||||
- try using 'print' function instead of debug print. See **common/print.h**.
|
||||
- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
|
||||
|
||||
## Linux or UNIX like system requires Super User privilege
|
||||
Just use 'sudo' to execute *hid_listen* with privilege.
|
||||
```
|
||||
$ sudo hid_listen
|
||||
```
|
||||
|
||||
Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system.
|
||||
|
||||
File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu)
|
||||
```
|
||||
# tmk keyboard products https://github.com/tmk/tmk_keyboard
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
# Miscellaneous
|
||||
## NKRO Doesn't work
|
||||
First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**.
|
||||
|
||||
Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work you need to switch to **6KRO** mode, in particular when you are in BIOS.
|
||||
|
||||
If your firmeare built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and keeped over power cycles.
|
||||
|
||||
https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch
|
||||
|
||||
|
||||
## TrackPoint needs reset circuit(PS/2 mouse support)
|
||||
Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754.
|
||||
|
||||
- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447
|
||||
- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf
|
||||
|
||||
|
||||
## Can't read column of matrix beyond 16
|
||||
Use `1UL<<16` instead of `1<<16` in `read_cols()` in [matrix.h] when your columns goes beyond 16.
|
||||
|
||||
In C `1` means one of [int] type which is [16bit] in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use [unsigned long] type with `1UL`.
|
||||
|
||||
http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
|
||||
|
||||
|
||||
## Bootloader jump doesn't work
|
||||
Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**.
|
||||
```
|
||||
# Size of Bootloaders in bytes:
|
||||
# Atmel DFU loader(ATmega32U4) 4096
|
||||
# Atmel DFU loader(AT90USB128) 8192
|
||||
# LUFA bootloader(ATmega32U4) 4096
|
||||
# Arduino Caterina(ATmega32U4) 4096
|
||||
# USBaspLoader(ATmega***) 2048
|
||||
# Teensy halfKay(ATmega32U4) 512
|
||||
# Teensy++ halfKay(AT90USB128) 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
```
|
||||
AVR Boot section size are defined by setting **BOOTSZ** fuse in fact. Consult with your MCU datasheet.
|
||||
Note that **Word**(2 bytes) size and address are used in datasheet while TMK uses **Byte**.
|
||||
|
||||
AVR Boot section is located at end of Flash memory like the followings.
|
||||
```
|
||||
byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286)
|
||||
0x0000 +---------------+ 0x00000 +---------------+
|
||||
| | | |
|
||||
| | | |
|
||||
| Application | | Application |
|
||||
| | | |
|
||||
= = = =
|
||||
| | 32KB-4KB | | 128KB-8KB
|
||||
0x6000 +---------------+ 0x1E000 +---------------+
|
||||
| Bootloader | 4KB | Bootloader | 8KB
|
||||
0x7FFF +---------------+ 0x1FFFF +---------------+
|
||||
|
||||
|
||||
byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
|
||||
0x0000 +---------------+ 0x00000 +---------------+
|
||||
| | | |
|
||||
| | | |
|
||||
| Application | | Application |
|
||||
| | | |
|
||||
= = = =
|
||||
| | 32KB-512B | | 128KB-2KB
|
||||
0x7E00 +---------------+ 0x1FC00 +---------------+
|
||||
| Bootloader | 512B | Bootloader | 2KB
|
||||
0x7FFF +---------------+ 0x1FFFF +---------------+
|
||||
```
|
||||
|
||||
And see this discussion for further reference.
|
||||
https://github.com/tmk/tmk_keyboard/issues/179
|
||||
|
||||
|
||||
## Special Extra key doesn't work(System, Audio control keys)
|
||||
You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK.
|
||||
|
||||
```
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
```
|
||||
|
||||
## Wakeup from sleep doesn't work
|
||||
|
||||
In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting.
|
||||
|
||||
Pressing any key during sleep should wake host.
|
||||
|
||||
## Using Arduino?
|
||||
|
||||
**Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself.
|
||||
|
||||
- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf
|
||||
- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
|
||||
|
||||
Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
|
||||
|
||||
|
||||
## Using PF4-7 pins of USB AVR?
|
||||
You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affeteced with this.
|
||||
|
||||
If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.
|
||||
|
||||
See this code.
|
||||
```
|
||||
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
||||
MCUCR |= (1<<JTD);
|
||||
MCUCR |= (1<<JTD);
|
||||
```
|
||||
https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67
|
||||
|
||||
And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.
|
||||
|
||||
|
||||
## Adding LED indicators of Lock keys
|
||||
You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post.
|
||||
|
||||
http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560
|
||||
|
||||
## Program Arduino Micro/Leonardo
|
||||
Push reset button and then run command like this within 8 seconds.
|
||||
|
||||
```
|
||||
avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0
|
||||
```
|
||||
|
||||
Device name will vary depending on your system.
|
||||
|
||||
http://arduino.cc/en/Main/ArduinoBoardMicro
|
||||
https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867
|
||||
|
||||
|
||||
## USB 3 compatibility
|
||||
I heard some people have a problem with USB 3 port, try USB 2 port.
|
||||
|
||||
|
||||
## Mac compatibility
|
||||
### OS X 10.11 and Hub
|
||||
https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
|
||||
|
||||
|
||||
## Problem on BIOS(UEFI)/Resume(Sleep&Wake)/Power cycles
|
||||
Some people reported their keyboard stops working on BIOS and/or after resume(power cycles).
|
||||
|
||||
As of now root of its cause is not clear but some build options seem to be related. In Makefile try to disable those options like `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` and/or others.
|
||||
|
||||
https://github.com/tmk/tmk_keyboard/issues/266
|
||||
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
||||
|
||||
|
||||
|
||||
## FLIP doesn't work
|
||||
### AtLibUsbDfu.dll not found
|
||||
Remove current driver and reinstall one FLIP provides from DeviceManager.
|
||||
http://imgur.com/a/bnwzy
|
||||
* [General](faq_general.md)
|
||||
* [Building or Compiling QMK](faq_build.md)
|
||||
* [Debugging and Troubleshooting QMK](faq_debug.md)
|
||||
* [Keymap](faq_keymap.md)
|
||||
|
@@ -1,36 +1,28 @@
|
||||
# Frequently Asked Build Questions
|
||||
|
||||
This page covers questions about building QMK. If you have not yet you should read the [Build Guide](https://github.com/qmk/qmk_firmware/blob/master/docs/build_guide.md).
|
||||
This page covers questions about building QMK. If you have not yet you should read the [Build Environment Setup](getting_started_build_tools.md) and [Make Instructions](getting_started_make_guide.md) guides.
|
||||
|
||||
In short,
|
||||
|
||||
$ make [-f Makefile.<variant>] [KEYMAP=...] clean
|
||||
$ make [-f Makefile.<variant>] [KEYMAP=...]
|
||||
$ make [-f Makefile.<variant>] [KEYMAP=...] dfu
|
||||
|
||||
|
||||
## Can't program on Linux
|
||||
You will need proper permission to operate a device. For Linux users see udev rules below.
|
||||
Easy way is to use `sudo` command, if you are not familiar with this command check its manual with `man sudo` or this page on line.
|
||||
## Can't Program on Linux
|
||||
You will need proper permission to operate a device. For Linux users see udev rules below. Easy way is to use `sudo` command, if you are not familiar with this command check its manual with `man sudo` or this page on line.
|
||||
|
||||
In short when your controller is ATMega32u4,
|
||||
|
||||
|
||||
$ sudo dfu-programmer atmega32u4 erase --force
|
||||
$ sudo dfu-programmer atmega32u4 flash your.hex
|
||||
$ sudo dfu-programmer atmega32u4 reset
|
||||
|
||||
or just
|
||||
|
||||
$ sudo make dfu
|
||||
$ sudo make <keyboard>:<keymap>:dfu
|
||||
|
||||
But to run `make` with root privilege is not good idea. Use former method as possible.
|
||||
But to run `make` with root privilege is not good idea. Use former method if possible.
|
||||
|
||||
## WINAVR is obsolete
|
||||
## WINAVR is Obsolete
|
||||
It is no longer recommended and may cause some problem.
|
||||
See [Issue #99](https://github.com/tmk/tmk_keyboard/issues/99).
|
||||
See [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99).
|
||||
|
||||
## USB VID and PID
|
||||
You can use any ID you want with editing `config.h`. Using any presumably unused ID will be no problem in fact except for very least chance of collision with other product.
|
||||
You can use any ID you want with editing `config.h`. Using any presumably unused ID will be no problem in fact except for very low chance of collision with other product.
|
||||
|
||||
Most boards in QMK use `0xFEED` as the vendor ID. You should look through other keyboards to make sure you pick a unique Product ID.
|
||||
|
||||
@@ -41,8 +33,7 @@ You can buy a really unique VID:PID here. I don't think you need this for person
|
||||
- http://www.obdev.at/products/vusb/license.html
|
||||
- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
|
||||
|
||||
|
||||
## Linux udev rules
|
||||
## Linux `udev` Rules
|
||||
On Linux you need proper privilege to access device file of MCU, you'll have to use `sudo` when flashing firmware. You can circumvent this with placing these files in `/etc/udev/rules.d/`.
|
||||
|
||||
**/etc/udev/rules.d/50-atmel-dfu.rules:**
|
||||
@@ -62,7 +53,7 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
|
||||
```
|
||||
|
||||
|
||||
## Cortex: cstddef: No such file or directory
|
||||
## Cortex: `cstddef: No such file or directory`
|
||||
GCC 4.8 of Ubuntu 14.04 had this problem and had to update to 4.9 with this PPA.
|
||||
https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded
|
||||
|
||||
@@ -71,7 +62,7 @@ https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstdd
|
||||
https://developer.mbed.org/forum/mbed/topic/5205/
|
||||
|
||||
|
||||
## 'clock_prescale_set' and 'clock_div_1' not available
|
||||
## `clock_prescale_set` and `clock_div_1` Not Available
|
||||
Your toolchain is too old to support the MCU. For example WinAVR 20100110 doesn't support ATMega32u2.
|
||||
|
||||
```
|
||||
@@ -90,11 +81,11 @@ make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1
|
||||
Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong comment.
|
||||
|
||||
```
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 2048
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 2048
|
||||
# Atmel DFU loader 4096 (TMK Alt Controller)
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=2048
|
||||
```
|
||||
|
243
docs/faq_debug.md
Normal file
243
docs/faq_debug.md
Normal file
@@ -0,0 +1,243 @@
|
||||
# Debugging FAQ
|
||||
|
||||
This page details various common questions people have about troubleshooting their keyboards.
|
||||
|
||||
# Debug Console
|
||||
|
||||
## `hid_listen` Can't Recognize Device
|
||||
When debug console of your device is not ready you will see like this:
|
||||
|
||||
```
|
||||
Waiting for device:.........
|
||||
```
|
||||
|
||||
once the device is plugged in then *hid_listen* finds it you will get this message:
|
||||
|
||||
```
|
||||
Waiting for new device:.........................
|
||||
Listening:
|
||||
```
|
||||
|
||||
If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes` in [Makefile]
|
||||
|
||||
You may need privilege to access the device on OS like Linux.
|
||||
- try `sudo hid_listen`
|
||||
|
||||
## Can't Get Message on Console
|
||||
Check:
|
||||
- *hid_listen* finds your device. See above.
|
||||
- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).
|
||||
- set `debug_enable=true` usually in `matrix_init()` in **matrix.c**.
|
||||
- try using 'print' function instead of debug print. See **common/print.h**.
|
||||
- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
|
||||
|
||||
## Linux or UNIX Like System Requires Super User Privilege
|
||||
Just use 'sudo' to execute *hid_listen* with privilege.
|
||||
```
|
||||
$ sudo hid_listen
|
||||
```
|
||||
|
||||
Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system.
|
||||
|
||||
File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu)
|
||||
```
|
||||
# tmk keyboard products https://github.com/tmk/tmk_keyboard
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
# Miscellaneous
|
||||
## Safety Considerations
|
||||
|
||||
You probably don't want to "brick" your keyboard, making it impossible
|
||||
to rewrite firmware onto it. Here are some of the parameters to show
|
||||
what things are (and likely aren't) too risky.
|
||||
|
||||
- If your keyboard map does not include RESET, then, to get into DFU
|
||||
mode, you will need to press the reset button on the PCB, which
|
||||
requires unscrewing the bottom.
|
||||
- Messing with tmk_core / common files might make the keyboard
|
||||
inoperable
|
||||
- Too large a .hex file is trouble; `make dfu` will erase the block,
|
||||
test the size (oops, wrong order!), which errors out, failing to
|
||||
flash the keyboard, leaving it in DFU mode.
|
||||
- To this end, note that the maximum .hex file size on Planck is
|
||||
7000h (28672 decimal)
|
||||
|
||||
```
|
||||
Linking: .build/planck_rev4_cbbrowne.elf [OK]
|
||||
Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK]
|
||||
|
||||
Size after:
|
||||
text data bss dec hex filename
|
||||
0 22396 0 22396 577c planck_rev4_cbbrowne.hex
|
||||
```
|
||||
|
||||
- The above file is of size 22396/577ch, which is less than
|
||||
28672/7000h
|
||||
- As long as you have a suitable alternative .hex file around, you
|
||||
can retry, loading that one
|
||||
- Some of the options you might specify in your keyboard's Makefile
|
||||
consume extra memory; watch out for BOOTMAGIC_ENABLE,
|
||||
MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE
|
||||
- DFU tools do /not/ allow you to write into the bootloader (unless
|
||||
you throw in extra fruit salad of options), so there is little risk
|
||||
there.
|
||||
- EEPROM has around a 100000 write cycle. You shouldn't rewrite the
|
||||
firmware repeatedly and continually; that'll burn the EEPROM
|
||||
eventually.
|
||||
## NKRO Doesn't work
|
||||
First you have to compile firmware with this build option `NKRO_ENABLE` in **Makefile**.
|
||||
|
||||
Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work you need to switch to **6KRO** mode, in particular when you are in BIOS.
|
||||
|
||||
If your firmware built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and kept over power cycles.
|
||||
|
||||
https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch
|
||||
|
||||
|
||||
## TrackPoint Needs Reset Circuit (PS/2 Mouse Support)
|
||||
Without reset circuit you will have inconsistent result due to improper initialize of the hardware. See circuit schematic of TPM754.
|
||||
|
||||
- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447
|
||||
- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf
|
||||
|
||||
|
||||
## Can't Read Column of Matrix Beyond 16
|
||||
Use `1UL<<16` instead of `1<<16` in `read_cols()` in [matrix.h] when your columns goes beyond 16.
|
||||
|
||||
In C `1` means one of [int] type which is [16 bit] in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use [unsigned long] type with `1UL`.
|
||||
|
||||
http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
|
||||
|
||||
|
||||
## Bootloader Jump Doesn't Work
|
||||
Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**.
|
||||
```
|
||||
# Size of Bootloaders in bytes:
|
||||
# Atmel DFU loader(ATmega32U4) 4096
|
||||
# Atmel DFU loader(AT90USB128) 8192
|
||||
# LUFA bootloader(ATmega32U4) 4096
|
||||
# Arduino Caterina(ATmega32U4) 4096
|
||||
# USBaspLoader(ATmega***) 2048
|
||||
# Teensy halfKay(ATmega32U4) 512
|
||||
# Teensy++ halfKay(AT90USB128) 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
```
|
||||
AVR Boot section size are defined by setting **BOOTSZ** fuse in fact. Consult with your MCU datasheet.
|
||||
Note that **Word**(2 bytes) size and address are used in datasheet while TMK uses **Byte**.
|
||||
|
||||
AVR Boot section is located at end of Flash memory like the followings.
|
||||
```
|
||||
byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286)
|
||||
0x0000 +---------------+ 0x00000 +---------------+
|
||||
| | | |
|
||||
| | | |
|
||||
| Application | | Application |
|
||||
| | | |
|
||||
= = = =
|
||||
| | 32KB-4KB | | 128KB-8KB
|
||||
0x6000 +---------------+ 0x1E000 +---------------+
|
||||
| Bootloader | 4KB | Bootloader | 8KB
|
||||
0x7FFF +---------------+ 0x1FFFF +---------------+
|
||||
|
||||
|
||||
byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
|
||||
0x0000 +---------------+ 0x00000 +---------------+
|
||||
| | | |
|
||||
| | | |
|
||||
| Application | | Application |
|
||||
| | | |
|
||||
= = = =
|
||||
| | 32KB-512B | | 128KB-2KB
|
||||
0x7E00 +---------------+ 0x1FC00 +---------------+
|
||||
| Bootloader | 512B | Bootloader | 2KB
|
||||
0x7FFF +---------------+ 0x1FFFF +---------------+
|
||||
```
|
||||
|
||||
And see this discussion for further reference.
|
||||
https://github.com/tmk/tmk_keyboard/issues/179
|
||||
|
||||
If you are using a TeensyUSB, there is a [known bug](https://github.com/qmk/qmk_firmware/issues/164) in which the hardware reset button prevents the RESET key from working. Unplugging the keyboard and plugging it back in should resolve the problem.
|
||||
|
||||
## Special Extra Key Doesn't Work (System, Audio Control Keys)
|
||||
You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK.
|
||||
|
||||
```
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
```
|
||||
|
||||
## Wakeup from Sleep Doesn't Work
|
||||
|
||||
In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting.
|
||||
|
||||
Pressing any key during sleep should wake host.
|
||||
|
||||
## Using Arduino?
|
||||
|
||||
**Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself.
|
||||
|
||||
- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf
|
||||
- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
|
||||
|
||||
Arduino Leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
|
||||
|
||||
|
||||
## Using PF4-7 Pins of USB AVR?
|
||||
You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affected with this.
|
||||
|
||||
If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.
|
||||
|
||||
See this code.
|
||||
```
|
||||
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
||||
MCUCR |= (1<<JTD);
|
||||
MCUCR |= (1<<JTD);
|
||||
```
|
||||
https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67
|
||||
|
||||
And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.
|
||||
|
||||
|
||||
## Adding LED Indicators of Lock Keys
|
||||
You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post.
|
||||
|
||||
http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560
|
||||
|
||||
## Program Arduino Micro/Leonardo
|
||||
Push reset button and then run command like this within 8 seconds.
|
||||
|
||||
```
|
||||
avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0
|
||||
```
|
||||
|
||||
Device name will vary depending on your system.
|
||||
|
||||
http://arduino.cc/en/Main/ArduinoBoardMicro
|
||||
https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867
|
||||
|
||||
|
||||
## USB 3 Compatibility
|
||||
I heard some people have a problem with USB 3 port, try USB 2 port.
|
||||
|
||||
|
||||
## Mac Compatibility
|
||||
### OS X 10.11 and Hub
|
||||
https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
|
||||
|
||||
|
||||
## Problem on BIOS (UEFI)/Resume (Sleep & Wake)/Power Cycles
|
||||
Some people reported their keyboard stops working on BIOS and/or after resume(power cycles).
|
||||
|
||||
As of now root of its cause is not clear but some build options seem to be related. In Makefile try to disable those options like `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` and/or others.
|
||||
|
||||
https://github.com/tmk/tmk_keyboard/issues/266
|
||||
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
||||
|
||||
|
||||
|
||||
## FLIP Doesn't Work
|
||||
### `AtLibUsbDfu.dll` Not Found
|
||||
Remove current driver and reinstall one FLIP provides from DeviceManager.
|
||||
http://imgur.com/a/bnwzy
|
19
docs/faq_general.md
Normal file
19
docs/faq_general.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Frequently Asked Questions
|
||||
|
||||
## What is QMK?
|
||||
|
||||
[QMK](https://github.com/qmk), short for Quantum Mechanical Keyboard, is a group of people building tools for custom keyboards. We started with the [QMK firmware](https://github.com/qmk/qmk_firmware), a heavily modified fork of [TMK](https://github.com/tmk/tmk_keyboard).
|
||||
|
||||
### Why the Name Quantum?
|
||||
|
||||
<!-- FIXME -->
|
||||
|
||||
## What Differences Are There Between QMK and TMK?
|
||||
|
||||
TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert](https://github.com/jackhumbert)'s fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK.
|
||||
|
||||
From a technical standpoint QMK builds upon TMK by adding several new features. Most notably QMK has expanded the number of available keycodes and uses these to implement advanced features like `S()`, `LCTL()`, and `MO()`. You can see a complete list of these keycodes in [Keycodes](keycodes.md).
|
||||
|
||||
From a project and community management standpoint TMK maintains all the officially supported keyboards by himself, with a bit of community support. Separate community maintained forks exist or can be created for other keyboards. Only a few keymaps are provided by default, so users typically don't share keymaps with each other. QMK encourages sharing of both keyboards and keymaps through a centrally managed repository, accepting all pull requests that follow the quality standards. These are mostly community maintained, but the QMK team also helps when necessary.
|
||||
|
||||
Both approaches have their merits and their drawbacks, and code flows freely between TMK and QMK when it makes sense.
|
@@ -1,31 +1,42 @@
|
||||
# Frequently Asked Keymap Questions
|
||||
# Keymap FAQ
|
||||
|
||||
This page covers questions people often have about keymaps. If you haven't you should read [Keymap Overview](keymap.html) first.
|
||||
This page covers questions people often have about keymaps. If you haven't you should read [Keymap Overview](keymap.md) first.
|
||||
|
||||
## What Keycodes Can I Use?
|
||||
See [Basic Keycodes](keycodes.html) and [Quantum Keycodes](quantum_keycodes.html) for most of the keys you can define.
|
||||
See [Keycodes](keycodes.md) for an index of keycodes available to you. These link to more extensive documentation when available.
|
||||
|
||||
Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h).
|
||||
|
||||
## `KC_SYSREQ` isn't working
|
||||
## What Are the Default Keycodes?
|
||||
|
||||
There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JIS. North America primarily uses ANSI, Europe and Africa primarily use ISO, and Japan uses JIS. Regions not mentioned typically use either ANSI or ISO. The keycodes corresponding to these layouts are shown here:
|
||||
|
||||
<!-- Source for this image: http://www.keyboard-layout-editor.com/#/gists/9ce023dc6caadc0cf11c88c782350a8c -->
|
||||

|
||||
|
||||
## The Menu Key Isn't Working
|
||||
|
||||
The key found on most modern keyboards that is located between `KC_RGUI` and `KC_RCTL` is actually called `KC_APP`. This is because when that key was invented there was already a key named `MENU` in the relevant standards, so MS chose to call that the `APP` key.
|
||||
|
||||
## `KC_SYSREQ` Isn't Working
|
||||
Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'.
|
||||
|
||||
See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and
|
||||
- http://en.wikipedia.org/wiki/Magic_SysRq_key
|
||||
- http://en.wikipedia.org/wiki/System_request
|
||||
|
||||
## Power key doesn't work
|
||||
## Power Key Doesn't Work
|
||||
Use `KC_PWR` instead of `KC_POWER` or vice versa.
|
||||
- `KC_PWR` works with Windows and Linux, not with OSX.
|
||||
- `KC_POWER` works with OSX and Linux, not with Windows.
|
||||
|
||||
More info: http://geekhack.org/index.php?topic=14290.msg1327264#msg1327264
|
||||
|
||||
## Oneshot modifier
|
||||
Solves my personal 'the' problem. I often got 'the' or 'THe' wrongly instead of 'The'. Oneshot Shift mitgates this for me.
|
||||
## One Shot Modifier
|
||||
Solves my personal 'the' problem. I often got 'the' or 'THe' wrongly instead of 'The'. One Shot Shift mitigates this for me.
|
||||
https://github.com/tmk/tmk_keyboard/issues/67
|
||||
|
||||
## Modifier/Layer stuck
|
||||
## Modifier/Layer Stuck
|
||||
Modifier keys or layers can be stuck unless layer switching is configured properly.
|
||||
For Modifier keys and layer actions you have to place `KC_TRANS` on same position of destination layer to unregister the modifier key or return to previous layer on release event.
|
||||
|
||||
@@ -37,7 +48,7 @@ For Modifier keys and layer actions you have to place `KC_TRANS` on same positio
|
||||
## Mechanical Lock Switch Support
|
||||
|
||||
This feature is for *mechanical lock switch* like [this Alps one](http://deskthority.net/wiki/Alps_SKCL_Lock). You can enable it by adding this to your `config.h`:
|
||||
|
||||
|
||||
```
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
@@ -47,7 +58,7 @@ After enabling this feature use keycodes `KC_LCAP`, `KC_LNUM` and `KC_LSCR` in y
|
||||
|
||||
Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `KC_CAPS`, `KC_NLCK` and `KC_SLCK`.***
|
||||
|
||||
## Input special charactors other than ASCII like Cédille 'Ç'
|
||||
## Input Special Characters Other Than ASCII like Cédille 'Ç'
|
||||
NO UNIVERSAL METHOD TO INPUT THOSE WORKS OVER ALL SYSTEMS. You have to define **MACRO** in way specific to your OS or layout.
|
||||
|
||||
See this post for example **MACRO** code.
|
||||
@@ -68,7 +79,7 @@ And see this for **Unicode** input.
|
||||
- http://en.wikipedia.org/wiki/Unicode_input
|
||||
|
||||
|
||||
## Apple/Mac keyboard Fn
|
||||
## Apple/Mac Keyboard `Fn`
|
||||
Not supported.
|
||||
|
||||
Apple/Mac keyboard sends keycode for Fn unlike most of other keyboards.
|
||||
@@ -77,13 +88,13 @@ I think you can send Apple Fn key using Apple venter specific Page 0xff01 and us
|
||||
https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/AppleHIDUsageTables.h
|
||||
|
||||
|
||||
## Media control keys in Mac OSX
|
||||
#### KC_MNXT and KC_MPRV does not work on Mac
|
||||
## Media Control Keys in Mac OSX
|
||||
#### KC_MNXT and KC_MPRV Does Not Work on Mac
|
||||
Use `KC_MFFD`(`KC_MEDIA_FAST_FORWARD`) and `KC_MRWD`(`KC_MEDIA_REWIND`) instead of `KC_MNXT` and `KC_MPRV`.
|
||||
See https://github.com/tmk/tmk_keyboard/issues/195
|
||||
|
||||
|
||||
## Keys supported in Mac OSX?
|
||||
## Keys Supported in Mac OSX?
|
||||
You can know which keycodes are supported in OSX from this source code.
|
||||
|
||||
`usb_2_adb_keymap` array maps Keyboard/Keypad Page usages to ADB scancodes(OSX internal keycodes).
|
||||
@@ -95,7 +106,7 @@ And `IOHIDConsumer::dispatchConsumerEvent` handles Consumer page usages.
|
||||
https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/IOHIDConsumer.cpp
|
||||
|
||||
|
||||
## JIS keys in Mac OSX
|
||||
## JIS Keys in Mac OSX
|
||||
Japanese JIS keyboard specific keys like `無変換(Muhenkan)`, `変換(Henkan)`, `ひらがな(hiragana)` are not recognized on OSX. You can use **Seil** to enable those keys, try following options.
|
||||
|
||||
* Enable NFER Key on PC keyboard
|
||||
@@ -105,21 +116,21 @@ Japanese JIS keyboard specific keys like `無変換(Muhenkan)`, `変換(Henkan)`
|
||||
https://pqrs.org/osx/karabiner/seil.html
|
||||
|
||||
|
||||
## RN-42 Bluetooth doesn't work with Karabiner
|
||||
## RN-42 Bluetooth Doesn't Work with Karabiner
|
||||
Karabiner - Keymapping tool on Mac OSX - ignores inputs from RN-42 module by default. You have to enable this option to make Karabiner working with your keyboard.
|
||||
https://github.com/tekezo/Karabiner/issues/403#issuecomment-102559237
|
||||
|
||||
See these for the deail of this problem.
|
||||
See these for the detail of this problem.
|
||||
https://github.com/tmk/tmk_keyboard/issues/213
|
||||
https://github.com/tekezo/Karabiner/issues/403
|
||||
|
||||
|
||||
## Esc and `~ on a key
|
||||
## Esc and <code>`</code> on a Single Key
|
||||
|
||||
Use `GRAVE_ESC` or `KC_GESC` in your keymap.
|
||||
See the [Grave Escape](feature_grave_esc.md) feature.
|
||||
|
||||
## Arrow on Right Modifier keys with Dual-Role
|
||||
This turns right modifer keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**.
|
||||
## Arrow on Right Modifier Keys with Dual-Role
|
||||
This turns right modifier keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**.
|
||||
```
|
||||
|
||||
#include "keymap_common.h"
|
||||
@@ -170,18 +181,18 @@ It seems Windows 10 ignores the code and Linux/Xorg recognizes but has no mappin
|
||||
Not sure what keycode Eject is on genuine Apple keyboard actually. HHKB uses `F20` for Eject key(`Fn+f`) on Mac mode but this is not same as Apple Eject keycode probably.
|
||||
|
||||
|
||||
## What's weak_mods and real_mods in action_util.c
|
||||
## What's `weak_mods` and `real_mods` in `action_util.c`
|
||||
___TO BE IMPROVED___
|
||||
|
||||
real_mods is intended to retains state of real/physical modifier key state, while
|
||||
weak_mods retains state of virtual or temprary modifiers which should not affect state real modifier key.
|
||||
weak_mods retains state of virtual or temporary modifiers which should not affect state real modifier key.
|
||||
|
||||
Let's say you hold down physical left shift key and type ACTION_MODS_KEY(LSHIFT, KC_A),
|
||||
Let's say you hold down physical left shift key and type ACTION_MODS_KEY(LSHIFT, KC_A),
|
||||
|
||||
with weak_mods,
|
||||
* (1) hold down left shift: real_mods |= MOD_BIT(LSHIFT)
|
||||
* (2) press ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods |= MOD_BIT(LSHIFT)
|
||||
* (3) release ACTION_MODS_KEY(LSHIFT, KC_A): waek_mods &= ~MOD_BIT(LSHIFT)
|
||||
* (3) release ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods &= ~MOD_BIT(LSHIFT)
|
||||
real_mods still keeps modifier state.
|
||||
|
||||
without weak mods,
|
||||
@@ -193,7 +204,7 @@ here real_mods lost state for 'physical left shift'.
|
||||
weak_mods is ORed with real_mods when keyboard report is sent.
|
||||
https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57
|
||||
|
||||
## Timer functionality
|
||||
## Timer Functionality
|
||||
|
||||
It's possible to start timers and read values for time-specific events - here's an example:
|
||||
|
||||
|
169
docs/feature_advanced_keycodes.md
Normal file
169
docs/feature_advanced_keycodes.md
Normal file
@@ -0,0 +1,169 @@
|
||||
# Advanced Keycodes
|
||||
|
||||
Your keymap can include keycodes that are more advanced than normal, for example shifted keys. This page documents the functions that are available to you.
|
||||
|
||||
### Assigning Custom Names
|
||||
|
||||
People often define custom names using `#define`. For example:
|
||||
|
||||
```c
|
||||
#define FN_CAPS LT(_FL, KC_CAPSLOCK)
|
||||
#define ALT_TAB LALT(KC_TAB)
|
||||
```
|
||||
|
||||
This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping it more readable.
|
||||
|
||||
### Limits of These Aliases
|
||||
|
||||
Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.md), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used see [Basic Keycodes](keycodes_basic.md).
|
||||
|
||||
# Switching and Toggling Layers
|
||||
|
||||
These functions allow you to activate layers in various ways.
|
||||
|
||||
* `MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer.
|
||||
* `LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped.
|
||||
* `TG(layer)` - toggles a layer on or off.
|
||||
* `TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed).
|
||||
* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 2` for just two taps.
|
||||
|
||||
# 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.
|
||||
|
||||
### Beginners
|
||||
|
||||
If you are just getting started with QMK you will want to keep everything simple. Follow these guidelines when setting up your layers:
|
||||
|
||||
* Setup layer 0 as your "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.)
|
||||
* Arrange your layers in a "tree" layout, with layer 0 as the root. Do not try to enter the same layer from more than one other layer.
|
||||
* Never try to stack a higher numbered layer on top of a lower numbered layer. Doing so is tricky and error prone.
|
||||
|
||||
### Intermediate Users
|
||||
|
||||
Sometimes you need more than one base layer. For example, if you want to switch between QWERTY and Dvorak, switch between layouts for different countries, or switch your layout for different videogames. Your base layers should always be the lowest numbered layers. When you have multiple base layers you should always treat them as mutually exclusive. When one base layer is on the others are off.
|
||||
|
||||
### Advanced Users
|
||||
|
||||
Once you have a good feel for how layers work and what you can do, you can get more creative. The rules listed in the beginner section will help you be successful by avoiding some of the tricker details but they can be constraining, especially for ultra-compact keyboard users. Understanding how layers work will allow you to use them in more advanced ways.
|
||||
|
||||
Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem.
|
||||
|
||||
Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](../tmk_core/common/action_layer.h).
|
||||
|
||||
# Modifier Keys
|
||||
|
||||
These functions allow you to combine a mod with a keycode. When pressed the keydown for the mod will be sent first, and then *kc* will be sent. When released the keyup for *kc* will be sent and then the mod will be sent.
|
||||
|
||||
* `LSFT(kc)` or `S(kc)` - applies left Shift to *kc* (keycode)
|
||||
* `RSFT(kc)` - applies right Shift to *kc*
|
||||
* `LCTL(kc)` - applies left Control to *kc*
|
||||
* `RCTL(kc)` - applies right Control to *kc*
|
||||
* `LALT(kc)` - applies left Alt to *kc*
|
||||
* `RALT(kc)` - applies right Alt to *kc*
|
||||
* `LGUI(kc)` - applies left GUI (command/win) to *kc*
|
||||
* `RGUI(kc)` - applies right GUI (command/win) to *kc*
|
||||
* `HYPR(kc)` - applies Hyper (all modifiers) to *kc*
|
||||
* `MEH(kc)` - applies Meh (all modifiers except Win/Cmd) to *kc*
|
||||
* `LCAG(kc)` - applies CtrlAltGui to *kc*
|
||||
|
||||
You can also chain these, like this:
|
||||
|
||||
LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress.
|
||||
|
||||
# Shifted Keycodes
|
||||
|
||||
The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols.
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------------------|------------------|-------------------|
|
||||
|`KC_TILDE` |`KC_TILD` |`~` |
|
||||
|`KC_EXCLAIM` |`KC_EXLM` |`!` |
|
||||
|`KC_AT` | |`@` |
|
||||
|`KC_HASH` | |`#` |
|
||||
|`KC_DOLLAR` |`KC_DLR` |`$` |
|
||||
|`KC_PERCENT` |`KC_PERC` |`%` |
|
||||
|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` |
|
||||
|`KC_AMPERSAND` |`KC_AMPR` |`&` |
|
||||
|`KC_ASTERISK` |`KC_ASTR` |`*` |
|
||||
|`KC_LEFT_PAREN` |`KC_LPRN` |`(` |
|
||||
|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` |
|
||||
|`KC_UNDERSCORE` |`KC_UNDS` |`_` |
|
||||
|`KC_PLUS` | |`+` |
|
||||
|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` |
|
||||
|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` |
|
||||
|`KC_PIPE` | |<code>|</code>|
|
||||
|`KC_COLON` |`KC_COLN` |`:` |
|
||||
|`KC_DOUBLE_QUOTE` |`KC_DQT`/`KC_DQUO`|`"` |
|
||||
|`KC_LEFT_ANGLE_BRACKET` |`KC_LT`/`KC_LABK` |`<` |
|
||||
|`KC_RIGHT_ANGLE_BRACKET`|`KC_GT`/`KC_RABK` |`>` |
|
||||
|`KC_QUESTION` |`KC_QUES` |`?` |
|
||||
|
||||
# Mod Tap
|
||||
|
||||
`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down.
|
||||
|
||||
These are the values you can use for the `mod` in `MT()` and `OSM()`:
|
||||
|
||||
* MOD_LCTL
|
||||
* MOD_LSFT
|
||||
* MOD_LALT
|
||||
* MOD_LGUI
|
||||
* MOD_RCTL
|
||||
* MOD_RSFT
|
||||
* MOD_RALT
|
||||
* MOD_RGUI
|
||||
* MOD_HYPR
|
||||
* MOD_MEH
|
||||
|
||||
These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. Note however, that you cannot mix right and left side modifiers.
|
||||
|
||||
We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact:
|
||||
|
||||
* `CTL_T(kc)` - is LCTL when held and *kc* when tapped
|
||||
* `SFT_T(kc)` - is LSFT when held and *kc* when tapped
|
||||
* `ALT_T(kc)` - is LALT when held and *kc* when tapped
|
||||
* `ALGR_T(kc)` - is AltGr when held and *kc* when tapped
|
||||
* `GUI_T(kc)` - is LGUI when held and *kc* when tapped
|
||||
* `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)
|
||||
* `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped
|
||||
* `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift.
|
||||
|
||||
# One Shot Keys
|
||||
|
||||
One shot keys are keys that remain active until the next key is pressed, and then are released. This allows you to type keyboard combinations without pressing more than one key at a time. These keys are usually called "Sticky keys" or "Dead keys".
|
||||
|
||||
For example, if you define a key as `OSM(MOD_LSFT)`, you can type a capital A character by first pressing and releasing shift, and then pressing and releasing A. Your computer will see the shift key being held the moment shift is pressed, and it will see the shift key being released immediately after A is released.
|
||||
|
||||
One shot keys also work as normal modifiers. If you hold down a one shot key and type other keys, your one shot will be released immediately after you let go of the key.
|
||||
|
||||
You can control the behavior of one shot keys by defining these in `config.h`:
|
||||
|
||||
```c
|
||||
#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */
|
||||
#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
|
||||
```
|
||||
|
||||
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
|
||||
* `OSL(layer)` - momentary switch to *layer*.
|
||||
|
||||
Sometimes, you want to activate a one-shot layer as part of a macro or tap dance routine. To do this, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. For more complicated actions, take a look at the oneshot implementation in [`process_record`](../tmk_core/common/action.c#L429).
|
||||
|
||||
## Permissive Hold
|
||||
|
||||
As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
|
||||
|
||||
```
|
||||
#define PERMISSIVE_HOLD
|
||||
```
|
||||
|
||||
This makes it easier for fast typists to use dual-function keys. Without this, if you let go of a held key inside the tapping term, it won't register.
|
||||
|
||||
Example: (Tapping Term = 200ms)
|
||||
|
||||
- SHFT_T(KC_A) Down
|
||||
- KC_X Down
|
||||
- KC_X Up
|
||||
- SHFT_T(KC_A) Up
|
||||
|
||||
With defaults, if above is typed within tapping term, this will emit `ax`. With permissive hold, if above is typed within tapping term, this will emit `X` (so, Shift+X).
|
208
docs/feature_audio.md
Normal file
208
docs/feature_audio.md
Normal file
@@ -0,0 +1,208 @@
|
||||
# Audio
|
||||
|
||||
Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any AVR keyboard that allows access to the C6 or B5 port (`#define C6_AUDIO` and/or `#define B5_AUDIO`), you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
|
||||
|
||||
If you add `AUDIO_ENABLE = yes` to your `rules.mk`, there's a couple different sounds that will automatically be enabled without any other configuration:
|
||||
|
||||
```
|
||||
STARTUP_SONG // plays when the keyboard starts up (audio.c)
|
||||
GOODBYE_SONG // plays when you press the RESET key (quantum.c)
|
||||
AG_NORM_SONG // plays when you press AG_NORM (quantum.c)
|
||||
AG_SWAP_SONG // plays when you press AG_SWAP (quantum.c)
|
||||
MUSIC_ON_SONG // plays when music mode is activated (process_music.c)
|
||||
MUSIC_OFF_SONG // plays when music mode is deactivated (process_music.c)
|
||||
CHROMATIC_SONG // plays when the chromatic music mode is selected (process_music.c)
|
||||
GUITAR_SONG // plays when the guitar music mode is selected (process_music.c)
|
||||
VIOLIN_SONG // plays when the violin music mode is selected (process_music.c)
|
||||
MAJOR_SONG // plays when the major music mode is selected (process_music.c)
|
||||
```
|
||||
|
||||
You can override the default songs by doing something like this in your `config.h`:
|
||||
|
||||
```c
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(STARTUP_SOUND)
|
||||
#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).
|
||||
|
||||
To play a custom sound at a particular time, you can define a song like this (near the top of the file):
|
||||
|
||||
```c
|
||||
float my_song[][2] = SONG(QWERTY_SOUND);
|
||||
```
|
||||
|
||||
And then play your song like this:
|
||||
|
||||
```c
|
||||
PLAY_SONG(my_song);
|
||||
```
|
||||
|
||||
Alternatively, you can play it in a loop like this:
|
||||
|
||||
```c
|
||||
PLAY_LOOP(my_song);
|
||||
```
|
||||
|
||||
It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif` to avoid causing problems when audio isn't built into the keyboard.
|
||||
|
||||
## Music Mode
|
||||
|
||||
The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode.
|
||||
|
||||
Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things.
|
||||
|
||||
Keycodes available:
|
||||
|
||||
* `MU_ON` - Turn music mode on
|
||||
* `MU_OFF` - Turn music mode off
|
||||
* `MU_TOG` - Toggle music mode
|
||||
* `MU_MOD` - Cycle through the music modes:
|
||||
* `CHROMATIC_MODE` - Chromatic scale, row changes the octave
|
||||
* `GUITAR_MODE` - Chromatic scale, but the row changes the string (+5 st)
|
||||
* `VIOLIN_MODE` - Chromatic scale, but the row changes the string (+7 st)
|
||||
* `MAJOR_MODE` - Major scale
|
||||
|
||||
In music mode, the following keycodes work differently, and don't pass through:
|
||||
|
||||
* `LCTL` - start a recording
|
||||
* `LALT` - stop recording/stop playing
|
||||
* `LGUI` - play recording
|
||||
* `KC_UP` - speed-up playback
|
||||
* `KC_DOWN` - slow-down playback
|
||||
|
||||
By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less than `0xFF` are turned into notes, and don't output anything. You can change this by defining this in your `config.h` like this:
|
||||
|
||||
#define MUSIC_MASK keycode != KC_NO
|
||||
|
||||
Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard!
|
||||
|
||||
The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`:
|
||||
|
||||
#define PITCH_STANDARD_A 432.0f
|
||||
|
||||
You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `confid.h`:
|
||||
|
||||
#define NO_MUSIC_MODE
|
||||
|
||||
## MIDI Functionality
|
||||
|
||||
This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
|
||||
|
||||
<!-- FIXME: this formatting needs work
|
||||
|
||||
## Audio
|
||||
|
||||
```c
|
||||
#ifdef AUDIO_ENABLE
|
||||
AU_ON,
|
||||
AU_OFF,
|
||||
AU_TOG,
|
||||
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
FC_ON,
|
||||
FC_OFF,
|
||||
FC_TOG,
|
||||
#endif
|
||||
|
||||
// Music mode on/off/toggle
|
||||
MU_ON,
|
||||
MU_OFF,
|
||||
MU_TOG,
|
||||
|
||||
// Music voice iterate
|
||||
MUV_IN,
|
||||
MUV_DE,
|
||||
#endif
|
||||
```
|
||||
|
||||
### Midi
|
||||
|
||||
#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
|
||||
MI_ON, // send midi notes when music mode is enabled
|
||||
MI_OFF, // don't send midi notes when music mode is enabled
|
||||
#endif
|
||||
|
||||
MIDI_TONE_MIN,
|
||||
MIDI_TONE_MAX
|
||||
|
||||
MI_C = MIDI_TONE_MIN,
|
||||
MI_Cs,
|
||||
MI_Db = MI_Cs,
|
||||
MI_D,
|
||||
MI_Ds,
|
||||
MI_Eb = MI_Ds,
|
||||
MI_E,
|
||||
MI_F,
|
||||
MI_Fs,
|
||||
MI_Gb = MI_Fs,
|
||||
MI_G,
|
||||
MI_Gs,
|
||||
MI_Ab = MI_Gs,
|
||||
MI_A,
|
||||
MI_As,
|
||||
MI_Bb = MI_As,
|
||||
MI_B,
|
||||
|
||||
MIDI_TONE_KEYCODE_OCTAVES > 1
|
||||
|
||||
where x = 1-5:
|
||||
MI_C_x,
|
||||
MI_Cs_x,
|
||||
MI_Db_x = MI_Cs_x,
|
||||
MI_D_x,
|
||||
MI_Ds_x,
|
||||
MI_Eb_x = MI_Ds_x,
|
||||
MI_E_x,
|
||||
MI_F_x,
|
||||
MI_Fs_x,
|
||||
MI_Gb_x = MI_Fs_x,
|
||||
MI_G_x,
|
||||
MI_Gs_x,
|
||||
MI_Ab_x = MI_Gs_x,
|
||||
MI_A_x,
|
||||
MI_As_x,
|
||||
MI_Bb_x = MI_As_x,
|
||||
MI_B_x,
|
||||
|
||||
MI_OCT_Nx 1-2
|
||||
MI_OCT_x 0-7
|
||||
MIDI_OCTAVE_MIN = MI_OCT_N2,
|
||||
MIDI_OCTAVE_MAX = MI_OCT_7,
|
||||
MI_OCTD, // octave down
|
||||
MI_OCTU, // octave up
|
||||
|
||||
MI_TRNS_Nx 1-6
|
||||
MI_TRNS_x 0-6
|
||||
MIDI_TRANSPOSE_MIN = MI_TRNS_N6,
|
||||
MIDI_TRANSPOSE_MAX = MI_TRNS_6,
|
||||
MI_TRNSD, // transpose down
|
||||
MI_TRNSU, // transpose up
|
||||
|
||||
MI_VEL_x 1-10
|
||||
MIDI_VELOCITY_MIN = MI_VEL_1,
|
||||
MIDI_VELOCITY_MAX = MI_VEL_9,
|
||||
MI_VELD, // velocity down
|
||||
MI_VELU, // velocity up
|
||||
|
||||
MI_CHx 1-16
|
||||
MIDI_CHANNEL_MIN = MI_CH1
|
||||
MIDI_CHANNEL_MAX = MI_CH16,
|
||||
MI_CHD, // previous channel
|
||||
MI_CHU, // next channel
|
||||
|
||||
MI_ALLOFF, // all notes off
|
||||
|
||||
MI_SUS, // sustain
|
||||
MI_PORT, // portamento
|
||||
MI_SOST, // sostenuto
|
||||
MI_SOFT, // soft pedal
|
||||
MI_LEG, // legato
|
||||
|
||||
MI_MOD, // modulation
|
||||
MI_MODSD, // decrease modulation speed
|
||||
MI_MODSU, // increase modulation speed
|
||||
#endif // MIDI_ADVANCED
|
||||
|
||||
-->
|
161
docs/feature_auto_shift.md
Normal file
161
docs/feature_auto_shift.md
Normal file
@@ -0,0 +1,161 @@
|
||||
# Auto Shift: Why Do We Need a Shift Key?
|
||||
|
||||
Tap a key and you get its character. Tap a key, but hold it *slightly* longer
|
||||
and you get its shifted state. Voilà! No shift key needed!
|
||||
|
||||
## Why Auto Shift?
|
||||
|
||||
Many people suffer from various forms of RSI. A common cause is stretching your
|
||||
fingers repetitively long distances. For us on the keyboard, the pinky does that
|
||||
all too often when reaching for the shift key. Auto Shift looks to alleviate that
|
||||
problem.
|
||||
|
||||
## How Does It Work?
|
||||
|
||||
When you tap a key, it stays depressed for a short period of time before it is
|
||||
then released. This depressed time is a different length for everyone. Auto Shift
|
||||
defines a constant `AUTO_SHIFT_TIMEOUT` which is typically set to twice your
|
||||
normal pressed state time. When you press a key, a timer starts and then stops
|
||||
when you release the key. If the time depressed is greater than or equal to the
|
||||
`AUTO_SHIFT_TIMEOUT`, then a shifted version of the key is emitted. If the time
|
||||
is less than the `AUTO_SHIFT_TIMEOUT` time, then the normal state is emitted.
|
||||
|
||||
## Are There Limitations to Auto Shift?
|
||||
|
||||
Yes, unfortunately.
|
||||
|
||||
1. Key repeat will cease to work. For example, before if you wanted 20 'a'
|
||||
characters, you could press and hold the 'a' key for a second or two. This no
|
||||
longer works with Auto Shift because it is timing your depressed time instead
|
||||
of emitting a depressed key state to your operating system.
|
||||
2. Auto Shift is disabled for any key press that is accompanied by one or more
|
||||
modifiers. Thus, Ctrl+A that you hold for a really long time is not the same
|
||||
as Ctrl+Shift+A.
|
||||
3. You will have characters that are shifted when you did not intend on shifting, and
|
||||
other characters you wanted shifted, but were not. This simply comes down to
|
||||
practice. As we get in a hurry, we think we have hit the key long enough
|
||||
for a shifted version, but we did not. On the other hand, we may think we are
|
||||
tapping the keys, but really we have held it for a little longer than
|
||||
anticipated.
|
||||
|
||||
## How Do I Enable Auto Shift?
|
||||
|
||||
Add to your `rules.mk` in the keymap folder:
|
||||
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
|
||||
If no `rules.mk` exists, you can create one.
|
||||
|
||||
Then compile and install your new firmware with Auto Key enabled! That's it!
|
||||
|
||||
## Configuring Auto Shift
|
||||
|
||||
If desired, there is some configuration that can be done to change the
|
||||
behavior of Auto Shift. This is done by setting various variables the
|
||||
`config.h` file located in your keymap folder. If no `config.h` file exists, you can create one.
|
||||
|
||||
A sample is
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define AUTO_SHIFT_TIMEOUT 150
|
||||
#define NO_AUTO_SHIFT_SPECIAL
|
||||
|
||||
#endif
|
||||
|
||||
### AUTO_SHIFT_TIMEOUT (Value in ms)
|
||||
|
||||
This controls how long you have to hold a key before you get the shifted state.
|
||||
Obviously, this is different for everyone. For the common person, a setting of
|
||||
135 to 150 works great. However, one should start with a value of at least 175, which
|
||||
is the default value. Then work down from there. The idea is to have the shortest time required to get the shifted state without having false positives.
|
||||
|
||||
Play with this value until things are perfect. Many find that all will work well
|
||||
at a given value, but one or two keys will still emit the shifted state on
|
||||
occasion. This is simply due to habit and holding some keys a little longer
|
||||
than others. Once you find this value, work on tapping your problem keys a little
|
||||
quicker than normal and you will be set.
|
||||
|
||||
{% hint style='info' %}
|
||||
Auto Shift has three special keys that can help you get this value right very
|
||||
quick. See "Auto Shift Setup" for more details!
|
||||
{% endhint %}
|
||||
|
||||
### NO_AUTO_SHIFT_SPECIAL (simple define)
|
||||
|
||||
Do not Auto Shift special keys, which include -\_, =+, [{, ]}, ;:, '", ,<, .>,
|
||||
and /?
|
||||
|
||||
### NO_AUTO_SHIFT_NUMERIC (simple define)
|
||||
|
||||
Do not Auto Shift numeric keys, zero through nine.
|
||||
|
||||
### NO_AUTO_SHIFT_ALPHA (simple define)
|
||||
|
||||
Do not Auto Shift alpha characters, which include A through Z.
|
||||
|
||||
## Using Auto Shift Setup
|
||||
|
||||
This will enable you to define three keys temporarily to increase, decrease and report your `AUTO_SHIFT_TIMEOUT`.
|
||||
|
||||
### Setup
|
||||
|
||||
Map three keys temporarily in your keymap:
|
||||
|
||||
| Key Name | Description |
|
||||
|----------|-----------------------------------------------------|
|
||||
| KC_ASDN | Lower the Auto Shift timeout variable (down) |
|
||||
| KC_ASUP | Raise the Auto Shift timeout variable (up) |
|
||||
| KC_ASRP | Report your current Auto Shift timeout value |
|
||||
| KC_ASON | Turns on the Auto Shift Function |
|
||||
| KC_ASOFF | Turns off the Auto Shift Function |
|
||||
| KC_ASTG | Toggles the statn of the Auto Shift feature |
|
||||
|
||||
Compile and upload your new firmware.
|
||||
|
||||
### Use
|
||||
|
||||
It is important to note that during these tests, you should be typing
|
||||
completely normal and with no intention of shifted keys.
|
||||
|
||||
1. Type multiple sentences of alphabetical letters.
|
||||
2. Observe any upper case letters.
|
||||
3. If there are none, press the key you have mapped to `KC_ASDN` to decrease
|
||||
time Auto Shift timeout value and go back to step 1.
|
||||
4. If there are some upper case letters, decide if you need to work on tapping
|
||||
those keys with less down time, or if you need to increase the timeout.
|
||||
5. If you decide to increase the timeout, press the key you have mapped to
|
||||
`KC_ASUP` and go back to step 1.
|
||||
6. Once you are happy with your results, press the key you have mapped to
|
||||
`KC_ASRP`. The keyboard will type by itself the value of your
|
||||
`AUTO_SHIFT_TIMEOUT`.
|
||||
7. Update `AUTO_SHIFT_TIMEOUT` in your `config.h` with the value reported.
|
||||
8. Remove `AUTO_SHIFT_SETUP` from your `config.h`.
|
||||
9. Remove the key bindings `KC_ASDN`, `KC_ASUP` and `KC_ASRP`.
|
||||
10. Compile and upload your new firmware.
|
||||
|
||||
#### An Example Run
|
||||
|
||||
hello world. my name is john doe. i am a computer programmer playing with
|
||||
keyboards right now.
|
||||
|
||||
[PRESS KC_ASDN quite a few times]
|
||||
|
||||
heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
|
||||
KEYboArDS RiGHT NOw.
|
||||
|
||||
[PRESS KC_ASUP a few times]
|
||||
|
||||
hello world. my name is john Doe. i am a computer programmer playing with
|
||||
keyboarDs right now.
|
||||
|
||||
[PRESS KC_ASRP]
|
||||
|
||||
115
|
||||
|
||||
The keyboard typed `115` which represents your current `AUTO_SHIFT_TIMEOUT`
|
||||
value. You are now set! Practice on the *D* key a little bit that showed up
|
||||
in the testing and you'll be golden.
|
39
docs/feature_backlight.md
Normal file
39
docs/feature_backlight.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# Backlighting
|
||||
|
||||
<!-- FIXME: Describe how backlighting works in QMK -->
|
||||
|
||||
## Backlight Keycodes
|
||||
|
||||
These keycodes control the backlight. Most keyboards use this for single color in-switch lighting.
|
||||
|
||||
|Key |Description |
|
||||
|---------|------------------------------------------|
|
||||
|`BL_TOGG`|Turn the backlight on or off |
|
||||
|`BL_STEP`|Cycle through backlight levels |
|
||||
|`BL_ON` |Set the backlight to max brightness |
|
||||
|`BL_OFF` |Turn the backlight off |
|
||||
|`BL_INC` |Increase the backlight level |
|
||||
|`BL_DEC` |Decrease the backlight level |
|
||||
|`BL_BRTG`|Toggle backlight breathing |
|
||||
|
||||
Note that for backlight breathing, you need to have `#define BACKLIGHT_BREATHING` in your config.h.
|
||||
|
||||
## Configuration Options in `config.h`
|
||||
|
||||
* `BACKLIGHT_PIN B7` defines the pin that controlls the LEDs. Unless you design your own keyboard, you don't need to set this.
|
||||
* `BACKLIGHT_LEVELS 3` defines the number of brightness levels (maximum 15 excluding off).
|
||||
* `BACKLIGHT_BREATHING` if defined, enables backlight breathing. Note that this is only available if `BACKLIGHT_PIN` is B5, B6 or B7.
|
||||
* `BREATHING_PERIOD 6` defines the length of one backlight "breath" in seconds.
|
||||
|
||||
## Notes on Implementation
|
||||
|
||||
To change the brightness when using pins B5, B6 or B7, the PWM (Pulse Width Modulation) functionality of the on-chip timer is used.
|
||||
The timer is a counter that counts up to a certain TOP value (`0xFFFF` set in ICR1) before resetting to 0.
|
||||
We also set an OCR1x register.
|
||||
When the counter reaches the value stored in that register, the PWM pin drops to low.
|
||||
The PWM pin is pulled high again when the counter resets to 0.
|
||||
Therefore, OCR1x basically sets the duty cycle of the LEDs and as such the brightness where `0` is the darkest and `0xFFFF` the brightest setting.
|
||||
|
||||
To enable the breathing effect, we register an interrupt handler to be called whenever the counter resets (with `ISR(TIMER1_OVF_vect)`).
|
||||
In this handler, which gets called roughly 244 times per second, we compute the desired brightness using a precomputed brightness curve.
|
||||
To disable breathing, we can just disable the respective interrupt vector and reset the brightness to the desired level.
|
17
docs/feature_bluetooth.md
Normal file
17
docs/feature_bluetooth.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Bluetooth
|
||||
|
||||
## Bluetooth Functionality
|
||||
|
||||
This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will.
|
||||
|
||||
<!-- FIXME: Document bluetooth support more completely. -->
|
||||
|
||||
## Bluetooth Keycodes
|
||||
|
||||
This is used when multiple keyboard outputs can be selected. Currently this only allows for switching between USB and Bluetooth on keyboards that support both.
|
||||
|
||||
|Name |Description |
|
||||
|----------|----------------------------------------------|
|
||||
|`OUT_AUTO`|Automatically switch between USB and Bluetooth|
|
||||
|`OUT_USB` |USB only |
|
||||
|`OUT_BT` |Bluetooth only |
|
29
docs/feature_bootmagic.md
Normal file
29
docs/feature_bootmagic.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Bootmagic
|
||||
|
||||
<!-- FIXME: Describe the bootmagic feature here. -->
|
||||
|
||||
## Bootmagic Keycodes
|
||||
|
||||
Shortcuts for bootmagic options. You can use these even when bootmagic is off.
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------------------------|---------|------------------------------------|
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Left Control and Caps Lock |
|
||||
|`MAGIC_CAPSLOCK_TO_CONTROL` | |Treat Caps Lock as Control |
|
||||
|`MAGIC_SWAP_LALT_LGUI` | |Swap Left Alt and GUI |
|
||||
|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and GUI |
|
||||
|`MAGIC_NO_GUI` | |Disable the GUI key |
|
||||
|`MAGIC_SWAP_GRAVE_ESC` | |Swap <code>`</code> and Escape |
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap Backslash and Backspace |
|
||||
|`MAGIC_HOST_NKRO` | |Force NKRO on |
|
||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|
||||
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` | |Unswap Left Control and Caps Lock |
|
||||
|`MAGIC_UNCAPSLOCK_TO_CONTROL` | |Stop treating CapsLock as Control |
|
||||
|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and GUI |
|
||||
|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and GUI |
|
||||
|`MAGIC_UNNO_GUI` | |Enable the GUI key |
|
||||
|`MAGIC_UNSWAP_GRAVE_ESC` | |Unswap <code>`</code> and Escape|
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap Backslash and Backspace |
|
||||
|`MAGIC_UNHOST_NKRO` | |Force NKRO off |
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Left Alt and GUI |
|
||||
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
@@ -1,6 +1,6 @@
|
||||
# Dynamic macros: record and replay macros in runtime
|
||||
# Dynamic Macros: Record and Replay Macros in Runtime
|
||||
|
||||
QMK supports temporarily macros created on the fly. We call these Dynamic Macros. They are defined by the user from the keyboard and are lost when the keyboard is unplugged or otherwise rebooted.
|
||||
QMK supports temporary macros created on the fly. We call these Dynamic Macros. They are defined by the user from the keyboard and are lost when the keyboard is unplugged or otherwise rebooted.
|
||||
|
||||
You can store one or two macros and they may have a combined total of 128 keypresses. You can increase this size at the cost of RAM.
|
||||
|
||||
@@ -22,7 +22,7 @@ enum planck_keycodes {
|
||||
|
||||
It must be the last element because `dynamic_macros.h` will add some more keycodes after it.
|
||||
|
||||
Below it include the `dynamic_macro.h` header:
|
||||
Below it, include the `dynamic_macro.h` header:
|
||||
|
||||
```c
|
||||
#include "dynamic_macro.h"`
|
||||
@@ -52,12 +52,12 @@ For users of the earlier versions of dynamic macros: It is still possible to fin
|
||||
|
||||
```c
|
||||
uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode);
|
||||
|
||||
|
||||
if (!process_record_dynamic_macro(macro_kc, record)) {
|
||||
return false;
|
||||
}
|
||||
```
|
||||
|
||||
If the LED's start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by setting the `DYNAMIC_MACRO_SIZE` preprocessor macro (default value: 128; please read the comments for it in the header).
|
||||
If the LEDs start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by setting the `DYNAMIC_MACRO_SIZE` preprocessor macro (default value: 128; please read the comments for it in the header).
|
||||
|
||||
For the details about the internals of the dynamic macros, please read the comments in the `dynamic_macro.h` header.
|
17
docs/feature_grave_esc.md
Normal file
17
docs/feature_grave_esc.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Grave Escape
|
||||
|
||||
Grave Escape is a feature that allows you to share the grave key (<code>`</code> and `~`) on the same key as Escape. When `KC_GESC` is used it will act as `KC_ESC`, unless Shift or GUI is pressed, in which case it will act as `KC_GRAVE`.
|
||||
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|---------|-----------|------------------------------------------------------------------|
|
||||
|`KC_GESC`|`GRAVE_ESC`|Escape when pressed, <code>`</code> when Shift or GUI are held|
|
||||
|
||||
There are several possible key combinations this will break, among them Ctrl+Shift+Esc on Windows and Cmd+Opt+Esc on macOS. You can use these options in your `config.h` to work around this:
|
||||
|
||||
| Option | Description |
|
||||
|--------|-------------|
|
||||
| `GRAVE_ESC_ALT_OVERRIDE` | Always send Escape if Alt is pressed. |
|
||||
| `GRAVE_ESC_CTRL_OVERRIDE` | Always send Escape if Ctrl is pressed. |
|
||||
| `GRAVE_ESC_GUI_OVERRIDE` | Always send Escape if GUI is pressed. |
|
||||
| `GRAVE_ESC_SHIFT_OVERRIDE` | Always send Escape if SHIFT is pressed. |
|
11
docs/feature_key_lock.md
Normal file
11
docs/feature_key_lock.md
Normal file
@@ -0,0 +1,11 @@
|
||||
## Key Lock: Holding Down Keys for You
|
||||
|
||||
Sometimes, you need to hold down a specific key for a long period of time. Whether this is while typing in ALL CAPS, or playing a video game that hasn't implemented auto-run, Key Lock is here to help. Key Lock adds a new keycode, `KC_LOCK`, that will hold down the next key you hit for you. The key is released when you hit it again. Here's an example: let's say you need to type in all caps for a few sentences. You hit KC_LOCK, and then shift. Now, shift will be considered held until you hit it again. You can think of key lock as caps lock, but supercharged.
|
||||
|
||||
Here's how to use it:
|
||||
|
||||
1. Pick a key on your keyboard. This will be the key lock key. Assign it the keycode `KC_LOCK`. This will be a single-action key: you won't be able to use it for anything else.
|
||||
2. Enable key lock by including `KEY_LOCK_ENABLE = yes` in your Makefile.
|
||||
3. That's it!
|
||||
|
||||
Important: switching layers does not cancel the key lock. Additionally, key lock is only able to hold standard action keys and One Shot modifier keys (for example, if you have your shift defined as `OSM(KC_LSFT)`; see [One Shot Keys](quantum_keycodes.md#one-shot-keys)). This does not include any of the QMK special functions (except One Shot modifiers), or shifted versions of keys such as KC_LPRN. If it's in the [Basic Keycodes](keycodes_basic.md) list, it can be held. If it's not, then it can't be.
|
74
docs/feature_layouts.md
Normal file
74
docs/feature_layouts.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# Layouts: Using a Keymap with Multiple Keyboards
|
||||
|
||||
The `layouts/` folder contains different physical key layouts that can apply to different keyboards.
|
||||
|
||||
```
|
||||
layouts/
|
||||
+ default/
|
||||
| + 60_ansi/
|
||||
| | + readme.md
|
||||
| | + layout.json
|
||||
| | + a_good_keymap/
|
||||
| | | + keymap.c
|
||||
| | | + readme.md
|
||||
| | | + config.h
|
||||
| | | + rules.mk
|
||||
| | + <keymap folder>/
|
||||
| | + ...
|
||||
| + <layout folder>/
|
||||
+ community/
|
||||
| + <layout folder>/
|
||||
| + ...
|
||||
```
|
||||
|
||||
The `layouts/default/` and `layouts/community/` are two examples of layout "repositories" - currently `default` will contain all of the information concerning the layout, and one default keymap named `default_<layout>`, for users to use as a reference. `community` contains all of the community keymaps, with the eventual goal of being split-off into a separate repo for users to clone into `layouts/`. QMK searches through all folders in `layouts/`, so it's possible to have multiple repositories here.
|
||||
|
||||
Each layout folder is named (`[a-z0-9_]`) after the physical aspects of the layout, in the most generic way possible, and contains a `readme.md` with the layout to be defined by the keyboard:
|
||||
|
||||
```md
|
||||
# 60_ansi
|
||||
|
||||
LAYOUT_60_ansi
|
||||
```
|
||||
|
||||
New names should try to stick to the standards set by existing layouts, and can be discussed in the PR/Issue.
|
||||
|
||||
## Supporting a Layout
|
||||
|
||||
For a keyboard to support a layout, the variable must be defined in it's `<keyboard>.h`, and match the number of arguments/keys (and preferably the physical layout):
|
||||
|
||||
#define LAYOUT_60_ansi KEYMAP_ANSI
|
||||
|
||||
The name of the layout must match this regex: `[a-z0-9_]+`
|
||||
|
||||
The folder name must be added to the keyboard's `rules.mk`:
|
||||
|
||||
LAYOUTS = 60_ansi
|
||||
|
||||
`LAYOUTS` can be set in any keyboard folder level's `rules.mk`:
|
||||
|
||||
LAYOUTS = 60_iso
|
||||
|
||||
but the `LAYOUT_<layout>` variable must be defined in `<folder>.h` as well.
|
||||
|
||||
## Tips for Making Layouts Keyboard-Agnostic
|
||||
|
||||
Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<folder>.h` should not be included here) file that is being compiled:
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
If you want to keep some keyboard-specific code, you can use these variables to escape it with an `#ifdef` statement:
|
||||
|
||||
* `KEYBOARD_<folder1>_<folder2>`
|
||||
|
||||
For example:
|
||||
|
||||
```c
|
||||
#ifdef KEYBOARD_planck
|
||||
#ifdef KEYBOARD_planck_rev4
|
||||
planck_rev4_function();
|
||||
#endif
|
||||
#endif
|
||||
```
|
||||
|
||||
Note that the names are lowercase and match the folder/file names for the keyboard/revision exactly.
|
@@ -1,4 +1,4 @@
|
||||
# The Leader key: A new kind of modifier
|
||||
# The Leader Key: A New Kind of Modifier
|
||||
|
||||
If you've ever used Vim, you know what a Leader key is. If not, you're about to discover a wonderful concept. :) Instead of hitting Alt+Shift+W for example (holding down three keys at the same time), what if you could hit a _sequence_ of keys instead? So you'd hit our special modifier (the Leader key), followed by W and then C (just a rapid succession of keys), and something would happen.
|
||||
|
||||
@@ -34,4 +34,4 @@ void matrix_scan_user(void) {
|
||||
}
|
||||
```
|
||||
|
||||
As you can see, you have three function. you can use - `SEQ_ONE_KEY` for single-key sequences (Leader followed by just one key), and `SEQ_TWO_KEYS` and `SEQ_THREE_KEYS` for longer sequences. Each of these accepts one or more keycodes as arguments. This is an important point: You can use keycodes from **any layer on your keyboard**. That layer would need to be active for the leader macro to fire, obviously.
|
||||
As you can see, you have three function. you can use - `SEQ_ONE_KEY` for single-key sequences (Leader followed by just one key), and `SEQ_TWO_KEYS` and `SEQ_THREE_KEYS` for longer sequences. Each of these accepts one or more keycodes as arguments. This is an important point: You can use keycodes from **any layer on your keyboard**. That layer would need to be active for the leader macro to fire, obviously.
|
264
docs/feature_macros.md
Normal file
264
docs/feature_macros.md
Normal file
@@ -0,0 +1,264 @@
|
||||
# Macros
|
||||
|
||||
Macros allow you to send multiple keystrokes when pressing just one key. QMK has a number of ways to define and use macros. These can do anything you want: type common phrases for you, copypasta, repetitive game movements, or even help you code.
|
||||
|
||||
{% hint style='danger' %}
|
||||
**Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets a hold of your keyboard will be able to access that information by opening a text editor.
|
||||
{% endhint %}
|
||||
|
||||
## The New Way: `SEND_STRING()` & `process_record_user`
|
||||
|
||||
Sometimes you just want a key to type out words or phrases. For the most common situations we've provided `SEND_STRING()`, which will type out your string (i.e. a sequence of characters) for you. All ASCII characters that are easily translated to a keycode are supported (e.g. `\n\t`).
|
||||
|
||||
Here is an example `keymap.c` for a two-key keyboard:
|
||||
|
||||
```c
|
||||
enum custom_keycodes {
|
||||
MY_CUSTOM_MACRO = SAFE_RANGE
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
switch(keycode) {
|
||||
case MY_CUSTOM_MACRO:
|
||||
SEND_STRING("QMK is the best thing ever!"); // this is our macro!
|
||||
return false; break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = {
|
||||
{MY_CUSTOM_MACRO, KC_ESC}
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
What happens here is this:
|
||||
We first define a new custom keycode in the range not occupied by any other keycodes.
|
||||
Then we use the `process_record_user` function, which is called whenever a key is pressed or released, to check if our custom keycode has been activated.
|
||||
If yes, we send the string `"QMK is the best thing ever!"` to the computer via the `SEND_STRING` macro (this is a C preprocessor macro, not to be confused with QMK macros).
|
||||
We return `false` to indicate to the caller that the key press we just processed need not be processed any further.
|
||||
Finally, we define the keymap so that the first button activates our macro and the second button is just an escape button.
|
||||
|
||||
You might want to add more than one macro.
|
||||
You can do that by adding another keycode and adding another case to the switch statement, like so:
|
||||
|
||||
```c
|
||||
enum custom_keycodes {
|
||||
MY_CUSTOM_MACRO = SAFE_RANGE,
|
||||
MY_OTHER_MACRO
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
switch(keycode) {
|
||||
case MY_CUSTOM_MACRO:
|
||||
SEND_STRING("QMK is the best thing ever!");
|
||||
return false; break;
|
||||
case MY_OTHER_MACRO:
|
||||
SEND_STRING(SS_LCTRL("ac")); // selects all and copies
|
||||
return false; break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = {
|
||||
{MY_CUSTOM_MACRO, MY_OTHER_MACRO}
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
### TAP, DOWN and UP
|
||||
|
||||
You may want to use keys in your macros that you can't write down, such as `Ctrl` or `Home`.
|
||||
You can send arbitrary keycodes by wrapping them in:
|
||||
|
||||
* `SS_TAP()` presses and releases a key.
|
||||
* `SS_DOWN()` presses (but does not release) a key.
|
||||
* `SS_UP()` releases a key.
|
||||
|
||||
For example:
|
||||
|
||||
SEND_STRING(SS_TAP(X_HOME));
|
||||
|
||||
Would tap `KC_HOME` - note how the prefix is now `X_`, and not `KC_`. You can also combine this with other strings, like this:
|
||||
|
||||
SEND_STRING("VE"SS_TAP(X_HOME)"LO");
|
||||
|
||||
Which would send "VE" followed by a `KC_HOME` tap, and "LO" (spelling "LOVE" if on a newline).
|
||||
|
||||
There's also a couple of mod shortcuts you can use:
|
||||
|
||||
* `SS_LCTRL(string)`
|
||||
* `SS_LGUI(string)`
|
||||
* `SS_LALT(string)`
|
||||
* `SS_LSFT(string)`
|
||||
|
||||
These press the respective modifier, send the supplied string and then release the modifier.
|
||||
They can be used like this:
|
||||
|
||||
SEND_STRING(SS_LCTRL("a"));
|
||||
|
||||
Which would send LCTRL+a (LCTRL down, a, LCTRL up) - notice that they take strings (eg `"k"`), and not the `X_K` keycodes.
|
||||
|
||||
### Alternative Keymaps
|
||||
|
||||
By default, it assumes a US keymap with a QWERTY layout; if you want to change that (e.g. if your OS uses software Colemak), include this somewhere in your keymap:
|
||||
|
||||
#include <sendstring_colemak.h>
|
||||
|
||||
### Strings in Memory
|
||||
|
||||
If for some reason you're manipulating strings and need to print out something you just generated (instead of being a literal, constant string), you can use `send_string()`, like this:
|
||||
|
||||
```c
|
||||
char my_str[4] = "ok.";
|
||||
send_string(my_str);
|
||||
```
|
||||
|
||||
The shortcuts defined above won't work with `send_string()`, but you can separate things out to different lines if needed:
|
||||
|
||||
```c
|
||||
char my_str[4] = "ok.";
|
||||
SEND_STRING("I said: ");
|
||||
send_string(my_str);
|
||||
SEND_STRING(".."SS_TAP(X_END));
|
||||
```
|
||||
|
||||
## The Old Way: `MACRO()` & `action_get_macro`
|
||||
|
||||
{% hint style='info' %}
|
||||
This is inherited from TMK, and hasn't been updated - it's recommend that you use `SEND_STRING` and `process_record_user` instead.
|
||||
{% endhint %}
|
||||
|
||||
By default QMK assumes you don't have any macros. To define your macros you create an `action_get_macro()` function. For example:
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||
case 1:
|
||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
This defines two macros which will be run when the key they are assigned to is pressed. If instead you'd like them to run when the key is released you can change the if statement:
|
||||
|
||||
if (!record->event.pressed) {
|
||||
|
||||
### Macro Commands
|
||||
|
||||
A macro can include the following commands:
|
||||
|
||||
* I() change interval of stroke in milliseconds.
|
||||
* D() press key.
|
||||
* U() release key.
|
||||
* T() type key(press and release).
|
||||
* W() wait (milliseconds).
|
||||
* END end mark.
|
||||
|
||||
### Mapping a Macro to a Key
|
||||
|
||||
Use the `M()` function within your `KEYMAP()` to call a macro. For example, here is the keymap for a 2-key keyboard:
|
||||
|
||||
```c
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
M(0), M(1)
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||
case 1:
|
||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
When you press the key on the left it will type "Hi!" and when you press the key on the right it will type "Bye!".
|
||||
|
||||
### Naming Your Macros
|
||||
|
||||
If you have a bunch of macros you want to refer to from your keymap while keeping the keymap easily readable you can name them using `#define` at the top of your file.
|
||||
|
||||
```c
|
||||
#define M_HI M(0)
|
||||
#define M_BYE M(1)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
M_HI, M_BYE
|
||||
),
|
||||
};
|
||||
```
|
||||
|
||||
## Advanced Macro Functions
|
||||
|
||||
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.
|
||||
|
||||
### `record->event.pressed`
|
||||
|
||||
This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is
|
||||
|
||||
```c
|
||||
if (record->event.pressed) {
|
||||
// on keydown
|
||||
} else {
|
||||
// on keyup
|
||||
}
|
||||
```
|
||||
|
||||
### `register_code(<kc>);`
|
||||
|
||||
This sends the `<kc>` keydown event to the computer. Some examples would be `KC_ESC`, `KC_C`, `KC_4`, and even modifiers such as `KC_LSFT` and `KC_LGUI`.
|
||||
|
||||
### `unregister_code(<kc>);`
|
||||
|
||||
Parallel to `register_code` function, this sends the `<kc>` keyup event to the computer. If you don't use this, the key will be held down until it's sent.
|
||||
|
||||
### `clear_keyboard();`
|
||||
|
||||
This will clear all mods and keys currently pressed.
|
||||
|
||||
### `clear_mods();`
|
||||
|
||||
This will clear all mods currently pressed.
|
||||
|
||||
### `clear_keyboard_but_mods();`
|
||||
|
||||
This will clear all keys besides the mods currently pressed.
|
||||
|
||||
## Advanced Example: Single-Key Copy/Paste
|
||||
|
||||
This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released.
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch(id) {
|
||||
case 0: {
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||
} else {
|
||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
@@ -3,11 +3,11 @@
|
||||
|
||||
Mousekeys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer around, click up to 5 buttons, and even scroll in all 4 directions. QMK uses the same algorithm as the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys).
|
||||
|
||||
## Adding Mousekeys To a Keymap
|
||||
## Adding Mousekeys to a Keymap
|
||||
|
||||
There are two steps to adding Mousekeys support to your keyboard. You must enable support in the Makefile and you must map mouse actions to keys on your keyboard.
|
||||
|
||||
### Adding Mousekeys support in the `Makefile`
|
||||
### Adding Mousekeys Support in the `Makefile`
|
||||
|
||||
To add support for Mousekeys you simply need to add a single line to your keymap's `Makefile`:
|
||||
|
||||
@@ -17,34 +17,34 @@ MOUSEKEY_ENABLE = yes
|
||||
|
||||
You can see an example here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/mouse_keys/Makefile
|
||||
|
||||
### Mapping Mouse Actions To Keyboard Keys
|
||||
### Mapping Mouse Actions to Keyboard Keys
|
||||
|
||||
You can use these keycodes within your keymap to map button presses to mouse actions:
|
||||
|
||||
|Long Name|Short Name|Description|
|
||||
|---------|----------|-----------|
|
||||
|KC_MS_UP|KC_MS_U|Mouse Cursor Up|
|
||||
|KC_MS_DOWN|KC_MS_D|Mouse Cursor Down|
|
||||
|KC_MS_LEFT|KC_MS_L|Mouse Cursor Left|
|
||||
|KC_MS_RIGHT|KC_MS_R|Mouse Cursor Right|
|
||||
|KC_MS_BTN1|KC_BTN1|Mouse Button 1|
|
||||
|KC_MS_BTN2|KC_BTN2|Mouse Button 2|
|
||||
|KC_MS_BTN3|KC_BTN3|Mouse Button 3|
|
||||
|KC_MS_BTN4|KC_BTN4|Mouse Button 4|
|
||||
|KC_MS_BTN5|KC_BTN5|Mouse Button 5|
|
||||
|KC_MS_WH_UP|KC_WH_U|Mouse Wheel Up|
|
||||
|KC_MS_WH_DOWN|KC_WH_D|Mouse Wheel Down|
|
||||
|KC_MS_WH_LEFT|KC_WH_L|Mouse Wheel Left|
|
||||
|KC_MS_WH_RIGHT|KC_WH_R|Mouse Wheel Right|
|
||||
|KC_MS_ACCEL0|KC_ACL0|Set Mouse Acceleration Speed to 0|
|
||||
|KC_MS_ACCEL1|KC_ACL1|Set Mouse Acceleration Speed to 1|
|
||||
|KC_MS_ACCEL2|KC_ACL2|Set Mouse Acceleration Speed to 2|
|
||||
|Key |Aliases |Description |
|
||||
|----------------|---------|---------------------------|
|
||||
|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up |
|
||||
|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down |
|
||||
|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left |
|
||||
|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right |
|
||||
|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 |
|
||||
|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 |
|
||||
|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 |
|
||||
|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 |
|
||||
|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 |
|
||||
|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up |
|
||||
|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down |
|
||||
|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left |
|
||||
|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right |
|
||||
|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0|
|
||||
|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1|
|
||||
|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2|
|
||||
|
||||
You can see an example in the `_ML` here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/mouse_keys/keymap.c#L46
|
||||
|
||||
## Configuring the behavior of Mousekeys
|
||||
## Configuring the Behavior of Mousekeys
|
||||
|
||||
The default speed for controlling the mouse with the keyboard is intentionaly slow. You can adjust these parameters by adding these settings to your keymap's `config.h` file. All times are specified in miliseconds (ms).
|
||||
The default speed for controlling the mouse with the keyboard is intentionally slow. You can adjust these parameters by adding these settings to your keymap's `config.h` file. All times are specified in milliseconds (ms).
|
||||
|
||||
```
|
||||
#define MOUSEKEY_DELAY 300
|
||||
@@ -78,4 +78,4 @@ The top speed for scrolling movements.
|
||||
|
||||
### `MOUSEKEY_WHEEL_TIME_TO_MAX`
|
||||
|
||||
How long you want to hold down a scroll key for until `MOUSEKEY_WHEEL_MAX_SPEED` is reached. This controls how quickling your scrolling will accelerate.
|
||||
How long you want to hold down a scroll key for until `MOUSEKEY_WHEEL_MAX_SPEED` is reached. This controls how quickly your scrolling will accelerate.
|
47
docs/feature_pointing_device.md
Normal file
47
docs/feature_pointing_device.md
Normal file
@@ -0,0 +1,47 @@
|
||||
## Pointing Device
|
||||
|
||||
Pointing Device is a generic name for a feature intended to be generic: moving the system pointer around. There are certainly other options for it - like mousekeys - but this aims to be easily modifiable and lightweight. You can implement custom keys to control functionality, or you can gather information from other peripherals and insert it directly here - let QMK handle the processing for you.
|
||||
|
||||
To enable Pointing Device, uncomment the following line in your rules.mk:
|
||||
|
||||
```
|
||||
POINTING_DEVICE_ENABLE = yes
|
||||
```
|
||||
|
||||
To manipulate the mouse report, you can use the following functions:
|
||||
|
||||
* `pointing_device_get_report()` - Returns the current report_mouse_t that represents the information sent to the host computer
|
||||
* `pointing_device_set_report(report_mouse_t newMouseReport)` - Overrides and saves the report_mouse_t to be sent to the host computer
|
||||
|
||||
Keep in mind that a report_mouse_t (here "mouseReport") has the following properties:
|
||||
|
||||
* `mouseReport.x` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing movement (+ to the right, - to the left) on the x axis.
|
||||
* `mouseReport.y` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing movement (+ upward, - downward) on the y axis.
|
||||
* `mouseReport.v` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing vertical scrolling (+ upward, - downward).
|
||||
* `mouseReport.h` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing horizontal scrolling (+ right, - left).
|
||||
* `mouseReport.buttons` - this is a uint8_t in which the last 5 bits are used. These bits represent the mouse button state - bit 3 is mouse button 5, and bit 7 is mouse button 1.
|
||||
|
||||
When the mouse report is sent, the x, y, v, and h values are set to 0 (this is done in "pointing_device_send()", which can be overridden to avoid this behavior). This way, button states persist, but movement will only occur once. For further customization, both `pointing_device_init` and `pointing_device_task` can be overridden.
|
||||
|
||||
In the following example, a custom key is used to click the mouse and scroll 127 units vertically and horizontally, then undo all of that when released - because that's a totally useful function. Listen, this is an example:
|
||||
|
||||
```
|
||||
case MS_SPECIAL:
|
||||
report_mouse_t currentReport = pointing_device_get_report();
|
||||
if (record->event.pressed)
|
||||
{
|
||||
currentReport.v = 127;
|
||||
currentReport.h = 127;
|
||||
currentReport.buttons |= MOUSE_BTN1; //this is defined in report.h
|
||||
}
|
||||
else
|
||||
{
|
||||
currentReport.v = -127;
|
||||
currentReport.h = -127;
|
||||
currentReport.buttons &= ~MOUSE_BTN1;
|
||||
}
|
||||
pointing_device_set_report(currentReport);
|
||||
break;
|
||||
```
|
||||
|
||||
Recall that the mouse report is set to zero (except the buttons) whenever it is sent, so the scrolling would only occur once in each case.
|
258
docs/feature_ps2_mouse.md
Normal file
258
docs/feature_ps2_mouse.md
Normal file
@@ -0,0 +1,258 @@
|
||||
## PS/2 Mouse Support
|
||||
|
||||
Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device.
|
||||
|
||||
To hook up a Trackpoint, you need to obtain a Trackpoint module (i.e. harvest from a Thinkpad keyboard), identify the function of each pin of the module, and make the necessary circuitry between controller and Trackpoint module. For more information, please refer to [Trackpoint Hardware](https://deskthority.net/wiki/TrackPoint_Hardware) page on Deskthority Wiki.
|
||||
|
||||
There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended).
|
||||
|
||||
### Busywait Version
|
||||
|
||||
Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.
|
||||
|
||||
In rules.mk:
|
||||
|
||||
```
|
||||
PS2_MOUSE_ENABLE = yes
|
||||
PS2_USE_BUSYWAIT = yes
|
||||
```
|
||||
|
||||
In your keyboard config.h:
|
||||
|
||||
```
|
||||
#ifdef PS2_USE_BUSYWAIT
|
||||
# define PS2_CLOCK_PORT PORTD
|
||||
# define PS2_CLOCK_PIN PIND
|
||||
# define PS2_CLOCK_DDR DDRD
|
||||
# define PS2_CLOCK_BIT 1
|
||||
# define PS2_DATA_PORT PORTD
|
||||
# define PS2_DATA_PIN PIND
|
||||
# define PS2_DATA_DDR DDRD
|
||||
# define PS2_DATA_BIT 2
|
||||
#endif
|
||||
```
|
||||
|
||||
### Interrupt Version
|
||||
|
||||
The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data.
|
||||
|
||||
In rules.mk:
|
||||
|
||||
```
|
||||
PS2_MOUSE_ENABLE = yes
|
||||
PS2_USE_INT = yes
|
||||
```
|
||||
|
||||
In your keyboard config.h:
|
||||
|
||||
```
|
||||
#ifdef PS2_USE_INT
|
||||
#define PS2_CLOCK_PORT PORTD
|
||||
#define PS2_CLOCK_PIN PIND
|
||||
#define PS2_CLOCK_DDR DDRD
|
||||
#define PS2_CLOCK_BIT 2
|
||||
#define PS2_DATA_PORT PORTD
|
||||
#define PS2_DATA_PIN PIND
|
||||
#define PS2_DATA_DDR DDRD
|
||||
#define PS2_DATA_BIT 5
|
||||
|
||||
#define PS2_INT_INIT() do { \
|
||||
EICRA |= ((1<<ISC21) | \
|
||||
(0<<ISC20)); \
|
||||
} while (0)
|
||||
#define PS2_INT_ON() do { \
|
||||
EIMSK |= (1<<INT2); \
|
||||
} while (0)
|
||||
#define PS2_INT_OFF() do { \
|
||||
EIMSK &= ~(1<<INT2); \
|
||||
} while (0)
|
||||
#define PS2_INT_VECT INT2_vect
|
||||
#endif
|
||||
```
|
||||
|
||||
### USART Version
|
||||
|
||||
To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. If one of those are unavailable, you need to use interrupt version.
|
||||
|
||||
In rules.mk:
|
||||
|
||||
```
|
||||
PS2_MOUSE_ENABLE = yes
|
||||
PS2_USE_USART = yes
|
||||
```
|
||||
|
||||
In your keyboard config.h:
|
||||
|
||||
```
|
||||
#ifdef PS2_USE_USART
|
||||
#define PS2_CLOCK_PORT PORTD
|
||||
#define PS2_CLOCK_PIN PIND
|
||||
#define PS2_CLOCK_DDR DDRD
|
||||
#define PS2_CLOCK_BIT 5
|
||||
#define PS2_DATA_PORT PORTD
|
||||
#define PS2_DATA_PIN PIND
|
||||
#define PS2_DATA_DDR DDRD
|
||||
#define PS2_DATA_BIT 2
|
||||
|
||||
/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
|
||||
/* set DDR of CLOCK as input to be slave */
|
||||
#define PS2_USART_INIT() do { \
|
||||
PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
|
||||
PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
|
||||
UCSR1C = ((1 << UMSEL10) | \
|
||||
(3 << UPM10) | \
|
||||
(0 << USBS1) | \
|
||||
(3 << UCSZ10) | \
|
||||
(0 << UCPOL1)); \
|
||||
UCSR1A = 0; \
|
||||
UBRR1H = 0; \
|
||||
UBRR1L = 0; \
|
||||
} while (0)
|
||||
#define PS2_USART_RX_INT_ON() do { \
|
||||
UCSR1B = ((1 << RXCIE1) | \
|
||||
(1 << RXEN1)); \
|
||||
} while (0)
|
||||
#define PS2_USART_RX_POLL_ON() do { \
|
||||
UCSR1B = (1 << RXEN1); \
|
||||
} while (0)
|
||||
#define PS2_USART_OFF() do { \
|
||||
UCSR1C = 0; \
|
||||
UCSR1B &= ~((1 << RXEN1) | \
|
||||
(1 << TXEN1)); \
|
||||
} while (0)
|
||||
#define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
|
||||
#define PS2_USART_RX_DATA UDR1
|
||||
#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
|
||||
#define PS2_USART_RX_VECT USART1_RX_vect
|
||||
#endif
|
||||
```
|
||||
|
||||
### Additional Settings
|
||||
|
||||
#### PS/2 Mouse Features
|
||||
|
||||
These enable settings supported by the PS/2 mouse protocol: http://www.computer-engineering.org/ps2mouse/
|
||||
|
||||
```
|
||||
/* Use remote mode instead of the default stream mode (see link) */
|
||||
#define PS2_MOUSE_USE_REMOTE_MODE
|
||||
|
||||
/* Enable the scrollwheel or scroll gesture on your mouse or touchpad */
|
||||
#define PS2_MOUSE_ENABLE_SCROLLING
|
||||
|
||||
/* Some mice will need a scroll mask to be configured. The default is 0xFF. */
|
||||
#define PS2_MOUSE_SCROLL_MASK 0x0F
|
||||
|
||||
/* Applies a transformation to the movement before sending to the host (see link) */
|
||||
#define PS2_MOUSE_USE_2_1_SCALING
|
||||
|
||||
/* The time to wait after initializing the ps2 host */
|
||||
#define PS2_MOUSE_INIT_DELAY 1000 /* Default */
|
||||
```
|
||||
|
||||
You can also call the following functions from ps2_mouse.h
|
||||
|
||||
```
|
||||
void ps2_mouse_disable_data_reporting(void);
|
||||
|
||||
void ps2_mouse_enable_data_reporting(void);
|
||||
|
||||
void ps2_mouse_set_remote_mode(void);
|
||||
|
||||
void ps2_mouse_set_stream_mode(void);
|
||||
|
||||
void ps2_mouse_set_scaling_2_1(void);
|
||||
|
||||
void ps2_mouse_set_scaling_1_1(void);
|
||||
|
||||
void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
|
||||
|
||||
void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
|
||||
```
|
||||
|
||||
#### Fine Control
|
||||
|
||||
Use the following defines to change the sensitivity and speed of the mouse.
|
||||
Note: you can also use `ps2_mouse_set_resolution` for the same effect (not supported on most touchpads).
|
||||
|
||||
```
|
||||
#define PS2_MOUSE_X_MULTIPLIER 3
|
||||
#define PS2_MOUSE_Y_MULTIPLIER 3
|
||||
#define PS2_MOUSE_V_MULTIPLIER 1
|
||||
```
|
||||
|
||||
#### Scroll Button
|
||||
|
||||
If you're using a trackpoint, you will likely want to be able to use it for scrolling.
|
||||
Its possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving.
|
||||
To enable the feature, you must set a scroll button mask as follows:
|
||||
|
||||
```
|
||||
#define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BUTTON_MIDDLE) /* Default */
|
||||
```
|
||||
|
||||
To disable the scroll button feature:
|
||||
|
||||
```
|
||||
#define PS2_MOUSE_SCROLL_BTN_MASK 0
|
||||
```
|
||||
|
||||
The available buttons are:
|
||||
|
||||
```
|
||||
#define PS2_MOUSE_BTN_LEFT 0
|
||||
#define PS2_MOUSE_BTN_RIGHT 1
|
||||
#define PS2_MOUSE_BTN_MIDDLE 2
|
||||
```
|
||||
|
||||
You can also combine buttons in the mask by `|`ing them together.
|
||||
|
||||
Once you've configured your scroll button mask, you must configure the scroll button send interval.
|
||||
This is the interval before which if the scroll buttons were released they would be sent to the host.
|
||||
After this interval, they will cause the mouse to scroll and will not be sent.
|
||||
|
||||
```
|
||||
#define PS2_MOUSE_SCROLL_BTN_SEND 300 /* Default */
|
||||
```
|
||||
|
||||
To disable sending the scroll buttons:
|
||||
```
|
||||
#define PS2_MOUSE_SCROLL_BTN_SEND 0
|
||||
```
|
||||
|
||||
Fine control over the scrolling is supported with the following defines:
|
||||
|
||||
```
|
||||
#define PS2_MOUSE_SCROLL_DIVISOR_H 2
|
||||
#define PS2_MOUSE_SCROLL_DIVISOR_V 2
|
||||
```
|
||||
|
||||
#### Invert Mouse and Scroll Axes
|
||||
|
||||
To invert the X and Y axes you can put:
|
||||
|
||||
```
|
||||
#define PS2_MOUSE_INVERT_X
|
||||
#define PS2_MOUSE_INVERT_Y
|
||||
```
|
||||
|
||||
into config.h.
|
||||
|
||||
To reverse the scroll axes you can put:
|
||||
|
||||
```
|
||||
#define PS2_MOUSE_INVERT_H
|
||||
#define PS2_MOUSE_INVERT_V
|
||||
```
|
||||
|
||||
into config.h.
|
||||
|
||||
#### Debug Settings
|
||||
|
||||
To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
|
||||
|
||||
```
|
||||
/* To debug the mouse reports */
|
||||
#define PS2_MOUSE_DEBUG_HID
|
||||
#define PS2_MOUSE_DEBUG_RAW
|
||||
```
|
141
docs/feature_rgblight.md
Normal file
141
docs/feature_rgblight.md
Normal file
@@ -0,0 +1,141 @@
|
||||
# RGB Lighting
|
||||
|
||||
If you've installed addressable RGB lights on your keyboard you can control them with QMK. Currently we support the following addressable LEDs on Atmel AVR processors:
|
||||
|
||||
* WS2811 and variants (WS2812, WS2812B, WS2812C, etc)
|
||||
* SK6812RGBW
|
||||
|
||||
Some keyboards come with RGB LEDs pre-installed. Others have to have LEDs installed after the fact. See below for information on modifying your keyboard.
|
||||
|
||||
## Selecting Colors
|
||||
|
||||
QMK uses Hue, Saturation, and Value to set color rather than using RGB. You can use the color wheel below to see how this works. Changing the Hue will cycle around the circle. Saturation will affect the intensity of the color, which you can see as you move from the inner part to the outer part of the wheel. Value sets the overall brightness.
|
||||
|
||||
<img src="gitbook/images/color-wheel.svg" alt="HSV Color Wheel" width="250">
|
||||
|
||||
If you would like to learn more about HSV you can start with the [Wikipedia article](https://en.wikipedia.org/wiki/HSL_and_HSV).
|
||||
|
||||
## Configuration
|
||||
|
||||
Before RGB Lighting can be used you have to enable it in `rules.mk`:
|
||||
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
||||
You can configure the behavior of the RGB lighting by defining values inside `config.h`.
|
||||
|
||||
### Required Configuration
|
||||
|
||||
At minimum you have to define the pin your LED strip is connected to and the number of LEDs connected.
|
||||
|
||||
```c
|
||||
#define RGB_DI_PIN D7 // The pin the LED strip is connected to
|
||||
#define RGBLED_NUM 14 // Number of LEDs in your strip
|
||||
```
|
||||
|
||||
### Optional Configuration
|
||||
|
||||
You can change the behavior of the RGB Lighting by setting these configuration values. Use `#define <Option> <Value>` in a `config.h` at the keyboard, revision, or keymap level.
|
||||
|
||||
| Option | Default Value | Description |
|
||||
|--------|---------------|-------------|
|
||||
| `RGBLIGHT_HUE_STEP` | 10 | How many hues you want to have available. |
|
||||
| `RGBLIGHT_SAT_STEP` | 17 | How many steps of saturation you'd like. |
|
||||
| `RGBLIGHT_VAL_STEP` | 17 | The number of levels of brightness you want. |
|
||||
| `RGBLIGHT_LIMIT_VAL` | 255 | Limit the val of HSV to limit the maximum brightness simply. |
|
||||
|
||||
### Animations
|
||||
|
||||
If you have `#define RGBLIGHT_ANIMATIONS` in your `config.h` you will have a number of animation modes you can cycle through using the `RGB_MOD` key. You can also `#define` other options to tweak certain animations.
|
||||
|
||||
| Option | Default Value | Description |
|
||||
|--------|---------------|-------------|
|
||||
| `RGBLIGHT_ANIMATIONS` | | `#define` this to enable animation modes. |
|
||||
| `RGBLIGHT_EFFECT_BREATHE_CENTER` | 1.85 | Used to calculate the curve for the breathing animation. Valid values 1.0-2.7. |
|
||||
| `RGBLIGHT_EFFECT_BREATHE_MAX` | 255 | The maximum brightness for the breathing mode. Valid values 1-255. |
|
||||
| `RGBLIGHT_EFFECT_SNAKE_LENGTH` | 4 | The number of LEDs to light up for the "snake" animation. |
|
||||
| `RGBLIGHT_EFFECT_KNIGHT_LENGTH` | 3 | The number of LEDs to light up for the "knight" animation. |
|
||||
| `RGBLIGHT_EFFECT_KNIGHT_OFFSET` | 0 | Start the knight animation this many LEDs from the start of the strip. |
|
||||
| `RGBLIGHT_EFFECT_KNIGHT_LED_NUM` | RGBLED_NUM | The number of LEDs to have the "knight" animation travel. |
|
||||
| `RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL` | 1000 | How long to wait between light changes for the "christmas" animation. Specified in ms. |
|
||||
| `RGBLIGHT_EFFECT_CHRISTMAS_STEP` | 2 | How many LED's to group the red/green colors by for the christmas mode. |
|
||||
|
||||
You can also tweak the behavior of the animations by defining these consts in your `keymap.c`. These mostly affect the speed different modes animate at.
|
||||
|
||||
```c
|
||||
// How long (in ms) to wait between animation steps for the breathing mode
|
||||
const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5};
|
||||
|
||||
// How long (in ms) to wait between animation steps for the rainbow mode
|
||||
const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30};
|
||||
|
||||
// How long (in ms) to wait between animation steps for the swirl mode
|
||||
const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20};
|
||||
|
||||
// How long (in ms) to wait between animation steps for the snake mode
|
||||
const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20};
|
||||
|
||||
// How long (in ms) to wait between animation steps for the knight modes
|
||||
const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31};
|
||||
|
||||
// These control which colors are selected for the gradient mode
|
||||
const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90};
|
||||
```
|
||||
|
||||
### LED Control
|
||||
|
||||
Look in `rgblights.h` for all available functions, but if you want to control all or some LEDs your goto functions are:
|
||||
|
||||
```c
|
||||
rgblight_disable(); // turn all lights off
|
||||
rgblight_enable(); // turn lights on, based on their previous state (stored in EEPROM)
|
||||
|
||||
rgblight_setrgb(r, g, b); // where r/g/b is a number from 0..255. Turns all the LEDs to this color
|
||||
rgblight_sethsv(h, s, v); // HSV color control
|
||||
rgblight_setrgb_at(r,g,b, LED); // control a single LED. 0 <= LED < RGBLED_NUM
|
||||
rgblight_sethsv_at(h,s,v, LED); // control a single LED. 0 <= LED < RGBLED_NUM
|
||||
```
|
||||
|
||||
## RGB Lighting Keycodes
|
||||
|
||||
These control the RGB Lighting functionality.
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-------------------|----------|--------------------------------------------------------------------|
|
||||
|`RGB_TOG` | |Toggle RGB lighting on or off |
|
||||
|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
|
||||
|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held|
|
||||
|`RGB_HUI` | |Increase hue |
|
||||
|`RGB_HUD` | |Decrease hue |
|
||||
|`RGB_SAI` | |Increase saturation |
|
||||
|`RGB_SAD` | |Decrease saturation |
|
||||
|`RGB_VAI` | |Increase value (brightness) |
|
||||
|`RGB_VAD` | |Decrease value (brightness) |
|
||||
|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode |
|
||||
|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode |
|
||||
|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode |
|
||||
|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode |
|
||||
|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode |
|
||||
|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode |
|
||||
|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode |
|
||||
|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
|
||||
|
||||
note: for backwards compatibility, `RGB_SMOD` is an alias for `RGB_MOD`.
|
||||
|
||||
## Hardware Modification
|
||||
|
||||

|
||||
|
||||
Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY).
|
||||
|
||||
For this mod, you need an unused pin wiring to DI of WS2812 strip. After wiring the VCC, GND, and DI, you can enable the underglow in your Makefile.
|
||||
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
||||
In order to use the underglow animation functions, you need to have `#define RGBLIGHT_ANIMATIONS` in your `config.h`.
|
||||
|
||||
Please add the following options into your config.h, and set them up according your hardware configuration. These settings are for the `F4` pin by default:
|
||||
|
||||
#define RGB_DI_PIN F4 // The pin your RGB strip is wired to
|
||||
#define RGBLED_NUM 14 // Number of LEDs
|
||||
|
||||
You'll need to edit `RGB_DI_PIN` to the pin you have your `DI` on your RGB strip wired to.
|
@@ -1,8 +1,8 @@
|
||||
## Space Cadet Shift: The future, built in
|
||||
## Space Cadet Shift: The Future, Built In
|
||||
|
||||
Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) the Space Cadet Shift quite well. Essentially, you hit the left Shift on its own, and you get an opening parenthesis; hit the right Shift on its own, and you get the closing one. When hit with other keys, the Shift key keeps working as it always does. Yes, it's as cool as it sounds.
|
||||
|
||||
To use it, use `KC_LSPO` (Left Shift, Parens Open) for your left Shift on your keymap, and `KC_RSPC` (Right Shift, Parens Close) for your right Shift.
|
||||
To use it, use `KC_LSPO` (Left Shift, Parenthesis Open) for your left Shift on your keymap, and `KC_RSPC` (Right Shift, Parenthesis Close) for your right Shift.
|
||||
|
||||
It's defaulted to work on US keyboards, but if your layout uses different keys for parenthesis, you can define those in your `config.h` like this:
|
||||
|
26
docs/feature_space_shift_cadet.md
Normal file
26
docs/feature_space_shift_cadet.md
Normal file
@@ -0,0 +1,26 @@
|
||||
## Space Cadet Shift Enter: The future, built in
|
||||
|
||||
Based on the Space Cadet Shift by Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/)
|
||||
Essentially, you hit the Shift on its own, and it acts as the enter key. When hit with other keys, the Shift key keeps working as it always does. Yes, it's as cool as it sounds. This solution works better than using a macro since the timers defined in quantum allow us to tell when another key is pressed, rather than just having a janky timer than results in accidental endlines.
|
||||
|
||||
To use it, use `KC_SFTENT` (Shift, Enter) for any Shift on your keymap.
|
||||
|
||||
It's defaulted to work on US keyboards, but if you'd like to use a different key for Enter, you can define those in your `config.h` like this:
|
||||
|
||||
#define SFTENT_KEY KC_ENT
|
||||
|
||||
|
||||
The only other thing you're going to want to do is create a `rules.mk` in your keymap directory and set the following:
|
||||
|
||||
```
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
```
|
||||
|
||||
This is just to keep the keyboard from going into command mode when you hold both Shift keys at the same time.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PLEASE NOTE: this feature uses the same timers as the Space Cadet Shift feature, so using them in tandem may produce unwanted results.
|
||||
|
108
docs/feature_stenography.md
Normal file
108
docs/feature_stenography.md
Normal file
@@ -0,0 +1,108 @@
|
||||
# Stenography in QMK
|
||||
|
||||
[Stenography](https://en.wikipedia.org/wiki/Stenotype) is a method of writing most often used by court reports, closed-captioning, and real-time transcription for the deaf. In stenography words are chorded syllable by syllable with a mixture of spelling, phonetic, and shortcut (briefs) strokes. Professional stenographers can reach 200-300 WPM without any of the strain usually found in standard typing and with far fewer errors (>99.9% accuracy).
|
||||
|
||||
The [Open Steno Project](http://www.openstenoproject.org/) has built an open-source program called Plover that provides real-time translation of steno strokes into words and commands. It has an established dictionary and supports
|
||||
|
||||
## Plover with QWERTY Keyboard
|
||||
|
||||
Plover can work with any standard QWERTY keyboard, although it is more efficient if the keyboard supports NKRO (n-key rollover) to allow Plover to see all the pressed keys at once. An example keymap for Plover can be found in `planck/keymaps/default`. Switching to the `PLOVER` layer adjusts the position of the keyboard to support the number bar.
|
||||
|
||||
To use Plover with QMK just enable NKRO and optionally adjust your layout if you have anything other than a standard layout. You may also want to purchase some steno-friendly keycaps to make it easier to hit multiple keys.
|
||||
|
||||
## Plover with Steno Protocol
|
||||
|
||||
Plover also understands the language of several steno machines. QMK can speak a couple of these languages, TX Bolt and GeminiPR. An example layout can be found in `planck/keymaps/steno`.
|
||||
|
||||
When QMK speaks to Plover over a steno protocol Plover will not use the keyboard as input. This means that you can switch back and forth between a standard keyboard and your steno keyboard, or even switch layers from Plover to standard and back without needing to activate/deactivate Plover.
|
||||
|
||||
In this mode Plover expects to speak with a steno machine over a serial port so QMK will present itself to the operating system as a virtual serial port in addition to a keyboard. By default QMK will speak the TX Bolt protocol but can be switched to GeminiPR; the last protocol used is stored in non-volatile memory so QMK will use the same protocol on restart.
|
||||
|
||||
> Note: Due to hardware limitations you may not be able to run both a virtual serial port and mouse emulation at the same time.
|
||||
|
||||
### TX Bolt
|
||||
|
||||
TX Bolt communicates the status of 24 keys over a very simple protocol in variable-sized (1-5 byte) packets.
|
||||
|
||||
### GeminiPR
|
||||
|
||||
GeminiPR encodes 42 keys into a 6-byte packet. While TX Bolt contains everything that is necessary for standard stenography, GeminiPR opens up many more options, including supporting non-English theories.
|
||||
|
||||
## Configuring QMK for Steno
|
||||
|
||||
Firstly, enable steno in your keymap's Makefile. You may also need disable mousekeys, extra keys, or another USB endpoint to prevent conflicts. The builtin USB stack for some processors only supports a certain number of USB endpoints and the virtual serial port needed for steno fills 3 of them.
|
||||
|
||||
```Makefile
|
||||
STENO_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no
|
||||
```
|
||||
|
||||
In your keymap create a new layer for Plover. You will need to include `keymap_steno.h`. See `planck/keymaps/steno/keymap.c` for an example. Remember to create a key to switch to the layer as well as a key for exiting the layer. If you would like to switch modes on the fly you can use the keycodes `QK_STENO_BOLT` and `QK_STENO_GEMINI`. If you only want to use one of the protocols you may set it up in your initialization function:
|
||||
|
||||
```C
|
||||
void matrix_init_user() {
|
||||
steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT
|
||||
}
|
||||
```
|
||||
|
||||
Once you have your keyboard flashed launch Plover. Click the 'Configure...' button. In the 'Machine' tab select the Stenotype Machine that corresponds to your desired protocol. Click the 'Configure...' button on this tab and enter the serial port or click 'Scan'. Baud rate is fine at 9600 (although you should be able to set as high as 115200 with no issues). Use the default settings for everything else (Data Bits: 8, Stop Bits: 1, Parity: N, no flow control).
|
||||
|
||||
On the display tab click 'Open stroke display'. With Plover disabled you should be able to hit keys on your keyboard and see them show up in the stroke display window. Use this to make sure you have set up your keymap correctly. You are now ready to steno!
|
||||
|
||||
## Learning Stenography
|
||||
|
||||
* [Learn Plover!](https://sites.google.com/site/ploverdoc/)
|
||||
* [QWERTY Steno](http://qwertysteno.com/Home/)
|
||||
* [Steno Jig](https://joshuagrams.github.io/steno-jig/)
|
||||
* More resources at the Plover [Learning Stenography](https://github.com/openstenoproject/plover/wiki/Learning-Stenography) wiki
|
||||
|
||||
## Keycode Reference
|
||||
|
||||
As defined in `keymap_steno.h`.
|
||||
|
||||
> Note: TX Bolt does not support the full set of keys. The TX Bolt implementation in QMK will map the GeminiPR keys to the nearest TX Bolt key so that one key map will work for both.
|
||||
|
||||
|GeminiPR|TX Bolt|Steno Key|
|
||||
|--------|-------|-----------|
|
||||
|`STN_N1`|`STN_NUM`|Number bar #1|
|
||||
|`STN_N2`|`STN_NUM`|Number bar #2|
|
||||
|`STN_N3`|`STN_NUM`|Number bar #3|
|
||||
|`STN_N4`|`STN_NUM`|Number bar #4|
|
||||
|`STN_N5`|`STN_NUM`|Number bar #5|
|
||||
|`STN_N6`|`STN_NUM`|Number bar #6|
|
||||
|`STN_N7`|`STN_NUM`|Number bar #7|
|
||||
|`STN_N8`|`STN_NUM`|Number bar #8|
|
||||
|`STN_N9`|`STN_NUM`|Number bar #9|
|
||||
|`STN_NA`|`STN_NUM`|Number bar #A|
|
||||
|`STN_NB`|`STN_NUM`|Number bar #B|
|
||||
|`STN_NC`|`STN_NUM`|Number bar #C|
|
||||
|`STN_S1`|`STN_SL`| `S-` upper|
|
||||
|`STN_S2`|`STN_SL`| `S-` lower|
|
||||
|`STN_TL`|`STN_TL`| `T-`|
|
||||
|`STN_KL`|`STN_KL`| `K-`|
|
||||
|`STN_PL`|`STN_PL`| `P-`|
|
||||
|`STN_WL`|`STN_WL`| `W-`|
|
||||
|`STN_HL`|`STN_HL`| `H-`|
|
||||
|`STN_RL`|`STN_RL`| `R-`|
|
||||
|`STN_A`|`STN_A`| `A` vowel|
|
||||
|`STN_O`|`STN_O`| `O` vowel|
|
||||
|`STN_ST1`|`STN_STR`| `*` upper-left |
|
||||
|`STN_ST2`|`STN_STR`| `*` lower-left|
|
||||
|`STN_ST3`|`STN_STR`| `*` upper-right|
|
||||
|`STN_ST4`|`STN_STR`| `*` lower-right|
|
||||
|`STN_E`|`STN_E`| `E` vowel|
|
||||
|`STN_U`|`STN_U`| `U` vowel|
|
||||
|`STN_FR`|`STN_FR`| `-F`|
|
||||
|`STN_PR`|`STN_PR`| `-P`|
|
||||
|`STN_RR`|`STN_RR`| `-R`|
|
||||
|`STN_BR`|`STN_BR`| `-B`|
|
||||
|`STN_LR`|`STN_LR`| `-L`|
|
||||
|`STN_GR`|`STN_GR`| `-G`|
|
||||
|`STN_TR`|`STN_TR`| `-T`|
|
||||
|`STN_SR`|`STN_SR`| `-S`|
|
||||
|`STN_DR`|`STN_DR`| `-D`|
|
||||
|`STN_ZR`|`STN_ZR`| `-Z`|
|
||||
|`STN_FN`|| (GeminiPR only)|
|
||||
|`STN_RES1`||(GeminiPR only)|
|
||||
|`STN_RES2`||(GeminiPR only)|
|
||||
|`STN_PWR`||(GeminiPR only)|
|
@@ -1,4 +1,4 @@
|
||||
# Tap Dance: A single key can do 3, 5, or 100 different things
|
||||
# Tap Dance: A Single Key Can Do 3, 5, or 100 Different Things
|
||||
|
||||
<!-- FIXME: Break this up into multiple sections -->
|
||||
|
||||
@@ -14,7 +14,7 @@ The implementation hooks into two parts of the system, to achieve this: into `pr
|
||||
|
||||
But lets start with how to use it, first!
|
||||
|
||||
First, you will need `TAP_DANCE_ENABLE=yes` in your `Makefile`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()`, takes a number, which will later be used as an index into the `tap_dance_actions` array.
|
||||
First, you will need `TAP_DANCE_ENABLE=yes` in your `rules.mk`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()`, takes a number, which will later be used as an index into the `tap_dance_actions` array.
|
||||
|
||||
This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are three possible options:
|
||||
|
||||
@@ -42,7 +42,7 @@ For the sake of flexibility, tap-dance actions can be either a pair of keycodes,
|
||||
|
||||
Here's a simple example for a single definition:
|
||||
|
||||
1. In your `makefile`, add `TAP_DANCE_ENABLE = yes`
|
||||
1. In your `rules.mk`, add `TAP_DANCE_ENABLE = yes`
|
||||
2. In your `config.h` (which you can copy from `qmk_firmware/keyboards/planck/config.h` to your keymap directory), add `#define TAPPING_TERM 200`
|
||||
3. In your `keymap.c` file, define the variables and definitions, then add to your keymap:
|
||||
|
||||
@@ -63,20 +63,23 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
TD(TD_ESC_CAPS)
|
||||
```
|
||||
|
||||
## Complex Example
|
||||
## Complex Examples
|
||||
|
||||
Here's a more complex example involving custom actions:
|
||||
This section details several complex tap dance examples.
|
||||
All the enums used in the examples are declared like this:
|
||||
|
||||
```c
|
||||
// Enums defined for all examples:
|
||||
enum {
|
||||
CT_SE = 0,
|
||||
CT_CLN,
|
||||
CT_EGG,
|
||||
CT_FLSH,
|
||||
X_TAP_DANCE
|
||||
};
|
||||
|
||||
/* Have the above three on the keymap, TD(CT_SE), etc... */
|
||||
|
||||
```
|
||||
### Example 1: Send `:` on Single Tap, `;` on Double Tap
|
||||
```c
|
||||
void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
register_code (KC_RSFT);
|
||||
@@ -95,6 +98,13 @@ void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
}
|
||||
}
|
||||
|
||||
//All tap dance functions would go here. Only showing this one.
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset)
|
||||
};
|
||||
```
|
||||
### Example 2: Send "Safety Dance!" After 100 Taps
|
||||
```c
|
||||
void dance_egg (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count >= 100) {
|
||||
SEND_STRING ("Safety dance!");
|
||||
@@ -102,6 +112,14 @@ void dance_egg (qk_tap_dance_state_t *state, void *user_data) {
|
||||
}
|
||||
}
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg)
|
||||
};
|
||||
```
|
||||
|
||||
### Example 3: Turn LED Lights On Then Off, One at a Time
|
||||
|
||||
```c
|
||||
// on each tap, light up one led, from right to left
|
||||
// on the forth tap, turn them off from right to left
|
||||
void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
|
||||
@@ -132,7 +150,7 @@ void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
}
|
||||
}
|
||||
|
||||
// if the flash state didnt happen, then turn off leds, left to right
|
||||
// if the flash state didn't happen, then turn off LEDs, left to right
|
||||
void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
ergodox_right_led_1_off();
|
||||
_delay_ms(50);
|
||||
@@ -141,6 +159,7 @@ void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
ergodox_right_led_3_off();
|
||||
}
|
||||
|
||||
//All tap dances now put together. Example 3 is "CT_FLASH"
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[CT_SE] = ACTION_TAP_DANCE_DOUBLE (KC_SPC, KC_ENT)
|
||||
,[CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset)
|
||||
@@ -148,3 +167,84 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
,[CT_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset)
|
||||
};
|
||||
```
|
||||
|
||||
### Example 4: 'Quad Function Tap-Dance'
|
||||
|
||||
By [DanielGGordon](https://github.com/danielggordon)
|
||||
|
||||
Allow one key to have 4 (or more) functions, depending on number of presses, and if the key is held or tapped.
|
||||
Below is a specific example:
|
||||
* Tap = Send `x`
|
||||
* Hold = Send `Control`
|
||||
* Double Tap = Send `Escape`
|
||||
* Double Tap and Hold = Send `Alt`
|
||||
|
||||
The following example can be easily expanded to more than 4 quite easily:
|
||||
```c
|
||||
//**************** Definitions needed for quad function to work *********************//
|
||||
//Enums used to clearly convey the state of the tap dance
|
||||
enum {
|
||||
SINGLE_TAP = 1,
|
||||
SINGLE_HOLD = 2,
|
||||
DOUBLE_TAP = 3,
|
||||
DOUBLE_HOLD = 4,
|
||||
DOUBLE_SINGLE_TAP = 5 //send SINGLE_TAP twice - NOT DOUBLE_TAP
|
||||
// Add more enums here if you want for triple, quadruple, etc.
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
bool is_press_action;
|
||||
int state;
|
||||
} tap;
|
||||
|
||||
int cur_dance (qk_tap_dance_state_t *state) {
|
||||
if (state->count == 1) {
|
||||
//If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP
|
||||
if (state->interrupted || state->pressed==0) return SINGLE_TAP;
|
||||
else return SINGLE_HOLD;
|
||||
}
|
||||
//If count = 2, and it has been interrupted - assume that user is trying to type the letter associated
|
||||
//with single tap. In example below, that means to send `xx` instead of `Escape`.
|
||||
else if (state->count == 2) {
|
||||
if (state->interrupted) return DOUBLE_SINGLE_TAP;
|
||||
else if (state->pressed) return DOUBLE_HOLD;
|
||||
else return DOUBLE_TAP;
|
||||
}
|
||||
else return 6; //magic number. At some point this method will expand to work for more presses
|
||||
}
|
||||
|
||||
//**************** Definitions needed for quad function to work *********************//
|
||||
|
||||
//instanalize an instance of 'tap' for the 'x' tap dance.
|
||||
static tap xtap_state = {
|
||||
.is_press_action = true,
|
||||
.state = 0
|
||||
};
|
||||
|
||||
void x_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||
xtap_state.state = cur_dance(state);
|
||||
switch (xtap_state.state) {
|
||||
case SINGLE_TAP: register_code(KC_X); break;
|
||||
case SINGLE_HOLD: register_code(KC_LCTRL); break;
|
||||
case DOUBLE_TAP: register_code(KC_ESC); break;
|
||||
case DOUBLE_HOLD: register_code(KC_LALT); break;
|
||||
case DOUBLE_SINGLE_TAP: register_code(KC_X); unregister_code(KC_X); register_code(KC_X);
|
||||
//Last case is for fast typing. Assuming your key is `f`:
|
||||
//For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
|
||||
//In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
|
||||
}
|
||||
}
|
||||
|
||||
void x_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch (xtap_state.state) {
|
||||
case SINGLE_TAP: unregister_code(KC_X); break;
|
||||
case SINGLE_HOLD: unregister_code(KC_LCTRL); break;
|
||||
case DOUBLE_TAP: unregister_code(KC_ESC); break;
|
||||
case DOUBLE_HOLD: unregister_code(KC_LALT);
|
||||
case DOUBLE_SINGLE_TAP: unregister_code(KC_X);
|
||||
}
|
||||
xtap_state.state = 0;
|
||||
}
|
||||
```
|
||||
And then simply add this to your list of tap dance functions:
|
||||
`[X_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset)`
|
80
docs/feature_terminal.md
Normal file
80
docs/feature_terminal.md
Normal file
@@ -0,0 +1,80 @@
|
||||
# Terminal
|
||||
|
||||
> This feature is currently *huge* at 4400 bytes, and should probably only be put on boards with a lot of memory, or for fun.
|
||||
|
||||
The terminal feature is a command-line-like interface designed to communicate through a text editor with keystrokes. It's beneficial to turn off auto-indent features in your editor.
|
||||
|
||||
To enable, stick this in your `rules.mk` or `Makefile`:
|
||||
|
||||
TERMINAL_ENABLE = yes
|
||||
|
||||
And use the `TERM_ON` and `TERM_OFF` keycodes to turn it on or off.
|
||||
|
||||
When enabled, a `> ` prompt will appear, where you'll be able to type, backspace (a bell will ding if you reach the beginning and audio is enabled), and hit enter to send the command. Arrow keys are currently disabled so it doesn't get confused. Moving your cursor around with the mouse is discouraged.
|
||||
|
||||
`#define TERMINAL_HELP` enables some other output helpers that aren't really needed with this page.
|
||||
|
||||
## Future Ideas
|
||||
|
||||
* Keyboard/user-extensible commands
|
||||
* Smaller footprint
|
||||
* Arrow key support
|
||||
* Command history
|
||||
* SD card support
|
||||
* LCD support for buffer display
|
||||
* Keycode -> name string LUT
|
||||
* Layer status
|
||||
* *Analog/digital port read/write*
|
||||
* RGB mode stuff
|
||||
* Macro definitions
|
||||
* EEPROM read/write
|
||||
* Audio control
|
||||
|
||||
## Current Commands
|
||||
|
||||
### `about`
|
||||
|
||||
Prints out the current version of QMK with a build date:
|
||||
|
||||
```
|
||||
> about
|
||||
QMK Firmware
|
||||
v0.5.115-7-g80ed73-dirty
|
||||
Built: 2017-08-29-20:24:44
|
||||
```
|
||||
|
||||
### `help`
|
||||
|
||||
Prints out the available commands:
|
||||
|
||||
```
|
||||
> help
|
||||
commands available:
|
||||
about help keycode keymap exit
|
||||
```
|
||||
|
||||
### `keycode <layer> <row> <col>`
|
||||
|
||||
Prints out the keycode value of a certain layer, row, and column:
|
||||
|
||||
```
|
||||
> keycode 0 1 0
|
||||
0x29 (41)
|
||||
```
|
||||
|
||||
### `keymap <layer>`
|
||||
|
||||
Prints out the entire keymap for a certain layer
|
||||
|
||||
```
|
||||
> keymap 0
|
||||
0x002b, 0x0014, 0x001a, 0x0008, 0x0015, 0x0017, 0x001c, 0x0018, 0x000c, 0x0012, 0x0013, 0x002a,
|
||||
0x0029, 0x0004, 0x0016, 0x0007, 0x0009, 0x000a, 0x000b, 0x000d, 0x000e, 0x000f, 0x0033, 0x0034,
|
||||
0x00e1, 0x001d, 0x001b, 0x0006, 0x0019, 0x0005, 0x0011, 0x0010, 0x0036, 0x0037, 0x0038, 0x0028,
|
||||
0x5cd6, 0x00e0, 0x00e2, 0x00e3, 0x5cd4, 0x002c, 0x002c, 0x5cd5, 0x0050, 0x0051, 0x0052, 0x004f,
|
||||
>
|
||||
```
|
||||
|
||||
### `exit`
|
||||
|
||||
Exits the terminal - same as `TERM_OFF`.
|
10
docs/feature_thermal_printer.md
Normal file
10
docs/feature_thermal_printer.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Thermal Printer
|
||||
|
||||
<!-- FIXME: Describe thermal printers support here. -->
|
||||
|
||||
## Thermal Printer Keycodes
|
||||
|
||||
|Key |Description |
|
||||
|-----------|----------------------------------------|
|
||||
|`PRINT_ON` |Start printing everything the user types|
|
||||
|`PRINT_OFF`|Stop printing everything the user types |
|
@@ -1,4 +1,4 @@
|
||||
# Unicode support
|
||||
# Unicode Support
|
||||
|
||||
There are three Unicode keymap definition method available in QMK:
|
||||
|
||||
@@ -24,11 +24,12 @@ sort of like macro. Unfortunately, each OS has different ideas on how Unicode is
|
||||
This is the current list of Unicode input method in QMK:
|
||||
|
||||
* UC_OSX: MacOS Unicode Hex Input support. Works only up to 0xFFFF. Disabled by default. To enable: go to System Preferences -> Keyboard -> Input Sources, and enable Unicode Hex.
|
||||
* UC_OSX_RALT: Same as UC_OSX, but sends the Right Alt key for unicode input
|
||||
* UC_LNX: Unicode input method under Linux. Works up to 0xFFFFF. Should work almost anywhere on ibus enabled distros. Without ibus, this works under GTK apps, but rarely anywhere else.
|
||||
* UC_WIN: (not recommended) Windows built-in Unicode input. To enable: create registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad`, set its value to 1, and reboot. This method is not recommended because of reliability and compatibility issue, use WinCompose method below instead.
|
||||
* UC_WINC: Windows Unicode input using WinCompose. Requires [WinCompose](https://github.com/samhocevar/wincompose). Works reliably under many (all?) variations of Windows.
|
||||
|
||||
# Additional language support
|
||||
# Additional Language Support
|
||||
|
||||
In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware.
|
||||
|
||||
@@ -51,4 +52,3 @@ In the default script of AutoHotkey you can define custom hotkeys.
|
||||
|
||||
The hotkeys above are for the combination CtrlAltGui and CtrlAltGuiShift plus the letter a.
|
||||
AutoHotkey inserts the Text right of `Send, ` when this combination is pressed.
|
||||
|
95
docs/feature_userspace.md
Normal file
95
docs/feature_userspace.md
Normal file
@@ -0,0 +1,95 @@
|
||||
# Userspace: Sharing Code Between Keymaps
|
||||
|
||||
If you use more than one keyboard with a similar keymap, you might see the benefit in being able to share code between them. Create your own folder in `users/` named the same as your keymap (ideally your github username, `<name>`) with the following structure:
|
||||
|
||||
* `/users/<name>/` (added to the path automatically)
|
||||
* `readme.md`
|
||||
* `rules.mk` (included automatically)
|
||||
* `<name>.h` (optional)
|
||||
* `<name>.c` (optional)
|
||||
|
||||
`<name>.c` will need to be added to the SRC in `rules.mk` like this:
|
||||
|
||||
SRC += <name>.c
|
||||
|
||||
Additional files may be added in the same way - it's recommended you have one named `<name>`.c/.h though.
|
||||
|
||||
All this only happens when you build a keymap named `<name>`, like this:
|
||||
|
||||
make planck:<name>
|
||||
|
||||
For example,
|
||||
|
||||
make planck:jack
|
||||
|
||||
Will include the `/users/jack/` folder in the path, along with `/users/jack/rules.mk`.
|
||||
|
||||
## Readme
|
||||
|
||||
Please include authorship (your name, github username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses).
|
||||
|
||||
## Example
|
||||
|
||||
For a brief example, checkout `/users/_example/` , or for a more detailed examples check out [`template.h`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.h) and [`template.c`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.c) in `/users/drashna/` .
|
||||
|
||||
### Consolidated Macros
|
||||
|
||||
If you wanted to consolidate macros and other functions into your userspace for all of your keymaps, you can do that. The issue is that you then cannot call any function defined in your userspace, or it gets complicated. To better handle this, you can call the functions here and create new functions to use in individual keymaps.
|
||||
|
||||
First, you'd want to go through all of your `keymap.c` files and replace `process_record_user` with `process_record_keymap` instead. This way, you can still use keyboard specific codes on those boards, and use your custom "global" keycodes as well. You'll also want to replace `SAFE_RANGE` with `NEW_SAFE_RANGE` so that you wont have any overlapping keycodes
|
||||
|
||||
Then add `#include <name.h>` to all of your keymap.c files. This allows you to use these new keycodes without having to redefine them in each keymap.
|
||||
|
||||
Once you've done that, you'll want to set the keycode definitions that you need to the `<name>.h` file. For instance:
|
||||
```
|
||||
#ifndef USERSPACE
|
||||
#define USERSPACE
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
// Define all of
|
||||
enum custom_keycodes {
|
||||
KC_MAKE = SAFE_RANGE,
|
||||
NEW_SAFE_RANGE //use "NEW_SAFE_RANGE" for keymap specific codes
|
||||
};
|
||||
|
||||
#endif
|
||||
```
|
||||
|
||||
Now you want to create the `<name>.c` file, and add this content to it:
|
||||
|
||||
```
|
||||
#include "<name>.h"
|
||||
#include "quantum.h"
|
||||
#include "action.h"
|
||||
#include "version.h"
|
||||
|
||||
__attribute__ ((weak))
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_MAKE:
|
||||
if (!record->event.pressed) {
|
||||
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
|
||||
#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
|
||||
":dfu "
|
||||
#elif defined(BOOTLOADER_HALFKAY)
|
||||
":teensy "
|
||||
#elif defined(BOOTLOADER_CATERINA)
|
||||
":avrdude "
|
||||
#endif
|
||||
SS_TAP(X_ENTER));
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return process_record_keymap(keycode, record);
|
||||
}
|
||||
```
|
||||
|
||||
This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make <keyboard>:<keymap">`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time.
|
||||
|
||||
Additionally, this should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely (and will dump the HEX in the ".build" folder instead).
|
26
docs/features.md
Normal file
26
docs/features.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# QMK Features
|
||||
|
||||
QMK has a staggering number of features for building your keyboard. It can take some time to understand all of them and determine which one will achieve your goal.
|
||||
|
||||
|
||||
* [Advanced Keycodes](feature_advanced_keycodes.md) - Change layers, type shifted keys, and more. Go beyond typing simple characters.
|
||||
* [Audio](feature_audio.md) - Connect a speaker to your keyboard for audio feedback, midi support, and music mode.
|
||||
* [Auto Shift](feature_auto_shift.md) - Tap for the normal key, hold slightly longer for its shifted state.
|
||||
* [Backlight](feature_backlight.md) - LED lighting support for your keyboard.
|
||||
* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys.
|
||||
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
|
||||
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
|
||||
* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
|
||||
* [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior.
|
||||
* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key.
|
||||
* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard.
|
||||
* [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard.
|
||||
* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a PS/2 mouse directly to your keyboard.
|
||||
* [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard.
|
||||
* [Space Cadet](feature_space_cadet.md) - Use your left/right shift keys to type parenthesis and brackets.
|
||||
* [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use.
|
||||
* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want.
|
||||
* [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard.
|
||||
* [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type.
|
||||
* [Unicode](feature_unicode.md) - Unicode input support.
|
||||
* [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards.
|
@@ -1,105 +0,0 @@
|
||||
# QMK Features
|
||||
|
||||
|
||||
## Space Cadet Shift: The future, built in
|
||||
|
||||
Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) the Space Cadet Shift quite well. Essentially, you hit the left Shift on its own, and you get an opening parenthesis; hit the right Shift on its own, and you get the closing one. When hit with other keys, the Shift key keeps working as it always does. Yes, it's as cool as it sounds. Head on over to the [Space Cadet Shift](space_cadet_shift.md) page to read about it.
|
||||
|
||||
## The Leader key: A new kind of modifier
|
||||
|
||||
Most modifiers have to be held or toggled. But what if you had a key that indicated the start of a sequence? You could press that key and then rapidly press 1-3 more keys to trigger a macro, or enter a special layer, or anything else you might want to do. To learn more about it check out the [Leader Key](leader_key.md) page.
|
||||
|
||||
## Tap Dance: A single key can do 3, 5, or 100 different things
|
||||
|
||||
Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. Read more about it on the [Tap Dance](tap_dance.md) page.
|
||||
|
||||
## Temporarily setting the default layer
|
||||
|
||||
`DF(layer)` - sets default layer to _layer_. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does.
|
||||
|
||||
## Macro shortcuts: Send a whole string when pressing just one key
|
||||
|
||||
How would you like a single keypress to send a whole word, sentence, paragraph, or even document? Head on over to the [Macros](macros.md) page to read up on all aspects of Simple and Dynamic Macros.
|
||||
|
||||
## Additional keycode aliases for software-implemented layouts \(Colemak, Dvorak, etc\)
|
||||
|
||||
Everything is assuming you're in Qwerty \(in software\) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap:
|
||||
|
||||
```
|
||||
#include <keymap_colemak.h>
|
||||
```
|
||||
|
||||
If you use Dvorak, use `keymap_dvorak.h` instead of `keymap_colemak.h` for this line. After including this line, you will get access to:
|
||||
|
||||
* `CM_*` for all of the Colemak-equivalent characters
|
||||
* `DV_*` for all of the Dvorak-equivalent characters
|
||||
|
||||
These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features.
|
||||
|
||||
To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F`. Using `KC_F` under these same circumstances would result in `T`.
|
||||
|
||||
## Backlight Breathing
|
||||
|
||||
In order to enable backlight breathing, the following line must be added to your config.h file.
|
||||
|
||||
```
|
||||
#define BACKLIGHT_BREATHING
|
||||
```
|
||||
|
||||
The following function calls are used to control the breathing effect.
|
||||
|
||||
* `breathing_enable()` - Enable the free-running breathing effect.
|
||||
* `breathing_disable()` - Disable the free-running breathing effect immediately.
|
||||
* `breathing_self_disable()` - Disable the free-running breathing effect after the current effect ends.
|
||||
* `breathing_toggle()` - Toggle the free-running breathing effect.
|
||||
* `breathing_defaults()` - Reset the speed and brightness settings of the breathing effect.
|
||||
|
||||
The following function calls are used to control the maximum brightness of the breathing effect.
|
||||
|
||||
* `breathing_intensity_set(value)` - Set the brightness of the breathing effect when it is at its max value.
|
||||
* `breathing_intensity_default()` - Reset the brightness of the breathing effect to the default value based on the current backlight intensity.
|
||||
|
||||
The following function calls are used to control the cycling speed of the breathing effect.
|
||||
|
||||
* `breathing_speed_set(value)` - Set the speed of the breathing effect - how fast it cycles.
|
||||
* `breathing_speed_inc(value)` - Increase the speed of the breathing effect by a fixed value.
|
||||
* `breathing_speed_dec(value)` - Decrease the speed of the breathing effect by a fixed value.
|
||||
* `breathing_speed_default()` - Reset the speed of the breathing effect to the default value.
|
||||
|
||||
The following example shows how to enable the backlight breathing effect when the FUNCTION layer macro button is pressed:
|
||||
|
||||
```
|
||||
case MACRO_FUNCTION:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_set(3);
|
||||
breathing_enable();
|
||||
layer_on(LAYER_FUNCTION);
|
||||
}
|
||||
else
|
||||
{
|
||||
breathing_speed_set(1);
|
||||
breathing_self_disable();
|
||||
layer_off(LAYER_FUNCTION);
|
||||
}
|
||||
break;
|
||||
```
|
||||
|
||||
The following example shows how to pulse the backlight on-off-on when the RAISED layer macro button is pressed:
|
||||
|
||||
```
|
||||
case MACRO_RAISED:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
layer_on(LAYER_RAISED);
|
||||
breathing_speed_set(2);
|
||||
breathing_pulse();
|
||||
update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
|
||||
}
|
||||
else
|
||||
{
|
||||
layer_off(LAYER_RAISED);
|
||||
update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
|
||||
}
|
||||
break;
|
||||
```
|
104
docs/flashing.md
Normal file
104
docs/flashing.md
Normal file
@@ -0,0 +1,104 @@
|
||||
# Flashing Instructions and Bootloader Information
|
||||
|
||||
There are quite a few different types of bootloaders that keyboards use, and just about all of the use a different flashing method. Luckily, projects like the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) aim to be compatible with all the different types without having to think about it much, but this article will describe the different types of bootloaders, and available methods for flashing them.
|
||||
|
||||
If you have a bootloader selected with the `BOOTLOADER` variable in your `rules.mk`, QMK will automatically calculate if your .hex file is the right size to be flashed to the device, and output the total size it bytes (along with the max). To run this process manually, compile with the target `check-size`, eg `make planck/rev4:default:check-size`.
|
||||
|
||||
## DFU
|
||||
|
||||
Atmel's DFU bootloader comes on all atmega32u4 chips by default, and is used by many keyboards that have their own ICs on their PCBs (Older OLKB boards, Clueboards). Some keyboards may also use LUFA's DFU bootloader (or QMK's fork) (Newer OLKB boards) that adds in additional features specific to that hardware.
|
||||
|
||||
To ensure compatibility with the DFU bootloader, make sure this block is present your `rules.mk` (optionally with `lufa-dfu` or `qmk-dfu` instead):
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
|
||||
* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` in QMK (recommended command line)
|
||||
* [Atmel's Flip](http://www.atmel.com/tools/flip.aspx) (not recommended)
|
||||
|
||||
Flashing sequence:
|
||||
|
||||
1. Press the `RESET` keycode, or tap the RESET button (or short RST to GND).
|
||||
2. Wait for the OS to detect the device
|
||||
3. Erase the memory (may be done automatically)
|
||||
4. Flash a .hex file
|
||||
5. Reset the device into application mode (may be done automatically)
|
||||
|
||||
or:
|
||||
|
||||
make <keyboard>:<keymap>:dfu
|
||||
|
||||
### QMK DFU
|
||||
|
||||
QMK has a fork of the LUFA DFU bootloader that allows for a simple matrix scan for exiting the bootloader and returning to the application, as well as flashing an LED/making a ticking noise with a speaker when things are happening. To enable these features, use this block in your `config.h` (The key that exits the bootloader needs to be hooked-up to the INPUT and OUTPUT defined here):
|
||||
|
||||
#define QMK_ESC_OUTPUT F1 // usually COL
|
||||
#define QMK_ESC_INPUT D5 // usually ROW
|
||||
#define QMK_LED E6
|
||||
#define QMK_SPEAKER C6
|
||||
|
||||
The Manufacturer and Product names are automatically pulled from your `config.h`, and "Bootloader" is added to the product.
|
||||
|
||||
To generate this bootloader, use the `bootloader` target, eg `make planck/rev4:default:bootloader`.
|
||||
|
||||
To generate a production-ready .hex file (containing the application and the bootloader), use the `production` target, eg `make planck/rev4:default:production`.
|
||||
|
||||
## Caterina
|
||||
|
||||
Arduino boards and their clones use the [Caterina bootloader](https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/bootloaders/caterina) (any keyboard built with a Pro Micro, or clone), and uses the avr109 protocol to communicate through virtual serial. Bootloaders like [A-Star](https://www.pololu.com/docs/0J61/9) are based on Caterina.
|
||||
|
||||
To ensure compatibility with the Caterina bootloader, make sure this block is present your `rules.mk`:
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
BOOTLOADER = caterina
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
|
||||
* [avrdude](http://www.nongnu.org/avrdude/) with avr109 / `:avrdude` (recommended command line)
|
||||
* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS)
|
||||
|
||||
Flashing sequence:
|
||||
|
||||
1. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
|
||||
2. Wait for the OS to detect the device
|
||||
4. Flash a .hex file
|
||||
5. Wait for the device to reset automatically
|
||||
|
||||
or
|
||||
|
||||
make <keyboard>:<keymap>:avrdude
|
||||
|
||||
## Halfkay
|
||||
|
||||
Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0).
|
||||
|
||||
To ensure compatibility with the Halfkay bootloader, make sure this block is present your `rules.mk`:
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
BOOTLOADER = halfkay
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
|
||||
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html)
|
||||
* [Teensy Loader Command Line](https://www.pjrc.com/teensy/loader_cli.html) (recommended command line)
|
||||
|
||||
Flashing sequence:
|
||||
|
||||
1. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
|
||||
2. Wait for the OS to detect the device
|
||||
4. Flash a .hex file
|
||||
5. Reset the device into application mode (may be done automatically)
|
@@ -1,71 +1,10 @@
|
||||
# Build Environment Setup
|
||||
# Installing Build Tools
|
||||
|
||||
This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4.)
|
||||
This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4).
|
||||
|
||||
<!-- FIXME: We should have ARM instructions somewhere. -->
|
||||
|
||||
# Windows 10
|
||||
|
||||
## Creators Update
|
||||
If you have Windows 10 with Creators Update or later, you can build and flash the firmware directly. Before the Creators Update, only building was possible. If you don't have it yet or if are unsure, follow [these instructions](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update).
|
||||
|
||||
## Windows Subsystem for Linux
|
||||
In addition to the Creators Update, you need Windows 10 Subystem for Linux, so install it following [these instructions](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). If you already have the Windows 10 Subsystem for Linux from the Anniversary update it's recommended that you [upgrade](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) it to 16.04LTS, because some keyboards don't compile with the toolchains included in 14.04LTS. Note that you need to know what your are doing if you chose the `sudo do-release-upgrade` method.
|
||||
|
||||
## Git
|
||||
If you already have cloned the repository on your Windows file system you can ignore this section.
|
||||
|
||||
You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute.
|
||||
|
||||
Once Git is installed, open the Git bash command and change the directory to where you want to clone QMK, note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one.
|
||||
|
||||
## Toolchain setup
|
||||
The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information.
|
||||
|
||||
1. Open "Bash On Ubuntu On Windows" from the start menu.
|
||||
2. Go to the directory where you cloned `qmk_firmware`. Note that the paths start with `/mnt/` in the WSL, so you have to write for example `cd /mnt/c/path/to/qmk_firmware`.
|
||||
3. Run `util/wsl_install.sh` and follow the on-screen instructions.
|
||||
4. Close the Bash command window, and re-open it.
|
||||
5. You are ready to compile and flash the firmware!
|
||||
|
||||
## Some important things to keep in mind
|
||||
* You can run `util/wsl_install.sh` again to get all the newest updates.
|
||||
* Your QMK repository need to be on a Windows file system path, since WSL can't run executables outside it.
|
||||
* The WSL Git is **not** compatible with the Windows Git, so use the Windows Git Bash or a windows Git GUI for all Git operations
|
||||
* You can edit files either inside WSL or normally using Windows, but note that if you edit makefiles or shell scripts, make sure you are using an editor that saves the files with Unix line endings. Otherwise the compilation might not work.
|
||||
|
||||
# Windows (Vista and later)
|
||||
1. If you have ever installed WinAVR, uninstall it.
|
||||
2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
|
||||
3. If you are going to flash Infinity based keyboards you will need to install dfu-util, refer to the instructions by [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware).
|
||||
4. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location.
|
||||
5. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
|
||||
6. Open the `\util` folder.
|
||||
7. Double-click on the `1-setup-path-win` batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
|
||||
8. Right-click on the `2-setup-environment-win` batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete!
|
||||
|
||||
If you have trouble and want to ask for help, it is useful to generate a *Win_Check_Output.txt* file by running `Win_Check.bat` in the `\util` folder.
|
||||
|
||||
# Mac
|
||||
If you're using [homebrew,](http://brew.sh/) you can use the following commands:
|
||||
|
||||
brew tap osx-cross/avr
|
||||
brew install avr-libc
|
||||
brew install dfu-programmer
|
||||
|
||||
This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-libc can take over 20 minutes and exhibit high CPU usage.
|
||||
|
||||
You can also try these instructions:
|
||||
|
||||
1. Install Xcode from the App Store.
|
||||
2. Install the Command Line Tools from `Xcode->Preferences->Downloads`.
|
||||
3. Install [DFU-Programmer](https://dfu-programmer.github.io/).
|
||||
|
||||
If you are going to flash Infinity based keyboards you will also need dfu-util
|
||||
|
||||
brew install dfu-util
|
||||
|
||||
# Linux
|
||||
## Linux
|
||||
|
||||
To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.**
|
||||
|
||||
@@ -97,29 +36,103 @@ Debian/Ubuntu example:
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
|
||||
|
||||
# Docker
|
||||
## Nix
|
||||
|
||||
If you're on [NixOS](https://nixos.org/), or have Nix installed on Linux or macOS, run `nix-shell` from the repository root to get a build environment.
|
||||
|
||||
By default, this will download compilers for both AVR and ARM. If you don't need both, disable the `avr` or `arm` arguments, e.g.:
|
||||
|
||||
nix-shell --arg arm false
|
||||
|
||||
## macOS
|
||||
If you're using [homebrew,](http://brew.sh/) you can use the following commands:
|
||||
|
||||
brew tap osx-cross/avr
|
||||
brew tap PX4/homebrew-px4
|
||||
brew update
|
||||
brew install avr-gcc
|
||||
brew install dfu-programmer
|
||||
brew install gcc-arm-none-eabi
|
||||
brew install avrdude
|
||||
|
||||
This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-libc can take over 20 minutes and exhibit high CPU usage.
|
||||
|
||||
## Windows with msys2 (recommended)
|
||||
|
||||
The best environment to use, for Windows Vista through any later version (tested on 7 and 10), is [msys2](http://www.msys2.org).
|
||||
|
||||
* Install msys2 by downloading it and following the instructions here: http://www.msys2.org
|
||||
* Open the ``MSYS2 MingGW 64-bit`` shortcut
|
||||
* Navigate to your qmk checkout. For example, if it's in the root of your c drive:
|
||||
* `$ cd /c/qmk_firmware`
|
||||
* Run `util/msys2_install.sh` and follow the prompts
|
||||
|
||||
## Windows 10 (deprecated)
|
||||
These are the old instructions for Windows 10. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended).
|
||||
|
||||
### Creators Update
|
||||
If you have Windows 10 with Creators Update or later, you can build and flash the firmware directly. Before the Creators Update, only building was possible. If you don't have it yet or if are unsure, follow [these instructions](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update).
|
||||
|
||||
### Windows Subsystem for Linux
|
||||
In addition to the Creators Update, you need Windows 10 Subystem for Linux, so install it following [these instructions](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). If you already have the Windows 10 Subsystem for Linux from the Anniversary update it's recommended that you [upgrade](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) it to 16.04LTS, because some keyboards don't compile with the toolchains included in 14.04LTS. Note that you need to know what your are doing if you chose the `sudo do-release-upgrade` method.
|
||||
|
||||
### Git
|
||||
If you already have cloned the repository on your Windows file system you can ignore this section.
|
||||
|
||||
You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute.
|
||||
|
||||
Once Git is installed, open the Git Bash command and change the directory to where you want to clone QMK; note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one.
|
||||
|
||||
### Toolchain Setup
|
||||
The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information.
|
||||
|
||||
1. Open "Bash On Ubuntu On Windows" from the start menu.
|
||||
2. Go to the directory where you cloned `qmk_firmware`. Note that the paths start with `/mnt/` in the WSL, so you have to write for example `cd /mnt/c/path/to/qmk_firmware`.
|
||||
3. Run `util/wsl_install.sh` and follow the on-screen instructions.
|
||||
4. Close the Bash command window, and re-open it.
|
||||
5. You are ready to compile and flash the firmware!
|
||||
|
||||
### Some Important Things to Keep in Mind
|
||||
* You can run `util/wsl_install.sh` again to get all the newest updates.
|
||||
* Your QMK repository need to be on a Windows file system path, since WSL can't run executables outside it.
|
||||
* The WSL Git is **not** compatible with the Windows Git, so use the Windows Git Bash or a windows Git GUI for all Git operations
|
||||
* You can edit files either inside WSL or normally using Windows, but note that if you edit makefiles or shell scripts, make sure you are using an editor that saves the files with Unix line endings. Otherwise the compilation might not work.
|
||||
|
||||
## Windows (Vista and Later) (Deprecated)
|
||||
|
||||
These are the old instructions for Windows Vista and later. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended).
|
||||
|
||||
1. If you have ever installed WinAVR, uninstall it.
|
||||
2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
|
||||
3. If you are going to flash Infinity based keyboards you will need to install dfu-util, refer to the instructions by [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware).
|
||||
4. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location.
|
||||
5. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
|
||||
6. Open the `\util` folder.
|
||||
7. Double-click on the `1-setup-path-win` batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
|
||||
8. Right-click on the `2-setup-environment-win` batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete!
|
||||
|
||||
If you have trouble and want to ask for help, it is useful to generate a *Win_Check_Output.txt* file by running `Win_Check.bat` in the `\util` folder.
|
||||
|
||||
## Docker
|
||||
|
||||
If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker](https://www.docker.com/products/docker), run the following command at the root of the QMK folder to build a keyboard/keymap:
|
||||
|
||||
```bash
|
||||
# You'll run this every time you want to build a keymap
|
||||
# modify the keymap and keyboard assigment to compile what you want
|
||||
# modify the keymap and keyboard assignment to compile what you want
|
||||
# defaults are ergodox/default
|
||||
|
||||
docker run -e keymap=gwen -e subproject=ez -e keyboard=ergodox --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
|
||||
docker run -e keymap=gwen -e keyboard=ergodox_ez --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
|
||||
```
|
||||
|
||||
# On windows docker seems to have issue with VOLUME tag in Dockerfile, and $('pwd') won't print a windows compliant path, use full path instead like this
|
||||
docker run -e keymap=default -e subproject=ez -e keyboard=ergobox --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware
|
||||
On Windows Docker seems to have issues with the VOLUME tag in Dockerfile, and `$('pwd')` won't print a Windows compliant path; use full path instead, like this:
|
||||
|
||||
```bash
|
||||
docker run -e keymap=default -e keyboard=ergobox_ez --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware
|
||||
|
||||
```
|
||||
|
||||
This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash.
|
||||
|
||||
# Vagrant
|
||||
If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](vagrant_guide.md).
|
||||
|
||||
# Verify Your Installation
|
||||
1. If you haven't already, obtain this repository ([https://github.com/qmk/qmk_firmware](https://github.com/qmk/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application.
|
||||
2. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead.
|
||||
3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`.
|
||||
4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. More information about the `make` command can be found below.
|
||||
## Vagrant
|
||||
If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](getting_started_vagrant.md).
|
@@ -1,4 +1,4 @@
|
||||
# How to use Github with QMK
|
||||
# How to Use Github with QMK
|
||||
|
||||
Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK.
|
||||
|
||||
@@ -52,7 +52,7 @@ To https://github.com/whoeveryouare/qmk_firmware.git
|
||||
+ 20043e64...7da94ac5 master -> master
|
||||
```
|
||||
|
||||
Your changes now exist on your fork on Github - if you go back there (https://github.com/<whoeveryouare>/qmk_firmware), you can create a "New Pull Request" by clicking this button:
|
||||
Your changes now exist on your fork on Github - if you go back there (`https://github.com/<whoeveryouare>/qmk_firmware`), you can create a "New Pull Request" by clicking this button:
|
||||
|
||||

|
||||
|
||||
@@ -60,4 +60,4 @@ Here you'll be able to see exactly what you've committed - if it all looks good,
|
||||
|
||||

|
||||
|
||||
After submitting, we may talk to you about your changes, ask that you make changes, and eventually accept it! Thanks for contributing to QMK :)
|
||||
After submitting, we may talk to you about your changes, ask that you make changes, and eventually accept it! Thanks for contributing to QMK :)
|
47
docs/getting_started_introduction.md
Normal file
47
docs/getting_started_introduction.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Introduction
|
||||
|
||||
This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a Unix shell, but does not assume you are familiar with C or with compiling using make.
|
||||
|
||||
## Basic QMK Structure
|
||||
|
||||
QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
||||
|
||||
### Keyboard Project Structure
|
||||
|
||||
Within the folder `keyboards` and its subfolder `handwired` is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within it you'll find the following structure:
|
||||
|
||||
* `keymaps/`: Different keymaps that can be built
|
||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`
|
||||
* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
|
||||
|
||||
### Keymap Structure
|
||||
|
||||
In every keymap folder, the following files may be found. Only `keymap.c` is required, and if the rest of the files are not found the default options will be chosen.
|
||||
|
||||
* `config.h`: the options to configure your keymap
|
||||
* `keymap.c`: all of your keymap code, required
|
||||
* `rules.mk`: the features of QMK that are enabled
|
||||
* `readme.md`: a description of your keymap, how others might use it, and explanations of features. Please upload images to a service like imgur.
|
||||
|
||||
# The `config.h` File
|
||||
|
||||
There are 2 `config.h` locations:
|
||||
|
||||
* keyboard (`/keyboards/<keyboard>/config.h`)
|
||||
* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/config.h`)
|
||||
|
||||
If the keymap `config.h` exists, that file is included by the build system and the keyboard `config.h` is not included. If you wish to override settings in your keymap's `config.h` you will need to include some glue code:
|
||||
|
||||
```
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
```
|
||||
|
||||
If you want to override a setting from the parent `config.h` file, you need to `#undef` and then `#define` the setting again, like this:
|
||||
|
||||
```c
|
||||
#undef MY_SETTING
|
||||
#define MY_SETTING 4
|
||||
```
|
@@ -1,37 +1,23 @@
|
||||
# More detailed make instruction
|
||||
# More Detailed `make` Instructions
|
||||
|
||||
The full syntax of the `make` command is the following, but parts of the command can be left out if you run it from other directories than the `root` (as you might already have noticed by reading the simple instructions).
|
||||
The full syntax of the `make` command is `<keyboard_folder>:<keymap>:<target>`, where:
|
||||
|
||||
`<keyboard>-<subproject>-<keymap>-<target>`, where:
|
||||
|
||||
* `<keyboard>` is the name of the keyboard, for example `planck`
|
||||
* Use `allkb` to compile all keyboards
|
||||
* `<subproject>` is the name of the subproject (revision or sub-model of the keyboard). For example, for Ergodox it can be `ez` or `infinity`, and for Planck `rev3` or `rev4`.
|
||||
* If the keyboard doesn't have any subprojects, it can be left out
|
||||
* To compile the default subproject, you can leave it out, or specify `defaultsp`
|
||||
* Use `allsp` to compile all subprojects
|
||||
* `<keyboard_folder>` is the path of the keyboard, for example `planck`
|
||||
* Use `all` to compile all keyboards
|
||||
* Specify the path to compile a revision, for example `planck/rev4` or `planck/rev3`
|
||||
* If the keyboard doesn't have any folders, it can be left out
|
||||
* To compile the default folder, you can leave it out
|
||||
* `<keymap>` is the name of the keymap, for example `algernon`
|
||||
* Use `allkm` to compile all keymaps
|
||||
* Use `all` to compile all keymaps
|
||||
* `<target>` will be explained in more detail below.
|
||||
|
||||
**Note:** When you leave some parts of the command out, you should also remove the dash (`-`).
|
||||
|
||||
As mentioned above, there are some shortcuts, when you are in a:
|
||||
|
||||
* `keyboard` folder, the command will automatically fill the `<keyboard>` part. So you only need to type `<subproject>-<keymap>-<target>`
|
||||
* `subproject` folder, it will fill in both `<keyboard>` and `<subproject>`
|
||||
* `keymap` folder, then `<keyboard>` and `<keymap>` will be filled in. If you need to specify the `<subproject>` use the following syntax `<subproject>-<target>`
|
||||
* Note in order to support this shortcut, the keymap needs its own Makefile (see the example [here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_makefile_example.mk))
|
||||
* `keymap` folder of a `subproject`, then everything except the `<target>` will be filled in
|
||||
|
||||
The `<target>` means the following
|
||||
* If no target is given, then it's the same as `all` below
|
||||
* `all` compiles the keyboard and generates a `<keyboard>_<keymap>.hex` file in whichever folder you run `make` from. These files are ignored by git, so don't worry about deleting them when committing/creating pull requests.
|
||||
* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for Infinity keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme. **Note** that some operating systems needs root access for these commands to work, so in that case you need to run for example `sudo make dfu`.
|
||||
* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck.
|
||||
* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme.
|
||||
* **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:dfu`.
|
||||
* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems.
|
||||
|
||||
Some other targets are supported but, but not important enough to be documented here. Check the source code of the make files for more information.
|
||||
|
||||
You can also add extra options at the end of the make command line, after the target
|
||||
|
||||
* `make COLOR=false` - turns off color output
|
||||
@@ -43,26 +29,11 @@ The make command itself also has some additional options, type `make --help` for
|
||||
|
||||
Here are some examples commands
|
||||
|
||||
* `make allkb-allsp-allkm` builds everything (all keyboards, all subprojects, all keymaps). Running just `make` from the `root` will also run this.
|
||||
* `make` from within a `keyboard` directory, is the same as `make keyboard-allsp-allkm`, which compiles all subprojects and keymaps of the keyboard. **NOTE** that this behaviour has changed. Previously it compiled just the default keymap.
|
||||
* `make ergodox-infinity-algernon-clean` will clean the build output of the Ergodox Infinity keyboard. This example uses the full syntax and can be run from any folder with a `Makefile`
|
||||
* `make dfu COLOR=false` from within a keymap folder, builds and uploads the keymap, but without color output.
|
||||
* `make all:all` builds everything (all keyboard folders, all keymaps). Running just `make` from the `root` will also run this.
|
||||
* `make ergodox_infinity:algernon:clean` will clean the build output of the Ergodox Infinity keyboard.
|
||||
* `make planck/rev4:default:dfu COLOR=false` builds and uploads the keymap without color output.
|
||||
|
||||
# The `Makefile`
|
||||
|
||||
There are 5 different `make` and `Makefile` locations:
|
||||
|
||||
* root (`/`)
|
||||
* keyboard (`/keyboards/<keyboard>/`)
|
||||
* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/`)
|
||||
* subproject (`/keyboards/<keyboard>/<subproject>`)
|
||||
* subproject keymap (`/keyboards/<keyboard>/<subproject>/keymaps/<keymap>`)
|
||||
|
||||
The root contains the code used to automatically figure out which keymap or keymaps to compile based on your current directory and commandline arguments. It's considered stable, and shouldn't be modified. The keyboard one will contain the MCU set-up and default settings for your keyboard, and shouldn't be modified unless you are the producer of that keyboard. The keymap Makefile can be modified by users, and is optional. It is included automatically if it exists. You can see an example [here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_makefile_example.mk) - the last few lines are the most important. The settings you set here will override any defaults set in the keyboard Makefile. **The file is required if you want to run `make` in the keymap folder.**
|
||||
|
||||
For keyboards and subprojects, the make files are split in two parts `Makefile` and `rules.mk`. All settings can be found in the `rules.mk` file, while the `Makefile` is just there for support and including the root `Makefile`. Keymaps contain just one `Makefile` for simplicity.
|
||||
|
||||
## Makefile options
|
||||
## `rules.mk` Options
|
||||
|
||||
Set these variables to `no` to disable them, and `yes` to enable them.
|
||||
|
||||
@@ -82,9 +53,9 @@ This allows you to use the system and audio control key codes.
|
||||
|
||||
`CONSOLE_ENABLE`
|
||||
|
||||
This allows you to print messages that can be read using [`hid_listen`](https://www.pjrc.com/teensy/hid_listen.html).
|
||||
This allows you to print messages that can be read using [`hid_listen`](https://www.pjrc.com/teensy/hid_listen.html).
|
||||
|
||||
By default, all debug (*dprint*) print (*print*, *xprintf*), and user print (*uprint*) messages will be enabled. This will eat up a significant portion of the flash and may make the keyboard .hex file too big to program.
|
||||
By default, all debug (*dprint*) print (*print*, *xprintf*), and user print (*uprint*) messages will be enabled. This will eat up a significant portion of the flash and may make the keyboard .hex file too big to program.
|
||||
|
||||
To disable debug messages (*dprint*) and reduce the .hex file size, include `#define NO_DEBUG` in your `config.h` file.
|
||||
|
||||
@@ -94,7 +65,7 @@ To disable print messages (*print*, *xprintf*) and **KEEP** user print messages
|
||||
|
||||
To see the text, open `hid_listen` and enjoy looking at your printed messages.
|
||||
|
||||
**NOTE:** Do not include *uprint* messages in anything other than your keymap code. It must not be used within the QMK system framework. Otherwise, you will bloat other people's .hex files.
|
||||
**NOTE:** Do not include *uprint* messages in anything other than your keymap code. It must not be used within the QMK system framework. Otherwise, you will bloat other people's .hex files.
|
||||
|
||||
Consumes about 400 bytes.
|
||||
|
||||
@@ -142,7 +113,7 @@ This allows you to interface with a Bluefruit EZ-key to send keycodes wirelessly
|
||||
|
||||
`AUDIO_ENABLE`
|
||||
|
||||
This allows you output audio on the C6 pin (needs abstracting). See the [audio section](#audio-output-from-a-speaker) for more information.
|
||||
This allows you output audio on the C6 pin (needs abstracting). See the [audio page](feature_audio.md) for more information.
|
||||
|
||||
`FAUXCLICKY_ENABLE`
|
||||
|
||||
@@ -150,7 +121,7 @@ Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue swi
|
||||
|
||||
`VARIABLE_TRACE`
|
||||
|
||||
Use this to debug changes to variable values, see the [tracing variables](#tracing-variables) section for more information.
|
||||
Use this to debug changes to variable values, see the [tracing variables](unit_testing.md#tracing-variables) section of the Unit Testing page for more information.
|
||||
|
||||
`API_SYSEX_ENABLE`
|
||||
|
||||
@@ -158,10 +129,12 @@ This enables using the Quantum SYSEX API to send strings (somewhere?)
|
||||
|
||||
This consumes about 5390 bytes.
|
||||
|
||||
## Customizing Makefile options on a per-keymap basis
|
||||
`KEY_LOCK_ENABLE`
|
||||
|
||||
If your keymap directory has a file called `Makefile` (note the filename), any Makefile options you set in that file will take precedence over other Makefile options for your particular keyboard.
|
||||
This enables [key lock](feature_key_lock.md). This consumes an additional 260 bytes.
|
||||
|
||||
So let's say your keyboard's makefile has `BACKLIGHT_ENABLE = yes` (or maybe doesn't even list the `BACKLIGHT_ENABLE` option, which would cause it to be off). You want your particular keymap to not have the debug console, so you make a file called `Makefile` and specify `BACKLIGHT_ENABLE = no`.
|
||||
## Customizing Makefile Options on a Per-Keymap Basis
|
||||
|
||||
You can use the `docs/keymap_makefile_example.md` as a template/starting point.
|
||||
If your keymap directory has a file called `rules.mk` any options you set in that file will take precedence over other `rules.mk` options for your particular keyboard.
|
||||
|
||||
So let's say your keyboard's `rules.mk` has `BACKLIGHT_ENABLE = yes`. You want your particular keyboard to not have the backlight, so you make a file called `rules.mk` and specify `BACKLIGHT_ENABLE = no`.
|
@@ -10,11 +10,11 @@ Using the `/Vagrantfile` in this repository requires you have [Vagrant](http://w
|
||||
|
||||
Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below.
|
||||
|
||||
# Flashing the firmware
|
||||
# Flashing the Firmware
|
||||
|
||||
The "easy" way to flash the firmware is using a tool from your host OS:
|
||||
|
||||
* [QMK Flasher](https://github.com/qmk/qmk_flasher)
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (recommended)
|
||||
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html)
|
||||
* [Atmel FLIP](http://www.atmel.com/tools/flip.aspx)
|
||||
|
441
docs/gitbook/images/color-wheel.svg
Normal file
441
docs/gitbook/images/color-wheel.svg
Normal file
@@ -0,0 +1,441 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:ns1="http://sozi.baierouge.fr"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
id="Layer_1"
|
||||
enable-background="new 0 0 360 360"
|
||||
xml:space="preserve"
|
||||
viewBox="0 0 360 360"
|
||||
version="1.1"
|
||||
y="0px"
|
||||
x="0px"
|
||||
>
|
||||
<g
|
||||
>
|
||||
</g
|
||||
>
|
||||
<g
|
||||
>
|
||||
<g
|
||||
>
|
||||
<path
|
||||
d="m193.8 167.46l113.52-113.89c-23.457-23.36-50.2-38.727-82.193-47.23l-41.313 155.45c3.15 0.84 7.66 3.37 9.98 5.67z"
|
||||
fill="#E0C3D3"
|
||||
/>
|
||||
<path
|
||||
d="m209.95 151.26l97.367-97.688c-23.457-23.36-50.2-38.727-82.193-47.23l-35.43 133.29c7.71 1.86 14.76 5.91 20.25 11.63z"
|
||||
fill="#E0A0C3"
|
||||
/>
|
||||
<path
|
||||
d="m225.94 135.21l81.375-81.643c-23.457-23.36-50.2-38.727-82.193-47.23l-29.61 111.4c11.55 2.89 22.11 8.95 30.42 17.47z"
|
||||
fill="#E080B5"
|
||||
/>
|
||||
<path
|
||||
d="m241.95 119.15l65.369-65.585c-23.457-23.36-50.2-38.727-82.193-47.23l-23.784 89.491c15.38 3.919 29.46 12.004 40.6 23.324z"
|
||||
fill="#E061A7"
|
||||
/>
|
||||
<path
|
||||
d="m257.95 103.1l49.371-49.533c-23.457-23.36-50.2-38.727-82.193-47.23l-17.962 67.589c19.22 4.944 36.82 15.052 50.78 29.174z"
|
||||
fill="#E04198"
|
||||
/>
|
||||
<path
|
||||
d="m273.95 87.05l33.373-33.482c-23.457-23.36-50.2-38.727-82.193-47.23l-12.142 45.687c23.07 5.968 44.18 18.099 60.96 35.025z"
|
||||
fill="#E0228B"
|
||||
/>
|
||||
<path
|
||||
d="m289.94 70.999l17.375-17.431c-23.457-23.36-50.2-38.728-82.193-47.231l-6.321 23.784c26.91 6.994 51.54 21.148 71.13 40.878z"
|
||||
fill="#E10071"
|
||||
/>
|
||||
</g
|
||||
>
|
||||
<g
|
||||
>
|
||||
<path
|
||||
d="m174.73 162.13c2.934-0.792 6.094-0.876 8.876-0.292l41-155.36c-31.994-8.502-61.625-8.332-93.483 0.274l42.101 155.85c-0.01-0.02 1.13-0.37 1.5-0.47z"
|
||||
fill="#FFD9D9"
|
||||
/>
|
||||
<path
|
||||
d="m168.93 139.99c6.926-1.871 14.036-1.906 20.556-0.349l35.12-133.16c-31.994-8.502-61.625-8.332-93.483 0.274l36.127 133.73c0.95-0.27 1.19-0.36 1.67-0.49z"
|
||||
fill="#FFB6B6"
|
||||
/>
|
||||
<path
|
||||
d="m163.03 118.12c10.904-2.946 22.03-2.917 32.267-0.373l29.31-111.27c-31.994-8.502-61.625-8.332-93.483 0.274l30.218 111.86c0.96-0.27 1.19-0.36 1.68-0.49z"
|
||||
fill="#FF8F8F"
|
||||
/>
|
||||
<path
|
||||
d="m157.12 96.243c14.884-4.021 30.029-3.944 43.982-0.413l23.51-89.354c-31.994-8.502-61.625-8.332-93.483 0.274l24.304 89.968c0.96-0.268 1.2-0.344 1.69-0.475z"
|
||||
fill="#FF6E6E"
|
||||
/>
|
||||
<path
|
||||
d="m151.21 74.369c18.863-5.096 38.024-4.964 55.695-0.446l17.71-67.447c-31.994-8.502-61.625-8.332-93.483 0.274l18.395 68.094c0.96-0.267 1.2-0.344 1.69-0.475z"
|
||||
fill="#FF4848"
|
||||
/>
|
||||
<path
|
||||
d="m145.06 52.56c22.919-6.191 46.298-6.016 67.745-0.456l11.81-45.628c-31.994-8.502-61.625-8.332-93.483 0.274l12.484 46.214c0.97-0.263 1.13-0.317 1.45-0.404z"
|
||||
fill="#FF2424"
|
||||
/>
|
||||
<path
|
||||
d="m139.15 30.685c26.906-7.269 54.312-7.036 79.48-0.483l5.978-23.726c-31.994-8.502-61.625-8.332-93.483 0.274l6.575 24.34c0.97-0.262 1.13-0.318 1.45-0.405z"
|
||||
fill="#FF0000"
|
||||
/>
|
||||
</g
|
||||
>
|
||||
<g
|
||||
>
|
||||
<path
|
||||
d="m173.23 162.6l-42.1-155.85c-31.858 8.606-56.824 23.185-80.185 46.64l114.57 114.36c2.08-2.33 4.86-4.17 7.71-5.15z"
|
||||
fill="#FFEBD9"
|
||||
/>
|
||||
<path
|
||||
d="m167.25 140.48l-36.12-133.73c-31.858 8.606-56.824 23.185-80.185 46.64l98.442 98.288c4.77-5.09 11.17-9.11 17.86-11.2z"
|
||||
fill="#FFD7B3"
|
||||
/>
|
||||
<path
|
||||
d="m161.34 118.61l-30.21-111.86c-31.858 8.606-56.824 23.185-80.185 46.64l82.386 82.283c7.49-7.82 17.47-13.93 28.01-17.06z"
|
||||
fill="#FFC48F"
|
||||
/>
|
||||
<path
|
||||
d="m155.43 96.719l-24.3-89.969c-31.858 8.606-56.824 23.185-80.185 46.64l66.336 66.282c10.2-10.55 23.74-18.78 38.15-22.951z"
|
||||
fill="#FFB26C"
|
||||
/>
|
||||
<path
|
||||
d="m149.52 74.845l-18.39-68.095c-31.858 8.606-56.824 23.185-80.185 46.64l50.287 50.283c12.91-13.273 30.02-23.612 48.29-28.825z"
|
||||
fill="#FF9F48"
|
||||
/>
|
||||
<path
|
||||
d="m143.61 52.964l-12.48-46.214c-31.858 8.606-56.824 23.185-80.185 46.64l34.05 34.204c15.705-16.028 35.495-28.198 58.615-34.63z"
|
||||
fill="#FF8C24"
|
||||
/>
|
||||
<path
|
||||
d="m137.7 31.091l-6.575-24.34c-31.858 8.606-56.824 23.185-80.185 46.64l17.99 18.216c18.435-18.762 41.795-33.041 68.775-40.516z"
|
||||
fill="#FF8000"
|
||||
/>
|
||||
</g
|
||||
>
|
||||
<g
|
||||
>
|
||||
<path
|
||||
d="m166.24 167.56l-114.82-114.3c-23.36 23.457-36.884 48.514-45.386 80.507l155.98 41.453c0.85-3.15 1.92-5.35 4.23-7.66z"
|
||||
fill="#FFFED9"
|
||||
/>
|
||||
<path
|
||||
d="m149.96 151.35l-98.535-98.09c-23.36 23.457-36.884 48.514-45.386 80.507l133.85 35.573c1.8-6.74 5.26-12.94 10.07-17.99z"
|
||||
fill="#FFFDB3"
|
||||
/>
|
||||
<path
|
||||
d="m133.9 135.37l-82.475-82.11c-23.36 23.457-36.884 48.514-45.386 80.507l111.95 29.753c2.82-10.58 8.31-20.29 15.91-28.15z"
|
||||
fill="#FFFC8F"
|
||||
/>
|
||||
<path
|
||||
d="m117.84 119.37l-66.415-66.11c-23.36 23.457-36.884 48.514-45.386 80.507l90.037 23.929c3.845-14.42 11.364-27.64 21.764-38.33z"
|
||||
fill="#FFFB6C"
|
||||
/>
|
||||
<path
|
||||
d="m101.78 103.39l-50.355-50.13c-23.36 23.457-36.884 48.514-45.386 80.507l68.136 18.108c4.869-18.26 14.403-34.99 27.605-48.49z"
|
||||
fill="#FFFA48"
|
||||
/>
|
||||
<path
|
||||
d="m85.716 87.398l-34.291-34.138c-23.36 23.457-36.884 48.514-45.386 80.507l46.235 12.288c5.893-22.09 17.445-42.34 33.442-58.662z"
|
||||
fill="#FFF924"
|
||||
/>
|
||||
<path
|
||||
d="m69.657 71.411l-18.232-18.151c-23.36 23.457-36.884 48.514-45.386 80.507l24.334 6.468c6.917-25.93 20.488-49.694 39.284-68.829z"
|
||||
fill="#FFFF00"
|
||||
/>
|
||||
</g
|
||||
>
|
||||
<g
|
||||
>
|
||||
<path
|
||||
d="m162.13 185.27c-0.792-2.934-0.647-7.06-0.061-9.842l-155.89-41.15c-8.503 31.994-8.034 62.733 0.572 94.591l155.85-42.1c-0.02 0.01-0.37-1.13-0.47-1.5z"
|
||||
fill="#EBFFD9"
|
||||
/>
|
||||
<path
|
||||
d="m139.99 191.07c-1.963-7.268-1.891-14.725-0.095-21.517l-133.72-35.27c-8.503 31.994-8.034 62.733 0.572 94.591l133.73-36.127c-0.27-0.96-0.36-1.19-0.49-1.67z"
|
||||
fill="#D8FFB6"
|
||||
/>
|
||||
<path
|
||||
d="m118.12 196.98c-3.039-11.249-2.905-22.722-0.121-33.231l-111.82-29.47c-8.503 31.994-8.034 62.733 0.572 94.591l111.86-30.218c-0.27-0.96-0.36-1.19-0.49-1.67z"
|
||||
fill="#C5FF92"
|
||||
/>
|
||||
<path
|
||||
d="m96.244 202.89c-4.114-15.228-3.942-30.725-0.169-44.949l-89.897-23.66c-8.503 31.994-8.034 62.733 0.572 94.591l89.968-24.304c-0.268-0.97-0.343-1.2-0.474-1.68z"
|
||||
fill="#B1FF6C"
|
||||
/>
|
||||
<path
|
||||
d="m74.371 208.8c-5.189-19.208-4.962-38.724-0.201-56.666l-67.992-17.85c-8.503 31.994-8.034 62.733 0.572 94.591l68.094-18.395c-0.267-0.96-0.343-1.2-0.473-1.68z"
|
||||
fill="#9DFF48"
|
||||
/>
|
||||
<path
|
||||
d="m52.563 214.95c-6.285-23.265-6.011-46.996-0.205-68.714l-46.18-11.96c-8.503 31.994-8.034 62.733 0.572 94.591l46.214-12.484c-0.263-0.97-0.315-1.12-0.401-1.44z"
|
||||
fill="#8AFF24"
|
||||
/>
|
||||
<path
|
||||
d="m30.688 220.86c-7.362-27.251-7.029-55.011-0.229-80.452l-24.28-6.125c-8.503 31.994-8.034 62.733 0.572 94.591l24.34-6.575c-0.264-0.97-0.317-1.12-0.403-1.44z"
|
||||
fill="#71FF00"
|
||||
/>
|
||||
</g
|
||||
>
|
||||
<g
|
||||
>
|
||||
<path
|
||||
d="m162.6 186.77l-155.85 42.1c8.606 31.857 23.185 56.824 46.641 80.185l114.36-114.57c-2.33-2.09-4.17-4.87-5.15-7.72z"
|
||||
fill="#DCFFDC"
|
||||
/>
|
||||
<path
|
||||
d="m140.48 192.75l-133.73 36.12c8.606 31.857 23.185 56.824 46.641 80.185l98.286-98.442c-5.1-4.78-9.11-11.18-11.2-17.87z"
|
||||
fill="#B6FFB6"
|
||||
/>
|
||||
<path
|
||||
d="m118.61 198.66l-111.86 30.21c8.606 31.857 23.185 56.824 46.641 80.185l82.281-82.387c-7.82-7.49-13.93-17.47-17.06-28.01z"
|
||||
fill="#92FF92"
|
||||
/>
|
||||
<path
|
||||
d="m96.719 204.57l-89.969 24.3c8.606 31.857 23.185 56.824 46.641 80.185l66.28-66.336c-10.55-10.2-18.78-23.74-22.951-38.15z"
|
||||
fill="#6EFF6E"
|
||||
/>
|
||||
<path
|
||||
d="m74.845 210.48l-68.095 18.39c8.606 31.857 23.185 56.824 46.641 80.185l50.281-50.287c-13.274-12.92-23.614-30.02-28.825-48.29z"
|
||||
fill="#4AFF4A"
|
||||
/>
|
||||
<path
|
||||
d="m52.964 216.39l-46.214 12.48c8.606 31.857 23.185 56.824 46.641 80.185l34.202-34.049c-16.028-15.71-28.198-35.5-34.629-58.62z"
|
||||
fill="#27FF27"
|
||||
/>
|
||||
<path
|
||||
d="m31.091 222.3l-24.34 6.575c8.606 31.857 23.185 56.824 46.641 80.185l18.214-17.989c-18.763-18.43-33.043-41.79-40.515-68.77z"
|
||||
fill="#00FF00"
|
||||
/>
|
||||
</g
|
||||
>
|
||||
<g
|
||||
>
|
||||
<path
|
||||
d="m167.59 193.87l-114.31 114.78c23.455 23.359 47.388 37.112 79.381 45.616l41.606-156.55c-3.16-0.85-4.37-1.55-6.68-3.85z"
|
||||
fill="#DCFFED"
|
||||
/>
|
||||
<path
|
||||
d="m151.42 210.11l-98.14 98.54c23.455 23.359 47.388 37.112 79.381 45.616l35.721-134.41c-6.34-1.86-12.17-5.21-16.96-9.75z"
|
||||
fill="#B6FFD9"
|
||||
/>
|
||||
<path
|
||||
d="m135.43 226.16l-82.15 82.49c23.455 23.359 47.388 37.112 79.381 45.616l29.9-112.51c-10.18-2.89-19.52-8.26-27.13-15.6z"
|
||||
fill="#92FFC6"
|
||||
/>
|
||||
<path
|
||||
d="m119.43 242.22l-66.15 66.43c23.456 23.359 47.388 37.112 79.381 45.616l24.079-90.603c-14.02-3.92-26.87-11.31-37.31-21.45z"
|
||||
fill="#6EFFB3"
|
||||
/>
|
||||
<path
|
||||
d="m103.44 258.28l-50.16 50.37c23.455 23.359 47.388 37.112 79.381 45.616l18.258-68.701c-17.86-4.95-34.22-14.35-47.48-27.29z"
|
||||
fill="#4AFFA0"
|
||||
/>
|
||||
<path
|
||||
d="m87.451 274.34l-34.17 34.31c23.455 23.359 47.388 37.112 79.381 45.616l12.438-46.801c-21.69-5.97-41.58-17.4-57.649-33.13z"
|
||||
fill="#27FF8D"
|
||||
/>
|
||||
<path
|
||||
d="m71.459 290.39l-18.179 18.26c23.455 23.359 47.388 37.112 79.381 45.616l6.618-24.9c-25.53-6.99-48.93-20.44-67.821-38.98z"
|
||||
fill="#00FF80"
|
||||
/>
|
||||
</g
|
||||
>
|
||||
<g
|
||||
>
|
||||
<path
|
||||
d="m173.85 197.82l-41.812 156.61c31.993 8.501 61.11 8.47 92.969-0.136l-42.101-155.85c-2.95 0.59-6.08 0.35-9.06-0.62z"
|
||||
fill="#DCFFFE"
|
||||
/>
|
||||
<path
|
||||
d="m167.98 219.87l-35.941 134.56c31.993 8.501 61.11 8.47 92.969-0.136l-36.127-133.73c-6.82 1.57-14.22 1.29-20.9-0.69z"
|
||||
fill="#B6FFFD"
|
||||
/>
|
||||
<path
|
||||
d="m162.15 241.77l-30.107 112.65c31.993 8.501 61.11 8.47 92.969-0.136l-30.219-111.86c-10.69 2.62-22.24 2.33-32.64-0.65z"
|
||||
fill="#92FFFC"
|
||||
/>
|
||||
<path
|
||||
d="m156.32 263.68l-24.276 90.754c31.993 8.501 61.11 8.47 92.969-0.136l-24.305-89.969c-14.54 3.66-30.26 3.33-44.38-0.64z"
|
||||
fill="#6EFFFB"
|
||||
/>
|
||||
<path
|
||||
d="m150.49 285.57l-18.446 68.856c31.993 8.501 61.11 8.47 92.969-0.136l-18.396-68.095c-18.41 4.7-38.28 4.34-56.12-0.63z"
|
||||
fill="#4AFFFA"
|
||||
/>
|
||||
<path
|
||||
d="m144.7 307.61l-12.655 46.815c31.993 8.501 61.11 8.47 92.969-0.136l-12.484-46.215c-23.22 6.1-46.19 5.49-67.83-0.45z"
|
||||
fill="#27FFF9"
|
||||
/>
|
||||
<path
|
||||
d="m138.88 329.52l-6.839 24.913c31.994 8.501 61.11 8.47 92.969-0.136l-6.575-24.341c-27.08 7.13-54.2 6.49-79.56-0.43z"
|
||||
fill="#00FFFF"
|
||||
/>
|
||||
</g
|
||||
>
|
||||
<g
|
||||
>
|
||||
<path
|
||||
d="m192.47 193.82c-2.109 1.906-5.088 3.48-8.022 4.273-0.373 0.101-1.527 0.377-1.533 0.354l42.101 155.85c31.857-8.606 57.647-23.407 81.009-46.862l-113.56-113.61z"
|
||||
fill="#DCEFFF"
|
||||
/>
|
||||
<path
|
||||
d="m208.69 210.01c-4.857 4.652-11.156 8.255-18.107 10.133-0.485 0.131-0.729 0.176-1.699 0.42l36.127 133.73c31.857-8.606 57.647-23.407 81.009-46.862l-97.33-97.42z"
|
||||
fill="#B6DEFF"
|
||||
/>
|
||||
<path
|
||||
d="m224.73 226.01c-7.572 7.374-17.307 13.052-28.233 16.004-0.486 0.131-0.732 0.17-1.701 0.42l30.219 111.86c31.857-8.606 57.647-23.407 81.009-46.862l-81.3-81.42z"
|
||||
fill="#92CEFF"
|
||||
/>
|
||||
<path
|
||||
d="m240.78 242.02c-10.285 10.097-23.467 17.838-38.372 21.864-0.484 0.131-0.729 0.186-1.696 0.438l24.305 89.969c31.857-8.606 57.647-23.407 81.009-46.862l-65.25-65.41z"
|
||||
fill="#6EBEFF"
|
||||
/>
|
||||
<path
|
||||
d="m208.31 285.76c-0.485 0.132-0.731 0.185-1.698 0.439l18.396 68.095c31.857-8.606 57.647-23.407 81.009-46.862l-49.444-49.336c-13 12.81-29.38 22.56-48.27 27.66z"
|
||||
fill="#4AADFF"
|
||||
/>
|
||||
<path
|
||||
d="m213.98 307.7c-0.324 0.088-0.49 0.122-1.456 0.38l12.484 46.215c31.857-8.606 57.647-23.407 81.009-46.862l-33.533-33.371c-15.72 15.59-35.58 27.44-58.5 33.63z"
|
||||
fill="#279EFF"
|
||||
/>
|
||||
<path
|
||||
d="m219.89 329.57c-0.325 0.088-0.491 0.121-1.457 0.38l6.575 24.341c31.857-8.606 57.647-23.407 81.009-46.862l-17.47-17.385c-18.43 18.34-41.75 32.27-68.65 39.53z"
|
||||
fill="#0080FF"
|
||||
/>
|
||||
</g
|
||||
>
|
||||
<g
|
||||
>
|
||||
<path
|
||||
d="m197.71 185.73c-0.843 3.153-2.941 5.768-5.242 8.083l113.97 113.5c23.359-23.456 39.325-47.987 47.829-79.98l-156.56-41.6z"
|
||||
fill="#DCDCFF"
|
||||
/>
|
||||
<path
|
||||
d="m219.85 191.62c-2.041 6.976-5.889 13.329-11.148 18.372l97.727 97.328c23.359-23.456 39.325-47.987 47.829-79.98l-134.41-35.72z"
|
||||
fill="#B6B6FF"
|
||||
/>
|
||||
<path
|
||||
d="m241.75 197.44c-3.064 10.814-8.936 20.677-16.995 28.538l81.675 81.342c23.359-23.456 39.325-47.987 47.829-79.98l-112.52-29.9z"
|
||||
fill="#9292FF"
|
||||
/>
|
||||
<path
|
||||
d="m263.66 203.26c-4.089 14.652-11.976 28.037-22.837 38.716l65.61 65.343c23.359-23.456 39.325-47.987 47.829-79.98l-90.6-24.08z"
|
||||
fill="#6E6EFF"
|
||||
/>
|
||||
<path
|
||||
d="m285.56 209.08c-5.112 18.491-15.019 35.392-28.682 48.887l49.554 49.352c23.359-23.456 39.325-47.987 47.829-79.98l-68.7-18.26z"
|
||||
fill="#4A4AFF"
|
||||
/>
|
||||
<path
|
||||
d="m307.46 214.9c-6.137 22.329-18.063 42.745-34.525 59.06l33.496 33.358c23.359-23.456 39.325-47.987 47.829-79.98l-46.81-12.44z"
|
||||
fill="#2727FF"
|
||||
/>
|
||||
<path
|
||||
d="m329.36 220.72c-7.161 26.167-21.104 50.1-40.368 69.23l17.438 17.366c23.359-23.456 39.325-47.987 47.829-79.98l-24.9-6.62z"
|
||||
fill="#0000FF"
|
||||
/>
|
||||
</g
|
||||
>
|
||||
<g
|
||||
>
|
||||
<path
|
||||
d="m198.44 177.09c0.588 2.949 0.342 6.08-0.624 9.056l156.61 41.813c8.501-31.994 8.47-61.111-0.136-92.969l-155.85 42.1z"
|
||||
fill="#ECDCFF"
|
||||
/>
|
||||
<path
|
||||
d="m220.56 171.12c1.57 6.827 1.293 14.228-0.688 20.901l134.56 35.941c8.501-31.994 8.47-61.111-0.136-92.969l-133.73 36.13z"
|
||||
fill="#D8B6FF"
|
||||
/>
|
||||
<path
|
||||
d="m242.43 165.21c2.612 10.689 2.32 22.245-0.657 32.643l112.65 30.108c8.501-31.994 8.47-61.111-0.136-92.969l-111.85 30.22z"
|
||||
fill="#C492FF"
|
||||
/>
|
||||
<path
|
||||
d="m264.32 159.29c3.655 14.55 3.324 30.265-0.649 44.388l90.754 24.277c8.501-31.994 8.47-61.111-0.136-92.969l-89.96 24.3z"
|
||||
fill="#B16EFF"
|
||||
/>
|
||||
<path
|
||||
d="m286.2 153.38c4.699 18.412 4.345 38.281-0.625 56.128l68.855 18.446c8.501-31.994 8.47-61.111-0.136-92.969l-68.1 18.39z"
|
||||
fill="#9E4AFF"
|
||||
/>
|
||||
<path
|
||||
d="m308.08 147.47c6.088 23.216 5.471 46.185-0.464 67.83l46.814 12.655c8.501-31.994 8.47-61.111-0.136-92.969l-46.21 12.48z"
|
||||
fill="#8B27FF"
|
||||
/>
|
||||
<path
|
||||
d="m329.95 141.56c7.131 27.078 6.49 54.192-0.435 79.554l24.911 6.84c8.501-31.994 8.47-61.111-0.136-92.969l-24.34 6.58z"
|
||||
fill="#8000FF"
|
||||
/>
|
||||
</g
|
||||
>
|
||||
<g
|
||||
>
|
||||
<path
|
||||
d="m198.09 175.56c0.101 0.374 0.377 1.528 0.354 1.534l155.85-42.101c-8.606-31.858-23.408-57.649-46.862-81.009l-113.63 113.48c1.9 2.11 3.5 5.16 4.29 8.1z"
|
||||
fill="#FEDCFF"
|
||||
/>
|
||||
<path
|
||||
d="m220.14 169.42c0.131 0.486 0.176 0.729 0.42 1.699l133.73-36.126c-8.606-31.858-23.407-57.648-46.862-81.009l-97.479 97.275c4.61 4.84 8.32 11.25 10.19 18.16z"
|
||||
fill="#FDB6FF"
|
||||
/>
|
||||
<path
|
||||
d="m242.01 163.51c0.131 0.484 0.169 0.729 0.419 1.697l111.86-30.218c-8.606-31.858-23.408-57.649-46.862-81.009l-81.486 81.231c7.34 7.56 13.13 17.41 16.07 28.3z"
|
||||
fill="#FC92FF"
|
||||
/>
|
||||
<path
|
||||
d="m263.89 157.6c0.13 0.484 0.185 0.725 0.438 1.692l89.969-24.304c-8.606-31.858-23.408-57.649-46.862-81.009l-65.48 65.173c10.06 10.28 17.91 23.57 21.93 38.45z"
|
||||
fill="#FB6EFF"
|
||||
/>
|
||||
<path
|
||||
d="m285.76 151.69c0.131 0.483 0.183 0.724 0.438 1.69l68.095-18.395c-8.606-31.858-23.408-57.649-46.862-81.009l-49.482 49.121c12.79 13 22.71 29.74 27.8 48.6z"
|
||||
fill="#FA4AFF"
|
||||
/>
|
||||
<path
|
||||
d="m307.7 146.03c0.087 0.321 0.12 0.48 0.378 1.447l46.215-12.484c-8.606-31.858-23.408-57.649-46.862-81.009l-33.484 33.07c15.59 15.719 27.55 36.039 33.74 58.969z"
|
||||
fill="#F927FF"
|
||||
/>
|
||||
<path
|
||||
d="m329.58 140.12c0.086 0.321 0.118 0.48 0.377 1.446l24.341-6.575c-8.606-31.858-23.52-58.061-46.974-81.421l-17.375 17.432c18.32 18.435 32.35 42.199 39.62 69.109z"
|
||||
fill="#FF00FF"
|
||||
/>
|
||||
</g
|
||||
>
|
||||
</g
|
||||
>
|
||||
<metadata
|
||||
><rdf:RDF
|
||||
><cc:Work
|
||||
><dc:format
|
||||
>image/svg+xml</dc:format
|
||||
><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage"
|
||||
/><cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/publicdomain/"
|
||||
/><dc:publisher
|
||||
><cc:Agent
|
||||
rdf:about="http://openclipart.org/"
|
||||
><dc:title
|
||||
>Openclipart</dc:title
|
||||
></cc:Agent
|
||||
></dc:publisher
|
||||
></cc:Work
|
||||
><cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/publicdomain/"
|
||||
><cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction"
|
||||
/><cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution"
|
||||
/><cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks"
|
||||
/></cc:License
|
||||
></rdf:RDF
|
||||
></metadata
|
||||
></svg
|
||||
>
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 793 B |
157
docs/glossary.md
157
docs/glossary.md
@@ -1,29 +1,170 @@
|
||||
# Glossary of QMK terms
|
||||
# Glossary of QMK Terms
|
||||
|
||||
## ARM
|
||||
A line of 32-bit MCU's produced by a number of companies, such as Atmel, Cypress, Kinetis, NXP, ST, and TI.
|
||||
|
||||
## AVR
|
||||
A line of 8-bit MCU's produced by [Atmel](http://atmel.com). AVR was the original platform that TMK supported.
|
||||
|
||||
## AZERTY
|
||||
The standard Français (French) keyboard layout. Named for the first 6 keys on the keyboard.
|
||||
|
||||
## Backlight
|
||||
A generic term for lighting on a keyboard. The backlight is typically, but not always, an array of LED's that shine through keycaps and/or switches.
|
||||
|
||||
## Bluetooth
|
||||
A short range peer to peer wireless protocol. Most common wireless protocol for a keyboard.
|
||||
|
||||
## Bootloader
|
||||
A special program that is written to a protected area of your MCU that allows the MCU to upgrade its own firmware, typically over USB.
|
||||
|
||||
## Bootmagic
|
||||
A feature that allows for various keyboard behavior changes to happen on the fly, such as swapping or disabling common keys.
|
||||
|
||||
## C
|
||||
A low-level programming language suitable for system code. Most QMK code is written in C.
|
||||
|
||||
## Colemak
|
||||
An alternative keyboard layout that is gaining in popularity.
|
||||
|
||||
## Compile
|
||||
The process of turning human readable code into machine code your MCU can run.
|
||||
|
||||
## Dvorak
|
||||
An alternative keyboard layout developed by Dr. August Dvorak in the 1930's. A shortened form of the Dvorak Simplified Keyboard.
|
||||
|
||||
## Dynamic Macro
|
||||
A macro which has been recorded on the keyboard and which will be lost when the keyboard is unplugged or the computer rebooted.
|
||||
|
||||
* [Dynamic Macro Documentation](feature_dynamic_macros.md)
|
||||
|
||||
## Eclipse
|
||||
An IDE that is popular with many C developers.
|
||||
|
||||
* [Eclipse Setup Instructions](eclipse.md)
|
||||
|
||||
## Firmware
|
||||
The software that controls your MCU.
|
||||
|
||||
## FLIP
|
||||
Software provided by Atmel for flashing AVR devices. We generally recommend [QMK Flasher](https://github.com/qmk/qmk_flasher) instead, but for some advanced use cases FLIP is required.
|
||||
|
||||
## git
|
||||
Versioning software used at the commandline
|
||||
Versioning software used at the command line
|
||||
|
||||
## GitHub
|
||||
The website that hosts most of the QMK project. It provides integration with git, issue tracking, and other features that help us run QMK.
|
||||
|
||||
## ISP
|
||||
In-system programming, a method of programming an AVR chip using external hardware and the JTAG pins.
|
||||
|
||||
## hid_listen
|
||||
An interface for receiving debugging messages from your keyboard. You can view these messages using [QMK Flasher](https://github.com/qmk/qmk_flasher) or [PJRC's hid_listen](https://www.pjrc.com/teensy/hid_listen.html)
|
||||
|
||||
## Keycode
|
||||
A 2-byte number that represents a particular key. `0x00`-`0xFF` are used for [Basic Keycodes](keycodes.html) while `0x100`-`0xFFFF` are used for [Quantum Keycodes](quantum_keycodes.html).
|
||||
A 2-byte number that represents a particular key. `0x00`-`0xFF` are used for [Basic Keycodes](keycodes_basic.md) while `0x100`-`0xFFFF` are used for [Quantum Keycodes](quantum_keycodes.md).
|
||||
|
||||
## Key Down
|
||||
An event that happens when a key is pressed down, but is completed before a key is released.
|
||||
|
||||
## Key Up
|
||||
An event that happens when a key is released.
|
||||
|
||||
## Keymap
|
||||
An array of keycodes mapped to a physical keyboard layout, which are processed on key presses and releases
|
||||
|
||||
## Layer
|
||||
An abstraction used to allow a key to serve multiple purposes. The highest active layer takes precedence.
|
||||
|
||||
## Leader Key
|
||||
A feature that allows you to tap the leader key followed by a sequence of 1, 2, or 3 keys to activate key presses or other quantum features.
|
||||
|
||||
* [Leader Key Documentation](feature_leader_key.md)
|
||||
|
||||
## LED
|
||||
Light Emitting Diode, the most common device used for indicators on a keyboard.
|
||||
|
||||
## Make
|
||||
Software package that is used to compile all the source files. You run `make` with various options to compile your keyboard firmware.
|
||||
|
||||
## Matrix
|
||||
A wiring pattern of columns and rows (and usually diodes) that enables the MCU to detect keypresses with a fewer number of pins
|
||||
A wiring pattern of columns and rows that enables the MCU to detect keypresses with a fewer number of pins. The matrix often incorporates diodes to allow for NKRO.
|
||||
|
||||
## Macro
|
||||
A feature that lets you send muiltple keypress events (hid reports) after having pressed only a single key.
|
||||
A feature that lets you send multiple keypress events (hid reports) after having pressed only a single key.
|
||||
|
||||
* [Macro Documentation](feature_macros.md)
|
||||
|
||||
## MCU
|
||||
Microcontrol Unit, the processor that powers your keyboard.
|
||||
|
||||
## Modifier
|
||||
A key that is held down while typing another key to modify the action of that key. Examples include Ctrl, Alt, and Shift.
|
||||
|
||||
## Mousekeys
|
||||
A feature that lets you control your mouse cursor and click from your keyboard.
|
||||
|
||||
* [Mousekeys Documentation](mouse_keys.html)
|
||||
* [Mousekeys Documentation](feature_mouse_keys.md)
|
||||
|
||||
## N-Key Rollover (NKRO)
|
||||
A term that applies to keyboards that are capable of reporting any number of key-presses at once.
|
||||
|
||||
## Oneshot Modifier
|
||||
A modifier that acts as if it is held down until another key is released, so you can press the mod and then press the key, rather than holding the mod while pressing the key. Also known as a Sticky key or a Dead key.
|
||||
|
||||
## ProMicro
|
||||
A low cost AVR development board. Clones of this device are often found on ebay very inexpensively (under $5) but people often struggle with flashing their pro micros.
|
||||
|
||||
## Pull Request
|
||||
A request to submit code to QMK. We encourage all users to submit Pull Requests for their personal keymaps.
|
||||
|
||||
## QWERTY
|
||||
The standard English keyboard layout, and often a shortcut for other language's standard layouts. Named for the first 6 letters on the keyboard.
|
||||
|
||||
## QWERTZ
|
||||
The standard Deutsche (German) keyboard layout. Named for the first 6 letters on the keyboard.
|
||||
|
||||
## Rollover
|
||||
The term for pressing a key while a key is already held down. Variants include 2KRO, 6KRO, and NKRO.
|
||||
|
||||
## Scancode
|
||||
A 1 byte number that is sent as part of a HID report over USB that represents a single key. These numbers are documented in the [HID Usage Tables](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) published by the [USB-IF](http://www.usb.org/).
|
||||
|
||||
## Space Cadet Shift
|
||||
A special set of shift keys which allow you to type various types of braces by tapping the left or right shift one or more times.
|
||||
|
||||
* [Space Cadet Shift Documentation](feature_space_cadet.md)
|
||||
|
||||
## Tap
|
||||
Pressing and releasing a key. In some situations you will need to distinguish between a key down and a key up event, and Tap always refers to both at once.
|
||||
|
||||
## Tap Dance
|
||||
A feature that lets you assign muiltple keycodes to the same key based on how many times you press it.
|
||||
A feature that lets you assign multiple keycodes to the same key based on how many times you press it.
|
||||
|
||||
* [Tap Dance Documentation](tap_dance.html)
|
||||
* [Tap Dance Documentation](feature_tap_dance.md)
|
||||
|
||||
## Teensy
|
||||
A low-cost AVR development board that is commonly used for hand-wired builds. A teensy is often chosen despite costing a few dollars more due to its halfkay bootloader, which makes flashing very simple.
|
||||
|
||||
## Underlight
|
||||
A generic term for LEDs that light the underside of the board. These LED's typically shine away from the bottom of the PCB and towards the surface the keyboard rests on.
|
||||
|
||||
## Unicode
|
||||
In the larger computer world Unicode is a set of encoding schemes for representing characters in any language. As it relates to QMK it means using various OS schemes to send unicode codepoints instead of scancodes.
|
||||
|
||||
* [Unicode Documentation](feature_unicode.md)
|
||||
|
||||
## Unit Testing
|
||||
A framework for running automated tests against QMK. Unit testing helps us be confident that our changes do not break anything.
|
||||
|
||||
* [Unit Testing Documentation](unit_testing.md)
|
||||
|
||||
## USB
|
||||
Universal Serial Bus, the most common wired interface for a keyboard.
|
||||
|
||||
## USB Host (or simply Host)
|
||||
The USB Host is your computer, or whatever device your keyboard is plugged into.
|
||||
|
||||
# Couldn't Find the Term You're Looking For?
|
||||
|
||||
[Open an issue](https://github.com/qmk/qmk_firmware/issues) with your question and the term in question could be added here. Better still, open a pull request with the definition. :)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# Quantum Hand-wiring Guide
|
||||
# Quantum Hand-Wiring Guide
|
||||
|
||||
Parts list:
|
||||
* *x* keyswitches (MX, Matias, Gateron, etc)
|
||||
@@ -6,12 +6,12 @@ Parts list:
|
||||
* Keyboard plate (metal, plastic, cardboard, etc)
|
||||
* Wire (strained for wiring to the Teensy, anything for the rows/columns)
|
||||
* Soldering iron set at 600ºF or 315ºC (if temperature-controlled)
|
||||
* Resin-cored solder (leaded or lead-free)
|
||||
* Rosin-cored solder (leaded or lead-free)
|
||||
* Adequate ventilation/a fan
|
||||
* Tweezers (optional)
|
||||
* Wire cutters/snippers
|
||||
|
||||
## How the matrix works (why we need diodes)
|
||||
## How the Matrix Works (Why We Need Diodes)
|
||||
|
||||
The microcontroller (in this case, the Teensy 2.0) will be setup up via the firmware to send a logical 1 to the columns, one at a time, and read from the rows, all at once - this process is called matrix scanning. The matrix is a bunch of open switches that, by default, don't allow any current to pass through - the firmware will read this as no keys being pressed. As soon as you press one key down, the logical 1 that was coming from the column the keyswitch is attached to gets passed through the switch and to the corresponding row - check out the following 2x2 example:
|
||||
|
||||
@@ -100,9 +100,9 @@ Things act as they should! Which will get us the following data:
|
||||
|
||||
The firmware can then use this correct data to detect what it should do, and eventually, what signals it needs to send to the OS.
|
||||
|
||||
# The actual hand-wiring
|
||||
# The Actual Hand-Wiring
|
||||
|
||||
## Getting things in place
|
||||
## Getting Things in Place
|
||||
|
||||
When starting this, you should have all of your stabilisers and keyswitches already installed (and optionally keycaps). If you're using a Cherry-type stabiliser (plate-mounted only, obviously), you'll need to install that before your keyswitches. If you're using Costar ones, you can installed them afterwards.
|
||||
|
||||
@@ -112,7 +112,7 @@ Get your soldering iron heated-up and collect the rest of the materials from the
|
||||
|
||||
Before continuing, plan out where you're going to place your Teensy. If you're working with a board that has a large (6.25u) spacebar, it may be a good idea to place it in-between switches against the plate. Otherwise, you may want to trim some of the leads on the keyswitches where you plan on putting it - this will make it a little harder to solder the wire/diodes, but give you more room to place the Teensy.
|
||||
|
||||
## Preparing the diodes
|
||||
## Preparing the Diodes
|
||||
|
||||
It's a little easier to solder the diodes in place if you bend them at a 90º angle immediately after the black line - this will help to make sure you put them on the right way (direction matters), and in the correct position. The diodes will look like this when bent (with longer leads):
|
||||
|
||||
@@ -125,7 +125,7 @@ It's a little easier to solder the diodes in place if you bend them at a 90º an
|
||||
|
||||
We'll be using the long lead at the bent end to connect it to the elbow (bent part) of the next diode, creating the row.
|
||||
|
||||
## Soldering the diodes
|
||||
## Soldering the Diodes
|
||||
|
||||
Starting at the top-left switch, place the diode (with tweezers if you have them) on the switch so that the diode itself is vertically aligned, and the black line is facing toward you. The straight end of the diode should be touching the left contact on the switch, and the bent end should be facing to the right and resting on the switch there, like this:
|
||||
|
||||
@@ -133,7 +133,7 @@ Starting at the top-left switch, place the diode (with tweezers if you have them
|
||||
│o
|
||||
┌┴┐ o
|
||||
│ │ O
|
||||
├─┤
|
||||
├─┤
|
||||
└┬┘
|
||||
└─────────────
|
||||
```
|
||||
@@ -142,7 +142,7 @@ Letting the diode rest, grab your solder, and touch both it and the soldering ir
|
||||
|
||||
The smoke that the rosin releases is harmful, so be careful not to breath it or get it in your eyes/face.
|
||||
|
||||
After soldering things in place, it may be helpful to blow on the joint to push the smoke away from your face, and cool the solder quicker. You should see the solder develop a matte (not shiney) surface as it solidifies. Keep in mind that it will still be very hot afterwards, and will take a couple minutes to be cool to touch. Blow on it will accelerate this process.
|
||||
After soldering things in place, it may be helpful to blow on the joint to push the smoke away from your face, and cool the solder quicker. You should see the solder develop a matte (not shiny) surface as it solidifies. Keep in mind that it will still be very hot afterwards, and will take a couple minutes to be cool to touch. Blow on it will accelerate this process.
|
||||
|
||||
When the first diode is complete, the next one will need to be soldered to both the keyswitch, and the previous diode at the new elbow. That will look something like this:
|
||||
|
||||
@@ -150,7 +150,7 @@ When the first diode is complete, the next one will need to be soldered to both
|
||||
│o │o
|
||||
┌┴┐ o ┌┴┐ o
|
||||
│ │ O │ │ O
|
||||
├─┤ ├─┤
|
||||
├─┤ ├─┤
|
||||
└┬┘ └┬┘
|
||||
└────────────────┴─────────────
|
||||
```
|
||||
@@ -159,7 +159,7 @@ After completing a row, use the wire cutters to trim the excess wire from the to
|
||||
|
||||
When all of the diodes are completely soldered, it's a good idea to quickly inspect each one to ensure that your solder joints are solid and sturdy - repairing things after this is possible, but more difficult.
|
||||
|
||||
## Soldering the columns
|
||||
## Soldering the Columns
|
||||
|
||||
You'll have some options in the next process - it's a good idea to insulate the column wires (since the diodes aren't), but if you're careful enough, you can use exposed wires for the columns - it's not recommended, though. If you're using single-cored wire, stripping the plastic off of the whole wire and feeding it back on is probably the best option, but can be difficult depending on the size and materials. You'll want to leave parts of the wire exposed where you're going to be solder it onto the keyswitch.
|
||||
|
||||
@@ -169,7 +169,7 @@ Before beginning to solder, it helps to have your wire pre-bent (if using single
|
||||
|
||||
If you're not using any insulation, you can try to keep the column wires elevated, and solder them near the tips of the keyswitch contacts - if the wires are sturdy enough, they won't short out to the row wiring an diodes.
|
||||
|
||||
## Wiring things to the Teensy
|
||||
## Wiring Things to the Teensy
|
||||
|
||||
Now that the matrix itself is complete, it's time to connect what you've done to the Teensy. You'll be needing the number of pins equal to your number of columns + your number of rows. There are some pins on the Teensy that are special, like D6 (the LED on the chip), or some of the UART, SPI, I2C, or PWM channels, but only avoid those if you're planning something in addition to a keyboard. If you're unsure about wanting to add something later, you should have enough pins in total to avoid a couple.
|
||||
|
||||
@@ -185,7 +185,7 @@ When you're done with the columns, start with the rows in the same process, from
|
||||
|
||||
As you move along, be sure that the Teensy is staying in place - recutting and soldering the wires is a pain!
|
||||
|
||||
# Getting some basic firmware set-up
|
||||
# Getting Some Basic Firmware Set Up
|
||||
|
||||
From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch.
|
||||
|
||||
@@ -201,13 +201,13 @@ You'll want to navigate to the `keyboards/<project_name>/` folder by typing, lik
|
||||
|
||||
cd keyboards/<project_name>
|
||||
|
||||
### config.h
|
||||
### `config.h`
|
||||
|
||||
The first thing you're going to want to modify is the `config.h` file. Find `MATRIX_ROWS` and `MATRIX_COLS` and change their definitions to match the dimensions of your keyboard's matrix.
|
||||
|
||||
Farther down are `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. Change their definitions to match how you wired up your matrix (looking from the top of the keyboard, the rows run top-to-bottom and the columns run left-to-right). Likewise, change the definition of `UNUSED_PINS` to match the pins you did not use (this will save power).
|
||||
|
||||
### \<project_name\>.h
|
||||
### `<project_name>.h`
|
||||
|
||||
The next file you'll want to look at is `<project_name>.h`. You're going to want to rewrite the `KEYMAP` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix.
|
||||
|
||||
@@ -271,9 +271,9 @@ This would require our `KEYMAP` definition to look like this:
|
||||
|
||||
Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it.
|
||||
|
||||
### keymaps/default.c
|
||||
### `keymaps/<variant>/default.c`
|
||||
|
||||
This is the actual keymap for your keyboard, and the main place you'll make changes as you perfect your layout. `default.c` is the file that gets pull by default when typing `make`, but you can make other files as well, and specify them by typing `make KEYMAP=<variant>`, which will pull `keymaps/<variant>.c`.
|
||||
This is the actual keymap for your keyboard, and the main place you'll make changes as you perfect your layout. `default.c` is the file that gets pull by default when typing `make`, but you can make other files as well, and specify them by typing `make handwired/<keyboard>:<variant>`, which will pull `keymaps/<variant>/keymap.c`.
|
||||
|
||||
The basis of a keymap is its layers - by default, layer 0 is active. You can activate other layers, the highest of which will be referenced first. Let's start with our base layer.
|
||||
|
||||
@@ -298,19 +298,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
```
|
||||
|
||||
Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file.
|
||||
Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [Keycodes](keycodes.md) - there are also a lot of aliases to condense your keymap file.
|
||||
|
||||
It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring.
|
||||
|
||||
## Compiling your firmware
|
||||
## Compiling Your Firmware
|
||||
|
||||
After you've written out your entire keymap, you're ready to get the firmware compiled and onto your Teensy. Before compiling, you'll need to get your [development environment set-up](build_guide.md) - you can skip the dfu-programmer instructions, but you'll need to download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to get the firmware on your Teensy.
|
||||
After you've written out your entire keymap, you're ready to get the firmware compiled and onto your Teensy. Before compiling, you'll need to get your [development environment set-up](getting_started_build_tools.md) - you can skip the dfu-programmer instructions, but you'll need to download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to get the firmware on your Teensy.
|
||||
|
||||
Once everything is installed, running `make` in the terminal should get you some output, and eventually a `<project_name>.hex` file in that folder. If you're having trouble with this step, see the end of the guide for the trouble-shooting section.
|
||||
|
||||
Once you have your `<project_name>.hex` file, open up the Teensy loader application, and click the file icon. From here, navigate to your `QMK/keyboards/<project_name>/` folder, and select the `<project_name>.hex` file. Plug in your keyboard and press the button on the Teensy - you should see the LED on the device turn off once you do. The Teensy Loader app will change a little, and the buttons should be clickable - click the download button (down arrow), and then the reset button (right arrow), and your keyboard should be ready to go!
|
||||
|
||||
## Testing your firmware
|
||||
## Testing Your Firmware
|
||||
|
||||
Carefully flip your keyboard over, open up a new text document, and try typing - you should get the characters that you put into your keymap. Test each key, and note the ones that aren't working. Here's a quick trouble-shooting guide for non-working keys:
|
||||
|
||||
@@ -324,8 +324,8 @@ Carefully flip your keyboard over, open up a new text document, and try typing -
|
||||
|
||||
If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end.
|
||||
|
||||
# Securing the Teensy, finishing your hardware, getting fancier firmware
|
||||
# Securing the Teensy, Finishing Your Hardware, Getting Fancier Firmware
|
||||
|
||||
Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out.
|
||||
|
||||
There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/qmk/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
|
||||
There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different project (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
|
||||
|
8
docs/hardware.md
Normal file
8
docs/hardware.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Hardware
|
||||
|
||||
QMK runs on a variety of hardware. If your processor can be targeted by [LUFA](http://www.fourwalledcubicle.com/LUFA.php) or [ChibiOS](http://www.chibios.com) you can probably get QMK running on it. This section explores getting QMK running on, and communicating with, hardware of all kinds.
|
||||
|
||||
* [Keyboard Guidelines](hardware_keyboard_guidelines.md)
|
||||
* [AVR Processors](hardware_avr.md)
|
||||
* ARM Processors (TBD)
|
||||
* [Drivers](hardware_drivers.md)
|
157
docs/hardware_avr.md
Normal file
157
docs/hardware_avr.md
Normal file
@@ -0,0 +1,157 @@
|
||||
# Keyboards with AVR Processors
|
||||
|
||||
This page describes the support for for AVR processors in QMK. AVR processors include the atmega32u4, atmega32u2, at90usb1286, and other processors from Atmel Corporation. AVR processors are 8-bit MCU's that are designed to be easy to work with. The most common AVR processors in keyboards have on-board USB and plenty of GPIO for supporting large keyboard matrices. They are the most popular MCU for use in keyboards today.
|
||||
|
||||
If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_guidelines.md) to get a sense of how keyboards fit into QMK.
|
||||
|
||||
## Adding Your AVR Keyboard to QMK
|
||||
|
||||
QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started run the `util/new_project.sh` script:
|
||||
|
||||
```
|
||||
$ util/new_project.sh my_awesome_keyboard
|
||||
######################################################
|
||||
# /keyboards/my_awesome_keyboard project created. To start
|
||||
# working on things, cd into keyboards/my_awesome_keyboard
|
||||
######################################################
|
||||
```
|
||||
|
||||
This will create all the files needed to support your new keyboard, and populate the settings with default values. Now you just need to customize it for your keyboard.
|
||||
|
||||
## `readme.md`
|
||||
|
||||
This is where you'll describe your keyboard. Please follow the [Keyboard Readme Template](documentation_templates.md#keyboard-readmemd-template) when writing your `readme.md`. You're encouraged to place an image at the top of your `readme.md`, please use an external service such as [Imgur](http://imgur.com) to host the images.
|
||||
|
||||
## `<keyboard>.c`
|
||||
|
||||
This is where all the custom logic for your keyboard goes. Many keyboards do not need to put anything at all in here. You can learn more about writing custom logic in [Custom Quantum Functions](custom_quantum_functions.md).
|
||||
|
||||
## `<keyboard>.h`
|
||||
|
||||
This is the file you define your [Layout Macro(s)](feature_layouts.md) in. At minimum you should have a `#define LAYOUT` for your keyboard that looks something like this:
|
||||
|
||||
```
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, \
|
||||
k10, k11 \
|
||||
) { \
|
||||
{ k00, k01, k02 }, \
|
||||
{ k10, KC_NO, k11 }, \
|
||||
}
|
||||
```
|
||||
|
||||
The first half of the `LAYOUT` pre-processor macro defines the physical arrangement of keys. The second half of the macro defines the matrix the switches are connected to. This allows you to have a physical arrangement of keys that differs from the wiring matrix.
|
||||
|
||||
Each of the `k__` variables needs to be unique, and typically they follow the format `k<row><col>`.
|
||||
|
||||
The physical matrix (the second half) must have a number of rows equaling `MATRIX_ROWS`, and each row must have exactly `MATRIX_COLS` elements in it. If you do not have this many physical keys you can use `KC_NO` to fill in the blank spots.
|
||||
|
||||
## `config.h`
|
||||
|
||||
The `config.h` file is where you configure the hardware and feature set for your keyboard. There are a lot of options that can be placed in that file, too many to list there. For a complete overview of available options see the [Config Options](config_options.md) page.
|
||||
|
||||
### Hardware Configuration
|
||||
|
||||
|
||||
At the top of the `config.h` you'll find USB related settings. These control how your keyboard appears to the Operating System. If you don't have a good reason to change you should leave the `VENDOR_ID` as `0xFEED`. For the `PRODUCT_ID` you should pick a number that is not yet in use.
|
||||
|
||||
Do change the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` lines to accurately reflect your keyboard.
|
||||
|
||||
```
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER You
|
||||
#define PRODUCT my_awesome_keyboard
|
||||
#define DESCRIPTION A custom keyboard
|
||||
```
|
||||
|
||||
{% hint style='info' %}
|
||||
Note: On Windows and macOS the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` fields will be displayed in the list of USB devices. On Linux these values will not be visible in `lsusb`, since Linux takes that information from the list published by the USB-IF.
|
||||
{% endhint %}
|
||||
|
||||
### Keyboard Matrix Configuration
|
||||
|
||||
The next section of the `config.h` file deals with your keyboard's matrix. The first thing you should set is the matrix's size. This is usually, but not always, the same number of rows and columns as the physical key arrangement.
|
||||
|
||||
```
|
||||
#define MATRIX_ROWS 2
|
||||
#define MATRIX_COLS 3
|
||||
```
|
||||
|
||||
Once you've defined the size of your matrix you need to define which pins on your MCU are connected to rows and columns. To do so simply specify the names of those pins:
|
||||
|
||||
```
|
||||
#define MATRIX_ROW_PINS { D0, D5 }
|
||||
#define MATRIX_COL_PINS { F1, F0, B0 }
|
||||
#define UNUSED_PINS
|
||||
```
|
||||
|
||||
The number of `MATRIX_ROW_PINS` entries must be the same as the number you assigned to `MATRIX_ROWS`, and likewise for `MATRIX_COL_PINS` and `MATRIX_COLS`. You do not have to specify `UNUSED_PINS`, but you can if you want to document what pins are open.
|
||||
|
||||
Finally, you can specify the direction your diodes point. This can be `COL2ROW`, `ROW2COL`, or `CUSTOM_MATRIX`.
|
||||
|
||||
```
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
```
|
||||
|
||||
### Backlight Configuration
|
||||
|
||||
By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are using one of those you can simply enable it here. For more details see the [Backlight Documentation](feature_backlight.md).
|
||||
|
||||
```
|
||||
#define BACKLIGHT_PIN B7
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BREATHING_PERIOD 6
|
||||
```
|
||||
|
||||
{% hint style='info' %}
|
||||
You can use backlighting on any pin you like, but you will have to do more work to support that. See the [Backlight Documentation](feature_backlight.md) for more details.
|
||||
{% endhint %}
|
||||
|
||||
### Other Configuration Options
|
||||
|
||||
There are a lot of features that can be configured or tuned in `config.h`. You should see the [Config Options](config_options.md) page for more details.
|
||||
|
||||
## `rules.mk`
|
||||
|
||||
You use the `rules.mk` file to tell QMK what files to build and what features to enable. If you are building around an atmega32u4 you can largely leave these defaults alone. If you are using another MCU you may have to tweak some parameters.
|
||||
|
||||
### MCU Options
|
||||
|
||||
These options tell the build system what CPU to build for. Be very careful if you change any of these settings, you can render your keyboard inoperable.
|
||||
|
||||
```
|
||||
MCU = atmega32u4
|
||||
F_CPU = 16000000
|
||||
ARCH = AVR8
|
||||
F_USB = $(F_CPU)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
```
|
||||
|
||||
### Bootloader Size
|
||||
|
||||
The bootloader is a special section of your MCU that allows you to upgrade the code stored on the MCU. Think of it like a Rescue Partition for your keyboard. If you are using a teensy 2.0, or a device like the Ergodox EZ that uses the teensy bootloader you should set this to `512`. Most other bootloaders should be set to `4096`, but `1024` and `2048` are other possible values you may encounter.
|
||||
|
||||
#### Teensy 2.0 Bootloader Example
|
||||
|
||||
```
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
```
|
||||
|
||||
#### Teensy 2.0++ Bootloader Example
|
||||
|
||||
```
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=1024
|
||||
```
|
||||
|
||||
#### Atmel DFU Loader Example
|
||||
|
||||
```
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
```
|
||||
|
||||
### Build Options
|
||||
|
||||
There are a number of features that can be turned on or off in `rules.mk`. See the [Config Options](config_options.md#feature-options) page for a detailed list and description.
|
27
docs/hardware_drivers.md
Normal file
27
docs/hardware_drivers.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# QMK Hardware Drivers
|
||||
|
||||
QMK is used on a lot of different hardware. While support for the most common MCU's and matrix configurations is built-in there are a number of drivers that can be added to a keyboard to support additional hardware. Examples include mice and other pointing devices, i/o expanders for split keyboards, bluetooth modules, and LCD, OLED, and TFT screens.
|
||||
|
||||
<!-- FIXME: This should talk about how drivers are integrated into QMK and how you can add your own driver.
|
||||
|
||||
# Driver System Overview
|
||||
|
||||
-->
|
||||
|
||||
# Available Drivers
|
||||
|
||||
## ProMicro (AVR Only)
|
||||
|
||||
Support for addressing pins on the ProMicro by their Arduino name rather than their AVR name. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process.
|
||||
|
||||
## SSD1306 (AVR Only)
|
||||
|
||||
Support for SSD1306 based OLED displays. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process.
|
||||
|
||||
## uGFX
|
||||
|
||||
You can make use of uGFX within QMK to drive character and graphic LCD's, LED arrays, OLED, TFT, and other display technologies. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process.
|
||||
|
||||
## WS2812 (AVR Only)
|
||||
|
||||
Support for WS2811/WS2812{a,b,c} LED's. For more information see the [RGB Light](feature_rgblight.md) page.
|
137
docs/hardware_keyboard_guidelines.md
Normal file
137
docs/hardware_keyboard_guidelines.md
Normal file
@@ -0,0 +1,137 @@
|
||||
# QMK Keyboard Guidelines
|
||||
|
||||
We welcome all keyboard projects into QMK, but ask that you try to stick to a couple guidelines that help us keep things organised and consistent.
|
||||
|
||||
## Naming Your Keyboard/Project
|
||||
|
||||
All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format.
|
||||
|
||||
## `readme.md`
|
||||
|
||||
All projects need to have a `readme.md` file that explains what the keyboard is, who made it, where it is available, and links to more information. Please follow the [published template](documentation_templates.md#keyboard-readmemd-template).
|
||||
|
||||
## Image/Hardware Files
|
||||
|
||||
In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (imgur) and linking them in the `readme.md` is the preferred method.
|
||||
|
||||
Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be stored and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `/<keyboard>/` (name follows the same format as above) which are served at `http://qmk.fm/<keyboard>/`, and pages are generated from `/_pages/<keyboard>/` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example.
|
||||
|
||||
## Keyboard Metadata
|
||||
|
||||
As QMK grows so does the ecosystem surrounding QMK. To make it easier for projects in that ecosystem to tie into QMK as we make changes we are developing a metadata system to expose information about keyboards in QMK.
|
||||
|
||||
You can create `info.json` files at every level under `qmk_firmware/keyboards/<name>` to specify this metadata. These files are combined, with more specific files overriding keys in less specific files. This means you do not need to duplicate your metadata information. For example, `qmk_firmware/keyboards/clueboard/info.json` specifies `manufacturer` and `maintainer`, while `qmk_firmware/keyboards/clueboard/66/info.json` specifies more specific information about Clueboard 66%.
|
||||
|
||||
### `info.json` Format
|
||||
|
||||
The `info.json` file is a JSON formatted dictionary with the following keys available to be set. You do not have to set all of them, merely the keys that apply to your keyboard.
|
||||
|
||||
* `keyboard_name`
|
||||
* A free-form text string describing the keyboard.
|
||||
* Example: `Clueboard 66%`
|
||||
* `manufacturer`
|
||||
* A free-form text string naming the manufacturer.
|
||||
* Example: `Clueboard`
|
||||
* `identifier`
|
||||
* The Vendor, Product, and Revision ID's joined by a :
|
||||
* Example: `c1ed:2370:0001`
|
||||
* `url`
|
||||
* A URL to the keyboard's product page, [QMK.fm/keyboards](https://qmk.fm/keyboards) page, or other page describing information about the keyboard.
|
||||
* `processor`
|
||||
* The MCU or CPU this keyboard uses.
|
||||
* Example: `atmega32u4` or `stm32f303`
|
||||
* `bootloader`
|
||||
* What bootloader this keyboard uses. Available options:
|
||||
* `atmel-dfu`
|
||||
* `kiibohd-dfu-util`
|
||||
* `lufa-dfu`
|
||||
* `qmk-dfu`
|
||||
* `stm32-dfu-util`
|
||||
* (FIXME: This list is incomplete.)
|
||||
* `maintainer`
|
||||
* GitHub username of the maintainer, or `qmk` for community maintained boards
|
||||
* `width`
|
||||
* Width of the board in Key Units
|
||||
* `height`
|
||||
* Height of the board in Key Units
|
||||
* `layouts`
|
||||
* Physical Layout representations. See the next section for more detail.
|
||||
|
||||
#### Layout Format
|
||||
|
||||
Within our `info.json` file the `layouts` portion of the dictionary contains several nested dictionaries. The outer layer consists of QMK layout macros, for example `LAYOUT_ansi` or `LAYOUT_iso`. Within each layout macro are keys for `width`, `height`, and `key_count`, each of which should be self-explanatory.
|
||||
|
||||
* `width`
|
||||
* Optional: The width of the layout in Key Units
|
||||
* `height`
|
||||
* Optional: The height of the layout in Key Units
|
||||
* `key_count`
|
||||
* **Required**: The number of keys in this layout
|
||||
* `layout`
|
||||
* A list of Key Dictionaries describing the physical layout. See the next section for more details.
|
||||
|
||||
#### Key Dictionary Format
|
||||
|
||||
Each Key Dictionary in a layout describes the physical properties of a key. If you are familiar with the Raw Code for <http://keyboard-layout-editor.com> you will find many of the concepts the same. We re-use the same key names and layout choices wherever possible, but unlike keyboard-layout-editor each key is stateless, inheriting no properties from the keys that came before it.
|
||||
|
||||
All key positions and rotations are specified in relation to the top-left corner of the keyboard, and the top-left corner of each key.
|
||||
|
||||
* `X`
|
||||
* **Required**: The absolute position of the key in the horizontal axis, in Key Units.
|
||||
* `Y`
|
||||
* **Required**: The absolute position of the key in the vertical axis, in Key Units.
|
||||
* `W`
|
||||
* The width of the key, in Key Units. Ignored if `ks` is provided. Default: `1`
|
||||
* `H`
|
||||
* The height of the key, in Key Units. Ignored if `ks` is provided. Default: `1`
|
||||
* `R`
|
||||
* How many degrees clockwise to rotate the key.
|
||||
* `RX`
|
||||
* The absolute position of the point to rotate the key around in the horizontal axis. Default: `x`
|
||||
* `RY`
|
||||
* The absolute position of the point to rotate the key around in the vertical axis. Default: `y`
|
||||
* `KS`
|
||||
* Key Shape: define a polygon by providing a list of points, in Key Units.
|
||||
* **Important**: These are relative to the top-left of the key, not absolute.
|
||||
* Example ISO Enter: `[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]`
|
||||
|
||||
### How is the Metadata Exposed?
|
||||
|
||||
This metadata is primarily used in two ways:
|
||||
|
||||
* To allow web-based configurators to dynamically generate UI
|
||||
* To support the new `make keyboard:keymap:qmk` target, which bundles this metadata up with the firmware to allow QMK Toolbox to be smarter.
|
||||
|
||||
Configurator authors can see the [QMK Compiler](https://docs.compile.qmk.fm/api_docs.html) docs for more information on using the JSON API.
|
||||
|
||||
## Non-Production/Handwired Projects
|
||||
|
||||
We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder!
|
||||
|
||||
## Warnings as Errors
|
||||
|
||||
When developing your keyboard, keep in mind that all warnings will be treated as errors - these small warnings can build-up and cause larger errors down the road (and keeping them is generally a bad practice).
|
||||
|
||||
## Copyright Blurb
|
||||
|
||||
If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, in this format:
|
||||
|
||||
Copyright 2017 Your Name <your@email.com>
|
||||
|
||||
If you are modifying someone else's code and have made only trivial changes you should leave their name in the copyright statement. If you have done significant work on the file you should add your name to theirs, like so:
|
||||
|
||||
Copyright 2017 Their Name <original_author@example.com> Your Name <you@example.com>
|
||||
|
||||
The year should be the first year the file is created. If work was done to that file in later years you can reflect that by appending the second year to the first, like so:
|
||||
|
||||
Copyright 2015-2017 Your Name <you@example.com>
|
||||
|
||||
## License
|
||||
|
||||
The core of QMK is licensed under the [GNU General Public License](https://www.gnu.org/licenses/licenses.en.html). If you are shipping binaries for AVR processors you may choose either [GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) or [GPLv3](https://www.gnu.org/licenses/gpl.html). If you are shipping binaries for ARM processors you must choose [GPL Version 3](https://www.gnu.org/licenses/gpl.html) to comply with the [ChibiOS](http://www.chibios.org) GPLv3 license.
|
||||
|
||||
If your keyboard makes use of the [uGFX](https://ugfx.io) features within QMK you must comply with the [uGFX License](https://ugfx.io/license.html), which requires a separate commercial license before selling a device containing uGFX.
|
||||
|
||||
## Technical Details
|
||||
|
||||
If you're looking for more information on making your keyboard work with QMK, [check out the hardware section](hardware.md)!
|
@@ -1,10 +1,10 @@
|
||||
# How keys are registered, and interpreted by computers
|
||||
# How Keys Are Registered, and Interpreted by Computers
|
||||
|
||||
In this file, you can will learn the concepts of how keyboards work over USB,
|
||||
and you'll be able to better understand what you can expect from changing your
|
||||
firmware directly.
|
||||
|
||||
## Schematic view
|
||||
## Schematic View
|
||||
|
||||
Whenever you type on 1 particular key, here is the chain of actions taking
|
||||
place:
|
||||
@@ -49,9 +49,9 @@ layout is set to QWERTY, a sample of the matching table is as follow:
|
||||
| 0x1D | z/Z |
|
||||
| ... | ... |
|
||||
|
||||
## Back to the firmware
|
||||
## Back to the Firmware
|
||||
|
||||
As the layout is generally fixed (unless you create your own), the firmware can actually call a keycode by its layout name directly to ease things for you. This is exactly what is done here with `KC_A` actually representing `0x04` in QWERTY. The full list can be found in `keycode.txt`.
|
||||
As the layout is generally fixed (unless you create your own), the firmware can actually call a keycode by its layout name directly to ease things for you. This is exactly what is done here with `KC_A` actually representing `0x04` in QWERTY. The full list can be found in [keycodes](keycodes.md).
|
||||
|
||||
## List of Characters You Can Send
|
||||
|
@@ -17,11 +17,11 @@ If you're having trouble flashing/erasing your board, and running into cryptic e
|
||||
atmel.c:1434: Error flashing the block: err -2.
|
||||
ERROR
|
||||
Memory write error, use debug for more info.
|
||||
commands.c:360: Error writing memory data. (err -4)
|
||||
|
||||
commands.c:360: Error writing memory data. (err -4)
|
||||
|
||||
You're likely going to need to ISP flash your board/device to get it working again. Luckily, this process is pretty straight-forward, provided you have any extra programmable keyboard, Arduino, or Teensy 2.0/Teensy 2.0++. There are also dedicated ISP flashers available for this, but most cost >$15, and it's assumed that if you are googling this error, this is the first you've heard about ISP flashing, and don't have one readily available (whereas you might have some other AVR board). __We'll be using a Teensy 2.0 with Windows 10 in this guide__ - if you are comfortable doing this on another system, please consider editing this guide and contributing those instructions!
|
||||
|
||||
## Software needed
|
||||
## Software Needed
|
||||
|
||||
* [The Arduino IDE](https://www.arduino.cc/en/Main/Software)
|
||||
* [Teensyduino](https://www.pjrc.com/teensy/td_download.html) (if you're using a Teensy)
|
||||
@@ -37,8 +37,8 @@ This is pretty straight-forward - we'll be connecting like-things to like-things
|
||||
Flasher B3 <-> Keyboard B3 (MISO)
|
||||
Flasher VCC <-> Keyboard VCC
|
||||
Flasher GND <-> Keyboard GND
|
||||
|
||||
## The ISP firmware
|
||||
|
||||
## The ISP Firmware
|
||||
|
||||
Make sure your keyboard is unplugged from any device, and plug in your Teensy.
|
||||
|
||||
@@ -51,31 +51,31 @@ Then scroll down until you see something that looks like this block of code:
|
||||
// Configure which pins to use:
|
||||
|
||||
// The standard pin configuration.
|
||||
#ifndef ARDUINO_HOODLOADER2
|
||||
#ifndef ARDUINO_HOODLOADER2
|
||||
|
||||
#define RESET 0 // Use 0 (B0) instead of 10
|
||||
#define LED_HB 11 // Use 11 (LED on the Teensy 2.0)
|
||||
#define LED_ERR 8 // This won't be used unless you have an LED hooked-up to 8 (D3)
|
||||
#define LED_PMODE 7 // This won't be used unless you have an LED hooked-up to 7 (D2)
|
||||
|
||||
And make the changes in the last four lines. If you're using something besides the Teenys 2.0, you'll want to choose something else that makes sense for `LED_HB`. We define `RESET` as `0`/`B0` because that's what's close - if you want to use another pin for some reason, [you can use the pinouts to choose something else](https://www.pjrc.com/teensy/pinout.html).
|
||||
|
||||
Once you've made your changes, you can click the Upload button (right arrow), which will open up the Teensy flasher app - you'll need to press the reset button on the Teensy the first time, but after that, it's automatic (you shouldn't be flashing this more than once, though). Once flashed, the orange LED on the Teensy will flash on and off, indicating it's ready for some action.
|
||||
And make the changes in the last four lines. If you're using something besides the Teensy 2.0, you'll want to choose something else that makes sense for `LED_HB`. We define `RESET` as `0`/`B0` because that's what's close - if you want to use another pin for some reason, [you can use the pinouts to choose something else](https://www.pjrc.com/teensy/pinout.html).
|
||||
|
||||
## The .hex file
|
||||
Once you've made your changes, you can click the Upload button (right arrow), which will open up the Teensy flasher app - you'll need to press the reset button on the Teensy the first time, but after that, it's automatic (you shouldn't be flashing this more than once, though). Once flashed, the orange LED on the Teensy will flash on and off, indicating it's ready for some action.
|
||||
|
||||
Before flashing your firmware, you're going to need to and do a little preparation. We'll be appending [this bootloader (also a .hex file)](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1_0_0.hex) to the end of our firmware by opening the original .hex file in a text editor, and removing the last line, which should be `:00000001FF` (this is an EOF message). After that's been removed, copy the entire bootloader's contents and paste it at the end of the original file, and save it.
|
||||
## The `.hex` File
|
||||
|
||||
Before flashing your firmware, you're going to need to and do a little preparation. We'll be appending [this bootloader (also a .hex file)](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1_0_0.hex) to the end of our firmware by opening the original .hex file in a text editor, and removing the last line, which should be `:00000001FF` (this is an EOF message). After that's been removed, copy the entire bootloader's contents and paste it at the end of the original file, and save it.
|
||||
|
||||
It's possible to use other bootloaders here in the same way, but __you need a bootloader__, otherwise you'll have to ISP to write new firmware to your keyboard.
|
||||
|
||||
## Flashing your firmware
|
||||
## Flashing Your Firmware
|
||||
|
||||
Make sure your keyboard is unplugged from any device, and plug in your Teensy.
|
||||
|
||||
Open `cmd` and navigate to your where your modified .hex file is. We'll pretend this file is called `main.hex`, and that your Teensy 2.0 is on the `COM3` port - if you're unsure, you can open your Device Manager, and look for `Ports > USB Serial Device`. Use that COM port here. You can confirm it's the right port with:
|
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4
|
||||
|
||||
|
||||
and you should get something like the following output:
|
||||
|
||||
avrdude: AVR device initialized and ready to accept instructions
|
||||
@@ -90,8 +90,8 @@ and you should get something like the following output:
|
||||
|
||||
Since our keyboard uses an `atmega32u4` (common), that is the chip we'll specify. This is the full command:
|
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i
|
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i
|
||||
|
||||
You should see a couple of progress bars, then you should see:
|
||||
|
||||
avrdude: verifying ...
|
||||
@@ -100,7 +100,7 @@ You should see a couple of progress bars, then you should see:
|
||||
avrdude: safemode: Fuses OK
|
||||
|
||||
avrdude done. Thank you.
|
||||
|
||||
|
||||
Which means everything should be ok! Your board may restart automatically, otherwise, unplug your Teensy and plug in your keyboard - you can leave your Teensy wired to your keyboard while testing things, but it's recommended that you desolder it/remove the wiring once you're sure everything works.
|
||||
|
||||
If you have any questions/problems, feel free to [open an issue](https://github.com/qmk/qmk_firmware/issues/new)!
|
||||
|
@@ -1,128 +0,0 @@
|
||||
# Quick Aliases To Common Actions
|
||||
|
||||
Your keymap can include shortcuts to common operations (called "function actions" in tmk).
|
||||
|
||||
These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the qmk `ACTION_*` functions, please see the [Keymap documentation](keymap.md#2-action).
|
||||
|
||||
Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them.
|
||||
|
||||
## Limits of these aliases
|
||||
|
||||
Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes.html), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used, [see this list](keycodes.html).
|
||||
|
||||
# Switching and toggling layers
|
||||
|
||||
`MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack.
|
||||
|
||||
`LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. Like `MO()`, this only works upwards in the layer stack (`layer` must be higher than the current layer).
|
||||
|
||||
`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack.
|
||||
|
||||
`TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed).
|
||||
|
||||
`TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 1` for just one tap.
|
||||
|
||||
|
||||
# Modifier keys
|
||||
|
||||
* `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias
|
||||
* `RSFT(kc)` - applies right Shift to *kc*
|
||||
* `LCTL(kc)` - applies left Control to *kc*
|
||||
* `RCTL(kc)` - applies right Control to *kc*
|
||||
* `LALT(kc)` - applies left Alt to *kc*
|
||||
* `RALT(kc)` - applies right Alt to *kc*
|
||||
* `LGUI(kc)` - applies left GUI (command/win) to *kc*
|
||||
* `RGUI(kc)` - applies right GUI (command/win) to *kc*
|
||||
* `HYPR(kc)` - applies Hyper (all modifiers) to *kc*
|
||||
* `MEH(kc)` - applies Meh (all modifiers except Win/Cmd) to *kc*
|
||||
* `LCAG(kc)` - applies CtrlAltGui to *kc*
|
||||
|
||||
You can also chain these, like this:
|
||||
|
||||
LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress.
|
||||
|
||||
# Shifted Keycodes
|
||||
|
||||
The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. Their long names are also available and documented in `quantum/quantum_keycodes.h`.
|
||||
|
||||
KC_TILD ~
|
||||
KC_EXLM !
|
||||
KC_QUES ?
|
||||
KC_AT @
|
||||
KC_HASH #
|
||||
KC_DLR $
|
||||
KC_PERC %
|
||||
KC_CIRC ^
|
||||
KC_AMPR &
|
||||
KC_ASTR *
|
||||
KC_LPRN (
|
||||
KC_RPRN )
|
||||
KC_UNDS _
|
||||
KC_PLUS +
|
||||
KC_DQUO "
|
||||
KC_LCBR {
|
||||
KC_RCBR }
|
||||
KC_LABK <
|
||||
KC_RABK >
|
||||
KC_PIPE |
|
||||
KC_COLN :
|
||||
|
||||
# One Shot
|
||||
|
||||
`OSM(mod)` - this is a "one shot" modifier. So let's say you have your left Shift key defined as `OSM(MOD_LSFT)`. Tap it, let go, and Shift is "on" -- but only for the next character you'll type. So to write "The", you don't need to hold down Shift -- you tap it, tap t, and move on with life. And if you hold down the left Shift key, it just works as a left Shift key, as you would expect (so you could type THE). There's also a magical, secret way to "lock" a modifier by tapping it multiple times. If you want to learn more about that, open an issue. :)
|
||||
|
||||
`OSL(layer)` - momentary switch to *layer*, as a one-shot operation. So if you have a key that's defined as `OSL(1)`, and you tap that key, then only the very next keystroke would come from layer 1. You would drop back to layer zero immediately after that one keystroke. That's handy if you have a layer full of custom shortcuts -- for example, a dedicated key for closing a window. So you tap your one-shot layer mod, then tap that magic 'close window' key, and keep typing like a boss. Layer 1 would remain active as long as you hold that key down, too (so you can use it like a momentary toggle-layer key with extra powers).
|
||||
|
||||
|
||||
# Mod Tap
|
||||
|
||||
`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down.
|
||||
|
||||
These are the values you can use for the `mod` in `MT()` and `OSM()`:
|
||||
|
||||
* MOD_LCTL
|
||||
* MOD_LSFT
|
||||
* MOD_LALT
|
||||
* MOD_LGUI
|
||||
* MOD_RCTL
|
||||
* MOD_RSFT
|
||||
* MOD_RALT
|
||||
* MOD_RGUI
|
||||
* MOD_HYPR
|
||||
* MOD_MEH
|
||||
|
||||
These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. Note however, that you cannot mix right and left side modifiers.
|
||||
|
||||
We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact:
|
||||
|
||||
* `CTL_T(kc)` - is LCTL when held and *kc* when tapped
|
||||
* `SFT_T(kc)` - is LSFT when held and *kc* when tapped
|
||||
* `ALT_T(kc)` - is LALT when held and *kc* when tapped
|
||||
* `ALGR_T(kc)` - is AltGr when held and *kc* when tapped
|
||||
* `GUI_T(kc)` - is LGUI when held and *kc* when tapped
|
||||
* `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)
|
||||
* `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped
|
||||
* `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift.
|
||||
|
||||
# Permissive Hold
|
||||
|
||||
As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
|
||||
|
||||
```
|
||||
#define PERMISSIVE_HOLD
|
||||
```
|
||||
|
||||
This makes it easier for fast typists to use dual-function keys. As described in the PR:
|
||||
|
||||
Without this, if you let go of a held key inside the tapping term, it won't register.
|
||||
|
||||
Example: (Tapping Term = 200)
|
||||
|
||||
- SHFT_T(KC_A) Down
|
||||
- KC_X Down
|
||||
- KC_X Up
|
||||
- SHFT_T(KC_A) Up
|
||||
|
||||
With permissive hold, if above is typed within tapping term, this will emit `X` (so, Shift+X).
|
||||
|
||||
With defaults, if above is typed within tapping term, this will emit `ax`, which I doubt is what anyone really wants
|
@@ -183,7 +183,7 @@ KC_RSHIFT KC_RSFT E5 Keyboard RightShift
|
||||
KC_RALT E6 Keyboard RightAlt
|
||||
KC_RGUI E7 Keyboard Right GUI(Windows/Apple/Meta key)
|
||||
|
||||
/*
|
||||
/*
|
||||
* Virtual keycodes
|
||||
*/
|
||||
/* System Control */
|
||||
|
395
docs/keycodes.md
395
docs/keycodes.md
@@ -1,17 +1,392 @@
|
||||
# Overview
|
||||
# Keycodes Overview
|
||||
|
||||
When defining a [keymap](keymap.md) each key needs a valid key definition.
|
||||
When defining a [keymap](keymap.md) each key needs a valid key definition. This page documents the symbols that correspond to keycodes that are available to you in QMK.
|
||||
|
||||
This page documents the symbols that correspond to keycodes that are available to you in QMK.
|
||||
This is a reference only. Each group of keys links to the page documenting their functionality in more detail.
|
||||
|
||||
## Basic keycodes (`0x00` - `0xFF`)
|
||||
## [Basic Keycodes](keycodes_basic.md)
|
||||
|
||||
[Basic keycodes](basic_keycodes.md) in QMK are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) with following exceptions:
|
||||
|Key |Aliases |Description |
|
||||
|-----------------------|----------|-----------------------------------------------|
|
||||
|`KC_1` | |`1` and `!` |
|
||||
|`KC_2` | |`2` and `@` |
|
||||
|`KC_3` | |`3` and `#` |
|
||||
|`KC_4` | |`4` and `$` |
|
||||
|`KC_5` | |`5` and `%` |
|
||||
|`KC_6` | |`6` and `^` |
|
||||
|`KC_7` | |`7` and `&` |
|
||||
|`KC_8` | |`8` and `*` |
|
||||
|`KC_9` | |`9` and `(` |
|
||||
|`KC_0` | |`0` and `)` |
|
||||
|`KC_F1` | | |
|
||||
|`KC_F2` | | |
|
||||
|`KC_F3` | | |
|
||||
|`KC_F4` | | |
|
||||
|`KC_F5` | | |
|
||||
|`KC_F6` | | |
|
||||
|`KC_F7` | | |
|
||||
|`KC_F8` | | |
|
||||
|`KC_F9` | | |
|
||||
|`KC_F10` | | |
|
||||
|`KC_F11` | | |
|
||||
|`KC_F12` | | |
|
||||
|`KC_F13` | | |
|
||||
|`KC_F14` | | |
|
||||
|`KC_F15` | | |
|
||||
|`KC_F16` | | |
|
||||
|`KC_F17` | | |
|
||||
|`KC_F18` | | |
|
||||
|`KC_F19` | | |
|
||||
|`KC_F20` | | |
|
||||
|`KC_F21` | | |
|
||||
|`KC_F22` | | |
|
||||
|`KC_F23` | | |
|
||||
|`KC_F24` | | |
|
||||
|`KC_A` | |`a` and `A` |
|
||||
|`KC_B` | |`b` and `B` |
|
||||
|`KC_C` | |`c` and `C` |
|
||||
|`KC_D` | |`d` and `D` |
|
||||
|`KC_E` | |`e` and `E` |
|
||||
|`KC_F` | |`f` and `F` |
|
||||
|`KC_G` | |`g` and `G` |
|
||||
|`KC_H` | |`h` and `H` |
|
||||
|`KC_I` | |`i` and `I` |
|
||||
|`KC_J` | |`j` and `J` |
|
||||
|`KC_K` | |`k` and `K` |
|
||||
|`KC_L` | |`l` and `L` |
|
||||
|`KC_M` | |`m` and `M` |
|
||||
|`KC_N` | |`n` and `N` |
|
||||
|`KC_O` | |`o` and `O` |
|
||||
|`KC_P` | |`p` and `P` |
|
||||
|`KC_Q` | |`q` and `Q` |
|
||||
|`KC_R` | |`r` and `R` |
|
||||
|`KC_S` | |`s` and `S` |
|
||||
|`KC_T` | |`t` and `T` |
|
||||
|`KC_U` | |`u` and `U` |
|
||||
|`KC_V` | |`v` and `V` |
|
||||
|`KC_W` | |`w` and `W` |
|
||||
|`KC_X` | |`x` and `X` |
|
||||
|`KC_Y` | |`y` and `Y` |
|
||||
|`KC_Z` | |`z` and `Z` |
|
||||
|`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` |`-` and `_` |
|
||||
|`KC_EQUAL` |`KC_EQL` |`=` and `+` |
|
||||
|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` |
|
||||
|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` |
|
||||
|`KC_BSLASH` |`KC_BSLS` |`\` and <code>|</code> |
|
||||
|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |
|
||||
|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and <code>|</code> |
|
||||
|`KC_INT1` |`KC_RO` |JIS `\` and <code>|</code> |
|
||||
|`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana |
|
||||
|`KC_INT3` |`KC_JYEN` |JIS `¥` |
|
||||
|`KC_SCOLON` |`KC_SCLN` |`;` and `:` |
|
||||
|`KC_QUOTE` |`KC_QUOT` |`'` and `"` |
|
||||
|`KC_GRAVE` |`KC_GRV` |<code>`</code> and `~` |
|
||||
|`KC_COMMA` |`KC_COMM` |`,` and `<` |
|
||||
|`KC_DOT` | |`.` and `>` |
|
||||
|`KC_SLASH` |`KC_SLSH` |`/` and `?` |
|
||||
|`KC_CAPSLOCK` |`KC_CAPS` |Caps Lock |
|
||||
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|
||||
|`KC_LSHIFT` |`KC_LSFT` |Left Shift |
|
||||
|`KC_LALT` | |Left Alt |
|
||||
|`KC_LGUI` | |Left GUI (Windows/Command/Meta key) |
|
||||
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
||||
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|
||||
|`KC_RALT` | |Right Alt |
|
||||
|`KC_RGUI` | |Right GUI (Windows/Command/Meta key) |
|
||||
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |
|
||||
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |
|
||||
|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock |
|
||||
|`KC_INT4` |`KC_HENK` |JIS Henkan |
|
||||
|`KC_INT5` |`KC_MHEN` |JIS Muhenkan |
|
||||
|`KC_PSCREEN` |`KC_PSCR` |Print Screen |
|
||||
|`KC_SCROLLLOCK` |`KC_SLCK` |Scroll Lock |
|
||||
|`KC_PAUSE` |`KC_PAUS` |Pause |
|
||||
|`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` |Right Arrow |
|
||||
|`KC_LEFT` | |Left Arrow |
|
||||
|`KC_DOWN` | |Down Arrow |
|
||||
|`KC_UP` | |Up Arrow |
|
||||
|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key) |
|
||||
|`KC_POWER` | |Deprecated by MS in favor of `KC_SYSTEM_POWER`.|
|
||||
|`KC_EXECUTE` | |Execute |
|
||||
|`KC_HELP` | |Help |
|
||||
|`KC_MENU` | |Menu |
|
||||
|`KC_SELECT` | |Select |
|
||||
|`KC_AGAIN` | |Again |
|
||||
|`KC_UNDO` | |Undo |
|
||||
|`KC_CUT` | |Cut |
|
||||
|`KC_COPY` | |Copy |
|
||||
|`KC_PASTE` | |Paste |
|
||||
|`KC_FIND` | |Find |
|
||||
|`KC_ALT_ERASE` | |Alternate Erase |
|
||||
|`KC_SYSREQ` | |SysReq/Attention |
|
||||
|`KC_CANCEL` | |Cancel |
|
||||
|`KC_CLEAR` | |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_SYSTEM_POWER` |`KC_PWR` |System Power Down. Recommended over `KC_POWER`.|
|
||||
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |
|
||||
|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake |
|
||||
|`KC_MAIL` |`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_STOP` | |Stop |
|
||||
|`KC__MUTE` | |Mute (macOS) |
|
||||
|`KC__VOLUP` | |Volume Up (macOS) |
|
||||
|`KC__VOLDOWN` | |Volume Down (macOS) |
|
||||
|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute (Windows/macOS/Linux) |
|
||||
|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up (Windows/macOS/Linux) |
|
||||
|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down (Windows/macOS/Linux) |
|
||||
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track (Windows) |
|
||||
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track (Windows) |
|
||||
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track (macOS) |
|
||||
|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track (macOS) |
|
||||
|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |
|
||||
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |
|
||||
|`KC_MEDIA_SELECT` |`KC_MSEL` | |
|
||||
|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear |
|
||||
|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |
|
||||
|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |
|
||||
|`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` |
|
||||
|`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` |
|
||||
|`KC_KP_ENTER` |`KC_PENT` |Keypad Enter |
|
||||
|`KC_KP_1` |`KC_P1` |Keypad `1` and End |
|
||||
|`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow |
|
||||
|`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down |
|
||||
|`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow |
|
||||
|`KC_KP_5` |`KC_P5` |Keypad `5` |
|
||||
|`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow |
|
||||
|`KC_KP_7` |`KC_P7` |Keypad `7` and Home |
|
||||
|`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow |
|
||||
|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |
|
||||
|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |
|
||||
|`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete |
|
||||
|`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` |
|
||||
|`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` |
|
||||
|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards |
|
||||
|`KC_NO` | |Ignore this key (NOOP) |
|
||||
|`KC_TRANSPARENT` |`KC_TRNS` |Use the next lowest non-transparent key |
|
||||
|
||||
* `KC_NO` = 0 for no action
|
||||
* `KC_TRNS` = 1 for layer transparency
|
||||
* internal special keycodes in the `0xA5-DF` range (tmk heritage).
|
||||
## [Mouse Keys](feature_mouse_keys.md)
|
||||
|
||||
## Quantum keycodes (`0x0100` - `0xFFFF`)
|
||||
|Key |Aliases |Description |
|
||||
|----------------|---------|---------------------------|
|
||||
|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up |
|
||||
|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down |
|
||||
|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left |
|
||||
|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right |
|
||||
|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 |
|
||||
|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 |
|
||||
|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 |
|
||||
|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 |
|
||||
|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 |
|
||||
|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up |
|
||||
|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down |
|
||||
|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left |
|
||||
|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right |
|
||||
|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0|
|
||||
|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1|
|
||||
|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2|
|
||||
|
||||
[Quantum keycodes](quantum_keycodes.md) allow for easier customisation of your keymap than the basic ones provide, without having to define custom actions.
|
||||
## [Quantum Keycodes](quantum_keycodes.md#qmk-keycodes)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-------------|-----------|---------------------------------------------------------------------|
|
||||
|`RESET` | |Put the keyboard into DFU mode for flashing |
|
||||
|`DEBUG` | |Toggle debug mode |
|
||||
|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, <code>`</code> when pressed with Shift or GUI|
|
||||
|`KC_LSPO` | |Left Shift when held, `(` when tapped |
|
||||
|`KC_RSPC` | |Right Shift when held, `)` when tapped |
|
||||
|`KC_LEAD` | |The [Leader key](feature_leader_key.md) |
|
||||
|`KC_LOCK` | |The [Lock key](feature_key_lock.md) |
|
||||
|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) |
|
||||
|`M(n)` | |Call macro `n` |
|
||||
|`MACROTAP(n)`| |Macro-tap `n` idk FIXME |
|
||||
|
||||
## [Bootmagic](feature_bootmagic.md)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------------------------|---------|------------------------------------|
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Caps Lock and Left Control |
|
||||
|`MAGIC_CAPSLOCK_TO_CONTROL` | |Treat Caps Lock as Control |
|
||||
|`MAGIC_SWAP_LALT_LGUI` | |Swap Left Alt and GUI |
|
||||
|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and GUI |
|
||||
|`MAGIC_NO_GUI` | |Disable the GUI key |
|
||||
|`MAGIC_SWAP_GRAVE_ESC` | |Swap <code>`</code> and Escape |
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace |
|
||||
|`MAGIC_HOST_NKRO` | |Force NKRO on |
|
||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|
||||
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` | |Unswap Caps Lock and Left Control |
|
||||
|`MAGIC_UNCAPSLOCK_TO_CONTROL` | |Stop treating Caps Lock as Control |
|
||||
|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and GUI |
|
||||
|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and GUI |
|
||||
|`MAGIC_UNNO_GUI` | |Enable the GUI key |
|
||||
|`MAGIC_UNSWAP_GRAVE_ESC` | |Unswap <code>`</code> and Escape|
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|
||||
|`MAGIC_UNHOST_NKRO` | |Force NKRO off |
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
||||
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
||||
|
||||
## [Backlighting](feature_backlight.md)
|
||||
|
||||
|Key |Description |
|
||||
|---------|------------------------------------------|
|
||||
|`BL_TOGG`|Turn the backlight on or off |
|
||||
|`BL_STEP`|Cycle through backlight levels |
|
||||
|`BL_ON` |Set the backlight to max brightness |
|
||||
|`BL_OFF` |Turn the backlight off |
|
||||
|`BL_INC` |Increase the backlight level |
|
||||
|`BL_DEC` |Decrease the backlight level |
|
||||
|`BL_BRTG`|Toggle backlight breathing |
|
||||
|
||||
## [RGB Lighting](feature_rgblight.md)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-------------------|----------|--------------------------------------------------------------------|
|
||||
|`RGB_TOG` | |Toggle RGB lighting on or off |
|
||||
|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
|
||||
|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held|
|
||||
|`RGB_HUI` | |Increase hue |
|
||||
|`RGB_HUD` | |Decrease hue |
|
||||
|`RGB_SAI` | |Increase saturation |
|
||||
|`RGB_SAD` | |Decrease saturation |
|
||||
|`RGB_VAI` | |Increase value (brightness) |
|
||||
|`RGB_VAD` | |Decrease value (brightness) |
|
||||
|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode |
|
||||
|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode |
|
||||
|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode |
|
||||
|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode |
|
||||
|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode |
|
||||
|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode |
|
||||
|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode |
|
||||
|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
|
||||
|
||||
## [Thermal Printer](feature_thermal_printer.md)
|
||||
|
||||
|Key |Description |
|
||||
|-----------|----------------------------------------|
|
||||
|`PRINT_ON` |Start printing everything the user types|
|
||||
|`PRINT_OFF`|Stop printing everything the user types |
|
||||
|
||||
## [Bluetooth](feature_bluetooth.md)
|
||||
|
||||
|Key |Description |
|
||||
|----------|----------------------------------------------|
|
||||
|`OUT_AUTO`|Automatically switch between USB and Bluetooth|
|
||||
|`OUT_USB` |USB only |
|
||||
|`OUT_BT` |Bluetooth only |
|
||||
|
||||
## [Modifiers](quantum_keycodes.md#modifiers)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------|----------|----------------------------------------------------|
|
||||
|`KC_HYPR` | |Hold Left Control, Shift, Alt and GUI |
|
||||
|`KC_MEH` | |Hold Left Control, Shift and Alt |
|
||||
|`LCTL(kc)`| |Hold Left Control and press `kc` |
|
||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||
|`LALT(kc)`| |Hold Left Alt and press `kc` |
|
||||
|`LGUI(kc)`| |Hold Left GUI and press `kc` |
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||
|`RALT(kc)`| |Hold Right Alt and press `kc` |
|
||||
|`RGUI(kc)`| |Hold Right GUI and press `kc` |
|
||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
||||
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
||||
|`ALTG(kc)`| |Hold Right Control and Alt and press `kc` |
|
||||
|`SCMD(kc)`|`SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|
||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||
|
||||
## [Mod-Tap Keys](quantum_keycodes.md#mod-tap-keys)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------|------------|-------------------------------------------------------|
|
||||
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
||||
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||
|`RALT_T(kc)`|`ALGR_T(kc)`|Right Alt when held, `kc` when tapped |
|
||||
|`LGUI_T(kc)`|`GUI_T(kc)` |Left GUI when held, `kc` when tapped |
|
||||
|`RGUI_T(kc)`| |Right GUI when held, `kc` when tapped |
|
||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
||||
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
||||
|`SCMD_T(kc)`|`SWIN_T(kc)`|Left Shift and GUI when held, `kc` when tapped |
|
||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||
|
||||
## [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------------------|------------------|-------------------|
|
||||
|`KC_TILDE` |`KC_TILD` |`~` |
|
||||
|`KC_EXCLAIM` |`KC_EXLM` |`!` |
|
||||
|`KC_AT` | |`@` |
|
||||
|`KC_HASH` | |`#` |
|
||||
|`KC_DOLLAR` |`KC_DLR` |`$` |
|
||||
|`KC_PERCENT` |`KC_PERC` |`%` |
|
||||
|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` |
|
||||
|`KC_AMPERSAND` |`KC_AMPR` |`&` |
|
||||
|`KC_ASTERISK` |`KC_ASTR` |`*` |
|
||||
|`KC_LEFT_PAREN` |`KC_LPRN` |`(` |
|
||||
|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` |
|
||||
|`KC_UNDERSCORE` |`KC_UNDS` |`_` |
|
||||
|`KC_PLUS` | |`+` |
|
||||
|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` |
|
||||
|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` |
|
||||
|`KC_PIPE` | |<code>|</code>|
|
||||
|`KC_COLON` |`KC_COLN` |`:` |
|
||||
|`KC_DOUBLE_QUOTE` |`KC_DQT`/`KC_DQUO`|`"` |
|
||||
|`KC_LEFT_ANGLE_BRACKET` |`KC_LT`/`KC_LABK` |`<` |
|
||||
|`KC_RIGHT_ANGLE_BRACKET`|`KC_GT`/`KC_RABK` |`>` |
|
||||
|`KC_QUESTION` |`KC_QUES` |`?` |
|
||||
|
||||
## [Switching and Toggling Layers](feature_common_shortcuts.md#switching-and-toggling-layers)
|
||||
|
||||
|Key |Description |
|
||||
|---------------|----------------------------------------------------------------------------------|
|
||||
|`LT(layer, kc)`|Turn on `layer` when held, `kc` when tapped |
|
||||
|`TO(layer)` |Turn on `layer` when pressed |
|
||||
|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)|
|
||||
|`DF(layer)` |Set the base (default) layer |
|
||||
|`TG(layer)` |Toggle `layer` on or off |
|
||||
|`TT(layer)` |Tap toggle? idk FIXME |
|
||||
|
||||
## [One Shot Keys](quantum_keycodes.md#one-shot-keys)
|
||||
|
||||
|Key |Description |
|
||||
|------------|----------------------------------|
|
||||
|`OSM(mod)` |Hold `mod` for one keypress |
|
||||
|`OSL(layer)`|Switch to `layer` for one keypress|
|
||||
|
||||
## [Unicode Support](feature_unicode.md)
|
||||
|
||||
|Key |Aliases| |
|
||||
|------------|-------|-------------------------------------------------|
|
||||
|`UNICODE(n)`|`UC(n)`|Send Unicode character `n` |
|
||||
|`X(n)` | |Send Unicode character `n` via a different method|
|
||||
|
230
docs/keycodes_basic.md
Normal file
230
docs/keycodes_basic.md
Normal file
@@ -0,0 +1,230 @@
|
||||
# Basic Keycodes
|
||||
|
||||
The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) with the exception of `KC_NO`, `KC_TRNS` and keycodes in the `0xA5-DF` range. See below for more details.
|
||||
|
||||
## Letters and Numbers
|
||||
|
||||
|Key |Description|
|
||||
|------|-----------|
|
||||
|`KC_A`|`a` and `A`|
|
||||
|`KC_B`|`b` and `B`|
|
||||
|`KC_C`|`c` and `C`|
|
||||
|`KC_D`|`d` and `D`|
|
||||
|`KC_E`|`e` and `E`|
|
||||
|`KC_F`|`f` and `F`|
|
||||
|`KC_G`|`g` and `G`|
|
||||
|`KC_H`|`h` and `H`|
|
||||
|`KC_I`|`i` and `I`|
|
||||
|`KC_J`|`j` and `J`|
|
||||
|`KC_K`|`k` and `K`|
|
||||
|`KC_L`|`l` and `L`|
|
||||
|`KC_M`|`m` and `M`|
|
||||
|`KC_N`|`n` and `N`|
|
||||
|`KC_O`|`o` and `O`|
|
||||
|`KC_P`|`p` and `P`|
|
||||
|`KC_Q`|`q` and `Q`|
|
||||
|`KC_R`|`r` and `R`|
|
||||
|`KC_S`|`s` and `S`|
|
||||
|`KC_T`|`t` and `T`|
|
||||
|`KC_U`|`u` and `U`|
|
||||
|`KC_V`|`v` and `V`|
|
||||
|`KC_W`|`w` and `W`|
|
||||
|`KC_X`|`x` and `X`|
|
||||
|`KC_Y`|`y` and `Y`|
|
||||
|`KC_Z`|`z` and `Z`|
|
||||
|`KC_1`|`1` and `!`|
|
||||
|`KC_2`|`2` and `@`|
|
||||
|`KC_3`|`3` and `#`|
|
||||
|`KC_4`|`4` and `$`|
|
||||
|`KC_5`|`5` and `%`|
|
||||
|`KC_6`|`6` and `^`|
|
||||
|`KC_7`|`7` and `&`|
|
||||
|`KC_8`|`8` and `*`|
|
||||
|`KC_9`|`9` and `(`|
|
||||
|`KC_0`|`0` and `)`|
|
||||
|
||||
## F Keys
|
||||
|
||||
|Key |Description|
|
||||
|--------|-----------|
|
||||
|`KC_F1` | |
|
||||
|`KC_F2` | |
|
||||
|`KC_F3` | |
|
||||
|`KC_F4` | |
|
||||
|`KC_F5` | |
|
||||
|`KC_F6` | |
|
||||
|`KC_F7` | |
|
||||
|`KC_F8` | |
|
||||
|`KC_F9` | |
|
||||
|`KC_F10`| |
|
||||
|`KC_F11`| |
|
||||
|`KC_F12`| |
|
||||
|`KC_F13`| |
|
||||
|`KC_F14`| |
|
||||
|`KC_F15`| |
|
||||
|`KC_F16`| |
|
||||
|`KC_F17`| |
|
||||
|`KC_F18`| |
|
||||
|`KC_F19`| |
|
||||
|`KC_F20`| |
|
||||
|`KC_F21`| |
|
||||
|`KC_F22`| |
|
||||
|`KC_F23`| |
|
||||
|`KC_F24`| |
|
||||
|
||||
## Punctuation
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-----------------|---------|----------------------------------|
|
||||
|`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`|`-` and `_` |
|
||||
|`KC_EQUAL` |`KC_EQL` |`=` and `+` |
|
||||
|`KC_LBRACKET` |`KC_LBRC`|`[` and `{` |
|
||||
|`KC_RBRACKET` |`KC_RBRC`|`]` and `}` |
|
||||
|`KC_BSLASH` |`KC_BSLS`|`\` and <code>|</code> |
|
||||
|`KC_NONUS_HASH` |`KC_NUHS`|Non-US `#` and `~` |
|
||||
|`KC_NONUS_BSLASH`|`KC_NUBS`|Non-US `\` and <code>|</code>|
|
||||
|`KC_INT1` |`KC_RO` |JIS `\` and <code>|</code> |
|
||||
|`KC_INT2` |`KC_KANA`|JIS Katakana/Hiragana |
|
||||
|`KC_INT3` |`KC_JYEN`|JIS `¥` |
|
||||
|`KC_SCOLON` |`KC_SCLN`|`;` and `:` |
|
||||
|`KC_QUOTE` |`KC_QUOT`|`'` and `"` |
|
||||
|`KC_GRAVE` |`KC_GRV` |<code>`</code> and `~` |
|
||||
|`KC_COMMA` |`KC_COMM`|`,` and `<` |
|
||||
|`KC_DOT` | |`.` and `>` |
|
||||
|`KC_SLASH` |`KC_SLSH`|`/` and `?` |
|
||||
|`KC_CAPSLOCK` |`KC_CAPS`|Caps Lock |
|
||||
|
||||
## Modifiers
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-------------------|---------|------------------------------------|
|
||||
|`KC_LCTRL` |`KC_LCTL`|Left Control |
|
||||
|`KC_LSHIFT` |`KC_LSFT`|Left Shift |
|
||||
|`KC_LALT` | |Left Alt |
|
||||
|`KC_LGUI` | |Left GUI (Windows/Command/Meta key) |
|
||||
|`KC_RCTRL` |`KC_RCTL`|Right Control |
|
||||
|`KC_RSHIFT` |`KC_RSFT`|Right Shift |
|
||||
|`KC_RALT` | |Right Alt |
|
||||
|`KC_RGUI` | |Right GUI (Windows/Command/Meta key)|
|
||||
|`KC_LOCKING_CAPS` |`KC_LCAP`|Locking Caps Lock |
|
||||
|`KC_LOCKING_NUM` |`KC_LNUM`|Locking Num Lock |
|
||||
|`KC_LOCKING_SCROLL`|`KC_LSCR`|Locking Scroll Lock |
|
||||
|`KC_INT4` |`KC_HENK`|JIS Henkan |
|
||||
|`KC_INT5` |`KC_MHEN`|JIS Muhenkan |
|
||||
|
||||
## Commands
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------------|---------|------------------------------|
|
||||
|`KC_PSCREEN` |`KC_PSCR`|Print Screen |
|
||||
|`KC_SCROLLLOCK` |`KC_SLCK`|Scroll Lock |
|
||||
|`KC_PAUSE` |`KC_PAUS`|Pause |
|
||||
|`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`|Right Arrow |
|
||||
|`KC_LEFT` | |Left Arrow |
|
||||
|`KC_DOWN` | |Down Arrow |
|
||||
|`KC_UP` | |Up Arrow |
|
||||
|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key)|
|
||||
|`KC_POWER` | |Power |
|
||||
|`KC_EXECUTE` | |Execute |
|
||||
|`KC_HELP` | |Help |
|
||||
|`KC_MENU` | |Menu |
|
||||
|`KC_SELECT` | |Select |
|
||||
|`KC_AGAIN` | |Again |
|
||||
|`KC_UNDO` | |Undo |
|
||||
|`KC_CUT` | |Cut |
|
||||
|`KC_COPY` | |Copy |
|
||||
|`KC_PASTE` | |Paste |
|
||||
|`KC_FIND` | |Find |
|
||||
|`KC_ALT_ERASE` | |Alternate Erase |
|
||||
|`KC_SYSREQ` | |SysReq/Attention |
|
||||
|`KC_CANCEL` | |Cancel |
|
||||
|`KC_CLEAR` | |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 |
|
||||
|
||||
## Media Keys
|
||||
|
||||
These keycodes are not part of the Keyboard/Keypad usage page. The `SYSTEM_` keycodes are found in the Generic Desktop page, and the rest are located in the Consumer page.
|
||||
|
||||
Windows and macOS use different keycodes for "next track" and "previous track". Make sure you choose the keycode that corresponds to your OS.
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-----------------------|---------|---------------------------------|
|
||||
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |
|
||||
|`KC_SYSTEM_SLEEP` |`KC_SLEP`|System Sleep |
|
||||
|`KC_SYSTEM_WAKE` |`KC_WAKE`|System Wake |
|
||||
|`KC_MAIL` |`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_STOP` | |Stop |
|
||||
|`KC_WWW_FAVORITES` |`KC_WFAV`| |
|
||||
|`KC__MUTE` | |Mute (macOS) |
|
||||
|`KC__VOLUP` | |Volume Up (macOS) |
|
||||
|`KC__VOLDOWN` | |Volume Down (macOS) |
|
||||
|`KC_AUDIO_MUTE` |`KC_MUTE`|Mute (Windows/macOS/Linux) |
|
||||
|`KC_AUDIO_VOL_UP` |`KC_VOLU`|Volume Up (Windows/macOS/Linux) |
|
||||
|`KC_AUDIO_VOL_DOWN` |`KC_VOLD`|Volume Down (Windows/macOS/Linux)|
|
||||
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT`|Next Track (Windows) |
|
||||
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV`|Previous Track (Windows) |
|
||||
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD`|Next Track (macOS) |
|
||||
|`KC_MEDIA_REWIND` |`KC_MRWD`|Previous Track (macOS) |
|
||||
|`KC_MEDIA_STOP` |`KC_MSTP`|Stop Track |
|
||||
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY`|Play/Pause Track |
|
||||
|`KC_MEDIA_SELECT` |`KC_MSEL`| |
|
||||
|
||||
## Number Pad
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-------------------|---------|------------------------------|
|
||||
|`KC_NUMLOCK` |`KC_NLCK`|Keypad Num Lock and Clear |
|
||||
|`KC_KP_SLASH` |`KC_PSLS`|Keypad `/` |
|
||||
|`KC_KP_ASTERISK` |`KC_PAST`|Keypad `*` |
|
||||
|`KC_KP_MINUS` |`KC_PMNS`|Keypad `-` |
|
||||
|`KC_KP_PLUS` |`KC_PPLS`|Keypad `+` |
|
||||
|`KC_KP_ENTER` |`KC_PENT`|Keypad Enter |
|
||||
|`KC_KP_1` |`KC_P1` |Keypad `1` and End |
|
||||
|`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow |
|
||||
|`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down |
|
||||
|`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow |
|
||||
|`KC_KP_5` |`KC_P5` |Keypad `5` |
|
||||
|`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow |
|
||||
|`KC_KP_7` |`KC_P7` |Keypad `7` and Home |
|
||||
|`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow |
|
||||
|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |
|
||||
|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |
|
||||
|`KC_KP_DOT` |`KC_PDOT`|Keypad `.` and Delete |
|
||||
|`KC_KP_EQUAL` |`KC_PEQL`|Keypad `=` |
|
||||
|`KC_KP_COMMA` |`KC_PCMM`|Keypad `,` |
|
||||
|`KC_KP_EQUAL_AS400`| |Keypad `=` on AS/400 keyboards|
|
||||
|
||||
## Special Keys
|
||||
|
||||
In addition to these, keycodes in the range of `0xA5-DF` are reserved for internal use by TMK.
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------|---------|---------------------------------------|
|
||||
|`KC_NO` | |Ignore this key (NOOP) |
|
||||
|`KC_TRANSPARENT`|`KC_TRNS`|Use the next lowest non-transparent key|
|
31
docs/keycodes_us_ansi_shifted.md
Normal file
31
docs/keycodes_us_ansi_shifted.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# US ANSI Shifted Symbols
|
||||
|
||||
These keycodes correspond to characters that are "shifted" on a standard US ANSI keyboards. They do not have dedicated keycodes but are instead typed by holding down shift and then sending a keycode.
|
||||
|
||||
It's important to remember that all of these keycodes send a left shift - this may cause unintended actions if unaccounted for. The short code is preferred in most situations.
|
||||
|
||||
## US ANSI Shifted Keycodes
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------------------|------------------|-------------------|
|
||||
|`KC_TILDE` |`KC_TILD` |`~` |
|
||||
|`KC_EXCLAIM` |`KC_EXLM` |`!` |
|
||||
|`KC_AT` | |`@` |
|
||||
|`KC_HASH` | |`#` |
|
||||
|`KC_DOLLAR` |`KC_DLR` |`$` |
|
||||
|`KC_PERCENT` |`KC_PERC` |`%` |
|
||||
|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` |
|
||||
|`KC_AMPERSAND` |`KC_AMPR` |`&` |
|
||||
|`KC_ASTERISK` |`KC_ASTR` |`*` |
|
||||
|`KC_LEFT_PAREN` |`KC_LPRN` |`(` |
|
||||
|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` |
|
||||
|`KC_UNDERSCORE` |`KC_UNDS` |`_` |
|
||||
|`KC_PLUS` | |`+` |
|
||||
|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` |
|
||||
|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` |
|
||||
|`KC_PIPE` | |<code>|</code>|
|
||||
|`KC_COLON` |`KC_COLN` |`:` |
|
||||
|`KC_DOUBLE_QUOTE` |`KC_DQT`/`KC_DQUO`|`"` |
|
||||
|`KC_LEFT_ANGLE_BRACKET` |`KC_LT`/`KC_LABK` |`<` |
|
||||
|`KC_RIGHT_ANGLE_BRACKET`|`KC_GT`/`KC_RABK` |`>` |
|
||||
|`KC_QUESTION` |`KC_QUES` |`?` |
|
@@ -3,7 +3,7 @@
|
||||
QMK keymaps are defined inside a C source file. The data structure is an array of arrays. The outer array is a list of layer arrays while the inner layer array is a list of keys. Most keyboards define a `KEYMAP()` macro to help you create this array of arrays.
|
||||
|
||||
|
||||
## Keymap and layers
|
||||
## Keymap and Layers
|
||||
In QMK, **`const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]`** holds multiple **layers** of keymap information in **16 bit** data holding the **action code**. You can define **32 layers** at most.
|
||||
|
||||
For trivial key definitions, the higher 8 bits of the **action code** are all 0 and the lower 8 bits holds the USB HID usage code generated by the key as **keycode**.
|
||||
@@ -27,18 +27,16 @@ Respective layers can be validated simultaneously. Layers are indexed with 0 to
|
||||
|
||||
Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history.
|
||||
|
||||
### Keymap layer status
|
||||
Keymap layer has its state in two 32 bit parameters:
|
||||
### Keymap Layer Status
|
||||
The state of the Keymap layer is determined by two 32 bit parameters:
|
||||
|
||||
* **`default_layer_state`** indicates a base keymap layer(0-31) which is always valid and to be referred.
|
||||
* **`layer_state`** () has current on/off status of the layer on its each bit.
|
||||
* **`default_layer_state`** indicates a base keymap layer (0-31) which is always valid and to be referred (the default layer).
|
||||
* **`layer_state`** has current on/off status of each layer in its bits.
|
||||
|
||||
Keymap has its state in two parameter **`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit.
|
||||
Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`.
|
||||
To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty.
|
||||
Keymap layer '0' is usually `default_layer`, wither other layers initially off after booting up the firmware, although this can configured differently in `config.h`. It is useful to change `default_layer` when you completely switch a key layout, for example, if you want to switch to Colemak instead of Qwerty.
|
||||
|
||||
Initial state of Keymap Change base layout
|
||||
----------------------- ------------------
|
||||
Initial state of Keymap Change base layout
|
||||
----------------------- ------------------
|
||||
|
||||
31 31
|
||||
30 30
|
||||
@@ -52,7 +50,7 @@ To change `default_layer` will be useful when you switch key layout completely,
|
||||
`--- default_layer = 0 `--- default_layer = 1
|
||||
layer_state = 0x00000001 layer_state = 0x00000002
|
||||
|
||||
On the other hand, you shall change `layer_state` to overlay base layer with some layers for feature such as navigation keys, function key(F1-F12), media keys or special actions.
|
||||
On the other hand, you can change `layer_state` to overlay the base layer with other layers for features such as navigation keys, function keys (F1-F12), media keys, and/or special actions.
|
||||
|
||||
Overlay feature layer
|
||||
--------------------- bit|status
|
||||
@@ -77,9 +75,9 @@ Note that ***higher layer has higher priority on stack of layers***, namely firm
|
||||
You can place `KC_TRANS` on overlay layer changes just part of layout to fall back on lower or base layer.
|
||||
Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own keycode and refers to lower valid layers for keycode, instead.
|
||||
|
||||
## Anatomy Of A `keymap.c`
|
||||
## Anatomy of a `keymap.c`
|
||||
|
||||
For this example we will walk through the [default Clueboard keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/default/keymap.c). You'll find it helpful to open that file in another browser window so you can look at everything in context.
|
||||
For this example we will walk through an [older version of the default Clueboard 66% keymap](https://github.com/qmk/qmk_firmware/blob/ca01d94005f67ec4fa9528353481faa622d949ae/keyboards/clueboard/keymaps/default/keymap.c). You'll find it helpful to open that file in another browser window so you can look at everything in context.
|
||||
|
||||
There are 3 main sections of a `keymap.c` file you'll want to concern yourself with:
|
||||
|
||||
@@ -100,7 +98,7 @@ At the top of the file you'll find this:
|
||||
// Each layer gets a name for readability.
|
||||
// The underscores don't mean anything - you can
|
||||
// have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same
|
||||
// Layer names don't all need to be of the same
|
||||
// length, and you can also skip them entirely
|
||||
// and just use numbers.
|
||||
#define _BL 0
|
||||
@@ -115,9 +113,9 @@ The main part of this file is the `keymaps[]` definition. This is where you list
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
After this you'll find a list of KEYMAP() macros. A KEYMAP() is simply a list of keys to define a single layer. Typically you'll have one or more "base layers" (such as QWERTY, Dvorak, or Colemak) and then you'll layer on top of that one or more "function" layers. Due to the way layers are processed you can't overlay a "lower" layer on top of a "higher" layer.
|
||||
After this you'll find a list of KEYMAP() macros. A KEYMAP() is simply a list of keys to define a single layer. Typically you'll have one or more "base layers" (such as QWERTY, Dvorak, or Colemak) and then you'll layer on top of that one or more "function" layers. Due to the way layers are processed you can't overlay a "lower" layer on top of a "higher" layer.
|
||||
|
||||
`keymaps[][MATRIX_ROWS][MATRIX_COLS]` in QMK holds the 16 bit action code (sometimes referred as the quantum keycode) in it. For the keycode representing typical keys, its high byte is 0 and its low byte is the USB HID usage ID for keyboard.
|
||||
`keymaps[][MATRIX_ROWS][MATRIX_COLS]` in QMK holds the 16 bit action code (sometimes referred as the quantum keycode) in it. For the keycode representing typical keys, its high byte is 0 and its low byte is the USB HID usage ID for keyboard.
|
||||
|
||||
> TMK from which QMK was forked uses `const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]` instead and holds the 8 bit keycode. Some keycode values are reserved to induce execution of certain action codes via the `fn_actions[]` array.
|
||||
|
||||
@@ -155,11 +153,11 @@ Our function layer is, from a code point of view, no different from the base lay
|
||||
Some interesting things to note:
|
||||
|
||||
* We have used our `_______` definition to turn `KC_TRNS` into `_______`. This makes it easier to spot the keys that have changed on this layer.
|
||||
* While in this layer if you press one of the `_______` keys it will activate the key in the next lowest active layer.
|
||||
* While in this layer if you press one of the `_______` keys it will activate the key in the next lowest active layer.
|
||||
|
||||
### Custom Functions
|
||||
|
||||
At the bottom of the file we've defined a single custom function. This function defines a key that sends `KC_ESC` when pressed without modifiers and `KC_GRAVE` when modifiers are held. There are a couple pieces that need to be in place for this to work, and we will go over both of them.
|
||||
At the bottom of the file we've defined a single custom function. This function defines a key that sends `KC_ESC` when pressed without modifiers and `KC_GRAVE` when modifiers are held. There are a couple pieces that need to be in place for this to work, and we will go over both of them.
|
||||
|
||||
#### `fn_actions[]`
|
||||
|
||||
@@ -215,8 +213,7 @@ To actually handle the keypress event we define an `action_function()`. This fun
|
||||
|
||||
This should have given you a basic overview for creating your own keymap. For more details see the following resources:
|
||||
|
||||
* https://github.com/qmk/qmk_firmware/wiki/Keycodes
|
||||
* https://github.com/qmk/qmk_firmware/wiki/FAQ-Keymap
|
||||
* https://github.com/qmk/qmk_firmware/wiki/Keymap-examples
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Keymap FAQ](faq_keymap.md)
|
||||
|
||||
We are actively working to improve these docs. If you have suggestions for how they could be made better please [file an issue](https://github.com/qmk/qmk_firmware/issues/new)!
|
||||
We are actively working to improve these docs. If you have suggestions for how they could be made better please [file an issue](https://github.com/qmk/qmk_firmware/issues/new)!
|
||||
|
166
docs/macros.md
166
docs/macros.md
@@ -1,166 +0,0 @@
|
||||
# Macros
|
||||
|
||||
Macros allow you to send multiple keystrokes when pressing just one key. QMK has a number of ways to define and use macros. These can do anything you want- type common phrases for you, copypasta, repetitive game movements, or even help you code.
|
||||
|
||||
{% hint style='danger' %}
|
||||
**Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets ahold of your keyboard will be able to access that information by opening a text editor.
|
||||
{% endhint %}
|
||||
|
||||
# Macro Definitions
|
||||
|
||||
By default QMK assumes you don't have any macros. To define your macros you create an `action_get_macro()` function. For example:
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||
case 1:
|
||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
This defines two macros which will be run when the key they are assigned to is pressed. If you'd like them to run when the release is released instead you can change the if statement:
|
||||
|
||||
```c
|
||||
if (!record->event.pressed) {
|
||||
```
|
||||
|
||||
## Macro Commands
|
||||
|
||||
A macro can include the following commands:
|
||||
|
||||
* I() change interval of stroke in milliseconds.
|
||||
* D() press key.
|
||||
* U() release key.
|
||||
* T() type key(press and release).
|
||||
* W() wait (milliseconds).
|
||||
* END end mark.
|
||||
|
||||
## Sending strings
|
||||
|
||||
Sometimes you just want a key to type out words or phrases. For the most common situations we've provided `SEND_STRING()`, which will type out your string for you instead of having to build a `MACRO()`.
|
||||
|
||||
For example:
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
SEND_STRING("QMK is the best thing ever!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
By default, it assumes a US keymap with a QWERTY layout; if you want to change that (e.g. if your OS uses software Colemak), include this somewhere in your keymap:
|
||||
|
||||
```
|
||||
#include <sendstring_colemak.h>
|
||||
```
|
||||
|
||||
## Mapping a Macro to a key
|
||||
|
||||
Use the `M()` function within your `KEYMAP()` to call a macro. For example, here is the keymap for a 2-key keyboard:
|
||||
|
||||
```c
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
M(0), M(1)
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||
case 1:
|
||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
When you press the key on the left it will type "Hi!" and when you press the key on the right it will type "Bye!".
|
||||
|
||||
## Naming your macros
|
||||
|
||||
If you have a bunch of macros you want to refer to from your keymap while keeping the keymap easily readable you can name them using `#define` at the top of your file.
|
||||
|
||||
```c
|
||||
#define M_HI M(0)
|
||||
#define M_BYE M(1)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
M_HI, M_BYE
|
||||
),
|
||||
};
|
||||
```
|
||||
|
||||
# Advanced macro functions
|
||||
|
||||
While working within the `action_get_macro()` function block there are some functions you may find useful. 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.
|
||||
|
||||
#### `record->event.pressed`
|
||||
|
||||
This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is
|
||||
|
||||
```c
|
||||
if (record->event.pressed) {
|
||||
// on keydown
|
||||
} else {
|
||||
// on keyup
|
||||
}
|
||||
```
|
||||
|
||||
#### `register_code(<kc>);`
|
||||
|
||||
This sends the `<kc>` keydown event to the computer. Some examples would be `KC_ESC`, `KC_C`, `KC_4`, and even modifiers such as `KC_LSFT` and `KC_LGUI`.
|
||||
|
||||
#### `unregister_code(<kc>);`
|
||||
|
||||
Parallel to `register_code` function, this sends the `<kc>` keyup event to the computer. If you don't use this, the key will be held down until it's sent.
|
||||
|
||||
#### `clear_keyboard();`
|
||||
|
||||
This will clear all mods and keys currently pressed.
|
||||
|
||||
#### `clear_mods();`
|
||||
|
||||
This will clear all mods currently pressed.
|
||||
|
||||
#### `clear_keyboard_but_mods();`
|
||||
|
||||
This will clear all keys besides the mods currently pressed.
|
||||
|
||||
# Advanced Example: Single-key copy/paste
|
||||
|
||||
This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released.
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch(id) {
|
||||
case 0: {
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||
} else {
|
||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
|
@@ -1,388 +0,0 @@
|
||||
|
||||
## Audio output from a speaker
|
||||
|
||||
Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any keyboard that allows access to the C6 or B5 port (`#define C6_AUDIO` and `#define B5_AUDIO`), you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
|
||||
|
||||
The audio code lives in [quantum/audio/audio.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/audio.h) and in the other files in the audio directory. It's enabled by default on the Planck [stock keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/default/keymap.c). Here are the important bits:
|
||||
|
||||
```
|
||||
#include "audio.h"
|
||||
```
|
||||
|
||||
Then, lower down the file:
|
||||
|
||||
```
|
||||
float tone_startup[][2] = {
|
||||
ED_NOTE(_E7 ),
|
||||
E__NOTE(_CS7),
|
||||
E__NOTE(_E6 ),
|
||||
E__NOTE(_A6 ),
|
||||
M__NOTE(_CS7, 20)
|
||||
};
|
||||
```
|
||||
|
||||
This is how you write a song. Each of these lines is a note, so we have a little ditty composed of five notes here.
|
||||
|
||||
Then, we have this chunk:
|
||||
|
||||
```
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
float goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
```
|
||||
|
||||
Wherein we bind predefined songs (from [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h)) into named variables. This is one optimization that helps save on memory: These songs only take up memory when you reference them in your keymap, because they're essentially all preprocessor directives.
|
||||
|
||||
So now you have something called `tone_plover` for example. How do you make it play the Plover tune, then? If you look further down the keymap, you'll see this:
|
||||
|
||||
```
|
||||
PLAY_NOTE_ARRAY(tone_plover, false, 0); // Signature is: Song name, repeat, rest style
|
||||
```
|
||||
|
||||
This is inside one of the macros. So when that macro executes, your keyboard plays that particular chime.
|
||||
|
||||
"Rest style" in the method signature above (the last parameter) specifies if there's a rest (a moment of silence) between the notes.
|
||||
|
||||
## Music mode
|
||||
|
||||
The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode.
|
||||
|
||||
Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things.
|
||||
|
||||
Keycodes available:
|
||||
|
||||
* `MU_ON` - Turn music mode on
|
||||
* `MU_OFF` - Turn music mode off
|
||||
* `MU_TOG` - Toggle music mode
|
||||
|
||||
In music mode, the following keycodes work differently, and don't pass through:
|
||||
|
||||
* `LCTL` - start a recording
|
||||
* `LALT` - stop recording/stop playing
|
||||
* `LGUI` - play recording
|
||||
* `KC_UP` - speed-up playback
|
||||
* `KC_DOWN` - slow-down playback
|
||||
|
||||
## MIDI functionalty
|
||||
|
||||
This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
|
||||
|
||||
## Bluetooth functionality
|
||||
|
||||
This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will.
|
||||
|
||||
## RGB Under Glow Mod
|
||||
|
||||

|
||||
|
||||
Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY).
|
||||
|
||||
For this mod, you need an unused pin wiring to DI of WS2812 strip. After wiring the VCC, GND, and DI, you can enable the underglow in your Makefile.
|
||||
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
||||
In order to use the underglow animation functions, you need to have `#define RGBLIGHT_ANIMATIONS` in your `config.h`.
|
||||
|
||||
Please add the following options into your config.h, and set them up according your hardware configuration. These settings are for the `F4` pin by default:
|
||||
|
||||
#define RGB_DI_PIN F4 // The pin your RGB strip is wired to
|
||||
#define RGBLIGHT_ANIMATIONS // Require for fancier stuff (not compatible with audio)
|
||||
#define RGBLED_NUM 14 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
|
||||
You'll need to edit `RGB_DI_PIN` to the pin you have your `DI` on your RGB strip wired to.
|
||||
|
||||
The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. For details, please check this keymap. `keyboards/planck/keymaps/yang/keymap.c`
|
||||
|
||||
### WS2812 Wiring
|
||||
|
||||

|
||||
|
||||
Please note the USB port can only supply a limited amount of power to the keyboard (500mA by standard, however, modern computer and most usb hubs can provide 700+mA.). According to the data of NeoPixel from Adafruit, 30 WS2812 LEDs require a 5V 1A power supply, LEDs used in this mod should not more than 20.
|
||||
|
||||
## PS/2 Mouse Support
|
||||
|
||||
Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device.
|
||||
|
||||
To hook up a Trackpoint, you need to obtain a Trackpoint module (i.e. harvest from a Thinkpad keyboard), identify the function of each pin of the module, and make the necessary circuitry between controller and Trackpoint module. For more information, please refer to [Trackpoint Hardware](https://deskthority.net/wiki/TrackPoint_Hardware) page on Deskthority Wiki.
|
||||
|
||||
There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended).
|
||||
|
||||
### Busywait version
|
||||
|
||||
Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.
|
||||
|
||||
In rules.mk:
|
||||
|
||||
```
|
||||
PS2_MOUSE_ENABLE = yes
|
||||
PS2_USE_BUSYWAIT = yes
|
||||
```
|
||||
|
||||
In your keyboard config.h:
|
||||
|
||||
```
|
||||
#ifdef PS2_USE_BUSYWAIT
|
||||
# define PS2_CLOCK_PORT PORTD
|
||||
# define PS2_CLOCK_PIN PIND
|
||||
# define PS2_CLOCK_DDR DDRD
|
||||
# define PS2_CLOCK_BIT 1
|
||||
# define PS2_DATA_PORT PORTD
|
||||
# define PS2_DATA_PIN PIND
|
||||
# define PS2_DATA_DDR DDRD
|
||||
# define PS2_DATA_BIT 2
|
||||
#endif
|
||||
```
|
||||
|
||||
### Interrupt version
|
||||
|
||||
The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data.
|
||||
|
||||
In rules.mk:
|
||||
|
||||
```
|
||||
PS2_MOUSE_ENABLE = yes
|
||||
PS2_USE_INT = yes
|
||||
```
|
||||
|
||||
In your keyboard config.h:
|
||||
|
||||
```
|
||||
#ifdef PS2_USE_INT
|
||||
#define PS2_CLOCK_PORT PORTD
|
||||
#define PS2_CLOCK_PIN PIND
|
||||
#define PS2_CLOCK_DDR DDRD
|
||||
#define PS2_CLOCK_BIT 2
|
||||
#define PS2_DATA_PORT PORTD
|
||||
#define PS2_DATA_PIN PIND
|
||||
#define PS2_DATA_DDR DDRD
|
||||
#define PS2_DATA_BIT 5
|
||||
|
||||
#define PS2_INT_INIT() do { \
|
||||
EICRA |= ((1<<ISC21) | \
|
||||
(0<<ISC20)); \
|
||||
} while (0)
|
||||
#define PS2_INT_ON() do { \
|
||||
EIMSK |= (1<<INT2); \
|
||||
} while (0)
|
||||
#define PS2_INT_OFF() do { \
|
||||
EIMSK &= ~(1<<INT2); \
|
||||
} while (0)
|
||||
#define PS2_INT_VECT INT2_vect
|
||||
#endif
|
||||
```
|
||||
|
||||
### USART version
|
||||
|
||||
To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. If one of those are unavailable, you need to use interrupt version.
|
||||
|
||||
In rules.mk:
|
||||
|
||||
```
|
||||
PS2_MOUSE_ENABLE = yes
|
||||
PS2_USE_USART = yes
|
||||
```
|
||||
|
||||
In your keyboard config.h:
|
||||
|
||||
```
|
||||
#ifdef PS2_USE_USART
|
||||
#define PS2_CLOCK_PORT PORTD
|
||||
#define PS2_CLOCK_PIN PIND
|
||||
#define PS2_CLOCK_DDR DDRD
|
||||
#define PS2_CLOCK_BIT 5
|
||||
#define PS2_DATA_PORT PORTD
|
||||
#define PS2_DATA_PIN PIND
|
||||
#define PS2_DATA_DDR DDRD
|
||||
#define PS2_DATA_BIT 2
|
||||
|
||||
/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
|
||||
/* set DDR of CLOCK as input to be slave */
|
||||
#define PS2_USART_INIT() do { \
|
||||
PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
|
||||
PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
|
||||
UCSR1C = ((1 << UMSEL10) | \
|
||||
(3 << UPM10) | \
|
||||
(0 << USBS1) | \
|
||||
(3 << UCSZ10) | \
|
||||
(0 << UCPOL1)); \
|
||||
UCSR1A = 0; \
|
||||
UBRR1H = 0; \
|
||||
UBRR1L = 0; \
|
||||
} while (0)
|
||||
#define PS2_USART_RX_INT_ON() do { \
|
||||
UCSR1B = ((1 << RXCIE1) | \
|
||||
(1 << RXEN1)); \
|
||||
} while (0)
|
||||
#define PS2_USART_RX_POLL_ON() do { \
|
||||
UCSR1B = (1 << RXEN1); \
|
||||
} while (0)
|
||||
#define PS2_USART_OFF() do { \
|
||||
UCSR1C = 0; \
|
||||
UCSR1B &= ~((1 << RXEN1) | \
|
||||
(1 << TXEN1)); \
|
||||
} while (0)
|
||||
#define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
|
||||
#define PS2_USART_RX_DATA UDR1
|
||||
#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
|
||||
#define PS2_USART_RX_VECT USART1_RX_vect
|
||||
#endif
|
||||
```
|
||||
|
||||
### Additional Settings
|
||||
|
||||
#### PS/2 mouse features
|
||||
|
||||
These enable settings supported by the PS/2 mouse protocol: http://www.computer-engineering.org/ps2mouse/
|
||||
|
||||
```
|
||||
/* Use remote mode instead of the default stream mode (see link) */
|
||||
#define PS2_MOUSE_USE_REMOTE_MODE
|
||||
|
||||
/* Enable the scrollwheel or scroll gesture on your mouse or touchpad */
|
||||
#define PS2_MOUSE_ENABLE_SCROLLING
|
||||
|
||||
/* Some mice will need a scroll mask to be configured. The default is 0xFF. */
|
||||
#define PS2_MOUSE_SCROLL_MASK 0x0F
|
||||
|
||||
/* Applies a transformation to the movement before sending to the host (see link) */
|
||||
#define PS2_MOUSE_USE_2_1_SCALING
|
||||
|
||||
/* The time to wait after initializing the ps2 host */
|
||||
#define PS2_MOUSE_INIT_DELAY 1000 /* Default */
|
||||
```
|
||||
|
||||
You can also call the following functions from ps2_mouse.h
|
||||
|
||||
```
|
||||
void ps2_mouse_disable_data_reporting(void);
|
||||
|
||||
void ps2_mouse_enable_data_reporting(void);
|
||||
|
||||
void ps2_mouse_set_remote_mode(void);
|
||||
|
||||
void ps2_mouse_set_stream_mode(void);
|
||||
|
||||
void ps2_mouse_set_scaling_2_1(void);
|
||||
|
||||
void ps2_mouse_set_scaling_1_1(void);
|
||||
|
||||
void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
|
||||
|
||||
void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
|
||||
```
|
||||
|
||||
#### Fine control
|
||||
|
||||
Use the following defines to change the sensitivity and speed of the mouse.
|
||||
Note: you can also use `ps2_mouse_set_resolution` for the same effect (not supported on most touchpads).
|
||||
|
||||
```
|
||||
#define PS2_MOUSE_X_MULTIPLIER 3
|
||||
#define PS2_MOUSE_Y_MULTIPLIER 3
|
||||
#define PS2_MOUSE_V_MULTIPLIER 1
|
||||
```
|
||||
|
||||
#### Scroll button
|
||||
|
||||
If you're using a trackpoint, you will likely want to be able to use it for scrolling.
|
||||
Its possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving.
|
||||
To enable the feature, you must set a scroll button mask as follows:
|
||||
|
||||
```
|
||||
#define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BUTTON_MIDDLE) /* Default */
|
||||
```
|
||||
|
||||
To disable the scroll button feature:
|
||||
|
||||
```
|
||||
#define PS2_MOUSE_SCROLL_BTN_MASK 0
|
||||
```
|
||||
|
||||
The available buttons are:
|
||||
|
||||
```
|
||||
#define PS2_MOUSE_BTN_LEFT 0
|
||||
#define PS2_MOUSE_BTN_RIGHT 1
|
||||
#define PS2_MOUSE_BTN_MIDDLE 2
|
||||
```
|
||||
|
||||
You can also combine buttons in the mask by `|`ing them together.
|
||||
|
||||
Once you've configured your scroll button mask, you must configure the scroll button send interval.
|
||||
This is the interval before which if the scroll buttons were released they would be sent to the host.
|
||||
After this interval, they will cause the mouse to scroll and will not be sent.
|
||||
|
||||
```
|
||||
#define PS2_MOUSE_SCROLL_BTN_SEND 300 /* Default */
|
||||
```
|
||||
|
||||
To disable sending the scroll buttons:
|
||||
```
|
||||
#define PS2_MOUSE_SCROLL_BTN_SEND 0
|
||||
```
|
||||
|
||||
Fine control over the scrolling is supported with the following defines:
|
||||
|
||||
```
|
||||
#define PS2_MOUSE_SCROLL_DIVISOR_H 2
|
||||
#define PS2_MOUSE_SCROLL_DIVISOR_V 2
|
||||
```
|
||||
|
||||
#### Debug settings
|
||||
|
||||
To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
|
||||
|
||||
```
|
||||
/* To debug the mouse reports */
|
||||
#define PS2_MOUSE_DEBUG_HID
|
||||
#define PS2_MOUSE_DEBUG_RAW
|
||||
```
|
||||
|
||||
## Safety Considerations
|
||||
|
||||
You probably don't want to "brick" your keyboard, making it impossible
|
||||
to rewrite firmware onto it. Here are some of the parameters to show
|
||||
what things are (and likely aren't) too risky.
|
||||
|
||||
- If your keyboard map does not include RESET, then, to get into DFU
|
||||
mode, you will need to press the reset button on the PCB, which
|
||||
requires unscrewing the bottom.
|
||||
- Messing with tmk_core / common files might make the keyboard
|
||||
inoperable
|
||||
- Too large a .hex file is trouble; `make dfu` will erase the block,
|
||||
test the size (oops, wrong order!), which errors out, failing to
|
||||
flash the keyboard, leaving it in DFU mode.
|
||||
- To this end, note that the maximum .hex file size on Planck is
|
||||
7000h (28672 decimal)
|
||||
|
||||
```
|
||||
Linking: .build/planck_rev4_cbbrowne.elf [OK]
|
||||
Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK]
|
||||
|
||||
Size after:
|
||||
text data bss dec hex filename
|
||||
0 22396 0 22396 577c planck_rev4_cbbrowne.hex
|
||||
```
|
||||
|
||||
- The above file is of size 22396/577ch, which is less than
|
||||
28672/7000h
|
||||
- As long as you have a suitable alternative .hex file around, you
|
||||
can retry, loading that one
|
||||
- Some of the options you might specify in your keyboard's Makefile
|
||||
consume extra memory; watch out for BOOTMAGIC_ENABLE,
|
||||
MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE
|
||||
- DFU tools do /not/ allow you to write into the bootloader (unless
|
||||
you throw in extra fruitsalad of options), so there is little risk
|
||||
there.
|
||||
- EEPROM has around a 100000 write cycle. You shouldn't rewrite the
|
||||
firmware repeatedly and continually; that'll burn the EEPROM
|
||||
eventually.
|
||||
|
@@ -1,63 +0,0 @@
|
||||
# Porting your keyboard to QMK
|
||||
|
||||
This page describes the technical details of porting an existing keyboard to QMK. If you're looking to add your keyboard to QMK, please [look through these guidelines](adding_a_keyboard_to_qmk.md)!
|
||||
|
||||
If your keyboard is running an Atmega chip (atmega32u4 and others), it's pretty easy to get things setup for compiling your own firmware to flash onto your board. There is a `/util/new_project.sh <keyboard>` script to help get you started - you can simply pass your keyboard's name into the script, and all of the necessary files will be created. The components of each are described below.
|
||||
|
||||
## `/keyboards/<keyboard>/config.h`
|
||||
|
||||
The `USB Device descriptor parameter` block contains parameters are used to uniquely identify your keyboard, but they don't really matter to the machine.
|
||||
|
||||
Your `MATRIX_ROWS` and `MATRIX_COLS` are the numbers of rows and cols in your keyboard matrix - this may be different than the number of actual rows and columns on your keyboard. There are some tricks you can pull to increase the number of keys in a given matrix, but most keyboards are pretty straight-forward.
|
||||
|
||||
The `MATRIX_ROW_PINS` and `MATRIX_COL_PINS` are the pins your MCU uses on each row/column. Your schematic (if you have one) will have this information on it, and the values will vary depending on your setup. This is one of the most important things to double-check in getting your keyboard setup correctly.
|
||||
|
||||
For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the diodes in the `COL2ROW` position, but it's possible that they are in the other - people coming from EasyAVR often use `ROW2COL`. Nothing will function if this is incorrect.
|
||||
|
||||
`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported.
|
||||
|
||||
`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.
|
||||
|
||||
`BACKLIGHT_LEVELS` is how many levels exist for your backlight - max is 15, and they are computed automatically from this number.
|
||||
|
||||
## `/keyboards/<keyboard>/Makefile`
|
||||
|
||||
The values at the top likely won't need to be changed, since most boards use the `atmega32u4` chip. The `BOOTLOADER_SIZE` will need to be adjusted based on your MCU type. It's defaulted to the Teensy, since that's the most common controller. Below is quoted from the `Makefile`.
|
||||
|
||||
```
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
```
|
||||
|
||||
At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documenation of these features, see the [Makefile options](#makefile-options).
|
||||
|
||||
## `/keyboards/<keyboard>/readme.md`
|
||||
|
||||
This is where you'll describe your keyboard - please write as much as you can about it! Talking about default functionality/features is useful here. Feel free to link to external pages/sites if necessary. Images can be included here as well, as long as they're hosted elsewhere (imgur).
|
||||
|
||||
## `/keyboards/<keyboard>/<keyboard>.c`
|
||||
|
||||
This is where all of the custom logic for your keyboard goes - you may not need to put anything in this file, since a lot of things are configured automatically. All of the `*_kb()` functions are defined here. If you modify them, remember to keep the calls to `*_user()`, or things in the keymaps might not work. You can read more about the functions [here](#custom-quantum-functions-for-keyboards-and-keymaps)
|
||||
|
||||
## `/keyboards/<keyboard>/<keyboard>.h`
|
||||
|
||||
Here is where you can (optionally) define your `KEYMAP` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accomodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design:
|
||||
|
||||
```
|
||||
#define KEYMAP( \
|
||||
k00, k01, k02, \
|
||||
k10, k11 \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02 }, \
|
||||
{ k10, KC_NO, k11 }, \
|
||||
}
|
||||
```
|
||||
|
||||
Each of the `kxx` variables needs to be unique, and usually follows the format `k<row><col>`. You can place `KC_NO` where your dead keys are in your matrix.
|
||||
|
@@ -42,7 +42,7 @@ The values at the top likely won't need to be changed, since most boards use the
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
```
|
||||
|
||||
At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documenation of these features, see the [Makefile options](#makefile-options).
|
||||
At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documentation of these features, see the [Makefile options](#makefile-options).
|
||||
|
||||
## `/keyboards/<keyboard>/readme.md`
|
||||
|
||||
@@ -54,7 +54,7 @@ This is where all of the custom logic for your keyboard goes - you may not need
|
||||
|
||||
## `/keyboards/<keyboard>/<keyboard>.h`
|
||||
|
||||
Here is where you can (optionally) define your `KEYMAP` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accomodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design:
|
||||
Here is where you can (optionally) define your `KEYMAP` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accommodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design:
|
||||
|
||||
```
|
||||
#define KEYMAP( \
|
||||
|
@@ -21,7 +21,7 @@ MCUSR MCU Status Register
|
||||
|
||||
SMCR Sleep Mode Control Register
|
||||
SE Sleep Enable
|
||||
SM2:0
|
||||
SM2:0
|
||||
#define set_sleep_mode(mode) \
|
||||
#define SLEEP_MODE_IDLE (0)
|
||||
#define SLEEP_MODE_ADC _BV(SM0)
|
||||
|
@@ -1,75 +0,0 @@
|
||||
# QMK Overview
|
||||
|
||||
This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a UNIX shell, but does not assume you are familiar with C or with compiling using make.
|
||||
|
||||
# Basic QMK structure
|
||||
|
||||
QMK is a fork of @tmk's [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
||||
|
||||
## Keyboard project structure
|
||||
|
||||
Within the `handwired` and `keyboard` folders is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within you'll find the following structure:
|
||||
|
||||
* `keymaps/`: Different keymaps that can be built
|
||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`.
|
||||
* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
|
||||
|
||||
### Keymap structure
|
||||
|
||||
In every keymap folder, the following files may be found. Only `keymap.c` is required, if the rest of the files are not found the default options will be chosen.
|
||||
|
||||
* `config.h`: the options to configure your keymap
|
||||
* `keymap.c`: all of your keymap code, required
|
||||
* `Makefile`: the features of QMK that are enabled, required to run `make` in your keymap folder
|
||||
* `readme.md`: a description of your keymap, how others might use it, and explanations of features
|
||||
* Other files: Some people choose to include an image depicting the layout, and other files that help people to use or understand a particular keymap.
|
||||
|
||||
# The `make` command
|
||||
|
||||
The `make` command is how you compile the firmware into a .hex file, which can be loaded by a dfu programmer (like dfu-progammer via `make dfu`) or the [Teensy loader](https://www.pjrc.com/teensy/loader.html) (only used with Teensys). It it recommended that you always run make from within the `root` folder.
|
||||
|
||||
**NOTE:** To abort a make command press `Ctrl-c`
|
||||
|
||||
For more details on the QMK build process see [Make Instructions](make_instructions.md).
|
||||
|
||||
### Simple instructions for building and uploading a keyboard
|
||||
|
||||
**Most keyboards have more specific instructions in the keyboard specific readme.md file, so please check that first**
|
||||
|
||||
1. Enter the `root` folder
|
||||
2. Run `make <keyboard>-<subproject>-<keymap>-<programmer>`
|
||||
|
||||
In the above commands, replace:
|
||||
|
||||
* `<keyboard>` with the name of your keyboard
|
||||
* `<keymap>` with the name of your keymap
|
||||
* `<subproject>` with the name of the subproject (revision or sub-model of your keyboard). For example, for Ergodox it can be `ez` or `infinity`, and for Planck `rev3` or `rev4`.
|
||||
* If the keyboard doesn't have a subproject, or if you are happy with the default (defined in `rules.mk` file of the `keyboard` folder), you can leave it out. But remember to also remove the dash (`-`) from the command.
|
||||
* `<programmer>` The programmer to use. Most keyboards use `dfu`, but some use `teensy`. Infinity keyboards use `dfu-util`. Check the readme file in the keyboard folder to find out which programmer to use.
|
||||
* If you don't add `-<programmer` to the command line, the firmware will be still be compiled into a hex file, but the upload will be skipped.
|
||||
|
||||
**NOTE:** Some operating systems will refuse to program unless you run the make command as root for example `sudo make clueboard-default-dfu`
|
||||
|
||||
## Make Examples
|
||||
|
||||
* Build all Clueboard keymaps: `make clueboard`
|
||||
* Build the default Planck keymap: `make planck-rev4-default`
|
||||
* Build and flash your ergodox-ez: `make ergodox-ez-default-teensy`
|
||||
|
||||
# The `config.h` file
|
||||
|
||||
There are 2 `config.h` locations:
|
||||
|
||||
* keyboard (`/keyboards/<keyboard>/`)
|
||||
* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/`)
|
||||
|
||||
The keyboard `config.h` is included only if the keymap one doesn't exist. The format to use for your custom one [is here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_config_h_example.h). If you want to override a setting from the parent `config.h` file, you need to do this:
|
||||
|
||||
```c
|
||||
#undef MY_SETTING
|
||||
#define MY_SETTING 4
|
||||
```
|
||||
|
||||
For a value of `4` for this imaginary setting. So we `undef` it first, then `define` it.
|
||||
|
||||
You can then override any settings, rather than having to copy and paste the whole thing.
|
@@ -1,353 +1,22 @@
|
||||
# Quantum Keycodes
|
||||
|
||||
All keycodes within quantum are numbers between `0x0000` and `0xFFFF`. Within your `keymap.c` it may look like you have functions and other special cases, but ultimately the C preprocessor will translate those into a single 4 byte integer. QMK has reserved `0x0000` through `0x00FF` for standard keycodes. These are keycodes such as `KC_A`, `KC_1`, and `KC_LCTL`, which are basic keys defined in the USB HID specification.
|
||||
|
||||
On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are used to implement advanced quantum features. If you define your own custom keycodes they will be put into this range as well. Keycodes above `0x00FF` may not be used with any of the mod/layer-tap keys listed
|
||||
|
||||
## QMK keycodes
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
|`RESET`|Put the keyboard into DFU mode for flashing|
|
||||
|`DEBUG`|Toggles debug mode|
|
||||
|`KC_GESC`/`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a `~`|
|
||||
|`KC_LSPO`|Left shift when held, open paranthesis when tapped|
|
||||
|`KC_RSPC`|Right shift when held, close paranthesis when tapped|
|
||||
|`KC_LEAD`|The [leader key](leader_key.md)|
|
||||
|`FUNC(n)`/`F(n)`|Call `fn_action(n)`|
|
||||
|`M(n)`|to call macro n|
|
||||
|`MACROTAP(n)`|to macro-tap n idk FIXME|
|
||||
|
||||
## Bootmagic Keycodes
|
||||
|
||||
Shortcuts for bootmagic options (these work even when bootmagic is off.)
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK`|Swap Capslock and Left Control|
|
||||
|`MAGIC_CAPSLOCK_TO_CONTROL`|Treat Capslock like a Control Key|
|
||||
|`MAGIC_SWAP_LALT_LGUI`|Swap the left Alt and GUI keys|
|
||||
|`MAGIC_SWAP_RALT_RGUI`|Swap the right Alt and GUI keys|
|
||||
|`MAGIC_NO_GUI`|Disable the GUI key|
|
||||
|`MAGIC_SWAP_GRAVE_ESC`|Swap the Grave and Esc key.|
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE`|Swap backslack and backspace|
|
||||
|`MAGIC_HOST_NKRO`|Force NKRO on|
|
||||
|`MAGIC_SWAP_ALT_GUI`/`AG_SWAP`|Swap Alt and Gui on both sides|
|
||||
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK`|Disable the Control/Capslock swap|
|
||||
|`MAGIC_UNCAPSLOCK_TO_CONTROL`|Disable treating Capslock like Control |
|
||||
|`MAGIC_UNSWAP_LALT_LGUI`|Disable Left Alt and GUI switching|
|
||||
|`MAGIC_UNSWAP_RALT_RGUI`|Disable Right Alt and GUI switching|
|
||||
|`MAGIC_UNNO_GUI`|Enable the GUI key |
|
||||
|`MAGIC_UNSWAP_GRAVE_ESC`|Disable the Grave/Esc swap |
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|Disable the backslash/backspace swap|
|
||||
|`MAGIC_UNHOST_NKRO`|Force NKRO off|
|
||||
|`MAGIC_UNSWAP_ALT_GUI`/`AG_NORM`|Disable the Alt/GUI switching|
|
||||
|`MAGIC_TOGGLE_NKRO`|Turn NKRO on or off|
|
||||
|
||||
<!-- FIXME: this formatting needs work
|
||||
|
||||
## Audio
|
||||
|
||||
```c
|
||||
#ifdef AUDIO_ENABLE
|
||||
AU_ON,
|
||||
AU_OFF,
|
||||
AU_TOG,
|
||||
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
FC_ON,
|
||||
FC_OFF,
|
||||
FC_TOG,
|
||||
#endif
|
||||
|
||||
// Music mode on/off/toggle
|
||||
MU_ON,
|
||||
MU_OFF,
|
||||
MU_TOG,
|
||||
|
||||
// Music voice iterate
|
||||
MUV_IN,
|
||||
MUV_DE,
|
||||
#endif
|
||||
```
|
||||
|
||||
### Midi
|
||||
|
||||
#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
|
||||
MI_ON, // send midi notes when music mode is enabled
|
||||
MI_OFF, // don't send midi notes when music mode is enabled
|
||||
#endif
|
||||
|
||||
MIDI_TONE_MIN,
|
||||
MIDI_TONE_MAX
|
||||
|
||||
MI_C = MIDI_TONE_MIN,
|
||||
MI_Cs,
|
||||
MI_Db = MI_Cs,
|
||||
MI_D,
|
||||
MI_Ds,
|
||||
MI_Eb = MI_Ds,
|
||||
MI_E,
|
||||
MI_F,
|
||||
MI_Fs,
|
||||
MI_Gb = MI_Fs,
|
||||
MI_G,
|
||||
MI_Gs,
|
||||
MI_Ab = MI_Gs,
|
||||
MI_A,
|
||||
MI_As,
|
||||
MI_Bb = MI_As,
|
||||
MI_B,
|
||||
|
||||
MIDI_TONE_KEYCODE_OCTAVES > 1
|
||||
|
||||
where x = 1-5:
|
||||
MI_C_x,
|
||||
MI_Cs_x,
|
||||
MI_Db_x = MI_Cs_x,
|
||||
MI_D_x,
|
||||
MI_Ds_x,
|
||||
MI_Eb_x = MI_Ds_x,
|
||||
MI_E_x,
|
||||
MI_F_x,
|
||||
MI_Fs_x,
|
||||
MI_Gb_x = MI_Fs_x,
|
||||
MI_G_x,
|
||||
MI_Gs_x,
|
||||
MI_Ab_x = MI_Gs_x,
|
||||
MI_A_x,
|
||||
MI_As_x,
|
||||
MI_Bb_x = MI_As_x,
|
||||
MI_B_x,
|
||||
|
||||
MI_OCT_Nx 1-2
|
||||
MI_OCT_x 0-7
|
||||
MIDI_OCTAVE_MIN = MI_OCT_N2,
|
||||
MIDI_OCTAVE_MAX = MI_OCT_7,
|
||||
MI_OCTD, // octave down
|
||||
MI_OCTU, // octave up
|
||||
|
||||
MI_TRNS_Nx 1-6
|
||||
MI_TRNS_x 0-6
|
||||
MIDI_TRANSPOSE_MIN = MI_TRNS_N6,
|
||||
MIDI_TRANSPOSE_MAX = MI_TRNS_6,
|
||||
MI_TRNSD, // transpose down
|
||||
MI_TRNSU, // transpose up
|
||||
|
||||
MI_VEL_x 1-10
|
||||
MIDI_VELOCITY_MIN = MI_VEL_1,
|
||||
MIDI_VELOCITY_MAX = MI_VEL_9,
|
||||
MI_VELD, // velocity down
|
||||
MI_VELU, // velocity up
|
||||
|
||||
MI_CHx 1-16
|
||||
MIDI_CHANNEL_MIN = MI_CH1
|
||||
MIDI_CHANNEL_MAX = MI_CH16,
|
||||
MI_CHD, // previous channel
|
||||
MI_CHU, // next channel
|
||||
|
||||
MI_ALLOFF, // all notes off
|
||||
|
||||
MI_SUS, // sustain
|
||||
MI_PORT, // portamento
|
||||
MI_SOST, // sostenuto
|
||||
MI_SOFT, // soft pedal
|
||||
MI_LEG, // legato
|
||||
|
||||
MI_MOD, // modulation
|
||||
MI_MODSD, // decrease modulation speed
|
||||
MI_MODSU, // increase modulation speed
|
||||
#endif // MIDI_ADVANCED
|
||||
|
||||
-->
|
||||
|
||||
## Backlight
|
||||
|
||||
These keycodes control the backlight. Most keyboards use this for single color in-switch lighting.
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
|`BL_x`|Set a specific backlight level between 0-9|
|
||||
|`BL_ON`|An alias for `BL_9`|
|
||||
|`BL_OFF`|An alias for `BL_0`|
|
||||
|`BL_DEC`|Turn the backlight level down by 1|
|
||||
|`BL_INC`|Turn the backlight level up by 1|
|
||||
|`BL_TOGG`|Toggle the backlight on or off|
|
||||
|`BL_STEP`|Step through backlight levels, wrapping around to 0 when you reach the top.|
|
||||
|
||||
## RGBLIGHT WS2818 LEDs
|
||||
|
||||
This controls the `RGBLIGHT` functionality. Most keyboards use WS2812 (and compatible) LEDs for underlight or case lighting.
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
|`RGB_TOG`|toggle on/off|
|
||||
|`RGB_MOD`|cycle through modes|
|
||||
|`RGB_HUI`|hue increase|
|
||||
|`RGB_HUD`|hue decrease|
|
||||
|`RGB_SAI`|saturation increase|
|
||||
|`RGB_SAD`|saturation decrease|
|
||||
|`RGB_VAI`|value increase|
|
||||
|`RGB_VAD`|value decrease|
|
||||
|
||||
## Thermal Printer (experimental)
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
|`PRINT_ON`|Start printing everything the user types|
|
||||
|`PRINT_OFF`|Stop printing everything the user types|
|
||||
|
||||
## Keyboard output selection
|
||||
|
||||
This is used when multiple keyboard outputs can be selected. Currently this only allows for switching between USB and Bluetooth on keyboards that support both.
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
|`OUT_AUTO`|auto mode|
|
||||
|`OUT_USB`|usb only|
|
||||
|`OUT_BT`|bluetooth (when `BLUETOOTH_ENABLE`)|
|
||||
|
||||
## Modifiers
|
||||
|
||||
These are special keycodes that simulate pressing several modifiers at once.
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
|`KC_HYPR`|Hold down LCTL + LSFT + LALT + LGUI|
|
||||
|`KC_MEH`|Hold down LCTL + LSFT + LALT|
|
||||
|
||||
/* FIXME: Should we have these in QMK too?
|
||||
* |`KC_LCAG`|`LCTL` + `LALT` + `LGUI`|
|
||||
* |`KC_ALTG`|`RCTL` + `RALT`|
|
||||
* |`KC_SCMD`/`KC_SWIN`|`LGUI` + `LSFT`|
|
||||
* |`KC_LCA`|`LCTL` + `LALT`|
|
||||
*/
|
||||
|
||||
### Modifiers with keys
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
|`LCTL(kc)`|`LCTL` + `kc`|
|
||||
|`LSFT(kc)`/`S(kc)`|`LSFT` + `kc`|
|
||||
|`LALT(kc)`|`LALT` + `kc`|
|
||||
|`LGUI(kc)`|`LGUI` + `kc`|
|
||||
|`RCTL(kc)`|`RCTL` + `kc`|
|
||||
|`RSFT(kc)`|`RSFT` + `kc`|
|
||||
|`RALT(kc)`|`RALT` + `kc`|
|
||||
|`RGUI(kc)`|`RGUI` + `kc`|
|
||||
|`HYPR(kc)`|`LCTL` + `LSFT` + `LALT` + `LGUI` + `kc`|
|
||||
|`MEH(kc)`|`LCTL` + `LSFT` + `LALT` + `kc`|
|
||||
|`LCAG(kc)`|`LCTL` + `LALT` + `LGUI` + `kc`|
|
||||
|`ALTG(kc)`|`RCTL` + `RALT` + `kc`|
|
||||
|`SCMD(kc)`/`SWIN(kc)`|`LGUI` + `LSFT` + `kc`|
|
||||
|`LCA(kc)`|`LCTL` + `LALT` + `kc`|
|
||||
|
||||
### One Shot Keys
|
||||
|
||||
Most modifiers work by being held down while you push another key. You can use `OSM()` to setup a "One Shot" modifier. When you tap a one shot mod it will remain is a pressed state until you press another key.
|
||||
|
||||
To specify a your modifier you need to pass the `MOD` form of the key. For example, if you want to setup a One Shot Control you would use `OSM(MOD_LCTL)`.
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
|`OSM(mod)`|use mod for one keypress|
|
||||
|`OSL(layer)`|switch to layer for one keypress|
|
||||
|
||||
### Mod-tap keys
|
||||
|
||||
These keycodes will press the mod(s) when held, and the key when tapped. They only work with [basic keycodes](basic_keycodes.md).
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
|`CTL_T(kc)`/`LCTL_T(kc)`|`LCTL` when held, `kc` when tapped|
|
||||
|`RCTL_T(kc)`|`RCTL` when held, `kc` when tapped|
|
||||
|`SFT_T(kc)`/`LSFT_T(kc)`|`LSFT` when held, `kc` when tapped|
|
||||
|`RSFT_T(kc)`|`RSFT` when held, `kc` when tapped|
|
||||
|`ALT_T(kc)`/`LALT_T(kc)`|`LALT` when held, `kc` when tapped|
|
||||
|`RALT_T(kc)`/`ALGR_T(kc)`|`RALT` when held, `kc` when tapped|
|
||||
|`GUI_T(kc)`/`LGUI_T(kc)`|`LGUI` when held, `kc` when tapped|
|
||||
|`RGUI_T(kc)`|`RGUI` when held, `kc` when tapped|
|
||||
|`C_S_T(kc)`|`LCTL` + `LSFT` when held, `kc` when tapped|
|
||||
|`MEH_T(kc)`|`LCTL` + `LSFT` + `LALT` when held, `kc` when tapped|
|
||||
|`LCAG_T(kc)`|`LCTL` + `LALT` + `LGUI` when held, `kc` when tapped|
|
||||
|`RCAG_T(kc)`|`RCTL` + `RALT` + `RGUI` when held, `kc` when tapped|
|
||||
|`ALL_T(kc)`|`LCTL` + `LSFT` + `LALT` + `LGUI` when held, `kc` when tapped [more info](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
||||
|`SCMD_T(kc)`/`SWIN_T(kc)`|`LGUI` + `LSFT` when held, `kc` when tapped|
|
||||
|`LCA_T(kc)`|`LCTL` + `LALT` when held, `kc` when tapped|
|
||||
|
||||
## US ANSI Shifted symbols
|
||||
|
||||
These keycodes correspond to characters that are "shifted" on a standard US ANSI keyboards. They do not have dedicated keycodes but are instead typed by holding down shift and then sending a keycode.
|
||||
|
||||
It's important to remember that all of these keycodes send a left shift - this may cause unintended actions if unaccounted for. The short code is preferred in most situations.
|
||||
|
||||
|Short Name|Long Name|Description|
|
||||
|----------|---------|-----------|
|
||||
|`KC_TILD`|`KC_TILDE`|tilde `~`|
|
||||
|`KC_EXLM`|`KC_EXCLAIM`|exclamation mark `!`|
|
||||
|`KC_AT`||at sign `@`|
|
||||
|`KC_HASH`||hash sign `#`|
|
||||
|`KC_DLR`|`KC_DOLLAR`|dollar sign `$`|
|
||||
|`KC_PERC`|`KC_PERCENT`|percent sign `%`|
|
||||
|`KC_CIRC`|`KC_CIRCUMFLEX`|circumflex `^`|
|
||||
|`KC_AMPR`|`KC_AMPERSAND`|ampersand `&`|
|
||||
|`KC_ASTR`|`KC_ASTERISK`|asterisk `*`|
|
||||
|`KC_LPRN`|`KC_LEFT_PAREN`|left parenthesis `(`|
|
||||
|`KC_RPRN`|`KC_RIGHT_PAREN`|right parenthesis `)`|
|
||||
|`KC_UNDS`|`KC_UNDERSCORE`|underscore `_`|
|
||||
|`KC_PLUS`||plus sign `+`|
|
||||
|`KC_LCBR`|`KC_LEFT_CURLY_BRACE`|left curly brace `{`|
|
||||
|`KC_RCBR`|`KC_RIGHT_CURLY_BRACE`|right curly brace `}`|
|
||||
|`KC_LT`/`KC_LABK`|`KC_LEFT_ANGLE_BRACKET`|left angle bracket `<`|
|
||||
|`KC_GT`/`KC_RABK`|`KC_RIGHT_ANGLE_BRACKET`|right angle bracket `>`|
|
||||
|`KC_COLN`|`KC_COLON`|colon `:`|
|
||||
|`KC_PIPE`||pipe `\|`|
|
||||
|`KC_QUES`|`KC_QUESTION`|question mark `?`|
|
||||
|`KC_DQT`/`KC_DQUO`|`KC_DOUBLE_QUOTE`|double quote `"`|
|
||||
|
||||
## Layer Changes
|
||||
|
||||
These are keycodes that can be used to change the current layer.
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
|`LT(layer, kc)`|turn on layer (0-15) when held, kc ([basic keycodes](basic_keycodes.md)) when tapped|
|
||||
|`TO(layer)`|turn on layer when depressed|
|
||||
|`MO(layer)`|momentarily turn on layer when depressed (requires `KC_TRNS` on destination layer)|
|
||||
|`DF(layer)`|sets the base (default) layer|
|
||||
|`TG(layer)`|toggle layer on/off|
|
||||
|`TT(layer)`|tap toggle? idk FIXME|
|
||||
|`OSL(layer)`|switch to layer for one keycode|
|
||||
|
||||
## Unicode
|
||||
|
||||
These keycodes can be used in conjuction with the [Unicode](unicode_and_additional_language_support.md) support.
|
||||
|
||||
|`UNICODE(n)`/`UC(n)`|if `UNICODE_ENABLE`, this will send characters up to `0x7FFF`|
|
||||
|`X(n)`|if `UNICODEMAP_ENABLE`, also sends unicode via a different method|
|
||||
|
||||
# `SAFE_RANGE`, or safely defining custom keycodes
|
||||
|
||||
Sometimes you want to define your own custom keycodes to make your keymap easier to read. QMK provides `SAFE_RANGE` to help you do that. `SAFE_RANGE` is the first available keycode in the `0x0000`-`0xFFFF` range and you can use it when creating your own custom keycode enum:
|
||||
|
||||
```
|
||||
enum my_keycodes {
|
||||
FOO = SAFE_RANGE,
|
||||
BAR
|
||||
};
|
||||
```
|
||||
|
||||
You can then use `process_record_user()` to do something with your keycode:
|
||||
|
||||
```
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case FOO:
|
||||
// Do something here
|
||||
break;
|
||||
case BAR:
|
||||
// Do something here
|
||||
break;
|
||||
}
|
||||
}
|
||||
```
|
||||
Quantum keycodes allow for easier customisation of your keymap than the basic ones provide, without having to define custom actions.
|
||||
|
||||
All keycodes within quantum are numbers between `0x0000` and `0xFFFF`. Within your `keymap.c` it may look like you have functions and other special cases, but ultimately the C preprocessor will translate those into a single 4 byte integer. QMK has reserved `0x0000` through `0x00FF` for standard keycodes. These are keycodes such as `KC_A`, `KC_1`, and `KC_LCTL`, which are basic keys defined in the USB HID specification.
|
||||
|
||||
On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are used to implement advanced quantum features. If you define your own custom keycodes they will be put into this range as well.
|
||||
|
||||
## QMK Keycodes
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-------------|-----------|---------------------------------------------------------------------|
|
||||
|`RESET` | |Put the keyboard into DFU mode for flashing |
|
||||
|`DEBUG` | |Toggle debug mode |
|
||||
|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, <code>`</code> when pressed with Shift or GUI|
|
||||
|`KC_LSPO` | |Left Shift when held, `(` when tapped |
|
||||
|`KC_RSPC` | |Right Shift when held, `)` when tapped |
|
||||
|`KC_LEAD` | |The [Leader key](feature_leader_key.md) |
|
||||
|`KC_LOCK` | |The [Lock key](feature_key_lock.md) |
|
||||
|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) |
|
||||
|`M(n)` | |Call macro `n` |
|
||||
|`MACROTAP(n)`| |Macro-tap `n` idk FIXME |
|
||||
|
44
docs/redirects.json
Normal file
44
docs/redirects.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"redirects": [
|
||||
{
|
||||
"from": "adding_a_keyboard_to_qmk.html",
|
||||
"to": "hardware_keyboard_guidelines.html"
|
||||
},
|
||||
{
|
||||
"from": "build_environment_setup.html",
|
||||
"to": "getting_started_build_tools.html"
|
||||
},
|
||||
{
|
||||
"from": "dynamic_macros.html",
|
||||
"to": "feature_dynamic_macros.html"
|
||||
},
|
||||
{
|
||||
"from": "feature_common_shortcuts.html",
|
||||
"to": "feature_advanced_keycodes.html"
|
||||
},
|
||||
{
|
||||
"from": "key_lock.html",
|
||||
"to": "feature_key_lock.html"
|
||||
},
|
||||
{
|
||||
"from": "make_instructions.html",
|
||||
"to": "getting_started_make_guide.html"
|
||||
},
|
||||
{
|
||||
"from": "porting_your_keyboard_to_qmk.html",
|
||||
"to": "hardware_avr.html"
|
||||
},
|
||||
{
|
||||
"from": "space_cadet_shift.html",
|
||||
"to": "feature_space_cadet.html"
|
||||
},
|
||||
{
|
||||
"from": "tap_dance.html",
|
||||
"to": "feature_tap_dance.html"
|
||||
},
|
||||
{
|
||||
"from": "unicode.html",
|
||||
"to": "feature_unicode.html"
|
||||
}
|
||||
]
|
||||
}
|
@@ -2,8 +2,8 @@
|
||||
|
||||
This document attempts to explain how the QMK firmware works from a very high level. It assumes you understand basic programming concepts but does not (except where needed to demonstrate) assume familiarity with C. It assumes that you have a basic understanding of the following documents:
|
||||
|
||||
* [QMK Overview](qmk_overview.md)
|
||||
* [How Keyboards Work](basic_how_keyboards_work.md)
|
||||
* [Introduction](getting_started_introduction.md)
|
||||
* [How Keyboards Work](how_keyboards_work.md)
|
||||
* [FAQ](faq.md)
|
||||
|
||||
## Startup
|
||||
@@ -94,11 +94,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
}
|
||||
```
|
||||
|
||||
Notice how all of these arguments match up with the first half of the `KEYMAP()` macro from the last section? This is how we take a keycode and map it to our Matrix Scan from earlier.
|
||||
Notice how all of these arguments match up with the first half of the `KEYMAP()` macro from the last section? This is how we take a keycode and map it to our Matrix Scan from earlier.
|
||||
|
||||
##### State Change Detection
|
||||
|
||||
The matrix scanning described above tells us the state of the matrix at a given moment, but your computer only wants to know about changes, it doesn't care about the current state. QMK stores the results from the last matrix scan and compares the results from this matrix to determine when a key has been pressed or released.
|
||||
The matrix scanning described above tells us the state of the matrix at a given moment, but your computer only wants to know about changes, it doesn't care about the current state. QMK stores the results from the last matrix scan and compares the results from this matrix to determine when a key has been pressed or released.
|
||||
|
||||
Let's look at an example. We'll hop into the middle of a keyboard scanning loop to find that our previous scan looks like this:
|
||||
|
||||
@@ -147,9 +147,10 @@ The `process_record()` function itself is deceptively simple, but hidden within
|
||||
* [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode.c#L22)
|
||||
* [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c#L91)
|
||||
* [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_printer.c#L77)
|
||||
* [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_auto_shift.c#L47)
|
||||
* [`bool process_unicode_map(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicodemap.c#L47)
|
||||
* [Identify and process quantum specific keycodes](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L211)
|
||||
|
||||
|
||||
At any step during this chain of events a function (such as `process_record_kb()`) can `return false` to halt all further processing.
|
||||
|
||||
<!--
|
||||
|
@@ -18,7 +18,7 @@ Note that Google Test and therefore any test has to be written in C++, even if t
|
||||
|
||||
One thing to remember, is that you have to append `extern "C"` around all of your C file includes.
|
||||
|
||||
## Adding tests for new or existing features
|
||||
## Adding Tests for New or Existing Features
|
||||
|
||||
If you want to unit test some feature, then take a look at the existing serial_link tests, in the `quantum/serial_link/tests folder`, and follow the steps below to create a similar structure.
|
||||
|
||||
@@ -34,25 +34,25 @@ If you want to unit test some feature, then take a look at the existing serial_l
|
||||
|
||||
Note how there's several different tests, each mocking out a separate part. Also note that each of them only compiles the very minimum that's needed for the tests. It's recommend that you try to do the same. For a relevant video check out [Matt Hargett "Advanced Unit Testing in C & C++](https://www.youtube.com/watch?v=Wmy6g-aVgZI)
|
||||
|
||||
## Running the tests
|
||||
## Running the Tests
|
||||
|
||||
To run all the tests in the codebase, type `make test`. You can also run test matching a substring by typing `make test-matchingsubstring` Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer.
|
||||
To run all the tests in the codebase, type `make test`. You can also run test matching a substring by typing `make test:matchingsubstring` Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer.
|
||||
|
||||
## Debugging the tests
|
||||
## Debugging the Tests
|
||||
|
||||
If there are problems with the tests, you can find the executable in the `./build/test` folder. You should be able to run those with GDB or a similar debugger.
|
||||
|
||||
## Full Integration tests
|
||||
## Full Integration Tests
|
||||
|
||||
It's not yet possible to do a full integration test, where you would compile the whole firmware and define a keymap that you are going to test. However there are plans for doing that, because writing tests that way would probably be easier, at least for people that are not used to unit testing.
|
||||
|
||||
In that model you would emulate the input, and expect a certain output from the emulated keyboard.
|
||||
|
||||
# Tracing variables
|
||||
# Tracing Variables
|
||||
|
||||
Sometimes you might wonder why a variable gets changed and where, and this can be quite tricky to track down without having a debugger. It's of course possible to manually add print statements to track it, but you can also enable the variable trace feature. This works for both for variables that are changed by the code, and when the variable is changed by some memory corruption.
|
||||
|
||||
To take the feature into use add `VARIABLE_TRACE=x` to the end of you make command. `x` represents the number of variables you want to trace, which is usually 1.
|
||||
To take the feature into use add `VARIABLE_TRACE=x` to the end of you make command. `x` represents the number of variables you want to trace, which is usually 1.
|
||||
|
||||
Then at a suitable place in the code, call `ADD_TRACED_VARIABLE`, to begin the tracing. For example to trace all the layer changes, you can do this
|
||||
```c
|
||||
@@ -65,4 +65,4 @@ This will add a traced variable named "layer" (the name is just for your informa
|
||||
|
||||
In order to actually detect changes to the variables you should call `VERIFY_TRACED_VARIABLES` around the code that you think that modifies the variable. If a variable is modified it will tell you between which two `VERIFY_TRACED_VARIABLES` calls the modification happened. You can then add more calls to track it down further. I don't recommend spamming the codebase with calls. It's better to start with a few, and then keep adding them in a binary search fashion. You can also delete the ones you don't need, as each call need to store the file name and line number in the ROM, so you can run out of memory if you add too many calls.
|
||||
|
||||
Also remember to delete all the tracing code once you have found the bug, as you wouldn't want to create a pull request with tracing code.
|
||||
Also remember to delete all the tracing code once you have found the bug, as you wouldn't want to create a pull request with tracing code.
|
||||
|
@@ -28,23 +28,7 @@
|
||||
//#include "ws2812_config.h"
|
||||
//#include "i2cmaster.h"
|
||||
|
||||
#ifdef RGBW
|
||||
#define LED_TYPE struct cRGBW
|
||||
#else
|
||||
#define LED_TYPE struct cRGB
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Structure of the LED array
|
||||
*
|
||||
* cRGB: RGB for WS2812S/B/C/D, SK6812, SK6812Mini, SK6812WWA, APA104, APA106
|
||||
* cRGBW: RGBW for SK6812RGBW
|
||||
*/
|
||||
|
||||
struct cRGB { uint8_t g; uint8_t r; uint8_t b; };
|
||||
struct cRGBW { uint8_t g; uint8_t r; uint8_t b; uint8_t w;};
|
||||
|
||||
#include "rgblight_types.h"
|
||||
|
||||
|
||||
/* User Interface
|
||||
|
5
keyboards/6ball/6ball.c
Normal file
5
keyboards/6ball/6ball.c
Normal file
@@ -0,0 +1,5 @@
|
||||
#include "6ball.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
16
keyboards/6ball/6ball.h
Normal file
16
keyboards/6ball/6ball.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef SIXBALL_H
|
||||
#define SIXBALL_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
k01, k02, k03, \
|
||||
k04, k05, k06 \
|
||||
) \
|
||||
{ \
|
||||
{ k02, k03, k06, k05, k04, k01 } \
|
||||
}
|
||||
|
||||
#define KC_KEYMAP(k01, k02, k03, k04, k05, k06) KEYMAP(KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06)
|
||||
|
||||
#endif
|
53
keyboards/6ball/config.h
Normal file
53
keyboards/6ball/config.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xCEEB
|
||||
#define PRODUCT_ID 0x0007
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER That-Canadian
|
||||
#define PRODUCT 6-Ball
|
||||
#define DESCRIPTION 6-Ball Macropuck
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 1
|
||||
#define MATRIX_COLS 6
|
||||
|
||||
/* pin-out */
|
||||
#define MATRIX_ROW_PINS { F5 }
|
||||
#define MATRIX_COL_PINS { F4, D4, B5, B6, B2, F6 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* ws2812 RGB LED */
|
||||
#define RGB_DI_PIN F7
|
||||
#define RGBLIGHT_TIMER
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 6 // Number of LEDs
|
||||
#define ws2812_PORTREG PORTD
|
||||
#define ws2812_DDRREG DDRD
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#endif
|
28
keyboards/6ball/keymaps/default/keymap.c
Normal file
28
keyboards/6ball/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "6ball.h"
|
||||
|
||||
#define _MAIN 0
|
||||
#define _FN 1
|
||||
|
||||
#define KC_ KC_TRNS
|
||||
|
||||
#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
|
||||
#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
|
||||
#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
|
||||
#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
|
||||
#define KC_X0 LT(_FN, KC_ESC)
|
||||
#define KC_RTOG RGB_TOG
|
||||
#define KC_RMOD RGB_MOD
|
||||
#define KC_RHUI RGB_HUI
|
||||
#define KC_RHUD RGB_HUD
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_MAIN] = KC_KEYMAP(
|
||||
F , X0 ,LCTL,
|
||||
R , D , M
|
||||
),
|
||||
|
||||
[_FN] = KC_KEYMAP(
|
||||
F , ,RHUI,
|
||||
RTOG,RMOD,RHUD
|
||||
)
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user