mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-16 13:08:30 +00:00
Compare commits
610 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ac447d8acb | ||
![]() |
a5e749d8cd | ||
![]() |
4ee623fdd5 | ||
![]() |
751316c344 | ||
![]() |
5d3bf8a050 | ||
![]() |
6501377070 | ||
![]() |
af2ca13604 | ||
![]() |
451c472d1d | ||
![]() |
bfe76053ba | ||
![]() |
9d41281a1d | ||
![]() |
ba5e1f1bae | ||
![]() |
e4823aadec | ||
![]() |
5c9906eb4f | ||
![]() |
f56d333db1 | ||
![]() |
d8f76f9e6d | ||
![]() |
6ca00c2152 | ||
![]() |
dc6fe85b87 | ||
![]() |
883dd2df80 | ||
![]() |
2ac3a51d71 | ||
![]() |
f66680d233 | ||
![]() |
503cf18aed | ||
![]() |
38d2c8cedf | ||
![]() |
53224e03d6 | ||
![]() |
7ef2ea3d49 | ||
![]() |
9e4037465a | ||
![]() |
fd4f102977 | ||
![]() |
6d84795bc1 | ||
![]() |
179e5c018f | ||
![]() |
5246acb2e4 | ||
![]() |
02a8c874f8 | ||
![]() |
dae6f6b39b | ||
![]() |
526c185e7e | ||
![]() |
c63fd051da | ||
![]() |
b95979560c | ||
![]() |
65150984bd | ||
![]() |
205321c377 | ||
![]() |
1816ad01d0 | ||
![]() |
9c8f61dfa0 | ||
![]() |
d1df576ece | ||
![]() |
83ebbf57b3 | ||
![]() |
8e1f706ac6 | ||
![]() |
b0c780ed32 | ||
![]() |
3ad2be52a7 | ||
![]() |
0fbcb41c85 | ||
![]() |
ddca422776 | ||
![]() |
82bb7d2852 | ||
![]() |
1044519f36 | ||
![]() |
209942366b | ||
![]() |
494b34b63f | ||
![]() |
58e3b01f37 | ||
![]() |
6c2008c688 | ||
![]() |
bcedc80ec7 | ||
![]() |
ef5fad137b | ||
![]() |
15dd05c402 | ||
![]() |
32d03db371 | ||
![]() |
c9d396dd47 | ||
![]() |
2afb29e095 | ||
![]() |
fcf150bd82 | ||
![]() |
ee2eb01653 | ||
![]() |
0bece1d442 | ||
![]() |
be69dd22e8 | ||
![]() |
b9675d2106 | ||
![]() |
f689f043b1 | ||
![]() |
54b04d9665 | ||
![]() |
4604c70c4c | ||
![]() |
010c5b12bd | ||
![]() |
4adf4d5a89 | ||
![]() |
d0e0202b27 | ||
![]() |
fb9425df82 | ||
![]() |
22ad35b225 | ||
![]() |
f6cec668c7 | ||
![]() |
2651edc243 | ||
![]() |
2a43989d30 | ||
![]() |
2f5521cd48 | ||
![]() |
ac3d2a3810 | ||
![]() |
1786490993 | ||
![]() |
e55d55edc0 | ||
![]() |
ad014c2539 | ||
![]() |
81698df056 | ||
![]() |
fca35a3540 | ||
![]() |
5d01cc45be | ||
![]() |
eaab0844e8 | ||
![]() |
ce842f912e | ||
![]() |
cceab93baa | ||
![]() |
4161573b28 | ||
![]() |
d0e684ef55 | ||
![]() |
f125406700 | ||
![]() |
afebb6576c | ||
![]() |
7f6ba2bf8a | ||
![]() |
142ebaea46 | ||
![]() |
bbd17def21 | ||
![]() |
d89e552419 | ||
![]() |
9cf69a1997 | ||
![]() |
c6cf1ae4e7 | ||
![]() |
2c9ab8a606 | ||
![]() |
0bf60acc4b | ||
![]() |
6b54f3ce1c | ||
![]() |
c3aaed8dfb | ||
![]() |
ebc274209e | ||
![]() |
1bdfac8afc | ||
![]() |
9b716b7ada | ||
![]() |
b591c0c24a | ||
![]() |
6ba014a572 | ||
![]() |
2dd47a3bf4 | ||
![]() |
887c1c4e0e | ||
![]() |
f66850bfd0 | ||
![]() |
632285c982 | ||
![]() |
805f5cb72b | ||
![]() |
a8a8bf0ff3 | ||
![]() |
fadd3cb461 | ||
![]() |
a41f973f75 | ||
![]() |
7abbc95cd6 | ||
![]() |
30a6f231bf | ||
![]() |
44ff14f290 | ||
![]() |
741c7d5eec | ||
![]() |
f3c30e80cc | ||
![]() |
d846660e00 | ||
![]() |
774384ce31 | ||
![]() |
361ac2f32a | ||
![]() |
d15a60d2d3 | ||
![]() |
73992c68d5 | ||
![]() |
8ca4ed9a98 | ||
![]() |
640d12d070 | ||
![]() |
3beda5c16e | ||
![]() |
fb7fc54923 | ||
![]() |
179c868059 | ||
![]() |
7b11dcce10 | ||
![]() |
e2fa05c6d2 | ||
![]() |
4c4009c0fd | ||
![]() |
e7860d673b | ||
![]() |
2fe7e221ec | ||
![]() |
e0f548085c | ||
![]() |
94fc32f431 | ||
![]() |
1f7bbf279c | ||
![]() |
803610a284 | ||
![]() |
cd0edbb1fb | ||
![]() |
6919772fb9 | ||
![]() |
fedd8e81d1 | ||
![]() |
adda5d7770 | ||
![]() |
d2581884d9 | ||
![]() |
58fd782ce0 | ||
![]() |
8e56d10e4e | ||
![]() |
43868a5e20 | ||
![]() |
db167ecf79 | ||
![]() |
2b8b1045a1 | ||
![]() |
7a6e52b5d8 | ||
![]() |
ae5f7365ea | ||
![]() |
606438692d | ||
![]() |
5d29a13e22 | ||
![]() |
81c648e947 | ||
![]() |
923bad46f9 | ||
![]() |
19513fac5f | ||
![]() |
7bb9c76c80 | ||
![]() |
57e67a4cc8 | ||
![]() |
cf3913cd79 | ||
![]() |
a30cc37c09 | ||
![]() |
b18c261040 | ||
![]() |
bac5d6bc6a | ||
![]() |
ab1650606c | ||
![]() |
dc00942be1 | ||
![]() |
e8f842e798 | ||
![]() |
3745ebc22b | ||
![]() |
d646cba72a | ||
![]() |
15e84f79f1 | ||
![]() |
6f30b402a2 | ||
![]() |
1ff526dac0 | ||
![]() |
e17b55e33a | ||
![]() |
f31bf1b202 | ||
![]() |
5f82b0782f | ||
![]() |
2e6959ed87 | ||
![]() |
c482a2944b | ||
![]() |
65c8ac9ac9 | ||
![]() |
e182a38e7c | ||
![]() |
fe4581c1a1 | ||
![]() |
ddd055b1e2 | ||
![]() |
f7324ec684 | ||
![]() |
3d760caa85 | ||
![]() |
750c7c2bdb | ||
![]() |
4846c8eba0 | ||
![]() |
3de4c3ea6a | ||
![]() |
830bd5460c | ||
![]() |
9f54a26dc0 | ||
![]() |
16a15c1cfc | ||
![]() |
37a4b53c4f | ||
![]() |
a84d239661 | ||
![]() |
41fd60d624 | ||
![]() |
231464c49c | ||
![]() |
d26a14c169 | ||
![]() |
195be50745 | ||
![]() |
8fdb229b66 | ||
![]() |
fd3456f362 | ||
![]() |
812d80efbd | ||
![]() |
86c4c4e91d | ||
![]() |
168ba88ada | ||
![]() |
5f5c2a219c | ||
![]() |
e415198235 | ||
![]() |
b17482c3fd | ||
![]() |
5b4870c046 | ||
![]() |
374525c995 | ||
![]() |
e02a3c559d | ||
![]() |
e1217dae5a | ||
![]() |
485a0b0bc3 | ||
![]() |
23cfc4b145 | ||
![]() |
bd639752db | ||
![]() |
aaeef7a833 | ||
![]() |
0d6614f71f | ||
![]() |
d322ec5452 | ||
![]() |
c7449b3840 | ||
![]() |
4c51049b2b | ||
![]() |
dd60fcda28 | ||
![]() |
fd6b674b49 | ||
![]() |
2c0deb8a13 | ||
![]() |
a904371b29 | ||
![]() |
cfdd105d9d | ||
![]() |
82ae6ee007 | ||
![]() |
f220e7d713 | ||
![]() |
3cb6fb2935 | ||
![]() |
5c666398d5 | ||
![]() |
a47915d2d2 | ||
![]() |
6ec3cc029e | ||
![]() |
4597f2bcc8 | ||
![]() |
52af38da37 | ||
![]() |
b2dbc3f515 | ||
![]() |
86b62eadc2 | ||
![]() |
3337eb10b2 | ||
![]() |
32bab55def | ||
![]() |
47fc2f8855 | ||
![]() |
ee29b515ec | ||
![]() |
c031e13982 | ||
![]() |
84bf82f2c9 | ||
![]() |
af26238385 | ||
![]() |
28e5969f78 | ||
![]() |
59246756e5 | ||
![]() |
423ce39f18 | ||
![]() |
217debff07 | ||
![]() |
52e9719d09 | ||
![]() |
9df367e227 | ||
![]() |
8650b9f10c | ||
![]() |
5c9c45619e | ||
![]() |
09caf19389 | ||
![]() |
4baf49191f | ||
![]() |
427da3c19c | ||
![]() |
1df8bb3cdb | ||
![]() |
99eacdc47a | ||
![]() |
5e235d30c7 | ||
![]() |
6586280bf3 | ||
![]() |
0722986d7a | ||
![]() |
22a10cc8a3 | ||
![]() |
b349fa0a57 | ||
![]() |
e98a9578a1 | ||
![]() |
d2b03bf150 | ||
![]() |
35ca1c2212 | ||
![]() |
ccc8338b0e | ||
![]() |
bafa35ff46 | ||
![]() |
182286680a | ||
![]() |
c1c579c554 | ||
![]() |
19bd8aa942 | ||
![]() |
d0d105b083 | ||
![]() |
c0a57c2a50 | ||
![]() |
738c6612ca | ||
![]() |
643fc1d806 | ||
![]() |
f78896589e | ||
![]() |
837ffd0006 | ||
![]() |
92a50a386a | ||
![]() |
357c6009be | ||
![]() |
e916ce5f3e | ||
![]() |
086a7cf800 | ||
![]() |
99f7fe6bd4 | ||
![]() |
d0c3a4c8d5 | ||
![]() |
2dca087b04 | ||
![]() |
b80340c207 | ||
![]() |
cb4a86475e | ||
![]() |
7e4cf9ace2 | ||
![]() |
0d658e0c95 | ||
![]() |
1522d97c2b | ||
![]() |
2d39a9dcdb | ||
![]() |
33bf4863f5 | ||
![]() |
ad547c1fdd | ||
![]() |
9b70e53508 | ||
![]() |
33a5dc4fcf | ||
![]() |
e0fffcde99 | ||
![]() |
06bffbd45b | ||
![]() |
c261076f8e | ||
![]() |
51ecd37d7b | ||
![]() |
ed5e69093c | ||
![]() |
43785126a7 | ||
![]() |
8c97b4a3a4 | ||
![]() |
0698b15aa5 | ||
![]() |
d600631ad1 | ||
![]() |
f3595f65b7 | ||
![]() |
23df763a31 | ||
![]() |
ed910c8e97 | ||
![]() |
7e1c0bd4c0 | ||
![]() |
d2b8398f75 | ||
![]() |
195324cc4c | ||
![]() |
cd5399942b | ||
![]() |
fd4bbd8d11 | ||
![]() |
f43cb31476 | ||
![]() |
89eb3a9e42 | ||
![]() |
66d94dc22a | ||
![]() |
5a8f59503e | ||
![]() |
7918f7d61d | ||
![]() |
a6bd8fe67b | ||
![]() |
55b43f02f0 | ||
![]() |
db4b11f866 | ||
![]() |
46a84ec84a | ||
![]() |
3b5998085c | ||
![]() |
7a9980fd85 | ||
![]() |
bc13dcd349 | ||
![]() |
55002338b1 | ||
![]() |
99d9250045 | ||
![]() |
4a92dd327c | ||
![]() |
7873b49d40 | ||
![]() |
fcf2b45263 | ||
![]() |
5607af8524 | ||
![]() |
5a45627e17 | ||
![]() |
17d0f6338e | ||
![]() |
484c059d86 | ||
![]() |
3cc68543ca | ||
![]() |
daf6dedb02 | ||
![]() |
7a0d145e27 | ||
![]() |
e990863296 | ||
![]() |
d06340f665 | ||
![]() |
4c0065dda7 | ||
![]() |
2ae39ccf38 | ||
![]() |
5185c52b4a | ||
![]() |
c0b99badcb | ||
![]() |
f9bb9ef0b8 | ||
![]() |
3d9ffd3efb | ||
![]() |
3cea9fedff | ||
![]() |
575d99816e | ||
![]() |
4bccde37d4 | ||
![]() |
f6b40da7f8 | ||
![]() |
6fb048fdaf | ||
![]() |
06b571aa53 | ||
![]() |
355b693e4e | ||
![]() |
f514ad5503 | ||
![]() |
09a1917103 | ||
![]() |
46e4493761 | ||
![]() |
157d121c71 | ||
![]() |
7e6b550ebf | ||
![]() |
7f4ce4a8b7 | ||
![]() |
6452973761 | ||
![]() |
a2309b306a | ||
![]() |
52ac6c4303 | ||
![]() |
05e9ff6554 | ||
![]() |
17bda000f3 | ||
![]() |
46a69d1f3b | ||
![]() |
b56a41800a | ||
![]() |
d3c29c9b3c | ||
![]() |
370577e4ed | ||
![]() |
6e84247ec2 | ||
![]() |
5380c29dd7 | ||
![]() |
23f19852b9 | ||
![]() |
8a5c1e1859 | ||
![]() |
6265b78307 | ||
![]() |
23124b9fd1 | ||
![]() |
eb7fc7f9d9 | ||
![]() |
c2df714c3b | ||
![]() |
799b21f8cd | ||
![]() |
750179e111 | ||
![]() |
f538b2273a | ||
![]() |
50e85f91e8 | ||
![]() |
27e7f322a5 | ||
![]() |
dfdc89296b | ||
![]() |
671020af08 | ||
![]() |
b8c3f4c60b | ||
![]() |
511fe643c2 | ||
![]() |
f7601dba13 | ||
![]() |
89cab95b63 | ||
![]() |
cc38627816 | ||
![]() |
6c2c3c13e9 | ||
![]() |
e4cc642a79 | ||
![]() |
c3c3943432 | ||
![]() |
061ed87b89 | ||
![]() |
5c1aca0b88 | ||
![]() |
6384a2abd8 | ||
![]() |
439afc883a | ||
![]() |
07c75feba3 | ||
![]() |
b5aa5e4338 | ||
![]() |
be8443b35b | ||
![]() |
4b10235f67 | ||
![]() |
6ef13f83e2 | ||
![]() |
be2f5816b6 | ||
![]() |
ff213d5fe1 | ||
![]() |
3234118e52 | ||
![]() |
a1ffc40b36 | ||
![]() |
8fe5c718b4 | ||
![]() |
38f14c4174 | ||
![]() |
eb683c8c52 | ||
![]() |
21799be1ca | ||
![]() |
5cfc3ce02e | ||
![]() |
724f20ed32 | ||
![]() |
c61f016fa4 | ||
![]() |
ea7e40bae1 | ||
![]() |
974f83ec4b | ||
![]() |
400ca2d035 | ||
![]() |
e409fb47f2 | ||
![]() |
0499f30f59 | ||
![]() |
ae74922d14 | ||
![]() |
3349a8b49b | ||
![]() |
b4ef72423e | ||
![]() |
f4b67cde8a | ||
![]() |
0a643be39e | ||
![]() |
6c8e205fc0 | ||
![]() |
7901006753 | ||
![]() |
9bfa713421 | ||
![]() |
b6fc3ad8e7 | ||
![]() |
e0909a31c7 | ||
![]() |
d6bffdf577 | ||
![]() |
d1190df10b | ||
![]() |
bf38f39c3f | ||
![]() |
6add103827 | ||
![]() |
62d1d69ba9 | ||
![]() |
7642075fc3 | ||
![]() |
ca91dc594b | ||
![]() |
26cb83b8c0 | ||
![]() |
2392ddb76b | ||
![]() |
6de77141a4 | ||
![]() |
6f6c2e1c5c | ||
![]() |
48cad94d7e | ||
![]() |
90665aeec9 | ||
![]() |
845953cc67 | ||
![]() |
c3c2eb71e1 | ||
![]() |
28a6a4a15b | ||
![]() |
ccb37f673a | ||
![]() |
c5efbc45a1 | ||
![]() |
6a0d3c3517 | ||
![]() |
2fbbac04bb | ||
![]() |
04c81a04c7 | ||
![]() |
120fcc58b6 | ||
![]() |
2f15cb2126 | ||
![]() |
8af156d976 | ||
![]() |
70b5015162 | ||
![]() |
3fad3854d6 | ||
![]() |
38d7145da2 | ||
![]() |
6e8876be39 | ||
![]() |
0bb2924670 | ||
![]() |
2f623daa45 | ||
![]() |
ebbaba9001 | ||
![]() |
5f35b07102 | ||
![]() |
59188bf29d | ||
![]() |
9c4bf0ac4a | ||
![]() |
f2901375ce | ||
![]() |
f65e79477f | ||
![]() |
3094422b33 | ||
![]() |
31fd0cbc1c | ||
![]() |
2b427f774a | ||
![]() |
85444176b2 | ||
![]() |
52b48997eb | ||
![]() |
808aab8496 | ||
![]() |
0742f9fc96 | ||
![]() |
58a9c84d6b | ||
![]() |
c217186bea | ||
![]() |
781308507d | ||
![]() |
2eb6cb0dfd | ||
![]() |
95c5c11d0b | ||
![]() |
b6a09502c6 | ||
![]() |
1962135418 | ||
![]() |
d79be051dd | ||
![]() |
3fe8d604a4 | ||
![]() |
194bc7a7e1 | ||
![]() |
fec4283022 | ||
![]() |
17af712b7c | ||
![]() |
712ded1f2f | ||
![]() |
c67e304593 | ||
![]() |
8c80475fcc | ||
![]() |
3e18bb914c | ||
![]() |
4434649c2f | ||
![]() |
c6c94eeabc | ||
![]() |
2c201ab9ad | ||
![]() |
e5b10079cf | ||
![]() |
854d46f833 | ||
![]() |
bdfdc506da | ||
![]() |
51a81813b0 | ||
![]() |
8566a684bc | ||
![]() |
28d3c29704 | ||
![]() |
dd5cb64851 | ||
![]() |
b9a64ec93b | ||
![]() |
c9067dfe4f | ||
![]() |
1592d7df24 | ||
![]() |
9acd5e04d5 | ||
![]() |
0afcb8a36c | ||
![]() |
89a675d57c | ||
![]() |
b892a1429d | ||
![]() |
e90d66f93e | ||
![]() |
bfef2c7b05 | ||
![]() |
74c01654c7 | ||
![]() |
dc98d44582 | ||
![]() |
defa1a1dc7 | ||
![]() |
c89c084146 | ||
![]() |
13fff52f6b | ||
![]() |
7bf9d9dc0a | ||
![]() |
14079ce698 | ||
![]() |
05d9a0ff03 | ||
![]() |
b9d0b1f064 | ||
![]() |
ed80874f72 | ||
![]() |
23e942ae4e | ||
![]() |
c077300e19 | ||
![]() |
11f12d386b | ||
![]() |
4d76d85d7b | ||
![]() |
981ea87b05 | ||
![]() |
65252ebf67 | ||
![]() |
5bd0a5a585 | ||
![]() |
9fbf17b90e | ||
![]() |
96bfce7000 | ||
![]() |
d68c4d8106 | ||
![]() |
9fb988b6e8 | ||
![]() |
016d417253 | ||
![]() |
de58b07659 | ||
![]() |
6ceaae30f5 | ||
![]() |
5075a1d9e4 | ||
![]() |
3587e20e70 | ||
![]() |
963bba1fc3 | ||
![]() |
571a589cfa | ||
![]() |
3c2d5599b9 | ||
![]() |
3b05f25221 | ||
![]() |
e05e671871 | ||
![]() |
2d5b492550 | ||
![]() |
ad8774d6fa | ||
![]() |
297aad6ebd | ||
![]() |
8f69983c58 | ||
![]() |
b779078c60 | ||
![]() |
b936048b0b | ||
![]() |
7e0dc5376f | ||
![]() |
6d1af63842 | ||
![]() |
6c4a744a1b | ||
![]() |
f7722ef9ca | ||
![]() |
76cb2b1160 | ||
![]() |
5117dff6a2 | ||
![]() |
e5d34fd084 | ||
![]() |
bfb2f8e0a8 | ||
![]() |
d8f3c28a37 | ||
![]() |
eef0cb2f90 | ||
![]() |
63e4ad13c8 | ||
![]() |
f9e67338a4 | ||
![]() |
5f9f62fb8c | ||
![]() |
147bc6ec43 | ||
![]() |
bea62add55 | ||
![]() |
d511e52c1f | ||
![]() |
789e199450 | ||
![]() |
a747c1c3de | ||
![]() |
a521fc2b6c | ||
![]() |
8651eef298 | ||
![]() |
f4799481cd | ||
![]() |
675b153525 | ||
![]() |
5df2424651 | ||
![]() |
f9c53ca71a | ||
![]() |
0d189582c1 | ||
![]() |
c6b667623a | ||
![]() |
d96380e654 | ||
![]() |
7e80686f1e | ||
![]() |
e967471c4f | ||
![]() |
eca3f9d935 | ||
![]() |
44c62117ee | ||
![]() |
f235822fba | ||
![]() |
5d5ff807c6 | ||
![]() |
1c7c5daad4 | ||
![]() |
aeab11da88 | ||
![]() |
b53934805a | ||
![]() |
6bfbdc30ca | ||
![]() |
02eb949479 | ||
![]() |
3a0f11eb27 | ||
![]() |
c2013f0b7c | ||
![]() |
19d7cbc858 | ||
![]() |
73f903906e | ||
![]() |
d235612e48 | ||
![]() |
6ad3328b83 | ||
![]() |
13d736d6ab | ||
![]() |
0b810bdff3 | ||
![]() |
3f19117124 | ||
![]() |
fe3e5cba69 | ||
![]() |
6ba383cc5f | ||
![]() |
d44ca60cb0 | ||
![]() |
42b0e95ae6 | ||
![]() |
b6316c5024 | ||
![]() |
fc4ef6934d | ||
![]() |
0dff26b550 | ||
![]() |
76d8558b1a | ||
![]() |
8123dd2649 | ||
![]() |
1ec648932f | ||
![]() |
427f7b3a39 | ||
![]() |
c670240503 | ||
![]() |
59d6b0faab | ||
![]() |
6f55aa993a | ||
![]() |
e34764502f | ||
![]() |
8b0efc2124 | ||
![]() |
2f936420dd | ||
![]() |
6698af9c3d | ||
![]() |
61da615308 | ||
![]() |
ece14278ef | ||
![]() |
567bfc97ac | ||
![]() |
7aff643031 | ||
![]() |
7fe4097792 | ||
![]() |
652f4492d3 | ||
![]() |
910c466cfe | ||
![]() |
19dbcf3814 | ||
![]() |
c89012566c | ||
![]() |
9dfebb9d67 | ||
![]() |
2a31fbf9a6 | ||
![]() |
cce2420bb2 | ||
![]() |
b272c035ba | ||
![]() |
5f1f370463 | ||
![]() |
49a2fbea0c | ||
![]() |
4b1430fd09 | ||
![]() |
f1c6fa3895 | ||
![]() |
fe1a055391 | ||
![]() |
c18b51e68e | ||
![]() |
dc68418660 | ||
![]() |
499d7c8ce6 |
@@ -1,24 +0,0 @@
|
|||||||
|
|
||||||
-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)\"
|
|
2
.github/workflows/cli.yml
vendored
2
.github/workflows/cli.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
container: qmkfm/base_container
|
container: qmkfm/base_container
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -24,6 +24,7 @@ quantum/version.h
|
|||||||
.idea/
|
.idea/
|
||||||
CMakeLists.txt
|
CMakeLists.txt
|
||||||
cmake-build-debug
|
cmake-build-debug
|
||||||
|
.clang_complete
|
||||||
doxygen/
|
doxygen/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/util/wsl_downloaded
|
/util/wsl_downloaded
|
||||||
@@ -47,7 +48,6 @@ doxygen/
|
|||||||
*.iml
|
*.iml
|
||||||
.browse.VC.db*
|
.browse.VC.db*
|
||||||
*.stackdump
|
*.stackdump
|
||||||
util/Win_Check_Output.txt
|
|
||||||
# Let these ones be user specific, since we have so many different configurations
|
# Let these ones be user specific, since we have so many different configurations
|
||||||
.vscode/c_cpp_properties.json
|
.vscode/c_cpp_properties.json
|
||||||
.vscode/launch.json
|
.vscode/launch.json
|
||||||
|
19
.vscode/settings.json
vendored
19
.vscode/settings.json
vendored
@@ -9,12 +9,17 @@
|
|||||||
"**/*.bin": true
|
"**/*.bin": true
|
||||||
},
|
},
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
"*.h": "c",
|
"*.h": "c",
|
||||||
"*.c": "c",
|
"*.c": "c",
|
||||||
"*.cpp": "cpp",
|
"*.inc": "c",
|
||||||
"*.hpp": "cpp",
|
"*.cpp": "cpp",
|
||||||
"xstddef": "c",
|
"*.hpp": "cpp",
|
||||||
"type_traits": "c",
|
"xstddef": "c",
|
||||||
"utility": "c"
|
"type_traits": "c",
|
||||||
|
"utility": "c"
|
||||||
|
},
|
||||||
|
"[markdown]": {
|
||||||
|
"editor.trimAutoWhitespace": false,
|
||||||
|
"files.trimTrailingWhitespace": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
7
Makefile
7
Makefile
@@ -29,6 +29,9 @@ $(info QMK Firmware $(QMK_VERSION))
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# avoid 'Entering|Leaving directory' messages
|
||||||
|
MAKEFLAGS += --no-print-directory
|
||||||
|
|
||||||
ON_ERROR := error_occurred=1
|
ON_ERROR := error_occurred=1
|
||||||
|
|
||||||
BREAK_ON_ERRORS = no
|
BREAK_ON_ERRORS = no
|
||||||
@@ -291,8 +294,8 @@ define PARSE_RULE
|
|||||||
$$(info | QMK's make format recently changed to use folder locations and colons:)
|
$$(info | QMK's make format recently changed to use folder locations and colons:)
|
||||||
$$(info | make project_folder:keymap[:target])
|
$$(info | make project_folder:keymap[:target])
|
||||||
$$(info | Examples:)
|
$$(info | Examples:)
|
||||||
$$(info | make planck/rev4:default:dfu)
|
$$(info | make dz60:default)
|
||||||
$$(info | make planck:default)
|
$$(info | make planck/rev6:default:flash)
|
||||||
$$(info |)
|
$$(info |)
|
||||||
endif
|
endif
|
||||||
endef
|
endef
|
||||||
|
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@@ -89,7 +89,7 @@ Vagrant.configure(2) do |config|
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
make planck/rev4:default:dfu
|
make planck/rev4:default:dfu
|
||||||
make planck:default
|
make planck/rev4:default
|
||||||
|
|
||||||
EOT
|
EOT
|
||||||
end
|
end
|
||||||
|
File diff suppressed because one or more lines are too long
67
bin/qmk
67
bin/qmk
@@ -2,52 +2,61 @@
|
|||||||
"""CLI wrapper for running QMK commands.
|
"""CLI wrapper for running QMK commands.
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
import subprocess
|
|
||||||
import sys
|
import sys
|
||||||
from importlib.util import find_spec
|
from importlib.util import find_spec
|
||||||
from time import strftime
|
from pathlib import Path
|
||||||
|
|
||||||
# Add the QMK python libs to our path
|
# Add the QMK python libs to our path
|
||||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
script_dir = Path(os.path.realpath(__file__)).parent
|
||||||
qmk_dir = os.path.abspath(os.path.join(script_dir, '..'))
|
qmk_dir = script_dir.parent
|
||||||
python_lib_dir = os.path.abspath(os.path.join(qmk_dir, 'lib', 'python'))
|
python_lib_dir = Path(qmk_dir / 'lib' / 'python').resolve()
|
||||||
sys.path.append(python_lib_dir)
|
sys.path.append(str(python_lib_dir))
|
||||||
|
|
||||||
# Make sure our modules have been setup
|
|
||||||
with open(os.path.join(qmk_dir, 'requirements.txt'), 'r') as fd:
|
|
||||||
for line in fd.readlines():
|
|
||||||
line = line.strip().replace('<', '=').replace('>', '=')
|
|
||||||
|
|
||||||
if line[0] == '#':
|
def _check_modules(requirements):
|
||||||
continue
|
""" Check if the modules in the given requirements.txt are available.
|
||||||
|
"""
|
||||||
|
with Path(qmk_dir / requirements).open() as fd:
|
||||||
|
for line in fd.readlines():
|
||||||
|
line = line.strip().replace('<', '=').replace('>', '=')
|
||||||
|
|
||||||
if '#' in line:
|
if len(line) == 0 or line[0] == '#' or line.startswith('-r'):
|
||||||
line = line.split('#')[0]
|
continue
|
||||||
|
|
||||||
module = line.split('=')[0] if '=' in line else line
|
if '#' in line:
|
||||||
|
line = line.split('#')[0]
|
||||||
|
|
||||||
|
module = dict()
|
||||||
|
module['name'] = module['import'] = line.split('=')[0] if '=' in line else line
|
||||||
|
|
||||||
if module in ['pep8-naming']:
|
|
||||||
# Not every module is importable by its own name.
|
# Not every module is importable by its own name.
|
||||||
continue
|
if module['name'] == "pep8-naming":
|
||||||
|
module['import'] = "pep8ext_naming"
|
||||||
|
|
||||||
if not find_spec(module):
|
if not find_spec(module['import']):
|
||||||
print('Could not find module %s!' % module)
|
print('Could not find module %s!' % module['name'])
|
||||||
print('Please run `pip3 install -r requirements.txt` to install the python dependencies.')
|
print('Please run `python3 -m pip install -r %s` to install required python dependencies.' % (qmk_dir / requirements,))
|
||||||
exit(255)
|
if developer:
|
||||||
|
print('You can also turn off developer mode: qmk config user.developer=None')
|
||||||
|
print()
|
||||||
|
exit(255)
|
||||||
|
|
||||||
# Figure out our version
|
|
||||||
# TODO(skullydazed/anyone): Find a method that doesn't involve git. This is slow in docker and on windows.
|
|
||||||
command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags']
|
|
||||||
result = subprocess.run(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
|
||||||
|
|
||||||
if result.returncode == 0:
|
developer = False
|
||||||
os.environ['QMK_VERSION'] = result.stdout.strip()
|
# Make sure our modules have been setup
|
||||||
else:
|
_check_modules('requirements.txt')
|
||||||
os.environ['QMK_VERSION'] = 'nogit-' + strftime('%Y-%m-%d-%H:%M:%S') + '-dirty'
|
|
||||||
|
|
||||||
# Setup the CLI
|
# Setup the CLI
|
||||||
import milc # noqa
|
import milc # noqa
|
||||||
|
|
||||||
|
# For developers additional modules are needed
|
||||||
|
if milc.cli.config.user.developer:
|
||||||
|
# Do not run the check for 'config',
|
||||||
|
# so users can turn off developer mode
|
||||||
|
if len(sys.argv) == 1 or (len(sys.argv) > 1 and 'config' != sys.argv[1]):
|
||||||
|
developer = True
|
||||||
|
_check_modules('requirements-dev.txt')
|
||||||
|
|
||||||
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
||||||
|
|
||||||
|
|
||||||
|
@@ -21,6 +21,11 @@ else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
|
|||||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Load the keymap-level rules.mk if exists
|
||||||
|
ifneq ("$(wildcard $(KEYMAP_PATH))", "")
|
||||||
|
-include $(KEYMAP_PATH)/rules.mk
|
||||||
|
endif
|
||||||
|
|
||||||
# Generate the keymap.c
|
# Generate the keymap.c
|
||||||
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
|
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
|
||||||
bin/qmk json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
|
bin/qmk json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
|
||||||
|
@@ -231,44 +231,19 @@ endif
|
|||||||
# We can assume a ChibiOS target When MCU_FAMILY is defined since it's
|
# We can assume a ChibiOS target When MCU_FAMILY is defined since it's
|
||||||
# not used for LUFA
|
# not used for LUFA
|
||||||
ifdef MCU_FAMILY
|
ifdef MCU_FAMILY
|
||||||
FIRMWARE_FORMAT?=bin
|
|
||||||
PLATFORM=CHIBIOS
|
PLATFORM=CHIBIOS
|
||||||
|
PLATFORM_KEY=chibios
|
||||||
|
FIRMWARE_FORMAT?=bin
|
||||||
else ifdef ARM_ATSAM
|
else ifdef ARM_ATSAM
|
||||||
PLATFORM=ARM_ATSAM
|
PLATFORM=ARM_ATSAM
|
||||||
|
PLATFORM_KEY=arm_atsam
|
||||||
FIRMWARE_FORMAT=bin
|
FIRMWARE_FORMAT=bin
|
||||||
else
|
else
|
||||||
PLATFORM=AVR
|
PLATFORM=AVR
|
||||||
|
PLATFORM_KEY=avr
|
||||||
FIRMWARE_FORMAT?=hex
|
FIRMWARE_FORMAT?=hex
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PLATFORM),CHIBIOS)
|
|
||||||
include $(TMK_PATH)/chibios.mk
|
|
||||||
OPT_OS = chibios
|
|
||||||
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
|
|
||||||
else ifneq ("$(wildcard $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h)","")
|
|
||||||
OPT_DEFS += -include $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Find all of the config.h files and add them to our CONFIG_H define.
|
# Find all of the config.h files and add them to our CONFIG_H define.
|
||||||
CONFIG_H :=
|
CONFIG_H :=
|
||||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/config.h)","")
|
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/config.h)","")
|
||||||
@@ -304,11 +279,6 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_5)/post_config.h)","")
|
|||||||
POST_CONFIG_H += $(KEYBOARD_PATH_5)/post_config.h
|
POST_CONFIG_H += $(KEYBOARD_PATH_5)/post_config.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Save the defines and includes here, so we don't include any keymap specific ones
|
|
||||||
PROJECT_DEFS := $(OPT_DEFS)
|
|
||||||
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS)
|
|
||||||
PROJECT_CONFIG := $(CONFIG_H)
|
|
||||||
|
|
||||||
# Userspace setup and definitions
|
# Userspace setup and definitions
|
||||||
ifeq ("$(USER_NAME)","")
|
ifeq ("$(USER_NAME)","")
|
||||||
USER_NAME := $(KEYMAP)
|
USER_NAME := $(KEYMAP)
|
||||||
@@ -354,23 +324,17 @@ SRC += $(TMK_COMMON_SRC)
|
|||||||
OPT_DEFS += $(TMK_COMMON_DEFS)
|
OPT_DEFS += $(TMK_COMMON_DEFS)
|
||||||
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
|
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
|
||||||
|
|
||||||
ifeq ($(PLATFORM),AVR)
|
include $(TMK_PATH)/$(PLATFORM_KEY).mk
|
||||||
ifeq ($(strip $(PROTOCOL)), VUSB)
|
ifneq ($(strip $(PROTOCOL)),)
|
||||||
include $(TMK_PATH)/protocol/vusb.mk
|
include $(TMK_PATH)/protocol/$(strip $(shell echo $(PROTOCOL) | tr '[:upper:]' '[:lower:]')).mk
|
||||||
else
|
else
|
||||||
include $(TMK_PATH)/protocol/lufa.mk
|
include $(TMK_PATH)/protocol/$(PLATFORM_KEY).mk
|
||||||
endif
|
|
||||||
include $(TMK_PATH)/avr.mk
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PLATFORM),ARM_ATSAM)
|
# TODO: remove this bodge?
|
||||||
include $(TMK_PATH)/arm_atsam.mk
|
PROJECT_DEFS := $(OPT_DEFS)
|
||||||
include $(TMK_PATH)/protocol/arm_atsam.mk
|
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS)
|
||||||
endif
|
PROJECT_CONFIG := $(CONFIG_H)
|
||||||
|
|
||||||
ifeq ($(PLATFORM),CHIBIOS)
|
|
||||||
include $(TMK_PATH)/protocol/chibios.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||||
VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer
|
VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer
|
||||||
|
@@ -41,6 +41,7 @@ all: elf
|
|||||||
|
|
||||||
VPATH += $(COMMON_VPATH)
|
VPATH += $(COMMON_VPATH)
|
||||||
PLATFORM:=TEST
|
PLATFORM:=TEST
|
||||||
|
PLATFORM_KEY:=test
|
||||||
|
|
||||||
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
||||||
include tests/$(TEST)/rules.mk
|
include tests/$(TEST)/rules.mk
|
||||||
|
@@ -13,52 +13,42 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
SERIAL_DIR := $(QUANTUM_DIR)/serial_link
|
|
||||||
SERIAL_PATH := $(QUANTUM_PATH)/serial_link
|
SERIAL_PATH := $(QUANTUM_PATH)/serial_link
|
||||||
SERIAL_SRC := $(wildcard $(SERIAL_PATH)/protocol/*.c)
|
|
||||||
SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c)
|
QUANTUM_SRC += \
|
||||||
SERIAL_DEFS += -DSERIAL_LINK_ENABLE
|
$(QUANTUM_DIR)/quantum.c \
|
||||||
COMMON_VPATH += $(SERIAL_PATH)
|
$(QUANTUM_DIR)/keymap_common.c \
|
||||||
|
$(QUANTUM_DIR)/keycode_config.c
|
||||||
|
|
||||||
ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
|
ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
|
||||||
OPT_DEFS += -DAPI_SYSEX_ENABLE
|
OPT_DEFS += -DAPI_SYSEX_ENABLE
|
||||||
SRC += $(QUANTUM_DIR)/api/api_sysex.c
|
|
||||||
OPT_DEFS += -DAPI_ENABLE
|
OPT_DEFS += -DAPI_ENABLE
|
||||||
SRC += $(QUANTUM_DIR)/api.c
|
|
||||||
MIDI_ENABLE=yes
|
MIDI_ENABLE=yes
|
||||||
|
SRC += $(QUANTUM_DIR)/api/api_sysex.c
|
||||||
|
SRC += $(QUANTUM_DIR)/api.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
MUSIC_ENABLE := 0
|
|
||||||
|
|
||||||
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||||
OPT_DEFS += -DAUDIO_ENABLE
|
OPT_DEFS += -DAUDIO_ENABLE
|
||||||
MUSIC_ENABLE := 1
|
MUSIC_ENABLE = yes
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
|
||||||
ifeq ($(PLATFORM),AVR)
|
SRC += $(QUANTUM_DIR)/audio/audio_$(PLATFORM_KEY).c
|
||||||
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/voices.c
|
||||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
||||||
OPT_DEFS += -DMIDI_ENABLE
|
OPT_DEFS += -DMIDI_ENABLE
|
||||||
MUSIC_ENABLE := 1
|
MUSIC_ENABLE = yes
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(MUSIC_ENABLE), 1)
|
MUSIC_ENABLE ?= no
|
||||||
|
ifeq ($(MUSIC_ENABLE), yes)
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(COMBO_ENABLE)), yes)
|
|
||||||
OPT_DEFS += -DCOMBO_ENABLE
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(STENO_ENABLE)), yes)
|
ifeq ($(strip $(STENO_ENABLE)), yes)
|
||||||
OPT_DEFS += -DSTENO_ENABLE
|
OPT_DEFS += -DSTENO_ENABLE
|
||||||
VIRTSER_ENABLE ?= yes
|
VIRTSER_ENABLE ?= yes
|
||||||
@@ -80,29 +70,7 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
|
|||||||
SRC += $(QUANTUM_DIR)/pointing_device.c
|
SRC += $(QUANTUM_DIR)/pointing_device.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(UCIS_ENABLE)), yes)
|
VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi
|
||||||
OPT_DEFS += -DUCIS_ENABLE
|
|
||||||
UNICODE_COMMON := yes
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
|
|
||||||
OPT_DEFS += -DUNICODEMAP_ENABLE
|
|
||||||
UNICODE_COMMON := yes
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(UNICODE_ENABLE)), yes)
|
|
||||||
OPT_DEFS += -DUNICODE_ENABLE
|
|
||||||
UNICODE_COMMON := yes
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(UNICODE_COMMON)), yes)
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c
|
|
||||||
EEPROM_DRIVER ?= vendor
|
EEPROM_DRIVER ?= vendor
|
||||||
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
|
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
|
||||||
$(error EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver)
|
$(error EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver)
|
||||||
@@ -117,6 +85,11 @@ else
|
|||||||
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
||||||
QUANTUM_LIB_SRC += i2c_master.c
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
SRC += eeprom_driver.c eeprom_i2c.c
|
SRC += eeprom_driver.c eeprom_i2c.c
|
||||||
|
else ifeq ($(strip $(EEPROM_DRIVER)), spi)
|
||||||
|
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_SPI
|
||||||
|
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
||||||
|
QUANTUM_LIB_SRC += spi_master.c
|
||||||
|
SRC += eeprom_driver.c eeprom_spi.c
|
||||||
else ifeq ($(strip $(EEPROM_DRIVER)), transient)
|
else ifeq ($(strip $(EEPROM_DRIVER)), transient)
|
||||||
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT
|
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
||||||
@@ -249,31 +222,18 @@ ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
|
|||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
|
||||||
OPT_DEFS += -DTAP_DANCE_ENABLE
|
|
||||||
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)
|
ifeq ($(strip $(PRINTING_ENABLE)), yes)
|
||||||
OPT_DEFS += -DPRINTING_ENABLE
|
OPT_DEFS += -DPRINTING_ENABLE
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
|
||||||
SRC += $(TMK_DIR)/protocol/serial_uart.c
|
SRC += $(TMK_DIR)/protocol/serial_uart.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
|
|
||||||
OPT_DEFS += -DAUTO_SHIFT_ENABLE
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c
|
|
||||||
ifeq ($(strip $(AUTO_SHIFT_MODIFIERS)), yes)
|
|
||||||
OPT_DEFS += -DAUTO_SHIFT_MODIFIERS
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
|
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
|
||||||
|
SERIAL_SRC := $(wildcard $(SERIAL_PATH)/protocol/*.c)
|
||||||
|
SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c)
|
||||||
|
SERIAL_DEFS += -DSERIAL_LINK_ENABLE
|
||||||
|
COMMON_VPATH += $(SERIAL_PATH)
|
||||||
|
|
||||||
SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
|
SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
|
||||||
OPT_DEFS += $(SERIAL_DEFS)
|
OPT_DEFS += $(SERIAL_DEFS)
|
||||||
VAPTH += $(SERIAL_PATH)
|
VAPTH += $(SERIAL_PATH)
|
||||||
@@ -315,11 +275,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
|||||||
else
|
else
|
||||||
SRC += $(QUANTUM_DIR)/backlight/backlight_driver_common.c
|
SRC += $(QUANTUM_DIR)/backlight/backlight_driver_common.c
|
||||||
ifeq ($(strip $(BACKLIGHT_DRIVER)), pwm)
|
ifeq ($(strip $(BACKLIGHT_DRIVER)), pwm)
|
||||||
ifeq ($(PLATFORM),AVR)
|
SRC += $(QUANTUM_DIR)/backlight/backlight_$(PLATFORM_KEY).c
|
||||||
SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c
|
|
||||||
else
|
|
||||||
SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
SRC += $(QUANTUM_DIR)/backlight/backlight_$(strip $(BACKLIGHT_DRIVER)).c
|
SRC += $(QUANTUM_DIR)/backlight/backlight_$(strip $(BACKLIGHT_DRIVER)).c
|
||||||
endif
|
endif
|
||||||
@@ -371,34 +327,16 @@ ifeq ($(strip $(USB_HID_ENABLE)), yes)
|
|||||||
include $(TMK_DIR)/protocol/usb_hid.mk
|
include $(TMK_DIR)/protocol/usb_hid.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(WPM_ENABLE)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/wpm.c
|
||||||
|
OPT_DEFS += -DWPM_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(ENCODER_ENABLE)), yes)
|
ifeq ($(strip $(ENCODER_ENABLE)), yes)
|
||||||
SRC += $(QUANTUM_DIR)/encoder.c
|
SRC += $(QUANTUM_DIR)/encoder.c
|
||||||
OPT_DEFS += -DENCODER_ENABLE
|
OPT_DEFS += -DENCODER_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
HAPTIC_ENABLE ?= no
|
|
||||||
ifneq ($(strip $(HAPTIC_ENABLE)),no)
|
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
|
||||||
SRC += haptic.c
|
|
||||||
OPT_DEFS += -DHAPTIC_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), )
|
|
||||||
SRC += DRV2605L.c
|
|
||||||
QUANTUM_LIB_SRC += i2c_master.c
|
|
||||||
OPT_DEFS += -DDRV2605L
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), )
|
|
||||||
SRC += solenoid.c
|
|
||||||
OPT_DEFS += -DSOLENOID_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
|
||||||
SRC += drivers/avr/hd44780.c
|
|
||||||
OPT_DEFS += -DHD44780_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(VELOCIKEY_ENABLE)), yes)
|
ifeq ($(strip $(VELOCIKEY_ENABLE)), yes)
|
||||||
OPT_DEFS += -DVELOCIKEY_ENABLE
|
OPT_DEFS += -DVELOCIKEY_ENABLE
|
||||||
SRC += $(QUANTUM_DIR)/velocikey.c
|
SRC += $(QUANTUM_DIR)/velocikey.c
|
||||||
@@ -417,26 +355,11 @@ ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes)
|
|||||||
SRC += $(QUANTUM_DIR)/dynamic_keymap.c
|
SRC += $(QUANTUM_DIR)/dynamic_keymap.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(LEADER_ENABLE)), yes)
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_leader.c
|
|
||||||
OPT_DEFS += -DLEADER_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
|
ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
|
||||||
SRC += $(QUANTUM_DIR)/dip_switch.c
|
OPT_DEFS += -DDIP_SWITCH_ENABLE
|
||||||
OPT_DEFS += -DDIP_SWITCH_ENABLE
|
SRC += $(QUANTUM_DIR)/dip_switch.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(DRIVER_PATH)/qwiic/qwiic.mk
|
|
||||||
|
|
||||||
QUANTUM_SRC:= \
|
|
||||||
$(QUANTUM_DIR)/quantum.c \
|
|
||||||
$(QUANTUM_DIR)/keymap_common.c \
|
|
||||||
$(QUANTUM_DIR)/keycode_config.c
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VALID_CUSTOM_MATRIX_TYPES:= yes lite no
|
VALID_CUSTOM_MATRIX_TYPES:= yes lite no
|
||||||
|
|
||||||
CUSTOM_MATRIX ?= no
|
CUSTOM_MATRIX ?= no
|
||||||
@@ -494,6 +417,29 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
|||||||
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
HAPTIC_ENABLE ?= no
|
||||||
|
ifneq ($(strip $(HAPTIC_ENABLE)),no)
|
||||||
|
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
||||||
|
SRC += haptic.c
|
||||||
|
OPT_DEFS += -DHAPTIC_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), )
|
||||||
|
SRC += DRV2605L.c
|
||||||
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
|
OPT_DEFS += -DDRV2605L
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), )
|
||||||
|
SRC += solenoid.c
|
||||||
|
OPT_DEFS += -DSOLENOID_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
||||||
|
SRC += drivers/avr/hd44780.c
|
||||||
|
OPT_DEFS += -DHD44780_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
|
ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
|
||||||
OPT_DEFS += -DOLED_DRIVER_ENABLE
|
OPT_DEFS += -DOLED_DRIVER_ENABLE
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/oled
|
COMMON_VPATH += $(DRIVER_PATH)/oled
|
||||||
@@ -501,10 +447,34 @@ ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
|
|||||||
SRC += oled_driver.c
|
SRC += oled_driver.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
include $(DRIVER_PATH)/qwiic/qwiic.mk
|
||||||
|
|
||||||
|
ifeq ($(strip $(UCIS_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DUCIS_ENABLE
|
||||||
|
UNICODE_COMMON := yes
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DUNICODEMAP_ENABLE
|
||||||
|
UNICODE_COMMON := yes
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(UNICODE_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DUNICODE_ENABLE
|
||||||
|
UNICODE_COMMON := yes
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(UNICODE_COMMON)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
|
||||||
|
endif
|
||||||
|
|
||||||
SPACE_CADET_ENABLE ?= yes
|
SPACE_CADET_ENABLE ?= yes
|
||||||
ifeq ($(strip $(SPACE_CADET_ENABLE)), yes)
|
ifeq ($(strip $(SPACE_CADET_ENABLE)), yes)
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_space_cadet.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_space_cadet.c
|
||||||
OPT_DEFS += -DSPACE_CADET_ENABLE
|
OPT_DEFS += -DSPACE_CADET_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
MAGIC_ENABLE ?= yes
|
MAGIC_ENABLE ?= yes
|
||||||
@@ -523,3 +493,31 @@ ifeq ($(strip $(DYNAMIC_MACRO_ENABLE)), yes)
|
|||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_dynamic_macro.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_dynamic_macro.c
|
||||||
OPT_DEFS += -DDYNAMIC_MACRO_ENABLE
|
OPT_DEFS += -DDYNAMIC_MACRO_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(COMBO_ENABLE)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
|
||||||
|
OPT_DEFS += -DCOMBO_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
|
||||||
|
OPT_DEFS += -DTAP_DANCE_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(KEY_LOCK_ENABLE)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_key_lock.c
|
||||||
|
OPT_DEFS += -DKEY_LOCK_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(LEADER_ENABLE)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_leader.c
|
||||||
|
OPT_DEFS += -DLEADER_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c
|
||||||
|
OPT_DEFS += -DAUTO_SHIFT_ENABLE
|
||||||
|
ifeq ($(strip $(AUTO_SHIFT_MODIFIERS)), yes)
|
||||||
|
OPT_DEFS += -DAUTO_SHIFT_MODIFIERS
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
* [Testing and Debugging](newbs_testing_debugging.md)
|
* [Testing and Debugging](newbs_testing_debugging.md)
|
||||||
* [Getting Help/Support](support.md)
|
* [Getting Help/Support](support.md)
|
||||||
* [Other Resources](newbs_learn_more_resources.md)
|
* [Other Resources](newbs_learn_more_resources.md)
|
||||||
|
* [Syllabus](syllabus.md)
|
||||||
|
|
||||||
* FAQs
|
* FAQs
|
||||||
* [General FAQ](faq_general.md)
|
* [General FAQ](faq_general.md)
|
||||||
@@ -18,7 +19,6 @@
|
|||||||
* [Overview](newbs_building_firmware_configurator.md)
|
* [Overview](newbs_building_firmware_configurator.md)
|
||||||
* [Step by Step](configurator_step_by_step.md)
|
* [Step by Step](configurator_step_by_step.md)
|
||||||
* [Troubleshooting](configurator_troubleshooting.md)
|
* [Troubleshooting](configurator_troubleshooting.md)
|
||||||
* [Problems and Bugs](configurator_problems.md)
|
|
||||||
* QMK API
|
* QMK API
|
||||||
* [Overview](api_overview.md)
|
* [Overview](api_overview.md)
|
||||||
* [API Documentation](api_docs.md)
|
* [API Documentation](api_docs.md)
|
||||||
@@ -34,7 +34,9 @@
|
|||||||
* [Customizing Functionality](custom_quantum_functions.md)
|
* [Customizing Functionality](custom_quantum_functions.md)
|
||||||
* [Driver Installation with Zadig](driver_installation_zadig.md)
|
* [Driver Installation with Zadig](driver_installation_zadig.md)
|
||||||
* [Keymap Overview](keymap.md)
|
* [Keymap Overview](keymap.md)
|
||||||
* [Vagrant Guide](getting_started_vagrant.md)
|
* Development Environments
|
||||||
|
* [Docker Guide](getting_started_docker.md)
|
||||||
|
* [Vagrant Guide](getting_started_vagrant.md)
|
||||||
* Flashing
|
* Flashing
|
||||||
* [Flashing](flashing.md)
|
* [Flashing](flashing.md)
|
||||||
* [Flashing ATmega32A (ps2avrgb)](flashing_bootloadhid.md)
|
* [Flashing ATmega32A (ps2avrgb)](flashing_bootloadhid.md)
|
||||||
@@ -53,7 +55,7 @@
|
|||||||
* Simple Keycodes
|
* Simple Keycodes
|
||||||
* [Full List](keycodes.md)
|
* [Full List](keycodes.md)
|
||||||
* [Basic Keycodes](keycodes_basic.md)
|
* [Basic Keycodes](keycodes_basic.md)
|
||||||
* [Layer Switching](feature_advanced_keycodes.md)
|
* [Modifier Keys](feature_advanced_keycodes.md)
|
||||||
* [Quantum Keycodes](quantum_keycodes.md)
|
* [Quantum Keycodes](quantum_keycodes.md)
|
||||||
|
|
||||||
* Advanced Keycodes
|
* Advanced Keycodes
|
||||||
@@ -72,14 +74,17 @@
|
|||||||
* [Combos](feature_combo.md)
|
* [Combos](feature_combo.md)
|
||||||
* [Debounce API](feature_debounce_type.md)
|
* [Debounce API](feature_debounce_type.md)
|
||||||
* [Key Lock](feature_key_lock.md)
|
* [Key Lock](feature_key_lock.md)
|
||||||
|
* [Layers](feature_layers.md)
|
||||||
* [One Shot Keys](one_shot_keys.md)
|
* [One Shot Keys](one_shot_keys.md)
|
||||||
* [Pointing Device](feature_pointing_device.md)
|
* [Pointing Device](feature_pointing_device.md)
|
||||||
|
* [Raw HID](feature_rawhid.md)
|
||||||
* [Swap Hands](feature_swap_hands.md)
|
* [Swap Hands](feature_swap_hands.md)
|
||||||
* [Tap Dance](feature_tap_dance.md)
|
* [Tap Dance](feature_tap_dance.md)
|
||||||
* [Tap-Hold Configuration](tap_hold.md)
|
* [Tap-Hold Configuration](tap_hold.md)
|
||||||
* [Terminal](feature_terminal.md)
|
* [Terminal](feature_terminal.md)
|
||||||
* [Unicode](feature_unicode.md)
|
* [Unicode](feature_unicode.md)
|
||||||
* [Userspace](feature_userspace.md)
|
* [Userspace](feature_userspace.md)
|
||||||
|
* [WPM Calculation](feature_wpm.md)
|
||||||
|
|
||||||
* Hardware Features
|
* Hardware Features
|
||||||
* Displays
|
* Displays
|
||||||
@@ -120,21 +125,26 @@
|
|||||||
* [Drivers](hardware_drivers.md)
|
* [Drivers](hardware_drivers.md)
|
||||||
* [ADC Driver](adc_driver.md)
|
* [ADC Driver](adc_driver.md)
|
||||||
* [I2C Driver](i2c_driver.md)
|
* [I2C Driver](i2c_driver.md)
|
||||||
|
* [SPI Driver](spi_driver.md)
|
||||||
* [WS2812 Driver](ws2812_driver.md)
|
* [WS2812 Driver](ws2812_driver.md)
|
||||||
* [EEPROM Driver](eeprom_driver.md)
|
* [EEPROM Driver](eeprom_driver.md)
|
||||||
|
* ['serial' Driver](serial_driver.md)
|
||||||
* [GPIO Controls](internals_gpio_control.md)
|
* [GPIO Controls](internals_gpio_control.md)
|
||||||
* [Keyboard Guidelines](hardware_keyboard_guidelines.md)
|
* [Keyboard Guidelines](hardware_keyboard_guidelines.md)
|
||||||
|
|
||||||
* Python Development
|
* Python Development
|
||||||
* [Coding Conventions](coding_conventions_python.md)
|
* [Coding Conventions](coding_conventions_python.md)
|
||||||
* [QMK CLI Development](cli_development.md)
|
* [QMK CLI Development](cli_development.md)
|
||||||
* [QMK CLI Config](cli_dev_configuration.md)
|
|
||||||
|
|
||||||
* Configurator Development
|
* Configurator Development
|
||||||
* QMK API
|
* QMK API
|
||||||
* [Development Environment](api_development_environment.md)
|
* [Development Environment](api_development_environment.md)
|
||||||
* [Architecture Overview](api_development_overview.md)
|
* [Architecture Overview](api_development_overview.md)
|
||||||
|
|
||||||
|
* Hardware Platform Development
|
||||||
|
* Arm/ChibiOS
|
||||||
|
* [Early initialization](platformdev_chibios_earlyinit.md)
|
||||||
|
|
||||||
* QMK Reference
|
* QMK Reference
|
||||||
* [Contributing to QMK](contributing.md)
|
* [Contributing to QMK](contributing.md)
|
||||||
* [Translating the QMK Docs](translating.md)
|
* [Translating the QMK Docs](translating.md)
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
QMK can leverage the Analog-to-Digital Converter (ADC) on supported MCUs to measure voltages on certain pins. This can be useful for implementing things such as battery level indicators for Bluetooth keyboards, or volume controls using a potentiometer, as opposed to a [rotary encoder](feature_encoders.md).
|
QMK can leverage the Analog-to-Digital Converter (ADC) on supported MCUs to measure voltages on certain pins. This can be useful for implementing things such as battery level indicators for Bluetooth keyboards, or volume controls using a potentiometer, as opposed to a [rotary encoder](feature_encoders.md).
|
||||||
|
|
||||||
This driver currently supports both AVR and a limited selection of ARM devices. On AVR devices, the values returned are 10-bit integers (0-1023) mapped between 0V and VCC (usually 5V or 3.3V). On supported ARM devices, there is more flexibility in control of operation through `#define`s, but by default the values returned are 12-bit integers (0-4095) mapped between 0V and VCC (usually 3.3V).
|
This driver currently supports both AVR and a limited selection of ARM devices. The values returned are 10-bit integers (0-1023) mapped between 0V and VCC (usually 5V or 3.3V for AVR, 3.3V only for ARM), however on ARM there is more flexibility in control of operation through `#define`s if you need more precision.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
@@ -102,7 +102,7 @@ This happens immediately after the previous `future` branch is merged.
|
|||||||
* [ ] Roll up the ChangeLog into one file.
|
* [ ] Roll up the ChangeLog into one file.
|
||||||
* [ ] `git commit -m 'Merge point for <DATE> Breaking Change'`
|
* [ ] `git commit -m 'Merge point for <DATE> Breaking Change'`
|
||||||
* [ ] `git push origin future`
|
* [ ] `git push origin future`
|
||||||
* Github Actions
|
* GitHub Actions
|
||||||
* [ ] Create a PR for `future`
|
* [ ] Create a PR for `future`
|
||||||
* [ ] Make sure travis comes back clean
|
* [ ] Make sure travis comes back clean
|
||||||
* [ ] Merge `future` PR
|
* [ ] Merge `future` PR
|
||||||
|
296
docs/cli.md
296
docs/cli.md
@@ -1,45 +1,34 @@
|
|||||||
# QMK CLI
|
# QMK CLI :id=qmk-cli
|
||||||
|
|
||||||
This page describes how to setup and use the QMK CLI.
|
## Overview :id=overview
|
||||||
|
|
||||||
# Overview
|
|
||||||
|
|
||||||
The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to simplify and streamline tasks such as obtaining and compiling the QMK firmware, creating keymaps, and more.
|
The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to simplify and streamline tasks such as obtaining and compiling the QMK firmware, creating keymaps, and more.
|
||||||
|
|
||||||
* [Global CLI](#global-cli)
|
### Requirements :id=requirements
|
||||||
* [Local CLI](#local-cli)
|
|
||||||
* [CLI Commands](#cli-commands)
|
|
||||||
|
|
||||||
# Requirements
|
QMK requires Python 3.6 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). These are installed automatically when you install the QMK CLI.
|
||||||
|
|
||||||
The CLI requires Python 3.5 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt).
|
### Install Using Homebrew (macOS, some Linux) :id=install-using-homebrew
|
||||||
|
|
||||||
# Global CLI
|
|
||||||
|
|
||||||
QMK provides an installable CLI that can be used to setup your QMK build environment, work with QMK, and which makes working with multiple copies of `qmk_firmware` easier. We recommend installing and updating this periodically.
|
|
||||||
|
|
||||||
## Install Using Homebrew (macOS, some Linux)
|
|
||||||
|
|
||||||
If you have installed [Homebrew](https://brew.sh) you can tap and install QMK:
|
If you have installed [Homebrew](https://brew.sh) you can tap and install QMK:
|
||||||
|
|
||||||
```
|
```
|
||||||
brew tap qmk/qmk
|
brew install qmk/qmk/qmk
|
||||||
brew install qmk
|
|
||||||
export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
|
export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
|
||||||
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
|
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install Using easy_install or pip
|
### Install Using pip :id=install-using-easy_install-or-pip
|
||||||
|
|
||||||
If your system is not listed above you can install QMK manually. First ensure that you have python 3.5 (or later) installed and have installed pip. Then install QMK with this command:
|
If your system is not listed above you can install QMK manually. First ensure that you have Python 3.6 (or later) installed and have installed pip. Then install QMK with this command:
|
||||||
|
|
||||||
```
|
```
|
||||||
pip3 install qmk
|
python3 -m pip install qmk
|
||||||
export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
|
export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
|
||||||
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
|
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
|
||||||
```
|
```
|
||||||
|
|
||||||
## Packaging For Other Operating Systems
|
### Packaging For Other Operating Systems :id=packaging-for-other-operating-systems
|
||||||
|
|
||||||
We are looking for people to create and maintain a `qmk` package for more operating systems. If you would like to create a package for your OS please follow these guidelines:
|
We are looking for people to create and maintain a `qmk` package for more operating systems. If you would like to create a package for your OS please follow these guidelines:
|
||||||
|
|
||||||
@@ -47,268 +36,3 @@ We are looking for people to create and maintain a `qmk` package for more operat
|
|||||||
* Document why in a comment when you do deviate
|
* Document why in a comment when you do deviate
|
||||||
* Install using a virtualenv
|
* Install using a virtualenv
|
||||||
* Instruct the user to set the environment variable `QMK_HOME` to have the firmware source checked out somewhere other than `~/qmk_firmware`.
|
* Instruct the user to set the environment variable `QMK_HOME` to have the firmware source checked out somewhere other than `~/qmk_firmware`.
|
||||||
|
|
||||||
# Local CLI
|
|
||||||
|
|
||||||
If you do not want to use the global CLI there is a local CLI bundled with `qmk_firmware`. You can find it in `qmk_firmware/bin/qmk`. You can run the `qmk` command from any directory and it will always operate on that copy of `qmk_firmware`.
|
|
||||||
|
|
||||||
**Example**:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ ~/qmk_firmware/bin/qmk hello
|
|
||||||
Ψ Hello, World!
|
|
||||||
```
|
|
||||||
|
|
||||||
## Local CLI Limitations
|
|
||||||
|
|
||||||
There are some limitations to the local CLI compared to the global CLI:
|
|
||||||
|
|
||||||
* The local CLI does not support `qmk setup` or `qmk clone`
|
|
||||||
* The local CLI always operates on the same `qmk_firmware` tree, even if you have multiple repositories cloned.
|
|
||||||
* The local CLI does not run in a virtualenv, so it's possible that dependencies will conflict
|
|
||||||
|
|
||||||
# CLI Commands
|
|
||||||
|
|
||||||
## `qmk cformat`
|
|
||||||
|
|
||||||
This command formats C code using clang-format.
|
|
||||||
|
|
||||||
Run it with no arguments to format all core code that has been changed. Default checks `origin/master` with `git diff`, branch can be changed using `-b <branch_name>`
|
|
||||||
|
|
||||||
Run it with `-a` to format all core code, or pass filenames on the command line to run it on specific files.
|
|
||||||
|
|
||||||
**Usage for specified files**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk cformat [file1] [file2] [...] [fileN]
|
|
||||||
```
|
|
||||||
|
|
||||||
**Usage for all core files**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk cformat -a
|
|
||||||
```
|
|
||||||
|
|
||||||
**Usage for only changed files against origin/master**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk cformat
|
|
||||||
```
|
|
||||||
|
|
||||||
**Usage for only changed files against branch_name**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk cformat -b branch_name
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk compile`
|
|
||||||
|
|
||||||
This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm>, compile keymaps in the repo, or compile the keyboard in the current working directory.
|
|
||||||
|
|
||||||
**Usage for Configurator Exports**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk compile <configuratorExport.json>
|
|
||||||
```
|
|
||||||
|
|
||||||
**Usage for Keymaps**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk compile -kb <keyboard_name> -km <keymap_name>
|
|
||||||
```
|
|
||||||
|
|
||||||
**Usage in Keyboard Directory**:
|
|
||||||
|
|
||||||
Must be in keyboard directory with a default keymap, or in keymap directory for keyboard, or supply one with `--keymap <keymap_name>`
|
|
||||||
```
|
|
||||||
qmk compile
|
|
||||||
```
|
|
||||||
|
|
||||||
**Example**:
|
|
||||||
```
|
|
||||||
$ qmk config compile.keymap=default
|
|
||||||
$ cd ~/qmk_firmware/keyboards/planck/rev6
|
|
||||||
$ qmk compile
|
|
||||||
Ψ Compiling keymap with make planck/rev6:default
|
|
||||||
...
|
|
||||||
```
|
|
||||||
or with optional keymap argument
|
|
||||||
|
|
||||||
```
|
|
||||||
$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4
|
|
||||||
$ qmk compile -km 66_iso
|
|
||||||
Ψ Compiling keymap with make clueboard/66/rev4:66_iso
|
|
||||||
...
|
|
||||||
```
|
|
||||||
or in keymap directory
|
|
||||||
|
|
||||||
```
|
|
||||||
$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
|
|
||||||
$ qmk compile
|
|
||||||
Ψ Compiling keymap with make make gh60/satan:colemak
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
**Usage in Layout Directory**:
|
|
||||||
|
|
||||||
Must be under `qmk_firmware/layouts/`, and in a keymap folder.
|
|
||||||
```
|
|
||||||
qmk compile -kb <keyboard_name>
|
|
||||||
```
|
|
||||||
|
|
||||||
**Example**:
|
|
||||||
```
|
|
||||||
$ cd ~/qmk_firmware/layouts/community/60_ansi/mechmerlin-ansi
|
|
||||||
$ qmk compile -kb dz60
|
|
||||||
Ψ Compiling keymap with make dz60:mechmerlin-ansi
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk flash`
|
|
||||||
|
|
||||||
This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default.
|
|
||||||
To specify a different bootloader, use `-bl <bootloader>`. Visit the [Flashing Firmware](flashing.md) guide for more details of the available bootloaders.
|
|
||||||
|
|
||||||
**Usage for Configurator Exports**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk flash <configuratorExport.json> -bl <bootloader>
|
|
||||||
```
|
|
||||||
|
|
||||||
**Usage for Keymaps**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk flash -kb <keyboard_name> -km <keymap_name> -bl <bootloader>
|
|
||||||
```
|
|
||||||
|
|
||||||
**Listing the Bootloaders**
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk flash -b
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk config`
|
|
||||||
|
|
||||||
This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md).
|
|
||||||
|
|
||||||
**Usage**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk docs`
|
|
||||||
|
|
||||||
This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
|
|
||||||
|
|
||||||
**Usage**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk docs [-p PORT]
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk doctor`
|
|
||||||
|
|
||||||
This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
|
|
||||||
|
|
||||||
**Usage**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk doctor [-y] [-n]
|
|
||||||
```
|
|
||||||
|
|
||||||
**Examples**:
|
|
||||||
|
|
||||||
Check your environment for problems and prompt to fix them:
|
|
||||||
|
|
||||||
qmk doctor
|
|
||||||
|
|
||||||
Check your environment and automatically fix any problems found:
|
|
||||||
|
|
||||||
qmk doctor -y
|
|
||||||
|
|
||||||
Check your environment and report problems only:
|
|
||||||
|
|
||||||
qmk doctor -n
|
|
||||||
|
|
||||||
## `qmk json2c`
|
|
||||||
|
|
||||||
Creates a keymap.c from a QMK Configurator export.
|
|
||||||
|
|
||||||
**Usage**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk json2c [-o OUTPUT] filename
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk kle2json`
|
|
||||||
|
|
||||||
This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite.
|
|
||||||
|
|
||||||
**Usage**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk kle2json [-f] <filename>
|
|
||||||
```
|
|
||||||
|
|
||||||
**Examples**:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ qmk kle2json kle.txt
|
|
||||||
☒ File info.json already exists, use -f or --force to overwrite.
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
$ qmk kle2json -f kle.txt -f
|
|
||||||
Ψ Wrote out to info.json
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk list-keyboards`
|
|
||||||
|
|
||||||
This command lists all the keyboards currently defined in `qmk_firmware`
|
|
||||||
|
|
||||||
**Usage**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk list-keyboards
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk list-keymaps`
|
|
||||||
|
|
||||||
This command lists all the keymaps for a specified keyboard (and revision).
|
|
||||||
|
|
||||||
**Usage**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk list-keymaps -kb planck/ez
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk new-keymap`
|
|
||||||
|
|
||||||
This command creates a new keymap based on a keyboard's existing default keymap.
|
|
||||||
|
|
||||||
**Usage**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk pyformat`
|
|
||||||
|
|
||||||
This command formats python code in `qmk_firmware`.
|
|
||||||
|
|
||||||
**Usage**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk pyformat
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk pytest`
|
|
||||||
|
|
||||||
This command runs the python test suite. If you make changes to python code you should ensure this runs successfully.
|
|
||||||
|
|
||||||
**Usage**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk pytest
|
|
||||||
```
|
|
||||||
|
291
docs/cli_commands.md
Normal file
291
docs/cli_commands.md
Normal file
@@ -0,0 +1,291 @@
|
|||||||
|
# QMK CLI Commands
|
||||||
|
|
||||||
|
# User Commands
|
||||||
|
|
||||||
|
## `qmk compile`
|
||||||
|
|
||||||
|
This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm>, compile keymaps in the repo, or compile the keyboard in the current working directory.
|
||||||
|
|
||||||
|
This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory.
|
||||||
|
|
||||||
|
**Usage for Configurator Exports**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk compile <configuratorExport.json>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage for Keymaps**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk compile -kb <keyboard_name> -km <keymap_name>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage in Keyboard Directory**:
|
||||||
|
|
||||||
|
Must be in keyboard directory with a default keymap, or in keymap directory for keyboard, or supply one with `--keymap <keymap_name>`
|
||||||
|
```
|
||||||
|
qmk compile
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage for building all keyboards that support a specific keymap**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk compile -kb all -km <keymap_name>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
```
|
||||||
|
$ qmk config compile.keymap=default
|
||||||
|
$ cd ~/qmk_firmware/keyboards/planck/rev6
|
||||||
|
$ qmk compile
|
||||||
|
Ψ Compiling keymap with make planck/rev6:default
|
||||||
|
...
|
||||||
|
```
|
||||||
|
or with optional keymap argument
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4
|
||||||
|
$ qmk compile -km 66_iso
|
||||||
|
Ψ Compiling keymap with make clueboard/66/rev4:66_iso
|
||||||
|
...
|
||||||
|
```
|
||||||
|
or in keymap directory
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
|
||||||
|
$ qmk compile
|
||||||
|
Ψ Compiling keymap with make make gh60/satan:colemak
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage in Layout Directory**:
|
||||||
|
|
||||||
|
Must be under `qmk_firmware/layouts/`, and in a keymap folder.
|
||||||
|
```
|
||||||
|
qmk compile -kb <keyboard_name>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
```
|
||||||
|
$ cd ~/qmk_firmware/layouts/community/60_ansi/mechmerlin-ansi
|
||||||
|
$ qmk compile -kb dz60
|
||||||
|
Ψ Compiling keymap with make dz60:mechmerlin-ansi
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk flash`
|
||||||
|
|
||||||
|
This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default. To specify a different bootloader, use `-bl <bootloader>`. Visit the [Flashing Firmware](flashing.md) guide for more details of the available bootloaders.
|
||||||
|
|
||||||
|
This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory.
|
||||||
|
|
||||||
|
**Usage for Configurator Exports**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk flash <configuratorExport.json> -bl <bootloader>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage for Keymaps**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk flash -kb <keyboard_name> -km <keymap_name> -bl <bootloader>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Listing the Bootloaders**
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk flash -b
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk config`
|
||||||
|
|
||||||
|
This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md).
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk doctor`
|
||||||
|
|
||||||
|
This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk doctor [-y] [-n]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Examples**:
|
||||||
|
|
||||||
|
Check your environment for problems and prompt to fix them:
|
||||||
|
|
||||||
|
qmk doctor
|
||||||
|
|
||||||
|
Check your environment and automatically fix any problems found:
|
||||||
|
|
||||||
|
qmk doctor -y
|
||||||
|
|
||||||
|
Check your environment and report problems only:
|
||||||
|
|
||||||
|
qmk doctor -n
|
||||||
|
|
||||||
|
## `qmk info`
|
||||||
|
|
||||||
|
Displays information about keyboards and keymaps in QMK. You can use this to get information about a keyboard, show the layouts, display the underlying key matrix, or to pretty-print JSON keymaps.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk info [-f FORMAT] [-m] [-l] [-km KEYMAP] [-kb KEYBOARD]
|
||||||
|
```
|
||||||
|
|
||||||
|
This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory.
|
||||||
|
|
||||||
|
**Examples**:
|
||||||
|
|
||||||
|
Show basic information for a keyboard:
|
||||||
|
|
||||||
|
qmk info -kb planck/rev5
|
||||||
|
|
||||||
|
Show the matrix for a keyboard:
|
||||||
|
|
||||||
|
qmk info -kb ergodox_ez -m
|
||||||
|
|
||||||
|
Show a JSON keymap for a keyboard:
|
||||||
|
|
||||||
|
qmk info -kb clueboard/california -km default
|
||||||
|
|
||||||
|
## `qmk json2c`
|
||||||
|
|
||||||
|
Creates a keymap.c from a QMK Configurator export.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk json2c [-o OUTPUT] filename
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk list-keyboards`
|
||||||
|
|
||||||
|
This command lists all the keyboards currently defined in `qmk_firmware`
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk list-keyboards
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk list-keymaps`
|
||||||
|
|
||||||
|
This command lists all the keymaps for a specified keyboard (and revision).
|
||||||
|
|
||||||
|
This command is directory aware. It will automatically fill in KEYBOARD if you are in a keyboard directory.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk list-keymaps -kb planck/ez
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk new-keymap`
|
||||||
|
|
||||||
|
This command creates a new keymap based on a keyboard's existing default keymap.
|
||||||
|
|
||||||
|
This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Developer Commands
|
||||||
|
|
||||||
|
## `qmk cformat`
|
||||||
|
|
||||||
|
This command formats C code using clang-format.
|
||||||
|
|
||||||
|
Run it with no arguments to format all core code that has been changed. Default checks `origin/master` with `git diff`, branch can be changed using `-b <branch_name>`
|
||||||
|
|
||||||
|
Run it with `-a` to format all core code, or pass filenames on the command line to run it on specific files.
|
||||||
|
|
||||||
|
**Usage for specified files**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk cformat [file1] [file2] [...] [fileN]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage for all core files**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk cformat -a
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage for only changed files against origin/master**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk cformat
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage for only changed files against branch_name**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk cformat -b branch_name
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk docs`
|
||||||
|
|
||||||
|
This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk docs [-p PORT]
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk kle2json`
|
||||||
|
|
||||||
|
This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk kle2json [-f] <filename>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Examples**:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ qmk kle2json kle.txt
|
||||||
|
☒ File info.json already exists, use -f or --force to overwrite.
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
$ qmk kle2json -f kle.txt -f
|
||||||
|
Ψ Wrote out to info.json
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk pyformat`
|
||||||
|
|
||||||
|
This command formats python code in `qmk_firmware`.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk pyformat
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk pytest`
|
||||||
|
|
||||||
|
This command runs the python test suite. If you make changes to python code you should ensure this runs successfully.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk pytest
|
||||||
|
```
|
||||||
|
|
@@ -108,7 +108,7 @@ compile.keymap: skully -> None
|
|||||||
|-----|---------------|-------------|
|
|-----|---------------|-------------|
|
||||||
| user.keyboard | None | The keyboard path (Example: `clueboard/66/rev4`) |
|
| user.keyboard | None | The keyboard path (Example: `clueboard/66/rev4`) |
|
||||||
| user.keymap | None | The keymap name (Example: `default`) |
|
| user.keymap | None | The keymap name (Example: `default`) |
|
||||||
| user.name | None | The user's github username. |
|
| user.name | None | The user's GitHub username. |
|
||||||
|
|
||||||
# All Configuration Options
|
# All Configuration Options
|
||||||
|
|
@@ -6,6 +6,18 @@ This document has useful information for developers wishing to write new `qmk` s
|
|||||||
|
|
||||||
The QMK CLI operates using the subcommand pattern made famous by git. The main `qmk` script is simply there to setup the environment and pick the correct entrypoint to run. Each subcommand is a self-contained module with an entrypoint (decorated by `@cli.subcommand()`) that performs some action and returns a shell returncode, or None.
|
The QMK CLI operates using the subcommand pattern made famous by git. The main `qmk` script is simply there to setup the environment and pick the correct entrypoint to run. Each subcommand is a self-contained module with an entrypoint (decorated by `@cli.subcommand()`) that performs some action and returns a shell returncode, or None.
|
||||||
|
|
||||||
|
## Developer mode:
|
||||||
|
|
||||||
|
If you intend to maintain keyboards and/or contribute to QMK, you can enable the CLI's "Developer" mode:
|
||||||
|
|
||||||
|
`qmk config user.developer=True`
|
||||||
|
|
||||||
|
This will allow you to see all available subcommands.
|
||||||
|
**Note:** You will have to install additional requirements:
|
||||||
|
```bash
|
||||||
|
python3 -m pip install -r requirements-dev.txt
|
||||||
|
```
|
||||||
|
|
||||||
# Subcommands
|
# Subcommands
|
||||||
|
|
||||||
[MILC](https://github.com/clueboard/milc) is the CLI framework `qmk` uses to handle argument parsing, configuration, logging, and many other features. It lets you focus on writing your tool without wasting your time writing glue code.
|
[MILC](https://github.com/clueboard/milc) is the CLI framework `qmk` uses to handle argument parsing, configuration, logging, and many other features. It lets you focus on writing your tool without wasting your time writing glue code.
|
||||||
@@ -32,7 +44,7 @@ def hello(cli):
|
|||||||
|
|
||||||
First we import the `cli` object from `milc`. This is how we interact with the user and control the script's behavior. We use `@cli.argument()` to define a command line flag, `--name`. This also creates a configuration variable named `hello.name` (and the corresponding `user.name`) which the user can set so they don't have to specify the argument. The `cli.subcommand()` decorator designates this function as a subcommand. The name of the subcommand will be taken from the name of the function.
|
First we import the `cli` object from `milc`. This is how we interact with the user and control the script's behavior. We use `@cli.argument()` to define a command line flag, `--name`. This also creates a configuration variable named `hello.name` (and the corresponding `user.name`) which the user can set so they don't have to specify the argument. The `cli.subcommand()` decorator designates this function as a subcommand. The name of the subcommand will be taken from the name of the function.
|
||||||
|
|
||||||
Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator.
|
Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.6/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator.
|
||||||
|
|
||||||
# User Interaction
|
# User Interaction
|
||||||
|
|
||||||
@@ -44,13 +56,13 @@ There are two main methods for outputting text in a subcommand- `cli.log` and `c
|
|||||||
|
|
||||||
You can use special tokens to colorize your text, to make it easier to understand the output of your program. See [Colorizing Text](#colorizing-text) below.
|
You can use special tokens to colorize your text, to make it easier to understand the output of your program. See [Colorizing Text](#colorizing-text) below.
|
||||||
|
|
||||||
Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.5/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example.
|
Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.6/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example.
|
||||||
|
|
||||||
You should never use the format operator (`%`) directly, always pass values as arguments.
|
You should never use the format operator (`%`) directly, always pass values as arguments.
|
||||||
|
|
||||||
### Logging (`cli.log`)
|
### Logging (`cli.log`)
|
||||||
|
|
||||||
The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong.
|
The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.6/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong.
|
||||||
|
|
||||||
The default log level is `INFO`. If the user runs `qmk -v <subcommand>` the default log level will be set to `DEBUG`.
|
The default log level is `INFO`. If the user runs `qmk -v <subcommand>` the default log level will be set to `DEBUG`.
|
||||||
|
|
||||||
@@ -198,7 +210,7 @@ Our tests can be found in `lib/python/qmk/tests/`. You will find both unit and i
|
|||||||
|
|
||||||
If your PR does not include a comprehensive set of tests please add comments like this to your code so that other people know where they can help:
|
If your PR does not include a comprehensive set of tests please add comments like this to your code so that other people know where they can help:
|
||||||
|
|
||||||
# TODO(unassigned/<yourGithubUsername>): Write <unit|integration> tests
|
# TODO(unassigned/<your_github_username>): Write <unit|integration> tests
|
||||||
|
|
||||||
We use [nose2](https://nose2.readthedocs.io/en/latest/getting_started.html) to run our tests. You can refer to the nose2 documentation for more details on what you can do in your test functions.
|
We use [nose2](https://nose2.readthedocs.io/en/latest/getting_started.html) to run our tests. You can refer to the nose2 documentation for more details on what you can do in your test functions.
|
||||||
|
|
||||||
|
@@ -20,11 +20,11 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely
|
|||||||
* We accept both forms of preprocessor if's: `#ifdef DEFINED` and `#if defined(DEFINED)`
|
* We accept both forms of preprocessor if's: `#ifdef DEFINED` and `#if defined(DEFINED)`
|
||||||
* If you are not sure which to prefer use the `#if defined(DEFINED)` form.
|
* If you are not sure which to prefer use the `#if defined(DEFINED)` form.
|
||||||
* Do not change existing code from one style to the other, except when moving to a multiple condition `#if`.
|
* Do not change existing code from one style to the other, except when moving to a multiple condition `#if`.
|
||||||
* Do not put whitespace between `#` and `if`.
|
* When deciding how (or if) to indent preprocessor directives, keep these points in mind:
|
||||||
* When deciding how (or if) to indent directives keep these points in mind:
|
* Readability is more important than consistency.
|
||||||
* Readability is more important than consistency.
|
* Follow the file's existing style. If the file is mixed, follow the style that makes sense for the section you are modifying.
|
||||||
* Follow the file's existing style. If the file is mixed follow the style that makes sense for the section you are modifying.
|
* When indenting, keep the hash at the start of the line and add whitespace between `#` and `if`, starting with 4 spaces after the `#`.
|
||||||
* When choosing to indent you can follow the indention level of the surrounding C code, or preprocessor directives can have their own indent level. Choose the style that best communicates the intent of your code.
|
* You can follow the indention level of the surrounding C code, or preprocessor directives can have their own indentation levels. Choose the style that best communicates the intent of your code.
|
||||||
|
|
||||||
Here is an example for easy reference:
|
Here is an example for easy reference:
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Most of our style follows PEP8 with some local modifications to make things less nit-picky.
|
Most of our style follows PEP8 with some local modifications to make things less nit-picky.
|
||||||
|
|
||||||
* We target Python 3.5 for compatability with all supported platforms.
|
* We target Python 3.6 for compatability with all supported platforms.
|
||||||
* We indent using four (4) spaces (soft tabs)
|
* We indent using four (4) spaces (soft tabs)
|
||||||
* We encourage liberal use of comments
|
* We encourage liberal use of comments
|
||||||
* Think of them as a story describing the feature
|
* Think of them as a story describing the feature
|
||||||
@@ -317,7 +317,7 @@ At the time of this writing our tests are not very comprehensive. Looking at the
|
|||||||
|
|
||||||
## Integration Tests
|
## Integration Tests
|
||||||
|
|
||||||
Integration tests can be found in `lib/python/qmk/tests/test_cli_commands.py`. This is where CLI commands are actually run and their overall behavior is verified. We use [`subprocess`](https://docs.python.org/3.5/library/subprocess.html#module-subprocess) to launch each CLI command and a combination of checking output and returncode to determine if the right thing happened.
|
Integration tests can be found in `lib/python/qmk/tests/test_cli_commands.py`. This is where CLI commands are actually run and their overall behavior is verified. We use [`subprocess`](https://docs.python.org/3.6/library/subprocess.html#module-subprocess) to launch each CLI command and a combination of checking output and returncode to determine if the right thing happened.
|
||||||
|
|
||||||
## Unit Tests
|
## Unit Tests
|
||||||
|
|
||||||
|
@@ -115,9 +115,9 @@ If you define these options you will disable the associated feature, which can s
|
|||||||
* `#define NO_ACTION_ONESHOT`
|
* `#define NO_ACTION_ONESHOT`
|
||||||
* disable one-shot modifiers
|
* disable one-shot modifiers
|
||||||
* `#define NO_ACTION_MACRO`
|
* `#define NO_ACTION_MACRO`
|
||||||
* disable old style macro handling: MACRO() & action_get_macro
|
* disable old-style macro handling using `MACRO()`, `action_get_macro()` _(deprecated)_
|
||||||
* `#define NO_ACTION_FUNCTION`
|
* `#define NO_ACTION_FUNCTION`
|
||||||
* disable calling of action_function() from the fn_actions array (deprecated)
|
* disable old-style function handling using `fn_actions`, `action_function()` _(deprecated)_
|
||||||
|
|
||||||
## Features That Can Be Enabled
|
## Features That Can Be Enabled
|
||||||
|
|
||||||
@@ -191,7 +191,12 @@ If you define these options you will enable the associated feature, which may in
|
|||||||
* `#define RGBLIGHT_ANIMATIONS`
|
* `#define RGBLIGHT_ANIMATIONS`
|
||||||
* run RGB animations
|
* run RGB animations
|
||||||
* `#define RGBLIGHT_LAYERS`
|
* `#define RGBLIGHT_LAYERS`
|
||||||
* Lets you define [lighting layers](feature_rgblight.md) that can be toggled on or off. Great for showing the current keyboard layer or caps lock state.
|
* Lets you define [lighting layers](feature_rgblight.md?id=lighting-layers) that can be toggled on or off. Great for showing the current keyboard layer or caps lock state.
|
||||||
|
* `#define RGBLIGHT_MAX_LAYERS`
|
||||||
|
* Defaults to 8. Can be expanded up to 32 if more [lighting layers](feature_rgblight.md?id=lighting-layers) are needed.
|
||||||
|
* Note: Increasing the maximum will increase the firmware size and slow sync on split keyboards.
|
||||||
|
* `#define RGBLIGHT_LAYER_BLINK`
|
||||||
|
* Adds ability to [blink](feature_rgblight.md?id=lighting-layer-blink) a lighting layer for a specified number of milliseconds (e.g. to acknowledge an action).
|
||||||
* `#define RGBLED_NUM 12`
|
* `#define RGBLED_NUM 12`
|
||||||
* number of LEDs
|
* number of LEDs
|
||||||
* `#define RGBLIGHT_SPLIT`
|
* `#define RGBLIGHT_SPLIT`
|
||||||
@@ -317,10 +322,10 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i
|
|||||||
* `LAYOUTS`
|
* `LAYOUTS`
|
||||||
* A list of [layouts](feature_layouts.md) this keyboard supports.
|
* A list of [layouts](feature_layouts.md) this keyboard supports.
|
||||||
* `LINK_TIME_OPTIMIZATION_ENABLE`
|
* `LINK_TIME_OPTIMIZATION_ENABLE`
|
||||||
* Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticeable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled.
|
* Enables Link Time Optimization (LTO) when compiling the keyboard. This makes the process take longer, but it can significantly reduce the compiled size (and since the firmware is small, the added time is not noticeable).
|
||||||
It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION`
|
However, this will automatically disable the legacy TMK Macros and Functions features, as these break when LTO is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION`. (Note: This does not affect QMK [Macros](feature_macros.md) and [Layers](feature_layers.md).)
|
||||||
* `LTO_ENABLE`
|
* `LTO_ENABLE`
|
||||||
* It has the same meaning as LINK_TIME_OPTIMIZATION_ENABLE. You can use `LTO_ENABLE` instead of `LINK_TIME_OPTIMIZATION_ENABLE`.
|
* Has the same meaning as `LINK_TIME_OPTIMIZATION_ENABLE`. You can use `LTO_ENABLE` instead of `LINK_TIME_OPTIMIZATION_ENABLE`.
|
||||||
|
|
||||||
## AVR MCU Options
|
## AVR MCU Options
|
||||||
* `MCU = atmega32u4`
|
* `MCU = atmega32u4`
|
||||||
|
@@ -12,7 +12,7 @@ I'll say that again because it's important:
|
|||||||
|
|
||||||
!> **MAKE SURE YOU SELECT THE RIGHT VERSION!**
|
!> **MAKE SURE YOU SELECT THE RIGHT VERSION!**
|
||||||
|
|
||||||
If your keyboard has been advertised to be powered by QMK but is not in the list, chances are a developer hasn't gotten to it yet or we haven't had a chance to merge it in yet. File an issue at [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) requesting to support that particular keyboard, if there is no active [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) for it. There are also QMK powered keyboards that are in their manufacturer's own github accounts. Double check for that as well. <!-- FIXME(skullydazed): This feels too wordy and I'm not sure we want to encourage these kinds of issues. Also, should we prompt them to bug the manufacutrer? -->
|
If your keyboard has been advertised to be powered by QMK but is not in the list, chances are a developer hasn't gotten to it yet or we haven't had a chance to merge it in yet. File an issue at [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) requesting to support that particular keyboard, if there is no active [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) for it. There are also QMK powered keyboards that are in their manufacturer's own GitHub accounts. Double check for that as well. <!-- FIXME(skullydazed): This feels too wordy and I'm not sure we want to encourage these kinds of issues. Also, should we prompt them to bug the manufacutrer? -->
|
||||||
|
|
||||||
## Step 2: Select Your Keyboard Layout
|
## Step 2: Select Your Keyboard Layout
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ QMK (*Quantum Mechanical Keyboard*) ist eine Open-Source-Community, welche die Q
|
|||||||
|
|
||||||
## Bezugsquelle für QMK
|
## Bezugsquelle für QMK
|
||||||
|
|
||||||
Wenn Du vorhast, deine Tastatur, Tastaturbelegung oder Features zu QMK beizusteuern, geht das am einfachsten, indem Du das [Repository auf Github](https://github.com/qmk/qmk_firmware#fork-destination-box) forkst, die Änderungen in deinem lokalen Repo vornimmst und anschließend einen [Pull Request](https://github.com/qmk/qmk_firmware/pulls) einreichst.
|
Wenn Du vorhast, deine Tastatur, Tastaturbelegung oder Features zu QMK beizusteuern, geht das am einfachsten, indem Du das [Repository auf GitHub](https://github.com/qmk/qmk_firmware#fork-destination-box) forkst, die Änderungen in deinem lokalen Repo vornimmst und anschließend einen [Pull Request](https://github.com/qmk/qmk_firmware/pulls) einreichst.
|
||||||
|
|
||||||
Ansonsten kannst Du es als [zip](https://github.com/qmk/qmk_firmware/zipball/master) oder [tar](https://github.com/qmk/qmk_firmware/tarball/master) herunterladen, oder es direkt via git klonen (`git clone git@github.com:qmk/qmk_firmware.git` bzw. `git clone https://github.com/qmk/qmk_firmware.git`).
|
Ansonsten kannst Du es als [zip](https://github.com/qmk/qmk_firmware/zipball/master) oder [tar](https://github.com/qmk/qmk_firmware/tarball/master) herunterladen, oder es direkt via git klonen (`git clone git@github.com:qmk/qmk_firmware.git` bzw. `git clone https://github.com/qmk/qmk_firmware.git`).
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
* [QMK CLI](de/cli.md)
|
* [QMK CLI](de/cli.md)
|
||||||
* [QMK CLI Konfiguration](de/cli_configuration.md)
|
* [QMK CLI Konfiguration](de/cli_configuration.md)
|
||||||
* [Zu QMK beitragen](de/contributing.md)
|
* [Zu QMK beitragen](de/contributing.md)
|
||||||
* [Anleitung für Github](de/getting_started_github.md)
|
* [Anleitung für GitHub](de/getting_started_github.md)
|
||||||
* [Nach Hilfe fragen](de/getting_started_getting_help.md)
|
* [Nach Hilfe fragen](de/getting_started_getting_help.md)
|
||||||
|
|
||||||
* [Breaking Changes](de/breaking_changes.md)
|
* [Breaking Changes](de/breaking_changes.md)
|
||||||
@@ -98,6 +98,7 @@
|
|||||||
* [ISP Flashing Guide](de/isp_flashing_guide.md)
|
* [ISP Flashing Guide](de/isp_flashing_guide.md)
|
||||||
* [ARM Debugging Guide](de/arm_debugging.md)
|
* [ARM Debugging Guide](de/arm_debugging.md)
|
||||||
* [I2C Driver](de/i2c_driver.md)
|
* [I2C Driver](de/i2c_driver.md)
|
||||||
|
* [SPI Driver](de/spi_driver.md)
|
||||||
* [GPIO Controls](de/internals_gpio_control.md)
|
* [GPIO Controls](de/internals_gpio_control.md)
|
||||||
* [Proton C Conversion](de/proton_c_conversion.md)
|
* [Proton C Conversion](de/proton_c_conversion.md)
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@ Git Ressourcen:
|
|||||||
|
|
||||||
* [Gutes allgemeines Tutorial](https://www.codecademy.com/learn/learn-git) (auf Englisch)
|
* [Gutes allgemeines Tutorial](https://www.codecademy.com/learn/learn-git) (auf Englisch)
|
||||||
* [Git spielerisch anhand von Beispielen lernen](https://learngitbranching.js.org/) (auf Englisch)
|
* [Git spielerisch anhand von Beispielen lernen](https://learngitbranching.js.org/) (auf Englisch)
|
||||||
* [Mehr über den allgemeinen Umgang mit Github](getting_started_github.md)
|
* [Mehr über den allgemeinen Umgang mit GitHub](getting_started_github.md)
|
||||||
* [Mehr über Git im Bezug zu QMK](contributing.md)
|
* [Mehr über Git im Bezug zu QMK](contributing.md)
|
||||||
|
|
||||||
Mehr über die Arbeit mit der Befehlszeile:
|
Mehr über die Arbeit mit der Befehlszeile:
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
# EEPROM Driver Configuration
|
# EEPROM Driver Configuration :id=eeprom-driver-configuration
|
||||||
|
|
||||||
The EEPROM driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.
|
The EEPROM driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.
|
||||||
|
|
||||||
@@ -6,15 +6,20 @@ Driver | Description
|
|||||||
-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
`EEPROM_DRIVER = vendor` (default) | Uses the on-chip driver provided by the chip manufacturer. For AVR, this is provided by avr-libc. This is supported on ARM for a subset of chips -- STM32F3xx, STM32F1xx, and STM32F072xB will be emulated by writing to flash. STM32L0xx and STM32L1xx will use the onboard dedicated true EEPROM. Other chips will generally act as "transient" below.
|
`EEPROM_DRIVER = vendor` (default) | Uses the on-chip driver provided by the chip manufacturer. For AVR, this is provided by avr-libc. This is supported on ARM for a subset of chips -- STM32F3xx, STM32F1xx, and STM32F072xB will be emulated by writing to flash. STM32L0xx and STM32L1xx will use the onboard dedicated true EEPROM. Other chips will generally act as "transient" below.
|
||||||
`EEPROM_DRIVER = i2c` | Supports writing to I2C-based 24xx EEPROM chips. See the driver section below.
|
`EEPROM_DRIVER = i2c` | Supports writing to I2C-based 24xx EEPROM chips. See the driver section below.
|
||||||
|
`EEPROM_DRIVER = spi` | Supports writing to SPI-based 25xx EEPROM chips. See the driver section below.
|
||||||
`EEPROM_DRIVER = transient` | Fake EEPROM driver -- supports reading/writing to RAM, and will be discarded when power is lost.
|
`EEPROM_DRIVER = transient` | Fake EEPROM driver -- supports reading/writing to RAM, and will be discarded when power is lost.
|
||||||
|
|
||||||
## Vendor Driver Configuration
|
## Vendor Driver Configuration :id=vendor-eeprom-driver-configuration
|
||||||
|
|
||||||
|
#### STM32 L0/L1 Configuration :id=stm32l0l1-eeprom-driver-configuration
|
||||||
|
|
||||||
!> Resetting EEPROM using an STM32L0/L1 device takes up to 1 second for every 1kB of internal EEPROM used.
|
!> Resetting EEPROM using an STM32L0/L1 device takes up to 1 second for every 1kB of internal EEPROM used.
|
||||||
|
|
||||||
No configurable options are available.
|
`config.h` override | Description | Default Value
|
||||||
|
------------------------------------|--------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------
|
||||||
|
`#define STM32_ONBOARD_EEPROM_SIZE` | The size of the EEPROM to use, in bytes. Erase times can be high, so it's configurable here, if not using the default value. | Minimum required to cover base _eeconfig_ data, or `1024` if VIA is enabled.
|
||||||
|
|
||||||
## I2C Driver Configuration
|
## I2C Driver Configuration :id=i2c-eeprom-driver-configuration
|
||||||
|
|
||||||
Currently QMK supports 24xx-series chips over I2C. As such, requires a working i2c_master driver configuration. You can override the driver configuration via your config.h:
|
Currently QMK supports 24xx-series chips over I2C. As such, requires a working i2c_master driver configuration. You can override the driver configuration via your config.h:
|
||||||
|
|
||||||
@@ -41,7 +46,21 @@ MB85RC256V FRAM | `#define EEPROM_I2C_MB85RC256V` | <https://www.adafruit.com/p
|
|||||||
|
|
||||||
?> If you find that the EEPROM is not cooperating, ensure you've correctly shifted up your EEPROM address by 1. For example, the datasheet might state the address as `0b01010000` -- the correct value of `EXTERNAL_EEPROM_I2C_BASE_ADDRESS` needs to be `0b10100000`.
|
?> If you find that the EEPROM is not cooperating, ensure you've correctly shifted up your EEPROM address by 1. For example, the datasheet might state the address as `0b01010000` -- the correct value of `EXTERNAL_EEPROM_I2C_BASE_ADDRESS` needs to be `0b10100000`.
|
||||||
|
|
||||||
## Transient Driver configuration
|
## SPI Driver Configuration :id=spi-eeprom-driver-configuration
|
||||||
|
|
||||||
|
Currently QMK supports 25xx-series chips over SPI. As such, requires a working spi_master driver configuration. You can override the driver configuration via your config.h:
|
||||||
|
|
||||||
|
`config.h` override | Description | Default Value
|
||||||
|
-----------------------------------------------|--------------------------------------------------------------------------------------|--------------
|
||||||
|
`#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN` | SPI Slave select pin in order to inform that the EEPROM is currently being addressed | _none_
|
||||||
|
`#define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR` | Clock divisor used to divide the peripheral clock to derive the SPI frequency | `64`
|
||||||
|
`#define EXTERNAL_EEPROM_BYTE_COUNT` | Total size of the EEPROM in bytes | 8192
|
||||||
|
`#define EXTERNAL_EEPROM_PAGE_SIZE` | Page size of the EEPROM in bytes, as specified in the datasheet | 32
|
||||||
|
`#define EXTERNAL_EEPROM_ADDRESS_SIZE` | The number of bytes to transmit for the memory location within the EEPROM | 2
|
||||||
|
|
||||||
|
!> There's no way to determine if there is an SPI EEPROM actually responding. Generally, this will result in reads of nothing but zero.
|
||||||
|
|
||||||
|
## Transient Driver configuration :id=transient-eeprom-driver-configuration
|
||||||
|
|
||||||
The only configurable item for the transient EEPROM driver is its size:
|
The only configurable item for the transient EEPROM driver is its size:
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ QMK (*Quantum Mechanical Keyboard*) es una comunidad open source que mantiene el
|
|||||||
|
|
||||||
## Cómo conseguirlo
|
## Cómo conseguirlo
|
||||||
|
|
||||||
Si estás pensando en contribuir con un keymap, teclado, or característica a QMK, la manera más sencilla es hacer un [fork del repositorio en Github](https://github.com/qmk/qmk_firmware#fork-destination-box), y clonar tu repositorio localmente para hacer los cambios, subirlos, y abir un [Pull Request](https://github.com/qmk/qmk_firmware/pulls) desde tu fork.
|
Si estás pensando en contribuir con un keymap, teclado, or característica a QMK, la manera más sencilla es hacer un [fork del repositorio en GitHub](https://github.com/qmk/qmk_firmware#fork-destination-box), y clonar tu repositorio localmente para hacer los cambios, subirlos, y abir un [Pull Request](https://github.com/qmk/qmk_firmware/pulls) desde tu fork.
|
||||||
|
|
||||||
De cualquier manera, también puedes descargarlo directamente en formatos ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), o clonarlo via git (`git@github.com:qmk/qmk_firmware.git`), o https (`https://github.com/qmk/qmk_firmware.git`).
|
De cualquier manera, también puedes descargarlo directamente en formatos ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), o clonarlo via git (`git@github.com:qmk/qmk_firmware.git`), o https (`https://github.com/qmk/qmk_firmware.git`).
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
* [QMK CLI](es/cli.md)
|
* [QMK CLI](es/cli.md)
|
||||||
* [Configuración de QMK CLI](es/cli_configuration.md)
|
* [Configuración de QMK CLI](es/cli_configuration.md)
|
||||||
* [Contribuyendo a QMK](es/contributing.md)
|
* [Contribuyendo a QMK](es/contributing.md)
|
||||||
* [Cómo usar Github](es/getting_started_github.md)
|
* [Cómo usar GitHub](es/getting_started_github.md)
|
||||||
* [Obtener ayuda](es/getting_started_getting_help.md)
|
* [Obtener ayuda](es/getting_started_getting_help.md)
|
||||||
|
|
||||||
* [Cambios incompatibles](es/breaking_changes.md)
|
* [Cambios incompatibles](es/breaking_changes.md)
|
||||||
@@ -98,6 +98,7 @@
|
|||||||
* [Guía de flasheado de ISP](es/isp_flashing_guide.md)
|
* [Guía de flasheado de ISP](es/isp_flashing_guide.md)
|
||||||
* [Guía de depuración de ARM](es/arm_debugging.md)
|
* [Guía de depuración de ARM](es/arm_debugging.md)
|
||||||
* [Driver I2C](es/i2c_driver.md)
|
* [Driver I2C](es/i2c_driver.md)
|
||||||
|
* [Driver SPI](es/spi_driver.md)
|
||||||
* [Controles GPIO](es/internals_gpio_control.md)
|
* [Controles GPIO](es/internals_gpio_control.md)
|
||||||
* [Conversión Proton C](es/proton_c_conversion.md)
|
* [Conversión Proton C](es/proton_c_conversion.md)
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@ Este documento procura instruir a los novatos en las mejores prácticas para ten
|
|||||||
|
|
||||||
En este documento suponemos un par de cosas:
|
En este documento suponemos un par de cosas:
|
||||||
|
|
||||||
1. Tienes una cuenta de Github, y has hecho un [fork del repo qmk_firmware](getting_started_github.md) en tu cuenta.
|
1. Tienes una cuenta de GitHub, y has hecho un [fork del repo qmk_firmware](getting_started_github.md) en tu cuenta.
|
||||||
2. Has [configurado tu entorno de desarrollo](newbs_getting_started.md?id=environment-setup).
|
2. Has [configurado tu entorno de desarrollo](newbs_getting_started.md?id=environment-setup).
|
||||||
|
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ Lo diré otra vez porque es importante
|
|||||||
|
|
||||||
!> **ASEGÚRATE DE QUE SELECCIONAS LA VERSIÓN CORRECTA!**
|
!> **ASEGÚRATE DE QUE SELECCIONAS LA VERSIÓN CORRECTA!**
|
||||||
|
|
||||||
Si se ha anunciado que tu teclado funciona con QMK pero no está en la lista, es probable que un desarrollador no se haya encargado de él aún o que todavía no hemos tenido la oportunidad de incluirlo. Abre un issue en [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) solicitando soportar ese teclado un particular, si no hay un [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) activo para ello. Hay también teclados que funcionan con QMK que están en las cuentas de github de sus manufacturantes. Acuérdate de comprobar esto también.
|
Si se ha anunciado que tu teclado funciona con QMK pero no está en la lista, es probable que un desarrollador no se haya encargado de él aún o que todavía no hemos tenido la oportunidad de incluirlo. Abre un issue en [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) solicitando soportar ese teclado un particular, si no hay un [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) activo para ello. Hay también teclados que funcionan con QMK que están en las cuentas de GitHub de sus manufacturantes. Acuérdate de comprobar esto también.
|
||||||
|
|
||||||
## Eligiendo el layout de tu teclado
|
## Eligiendo el layout de tu teclado
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@ Recursos de Git:
|
|||||||
|
|
||||||
* [Excelente tutorial general](https://www.codecademy.com/learn/learn-git)
|
* [Excelente tutorial general](https://www.codecademy.com/learn/learn-git)
|
||||||
* [Juego de Git para aprender usando ejemplos](https://learngitbranching.js.org/)
|
* [Juego de Git para aprender usando ejemplos](https://learngitbranching.js.org/)
|
||||||
* [Recursos de Git para aprender más sobre Github](getting_started_github.md)
|
* [Recursos de Git para aprender más sobre GitHub](getting_started_github.md)
|
||||||
* [Recursos de Git dirigidos específicamente a QMK](contributing.md)
|
* [Recursos de Git dirigidos específicamente a QMK](contributing.md)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -113,26 +113,16 @@ OPT_DEFS += -DBOOTLOADER_SIZE=2048
|
|||||||
```
|
```
|
||||||
|
|
||||||
## `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` on MacOS
|
## `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` on MacOS
|
||||||
|
|
||||||
This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled.
|
This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled.
|
||||||
|
|
||||||
The solution is to remove and reinstall all affected modules.
|
The solution is to remove and reinstall all affected modules.
|
||||||
|
|
||||||
```
|
```
|
||||||
brew rm avr-gcc
|
brew rm avr-gcc avr-gcc@8 dfu-programmer dfu-util gcc-arm-none-eabi arm-gcc-bin@8 avrdude qmk
|
||||||
brew rm avr-gcc@8
|
brew install qmk/qmk/qmk
|
||||||
brew rm dfu-programmer
|
|
||||||
brew rm dfu-util
|
|
||||||
brew rm gcc-arm-none-eabi
|
|
||||||
brew rm arm-gcc-bin@8
|
|
||||||
brew rm avrdude
|
|
||||||
brew install avr-gcc@8
|
|
||||||
brew install dfu-programmer
|
|
||||||
brew install dfu-util
|
|
||||||
brew install arm-gcc-bin@8
|
|
||||||
brew install avrdude
|
|
||||||
brew link --force avr-gcc@8
|
brew link --force avr-gcc@8
|
||||||
brew link --force arm-gcc-bin@8
|
brew link --force arm-gcc-bin@8
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### `avr-gcc` and LUFA
|
### `avr-gcc` and LUFA
|
||||||
|
@@ -160,10 +160,3 @@ As of now root of its cause is not clear but some build options seem to be relat
|
|||||||
|
|
||||||
https://github.com/tmk/tmk_keyboard/issues/266
|
https://github.com/tmk/tmk_keyboard/issues/266
|
||||||
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
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
|
|
||||||
|
@@ -1,46 +1,3 @@
|
|||||||
# Switching and Toggling Layers :id=switching-and-toggling-layers
|
|
||||||
|
|
||||||
These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers). When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended.
|
|
||||||
|
|
||||||
* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).)
|
|
||||||
* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated.
|
|
||||||
* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers: `MOD_LCTL`, `MOD_LSFT`, `MOD_LALT`, `MOD_LGUI` (note the use of `MOD_` constants instead of `KC_`). These modifiers can be combined using bitwise OR, e.g. `LM(_RAISE, MOD_LCTL | MOD_LALT)`.
|
|
||||||
* `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped. Only supports layers 0-15.
|
|
||||||
* `OSL(layer)` - momentarily activates *layer* until the next key is pressed. See [One Shot Keys](one_shot_keys.md) for details and additional functionality.
|
|
||||||
* `TG(layer)` - toggles *layer*, activating it if it's inactive and vice versa
|
|
||||||
* `TO(layer)` - activates *layer* and de-activates all other layers (except your default layer). This function is special, because instead of just adding/removing one layer to your active layer stack, it will completely replace your current active layers, uniquely allowing you to replace higher layers with a lower one. This is activated on keydown (as soon as the key is pressed).
|
|
||||||
* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, *layer* is activated, and then is de-activated when you let go (like `MO`). If you repeatedly tap it, the layer will be toggled on or off (like `TG`). It needs 5 taps by default, but you can change this by defining `TAPPING_TOGGLE` -- for example, `#define TAPPING_TOGGLE 2` to toggle on just two taps.
|
|
||||||
|
|
||||||
## Caveats
|
|
||||||
|
|
||||||
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
|
||||||
|
|
||||||
Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two.
|
|
||||||
|
|
||||||
# Working with Layers
|
|
||||||
|
|
||||||
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 default, "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.). It's important to set this as the lowest layer since it will typically have most or all of the keyboard's keys defined, so would block other layers from having any effect if it were above them (i.e., had a higher layer number).
|
|
||||||
* 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.
|
|
||||||
* In a layer's keymap, only reference higher-numbered layers. Because layers are processed from the highest-numbered (topmost) active layer down, modifying the state of lower layers can be 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](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h).
|
|
||||||
|
|
||||||
# Modifier Keys :id=modifier-keys
|
# Modifier Keys :id=modifier-keys
|
||||||
|
|
||||||
These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent.
|
These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent.
|
||||||
@@ -49,11 +6,11 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown
|
|||||||
|----------|-------------------------------|----------------------------------------------------|
|
|----------|-------------------------------|----------------------------------------------------|
|
||||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
||||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||||
|`LALT(kc)`|`A(kc)` |Hold Left Alt and press `kc` |
|
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|
||||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||||
|`RALT(kc)`|`ALGR(kc)` |Hold Right Alt and press `kc` |
|
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||||
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|
||||||
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|
||||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||||
@@ -61,12 +18,16 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown
|
|||||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
||||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
||||||
|
|
||||||
You can also chain them, for example `LCTL(LALT(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.
|
You can also chain them, for example `LCTL(LALT(KC_DEL))` or `C(A(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.
|
||||||
|
|
||||||
# Legacy Content
|
# Legacy Content :id=legacy-content
|
||||||
|
|
||||||
This page used to encompass a large set of features. We have moved many sections that used to be part of this page to their own pages. Everything below this point is simply a redirect so that people following old links on the web find what they're looking for.
|
This page used to encompass a large set of features. We have moved many sections that used to be part of this page to their own pages. Everything below this point is simply a redirect so that people following old links on the web find what they're looking for.
|
||||||
|
|
||||||
|
## Layers :id=switching-and-toggling-layers
|
||||||
|
|
||||||
|
* [Layers](feature_layers.md)
|
||||||
|
|
||||||
## Mod-Tap :id=mod-tap
|
## Mod-Tap :id=mod-tap
|
||||||
|
|
||||||
* [Mod-Tap](mod_tap.md)
|
* [Mod-Tap](mod_tap.md)
|
||||||
|
@@ -123,7 +123,7 @@ If you would like to change the hotkey assignments for Bootmagic, `#define` thes
|
|||||||
|
|
||||||
# Bootmagic Lite :id=bootmagic-lite
|
# Bootmagic Lite :id=bootmagic-lite
|
||||||
|
|
||||||
In addition to the full blown Bootmagic feature, is the Bootmagic Lite feature that only handles jumping into the bootloader. This is great for boards that don't have a physical reset button but you need a way to jump into the bootloader, and don't want to deal with the headache that Bootmagic can cause.
|
In addition to the full blown Bootmagic feature, is the Bootmagic Lite feature that only handles jumping into the bootloader. This is great for boards that don't have a physical reset button but you need a way to jump into the bootloader, and don't want to deal with the headache that Bootmagic can cause.
|
||||||
|
|
||||||
To enable this version of Bootmagic, you need to enable it in your `rules.mk` with:
|
To enable this version of Bootmagic, you need to enable it in your `rules.mk` with:
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ To enable this version of Bootmagic, you need to enable it in your `rules.mk` wi
|
|||||||
BOOTMAGIC_ENABLE = lite
|
BOOTMAGIC_ENABLE = lite
|
||||||
```
|
```
|
||||||
|
|
||||||
Additionally, you may want to specify which key to use. This is especially useful for keyboards that have unusual matrices. To do so, you need to specify the row and column of the key that you want to use. Add these entries to your `config.h` file:
|
Additionally, you may want to specify which key to use. This is especially useful for keyboards that have unusual matrices. To do so, you need to specify the row and column of the key that you want to use. Add these entries to your `config.h` file:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#define BOOTMAGIC_LITE_ROW 0
|
#define BOOTMAGIC_LITE_ROW 0
|
||||||
@@ -144,9 +144,20 @@ And to trigger the bootloader, you hold this key down when plugging the keyboard
|
|||||||
|
|
||||||
!> Using bootmagic lite will **always reset** the EEPROM, so you will lose any settings that have been saved.
|
!> Using bootmagic lite will **always reset** the EEPROM, so you will lose any settings that have been saved.
|
||||||
|
|
||||||
|
## Split Keyboards
|
||||||
|
|
||||||
|
When handedness is predetermined via an option like `SPLIT_HAND_PIN`, you might need to configure a different key between halves. This To do so, add these entries to your `config.h` file:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define BOOTMAGIC_LITE_ROW_RIGHT 4
|
||||||
|
#define BOOTMAGIC_LITE_COLUMN_RIGHT 1
|
||||||
|
```
|
||||||
|
|
||||||
|
By default, these values are not set.
|
||||||
|
|
||||||
## Advanced Bootmagic Lite
|
## Advanced Bootmagic Lite
|
||||||
|
|
||||||
The `bootmagic_lite` function is defined weakly, so that you can replace this in your code, if you need. A great example of this is the Zeal60 boards that have some additional handling needed.
|
The `bootmagic_lite` function is defined weakly, so that you can replace this in your code, if you need. A great example of this is the Zeal60 boards that have some additional handling needed.
|
||||||
|
|
||||||
To replace the function, all you need to do is add something like this to your code:
|
To replace the function, all you need to do is add something like this to your code:
|
||||||
|
|
||||||
@@ -163,4 +174,4 @@ void bootmagic_lite(void) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
You can additional feature here. For instance, resetting the eeprom or requiring additional keys to be pressed to trigger bootmagic. Keep in mind that `bootmagic_lite` is called before a majority of features are initialized in the firmware.
|
You can additional feature here. For instance, resetting the eeprom or requiring additional keys to be pressed to trigger bootmagic. Keep in mind that `bootmagic_lite` is called before a majority of features are initialized in the firmware.
|
||||||
|
@@ -38,5 +38,6 @@ For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computati
|
|||||||
appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
|
appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
|
||||||
* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key
|
* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key
|
||||||
* sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occured, all input changes are pushed.
|
* sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occured, all input changes are pushed.
|
||||||
|
* sym_pk - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occured on that key, the key status change is pushed.
|
||||||
|
|
||||||
|
|
||||||
|
@@ -61,7 +61,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
|||||||
} else {
|
} else {
|
||||||
tap_code(KC_PGUP);
|
tap_code(KC_PGUP);
|
||||||
}
|
}
|
||||||
} else if (index == 1) { /* Second encoder */
|
} else if (index == 1) { /* Second encoder */
|
||||||
if (clockwise) {
|
if (clockwise) {
|
||||||
tap_code(KC_DOWN);
|
tap_code(KC_DOWN);
|
||||||
} else {
|
} else {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# HD44780 LCD Displays
|
# HD44780 LCD Displays
|
||||||
|
|
||||||
This is an integration of Peter Fleury's LCD library. This page will explain the basics. [For in depth documentation visit his page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
This is an integration of Peter Fleury's LCD library. This page will explain the basics. [For in depth documentation visit his page.](http://www.peterfleury.epizy.com/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
||||||
|
|
||||||
You can enable support for HD44780 Displays by setting the `HD44780_ENABLE` flag in your keyboards `rules.mk` to yes.
|
You can enable support for HD44780 Displays by setting the `HD44780_ENABLE` flag in your keyboards `rules.mk` to yes.
|
||||||
|
|
||||||
@@ -50,8 +50,8 @@ LCD_DISP_ON_CURSOR_BLINK : display on, cursor on flashing
|
|||||||
````
|
````
|
||||||
This is best done in your keyboards `matrix_init_kb` or your keymaps `matrix_init_user`.
|
This is best done in your keyboards `matrix_init_kb` or your keymaps `matrix_init_user`.
|
||||||
It is advised to clear the display before use.
|
It is advised to clear the display before use.
|
||||||
To do so call `lcd_clrsrc()`.
|
To do so call `lcd_clrscr()`.
|
||||||
|
|
||||||
To now print something to your Display you first call `lcd_gotoxy(column, line)`. To go to the start of the first line you would call `lcd_gotoxy(0, 0)` and then print a string with `lcd_puts("example string")`.
|
To now print something to your Display you first call `lcd_gotoxy(column, line)`. To go to the start of the first line you would call `lcd_gotoxy(0, 0)` and then print a string with `lcd_puts("example string")`.
|
||||||
|
|
||||||
There are more methods available to control the display. [For in depth documentation please visit the linked page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
There are more methods available to control the display. [For in depth documentation please visit the linked page.](http://www.peterfleury.epizy.com/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
||||||
|
94
docs/feature_layers.md
Normal file
94
docs/feature_layers.md
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
# Layers :id=layers
|
||||||
|
|
||||||
|
One of the most powerful and well used features of QMK Firmware is the ability to use layers. For most people, this amounts to a function key that allows for different keys, much like what you would see on a laptop or tablet keyboard.
|
||||||
|
|
||||||
|
For a detailed explanation of how the layer stack works, checkout [Keymap Overview](keymap.md#keymap-and-layers).
|
||||||
|
|
||||||
|
## Switching and Toggling Layers :id=switching-and-toggling-layers
|
||||||
|
|
||||||
|
These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended.
|
||||||
|
|
||||||
|
* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).)
|
||||||
|
* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated.
|
||||||
|
* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers: `MOD_LCTL`, `MOD_LSFT`, `MOD_LALT`, `MOD_LGUI` (note the use of `MOD_` constants instead of `KC_`). These modifiers can be combined using bitwise OR, e.g. `LM(_RAISE, MOD_LCTL | MOD_LALT)`.
|
||||||
|
* `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped. Only supports layers 0-15.
|
||||||
|
* `OSL(layer)` - momentarily activates *layer* until the next key is pressed. See [One Shot Keys](one_shot_keys.md) for details and additional functionality.
|
||||||
|
* `TG(layer)` - toggles *layer*, activating it if it's inactive and vice versa
|
||||||
|
* `TO(layer)` - activates *layer* and de-activates all other layers (except your default layer). This function is special, because instead of just adding/removing one layer to your active layer stack, it will completely replace your current active layers, uniquely allowing you to replace higher layers with a lower one. This is activated on keydown (as soon as the key is pressed).
|
||||||
|
* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, *layer* is activated, and then is de-activated when you let go (like `MO`). If you repeatedly tap it, the layer will be toggled on or off (like `TG`). It needs 5 taps by default, but you can change this by defining `TAPPING_TOGGLE` -- for example, `#define TAPPING_TOGGLE 2` to toggle on just two taps.
|
||||||
|
|
||||||
|
### Caveats :id=caveats
|
||||||
|
|
||||||
|
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Specifically, dual function keys like `LT` and `MT` use a 16 bit keycode. 4 bits are used for the function identifier, the next 12 are divided into the parameters. Layer Tap uses 4 bits for the layer (and is why it's limited to layers 0-16, actually), while Mod Tap does the same, 4 bits for the identifier, 4 bits for which mods are used, and all of them use 8 bits for the keycode. Because of this, the keycode used is limited to `0xFF` (0-255), which are the basic keycodes only.
|
||||||
|
|
||||||
|
Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
||||||
|
|
||||||
|
Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two.
|
||||||
|
|
||||||
|
## Working with Layers :id=working-with-layers
|
||||||
|
|
||||||
|
Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems.
|
||||||
|
|
||||||
|
### Beginners :id=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 default, "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.). It's important to set this as the lowest layer since it will typically have most or all of the keyboard's keys defined, so would block other layers from having any effect if it were above them (i.e., had a higher layer number).
|
||||||
|
* 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.
|
||||||
|
* In a layer's keymap, only reference higher-numbered layers. Because layers are processed from the highest-numbered (topmost) active layer down, modifying the state of lower layers can be tricky and error-prone.
|
||||||
|
|
||||||
|
### Intermediate Users :id=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 :id=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](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h).
|
||||||
|
|
||||||
|
## Functions :id=functions
|
||||||
|
|
||||||
|
There are a number of functions (and variables) related to how you can use or manipulate the layers.
|
||||||
|
|
||||||
|
|Function |Description |
|
||||||
|
|----------------------------------------------|---------------------------------------------------------------------------------------------------------|
|
||||||
|
| `layer_state_set(layer_mask)` | Directly sets the layer state (recommended, do not use unless you know what you are doing). |
|
||||||
|
| `layer_clear()` | Clears all layers (turns them all off). |
|
||||||
|
| `layer_move(layer)` | Turns specified layer on, and all other layers off. |
|
||||||
|
| `layer_on(layer)` | Turns specified layer on, leaves all other layers in existing state. |
|
||||||
|
| `layer_off(layer)` | Turns specified layer off, leaves all other layers in existing state. |
|
||||||
|
| `layer_invert(layer)` | Interverts/toggles the state of the specified layer |
|
||||||
|
| `layer_or(layer_mask)` | Turns on layers based on matching bits between specifed layer and existing layer state. |
|
||||||
|
| `layer_and(layer_mask)` | Turns on layers based on matching enabled bits between specifed layer and existing layer state. |
|
||||||
|
| `layer_xor(layer_mask)` | Turns on layers based on non-matching bits between specifed layer and existing layer state. |
|
||||||
|
| `layer_debug(layer_mask)` | Prints out the current bit mask and highest active layer to debugger console. |
|
||||||
|
| `default_layer_set(layer_mask)` | Directly sets the default layer state (recommended, do not use unless you know what you are doing). |
|
||||||
|
| `default_layer_or(layer_mask)` | Turns on layers based on matching bits between specifed layer and existing default layer state. |
|
||||||
|
| `default_layer_and(layer_mask)` | Turns on layers based on matching enabled bits between specifed layer and existing default layer state. |
|
||||||
|
| `default_layer_xor(layer_mask)` | Turns on layers based on non-matching bits between specifed layer and existing default layer state. |
|
||||||
|
| `default_layer_debug(layer_mask)` | Prints out the current bit mask and highest active default layer to debugger console. |
|
||||||
|
| [`set_single_persistent_default_layer(layer)`](ref_functions.md#setting-the-persistent-default-layer) | Sets the default layer and writes it to persistent memory (EEPROM). |
|
||||||
|
| [`update_tri_layer(x, y, z)`](ref_functions.md#update_tri_layerx-y-z) | Checks if layers `x` and `y` are both on, and sets `z` based on that (on if both on, otherwise off). |
|
||||||
|
| [`update_tri_layer_state(state, x, y, z)`](ref_functions.md#update_tri_layer_statestate-x-y-z) | Does the same as `update_tri_layer(x, y, z)`, but from `layer_state_set_*` functions. |
|
||||||
|
|
||||||
|
|
||||||
|
In additional to the functions that you can call, there are a number of callback functions that get called every time the layer changes. This passed the layer state to the function, which can be read or modified.
|
||||||
|
|
||||||
|
|Callbacks |Description |
|
||||||
|
|-----------------------------------------------------|----------------------------------------------------------------------------------------|
|
||||||
|
| `layer_state_set_kb(layer_state_t state)` | Callback for layer functions, for keyboard. |
|
||||||
|
| `layer_state_set_user(layer_state_t state)` | Callback for layer functions, for users. |
|
||||||
|
| `default_layer_state_set_kb(layer_state_t state)` | Callback for default layer functions, for keyboard. Called on keyboard initialization. |
|
||||||
|
| `default_layer_state_set_user(layer_state_t state)` | Callback for default layer functions, for users. Called on keyboard initialization. |
|
||||||
|
|
||||||
|
?> For additional details on how you can use these callbacks, check out the [Layer Change Code](custom_quantum_functions.md#layer-change-code) document.
|
||||||
|
|
||||||
|
|Check functions |Description |
|
||||||
|
|-------------------------------------------|------------------------------------------------------------------------------|
|
||||||
|
| `layer_state_cmp(cmp_layer_state, layer)` | This checks the `cmp_layer_state` to see if the specific `layer` is enabled. This is meant for use with the layer callbacks. |
|
||||||
|
| `layer_state_is(layer)` | This checks the layer state to see if the specific `layer` is enabled. (calls `layer_state_cmp` for the global layer state). |
|
||||||
|
|
||||||
|
!> There is `IS_LAYER_ON(layer)` as well, however the `layer_state_cmp` function has some additional handling to ensure that on layer 0 that it returns the correct value. Otherwise, if you check to see if layer 0 is on, you may get an incorrect value returned.
|
@@ -74,9 +74,9 @@ SEQ_THREE_KEYS(KC_C, KC_C, KC_C) {
|
|||||||
|
|
||||||
## Strict Key Processing
|
## Strict Key Processing
|
||||||
|
|
||||||
By default, the Leader Key feature will filter the keycode out of [`Mod-Tap`](mod_tap.md) and [`Layer Tap`](feature_advanced_keycodes.md#switching-and-toggling-layers) functions when checking for the Leader sequences. That means if you're using `LT(3, KC_A)`, it will pick this up as `KC_A` for the sequence, rather than `LT(3, KC_A)`, giving a more expected behavior for newer users.
|
By default, the Leader Key feature will filter the keycode out of [`Mod-Tap`](mod_tap.md) and [`Layer Tap`](feature_layers.md#switching-and-toggling-layers) functions when checking for the Leader sequences. That means if you're using `LT(3, KC_A)`, it will pick this up as `KC_A` for the sequence, rather than `LT(3, KC_A)`, giving a more expected behavior for newer users.
|
||||||
|
|
||||||
While, this may be fine for most, if you want to specify the whole keycode (eg, `LT(3, KC_A)` from the example above) in the sequence, you can enable this by added `#define LEADER_KEY_STRICT_KEY_PROCESSING` to your `config.h` file. This well then disable the filtering, and you'll need to specify the whole keycode.
|
While, this may be fine for most, if you want to specify the whole keycode (eg, `LT(3, KC_A)` from the example above) in the sequence, you can enable this by added `#define LEADER_KEY_STRICT_KEY_PROCESSING` to your `config.h` file. This will then disable the filtering, and you'll need to specify the whole keycode.
|
||||||
|
|
||||||
## Customization
|
## Customization
|
||||||
|
|
||||||
|
@@ -88,6 +88,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Advanced Macros
|
||||||
|
|
||||||
|
In addition to the `process_record_user()` function, is the `post_process_record_user()` function. This runs after `process_record` and can be used to do things after a keystroke has been sent. This is useful if you want to have a key pressed before and released after a normal key, for instance.
|
||||||
|
|
||||||
|
In this example, we modify most normal keypresses so that `F22` is pressed before the keystroke is normally sent, and release it __only after__ it's been released.
|
||||||
|
|
||||||
|
```c
|
||||||
|
static uint8_t f22_tracker;
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case KC_A ... KC_F21: //notice how it skips over F22
|
||||||
|
case KC_F23 ... KC_EXSEL: //exsel is the last one before the modifier keys
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_F22); //this means to send F22 down
|
||||||
|
f22_tracker++;
|
||||||
|
register_code(keycode);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case KC_A ... KC_F21: //notice how it skips over F22
|
||||||
|
case KC_F23 ... KC_EXSEL: //exsel is the last one before the modifier keys
|
||||||
|
if (!record->event.pressed) {
|
||||||
|
f22_tracker--;
|
||||||
|
if (!f22_tracker) {
|
||||||
|
unregister_code(KC_F22); //this means to send F22 up
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### TAP, DOWN and UP
|
### 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 may want to use keys in your macros that you can't write down, such as `Ctrl` or `Home`.
|
||||||
@@ -121,11 +161,11 @@ There's also a couple of mod shortcuts you can use:
|
|||||||
|
|
||||||
* `SS_LCTL(string)`
|
* `SS_LCTL(string)`
|
||||||
* `SS_LSFT(string)`
|
* `SS_LSFT(string)`
|
||||||
* `SS_LALT(string)`
|
* `SS_LALT(string)` or `SS_LOPT(string)`
|
||||||
* `SS_LGUI(string)`, `SS_LCMD(string)` or `SS_LWIN(string)`
|
* `SS_LGUI(string)`, `SS_LCMD(string)` or `SS_LWIN(string)`
|
||||||
* `SS_RCTL(string)`
|
* `SS_RCTL(string)`
|
||||||
* `SS_RSFT(string)`
|
* `SS_RSFT(string)`
|
||||||
* `SS_RALT(string)` or `SS_ALGR(string)`
|
* `SS_RALT(string)`, `SS_ROPT(string)` or `SS_ALGR(string)`
|
||||||
* `SS_RGUI(string)`, `SS_RCMD(string)` or `SS_RWIN(string)`
|
* `SS_RGUI(string)`, `SS_RCMD(string)` or `SS_RWIN(string)`
|
||||||
|
|
||||||
These press the respective modifier, send the supplied string and then release the modifier.
|
These press the respective modifier, send the supplied string and then release the modifier.
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
## Pointing Device
|
# Pointing Device :id=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.
|
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:
|
To enable Pointing Device, uncomment the following line in your rules.mk:
|
||||||
|
|
||||||
```
|
```makefile
|
||||||
POINTING_DEVICE_ENABLE = yes
|
POINTING_DEVICE_ENABLE = yes
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -25,22 +25,19 @@ When the mouse report is sent, the x, y, v, and h values are set to 0 (this is d
|
|||||||
|
|
||||||
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:
|
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:
|
||||||
|
|
||||||
```
|
```c
|
||||||
case MS_SPECIAL:
|
case MS_SPECIAL:
|
||||||
report_mouse_t currentReport = pointing_device_get_report();
|
report_mouse_t currentReport = pointing_device_get_report();
|
||||||
if (record->event.pressed)
|
if (record->event.pressed) {
|
||||||
{
|
|
||||||
currentReport.v = 127;
|
currentReport.v = 127;
|
||||||
currentReport.h = 127;
|
currentReport.h = 127;
|
||||||
currentReport.buttons |= MOUSE_BTN1; //this is defined in report.h
|
currentReport.buttons |= MOUSE_BTN1; // this is defined in report.h
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
currentReport.v = -127;
|
currentReport.v = -127;
|
||||||
currentReport.h = -127;
|
currentReport.h = -127;
|
||||||
currentReport.buttons &= ~MOUSE_BTN1;
|
currentReport.buttons &= ~MOUSE_BTN1;
|
||||||
}
|
}
|
||||||
pointing_device_set_report(currentReport);
|
pointing_device_set_report(currentReport);
|
||||||
break;
|
break;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
## PS/2 Mouse Support
|
# PS/2 Mouse Support :id=ps2-mouse-support
|
||||||
|
|
||||||
Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device.
|
Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device.
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@ To hook up a Trackpoint, you need to obtain a Trackpoint module (i.e. harvest fr
|
|||||||
|
|
||||||
There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended).
|
There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended).
|
||||||
|
|
||||||
### The Cirtuitry between Trackpoint and Controller
|
## The Circuitry between Trackpoint and Controller :id=the-circuitry-between-trackpoint-and-controller
|
||||||
|
|
||||||
To get the things working, a 4.7K drag is needed between the two lines DATA and CLK and the line 5+.
|
To get the things working, a 4.7K drag is needed between the two lines DATA and CLK and the line 5+.
|
||||||
|
|
||||||
@@ -24,20 +24,20 @@ MODULE 5+ --------+--+--------- PWR CONTROLLER
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Busywait Version
|
## Busywait Version :id=busywait-version
|
||||||
|
|
||||||
Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.
|
Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.
|
||||||
|
|
||||||
In rules.mk:
|
In rules.mk:
|
||||||
|
|
||||||
```
|
```makefile
|
||||||
PS2_MOUSE_ENABLE = yes
|
PS2_MOUSE_ENABLE = yes
|
||||||
PS2_USE_BUSYWAIT = yes
|
PS2_USE_BUSYWAIT = yes
|
||||||
```
|
```
|
||||||
|
|
||||||
In your keyboard config.h:
|
In your keyboard config.h:
|
||||||
|
|
||||||
```
|
```c
|
||||||
#ifdef PS2_USE_BUSYWAIT
|
#ifdef PS2_USE_BUSYWAIT
|
||||||
# define PS2_CLOCK_PORT PORTD
|
# define PS2_CLOCK_PORT PORTD
|
||||||
# define PS2_CLOCK_PIN PIND
|
# define PS2_CLOCK_PIN PIND
|
||||||
@@ -50,20 +50,20 @@ In your keyboard config.h:
|
|||||||
#endif
|
#endif
|
||||||
```
|
```
|
||||||
|
|
||||||
### Interrupt Version
|
## Interrupt Version :id=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.
|
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:
|
In rules.mk:
|
||||||
|
|
||||||
```
|
```makefile
|
||||||
PS2_MOUSE_ENABLE = yes
|
PS2_MOUSE_ENABLE = yes
|
||||||
PS2_USE_INT = yes
|
PS2_USE_INT = yes
|
||||||
```
|
```
|
||||||
|
|
||||||
In your keyboard config.h:
|
In your keyboard config.h:
|
||||||
|
|
||||||
```
|
```c
|
||||||
#ifdef PS2_USE_INT
|
#ifdef PS2_USE_INT
|
||||||
#define PS2_CLOCK_PORT PORTD
|
#define PS2_CLOCK_PORT PORTD
|
||||||
#define PS2_CLOCK_PIN PIND
|
#define PS2_CLOCK_PIN PIND
|
||||||
@@ -88,20 +88,20 @@ In your keyboard config.h:
|
|||||||
#endif
|
#endif
|
||||||
```
|
```
|
||||||
|
|
||||||
### USART Version
|
## USART Version :id=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.
|
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:
|
In rules.mk:
|
||||||
|
|
||||||
```
|
```makefile
|
||||||
PS2_MOUSE_ENABLE = yes
|
PS2_MOUSE_ENABLE = yes
|
||||||
PS2_USE_USART = yes
|
PS2_USE_USART = yes
|
||||||
```
|
```
|
||||||
|
|
||||||
In your keyboard config.h:
|
In your keyboard config.h:
|
||||||
|
|
||||||
```
|
```c
|
||||||
#ifdef PS2_USE_USART
|
#ifdef PS2_USE_USART
|
||||||
#define PS2_CLOCK_PORT PORTD
|
#define PS2_CLOCK_PORT PORTD
|
||||||
#define PS2_CLOCK_PIN PIND
|
#define PS2_CLOCK_PIN PIND
|
||||||
@@ -145,13 +145,13 @@ In your keyboard config.h:
|
|||||||
#endif
|
#endif
|
||||||
```
|
```
|
||||||
|
|
||||||
### Additional Settings
|
## Additional Settings :id=additional-settings
|
||||||
|
|
||||||
#### PS/2 Mouse Features
|
### PS/2 Mouse Features :id=ps2-mouse-features
|
||||||
|
|
||||||
These enable settings supported by the PS/2 mouse protocol.
|
These enable settings supported by the PS/2 mouse protocol.
|
||||||
|
|
||||||
```
|
```c
|
||||||
/* Use remote mode instead of the default stream mode (see link) */
|
/* Use remote mode instead of the default stream mode (see link) */
|
||||||
#define PS2_MOUSE_USE_REMOTE_MODE
|
#define PS2_MOUSE_USE_REMOTE_MODE
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ These enable settings supported by the PS/2 mouse protocol.
|
|||||||
|
|
||||||
You can also call the following functions from ps2_mouse.h
|
You can also call the following functions from ps2_mouse.h
|
||||||
|
|
||||||
```
|
```c
|
||||||
void ps2_mouse_disable_data_reporting(void);
|
void ps2_mouse_disable_data_reporting(void);
|
||||||
|
|
||||||
void ps2_mouse_enable_data_reporting(void);
|
void ps2_mouse_enable_data_reporting(void);
|
||||||
@@ -188,36 +188,36 @@ void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
|
|||||||
void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
|
void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Fine Control
|
### Fine Control :id=fine-control
|
||||||
|
|
||||||
Use the following defines to change the sensitivity and speed of the mouse.
|
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).
|
Note: you can also use `ps2_mouse_set_resolution` for the same effect (not supported on most touchpads).
|
||||||
|
|
||||||
```
|
```c
|
||||||
#define PS2_MOUSE_X_MULTIPLIER 3
|
#define PS2_MOUSE_X_MULTIPLIER 3
|
||||||
#define PS2_MOUSE_Y_MULTIPLIER 3
|
#define PS2_MOUSE_Y_MULTIPLIER 3
|
||||||
#define PS2_MOUSE_V_MULTIPLIER 1
|
#define PS2_MOUSE_V_MULTIPLIER 1
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Scroll Button
|
### Scroll Button :id=scroll-button
|
||||||
|
|
||||||
If you're using a trackpoint, you will likely want to be able to use it for scrolling.
|
If you're using a trackpoint, you will likely want to be able to use it for scrolling.
|
||||||
It's possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving.
|
It's possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving.
|
||||||
To enable the feature, you must set a scroll button mask as follows:
|
To enable the feature, you must set a scroll button mask as follows:
|
||||||
|
|
||||||
```
|
```c
|
||||||
#define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BUTTON_MIDDLE) /* Default */
|
#define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BUTTON_MIDDLE) /* Default */
|
||||||
```
|
```
|
||||||
|
|
||||||
To disable the scroll button feature:
|
To disable the scroll button feature:
|
||||||
|
|
||||||
```
|
```c
|
||||||
#define PS2_MOUSE_SCROLL_BTN_MASK 0
|
#define PS2_MOUSE_SCROLL_BTN_MASK 0
|
||||||
```
|
```
|
||||||
|
|
||||||
The available buttons are:
|
The available buttons are:
|
||||||
|
|
||||||
```
|
```c
|
||||||
#define PS2_MOUSE_BTN_LEFT 0
|
#define PS2_MOUSE_BTN_LEFT 0
|
||||||
#define PS2_MOUSE_BTN_RIGHT 1
|
#define PS2_MOUSE_BTN_RIGHT 1
|
||||||
#define PS2_MOUSE_BTN_MIDDLE 2
|
#define PS2_MOUSE_BTN_MIDDLE 2
|
||||||
@@ -229,27 +229,28 @@ Once you've configured your scroll button mask, you must configure the scroll bu
|
|||||||
This is the interval before which if the scroll buttons were released they would be sent to the host.
|
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.
|
After this interval, they will cause the mouse to scroll and will not be sent.
|
||||||
|
|
||||||
```
|
```c
|
||||||
#define PS2_MOUSE_SCROLL_BTN_SEND 300 /* Default */
|
#define PS2_MOUSE_SCROLL_BTN_SEND 300 /* Default */
|
||||||
```
|
```
|
||||||
|
|
||||||
To disable sending the scroll buttons:
|
To disable sending the scroll buttons:
|
||||||
```
|
|
||||||
|
```c
|
||||||
#define PS2_MOUSE_SCROLL_BTN_SEND 0
|
#define PS2_MOUSE_SCROLL_BTN_SEND 0
|
||||||
```
|
```
|
||||||
|
|
||||||
Fine control over the scrolling is supported with the following defines:
|
Fine control over the scrolling is supported with the following defines:
|
||||||
|
|
||||||
```
|
```c
|
||||||
#define PS2_MOUSE_SCROLL_DIVISOR_H 2
|
#define PS2_MOUSE_SCROLL_DIVISOR_H 2
|
||||||
#define PS2_MOUSE_SCROLL_DIVISOR_V 2
|
#define PS2_MOUSE_SCROLL_DIVISOR_V 2
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Invert Mouse and Scroll Axes
|
### Invert Mouse and Scroll Axes :id=invert-mouse-and-scroll-axes
|
||||||
|
|
||||||
To invert the X and Y axes you can put:
|
To invert the X and Y axes you can put:
|
||||||
|
|
||||||
```
|
```c
|
||||||
#define PS2_MOUSE_INVERT_X
|
#define PS2_MOUSE_INVERT_X
|
||||||
#define PS2_MOUSE_INVERT_Y
|
#define PS2_MOUSE_INVERT_Y
|
||||||
```
|
```
|
||||||
@@ -258,18 +259,37 @@ into config.h.
|
|||||||
|
|
||||||
To reverse the scroll axes you can put:
|
To reverse the scroll axes you can put:
|
||||||
|
|
||||||
```
|
```c
|
||||||
#define PS2_MOUSE_INVERT_H
|
#define PS2_MOUSE_INVERT_H
|
||||||
#define PS2_MOUSE_INVERT_V
|
#define PS2_MOUSE_INVERT_V
|
||||||
```
|
```
|
||||||
|
|
||||||
into config.h.
|
into config.h.
|
||||||
|
|
||||||
#### Debug Settings
|
### Rotate Mouse Axes :id=rotate-mouse-axes
|
||||||
|
|
||||||
|
Transform the output of the device with a clockwise rotation of 90, 180, or 270
|
||||||
|
degrees.
|
||||||
|
|
||||||
|
When compensating for device orientation, rotate the output the same amount in
|
||||||
|
the opposite direction. E.g. if the normal device orientation is considered to
|
||||||
|
be North-facing, compensate as follows:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define PS2_MOUSE_ROTATE 270 /* Compensate for East-facing device orientation. */
|
||||||
|
```
|
||||||
|
```c
|
||||||
|
#define PS2_MOUSE_ROTATE 180 /* Compensate for South-facing device orientation. */
|
||||||
|
```
|
||||||
|
```c
|
||||||
|
#define PS2_MOUSE_ROTATE 90 /* Compensate for West-facing device orientation. */
|
||||||
|
```
|
||||||
|
|
||||||
|
### Debug Settings :id=debug-settings
|
||||||
|
|
||||||
To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
|
To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
|
||||||
|
|
||||||
```
|
```c
|
||||||
/* To debug the mouse reports */
|
/* To debug the mouse reports */
|
||||||
#define PS2_MOUSE_DEBUG_HID
|
#define PS2_MOUSE_DEBUG_HID
|
||||||
#define PS2_MOUSE_DEBUG_RAW
|
#define PS2_MOUSE_DEBUG_RAW
|
||||||
|
69
docs/feature_rawhid.md
Normal file
69
docs/feature_rawhid.md
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# Raw HID
|
||||||
|
|
||||||
|
Raw HID allows for bidirectional communication between QMK and the host computer over an HID interface. This has many potential use cases, such as switching keymaps on the fly or changing RGB LED colors and modes.
|
||||||
|
|
||||||
|
There are two main components to getting raw HID working with your keyboard.
|
||||||
|
|
||||||
|
## Keyboard firmware
|
||||||
|
|
||||||
|
The implementation is fairly straightforward for the firmware.
|
||||||
|
In your `rules.mk` add:
|
||||||
|
|
||||||
|
```make
|
||||||
|
RAW_ENABLE = yes
|
||||||
|
```
|
||||||
|
|
||||||
|
In your `keymap.c` include `"raw_hid.h"` and implement the following:
|
||||||
|
|
||||||
|
```C
|
||||||
|
void raw_hid_receive(uint8_t *data, uint8_t length) {
|
||||||
|
// Your code goes here. data is the packet received from host.
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The `"raw_hid.h"` header also declares `void raw_hid_send(uint8_t *data, uint8_t length);` which allows sending packets from keyboard to host. As an example, it can also be used for debugging when building your host application by returning all data back to the host.
|
||||||
|
|
||||||
|
```C
|
||||||
|
void raw_hid_receive(uint8_t *data, uint8_t length) {
|
||||||
|
raw_hid_send(data, length);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
`raw_hid_receive` can receive variable size packets from host with maximum length `RAW_EPSIZE`. `raw_hid_send` on the other hand can send packets to host of exactly `RAW_EPSIZE` length, therefore it should be used with data of length `RAW_EPSIZE`.
|
||||||
|
|
||||||
|
Make sure to flash raw enabled firmware before proceeding with working on the host side.
|
||||||
|
|
||||||
|
## Host (Windows/macOS/Linux)
|
||||||
|
|
||||||
|
This is the more complicated part as it will require some digging.
|
||||||
|
|
||||||
|
To connect your host computer to your keyboard with raw HID you need four pieces of information about your keyboard:
|
||||||
|
|
||||||
|
1. Vendor ID
|
||||||
|
2. Product ID
|
||||||
|
3. Usage Page
|
||||||
|
4. Usage
|
||||||
|
|
||||||
|
The first two can easily be found in your keyboard's `config.h` in the keyboard's main directory under `VENDOR_ID` and `PRODUCT_ID`.
|
||||||
|
|
||||||
|
The final two can be overridden in your keyboard's `config.h` in the keyboard's main directory by redefining the values: `#define RAW_USAGE_PAGE 0xFF60` and `#define RAW_USAGE_ID 0x61`.
|
||||||
|
|
||||||
|
By default, **Usage Page** is `0xFF60` and **Usage** is `0x61`.
|
||||||
|
|
||||||
|
### Building your host
|
||||||
|
|
||||||
|
You can build your host using any language that has an available HID implementation library if you don't wish to make your own. The ones we know of for popular languages are:
|
||||||
|
|
||||||
|
* Node: [node-hid](https://github.com/node-hid/node-hid).
|
||||||
|
* C: [hidapi](https://github.com/libusb/hidapi).
|
||||||
|
* Java: [purejavahidapi](https://github.com/nyholku/purejavahidapi) and [hid4java](https://github.com/gary-rowe/hid4java).
|
||||||
|
* Python: [pyhidapi](https://pypi.org/project/hid/).
|
||||||
|
|
||||||
|
This is not an exhaustive cross-platform list but should get you started. There are no special requirements for using raw HID so any HID library should work.
|
||||||
|
|
||||||
|
Now that you have all four pieces of information required to open HID interface to your keyboard. All you need to do is use your library's available functions to open the device with its ID parameters.
|
||||||
|
|
||||||
|
Note that Vendor ID and Product ID are not actually required to open the device. They are used only to filter to a specific device out of the many HID devices you have plugged in. Many libraries will give you the option to open the device using Product Name or Manufacturer Name instead, `node-hid` being a prime example. This will create issues for devices with builtin USB Hub or any extra HID interfaces where you will have multiple interfaces with the same name or from the same manufacturer. The Vendor ID together with Product ID create a unique designation to a single interface and will not exhibit this problem. Therefore, even if your library doesn't require you to, it is best to use them to avoid issues.
|
||||||
|
Unlike Vendor ID and Product ID though, Usage Page and Usage are necessary for successful communication.
|
||||||
|
|
||||||
|
It should go without saying that regardless of the library you're using, you should always make sure to close the interface when finished. Depending on the operating system and your particular environment there may be issues connecting to it again afterwards with another client or another instance of the same client if it's not explicitly closed.
|
@@ -1,22 +1,22 @@
|
|||||||
# RGB Matrix Lighting
|
# RGB Matrix Lighting :id=rgb-matrix-lighting
|
||||||
|
|
||||||
This feature allows you to use RGB LED matrices driven by external drivers. It hooks into the RGBLIGHT system so you can use the same keycodes as RGBLIGHT to control it.
|
This feature allows you to use RGB LED matrices driven by external drivers. It hooks into the RGBLIGHT system so you can use the same keycodes as RGBLIGHT to control it.
|
||||||
|
|
||||||
If you want to use single color LED's you should use the [LED Matrix Subsystem](feature_led_matrix.md) instead.
|
If you want to use single color LED's you should use the [LED Matrix Subsystem](feature_led_matrix.md) instead.
|
||||||
|
|
||||||
## Driver configuration
|
## Driver configuration :id=driver-configuration
|
||||||
---
|
---
|
||||||
### IS31FL3731
|
### IS31FL3731 :id=is31fl3731
|
||||||
|
|
||||||
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
|
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
|
||||||
|
|
||||||
```C
|
```makefile
|
||||||
RGB_MATRIX_ENABLE = IS31FL3731
|
RGB_MATRIX_ENABLE = IS31FL3731
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure the hardware via your `config.h`:
|
Configure the hardware via your `config.h`:
|
||||||
|
|
||||||
```C
|
```c
|
||||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||||
// set to 0 for write, 1 for read (as per I2C protocol)
|
// set to 0 for write, 1 for read (as per I2C protocol)
|
||||||
// The address will vary depending on your wiring:
|
// The address will vary depending on your wiring:
|
||||||
@@ -39,7 +39,7 @@ Currently only 2 drivers are supported, but it would be trivial to support all 4
|
|||||||
|
|
||||||
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
||||||
|
|
||||||
```C
|
```c
|
||||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||||
/* Refer to IS31 manual for these locations
|
/* Refer to IS31 manual for these locations
|
||||||
* driver
|
* driver
|
||||||
@@ -55,19 +55,19 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now).
|
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now).
|
||||||
|
|
||||||
---
|
---
|
||||||
### IS31FL3733/IS31FL3737
|
### IS31FL3733/IS31FL3737 :id=is31fl3733is31fl3737
|
||||||
|
|
||||||
!> For the IS31FL3737, replace all instances of `IS31FL3733` below with `IS31FL3737`.
|
!> For the IS31FL3737, replace all instances of `IS31FL3733` below with `IS31FL3737`.
|
||||||
|
|
||||||
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`:
|
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`:
|
||||||
|
|
||||||
```C
|
```makefile
|
||||||
RGB_MATRIX_ENABLE = IS31FL3733
|
RGB_MATRIX_ENABLE = IS31FL3733
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure the hardware via your `config.h`:
|
Configure the hardware via your `config.h`:
|
||||||
|
|
||||||
```C
|
```c
|
||||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||||
// set to 0 for write, 1 for read (as per I2C protocol)
|
// set to 0 for write, 1 for read (as per I2C protocol)
|
||||||
// The address will vary depending on your wiring:
|
// The address will vary depending on your wiring:
|
||||||
@@ -90,7 +90,7 @@ Currently only a single drivers is supported, but it would be trivial to support
|
|||||||
|
|
||||||
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
||||||
|
|
||||||
```C
|
```c
|
||||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||||
/* Refer to IS31 manual for these locations
|
/* Refer to IS31 manual for these locations
|
||||||
* driver
|
* driver
|
||||||
@@ -107,17 +107,17 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### WS2812
|
### WS2812 :id=ws2812
|
||||||
|
|
||||||
There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`:
|
There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`:
|
||||||
|
|
||||||
```C
|
```makefile
|
||||||
RGB_MATRIX_ENABLE = WS2812
|
RGB_MATRIX_ENABLE = WS2812
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure the hardware via your `config.h`:
|
Configure the hardware via your `config.h`:
|
||||||
|
|
||||||
```C
|
```c
|
||||||
// The pin connected to the data pin of the LEDs
|
// The pin connected to the data pin of the LEDs
|
||||||
#define RGB_DI_PIN D7
|
#define RGB_DI_PIN D7
|
||||||
// The number of LEDs connected
|
// The number of LEDs connected
|
||||||
@@ -128,7 +128,7 @@ Configure the hardware via your `config.h`:
|
|||||||
|
|
||||||
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
|
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
|
||||||
|
|
||||||
```C
|
```c
|
||||||
const led_config_t g_led_config = { {
|
const led_config_t g_led_config = { {
|
||||||
// Key Matrix to LED Index
|
// Key Matrix to LED Index
|
||||||
{ 5, NO_LED, NO_LED, 0 },
|
{ 5, NO_LED, NO_LED, 0 },
|
||||||
@@ -146,7 +146,7 @@ const led_config_t g_led_config = { {
|
|||||||
|
|
||||||
The first part, `// Key Matrix to LED Index`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `// LED Index to Physical Position` represents the LED's physical `{ x, y }` position on the keyboard. The default expected range of values for `{ x, y }` is the inclusive range `{ 0..224, 0..64 }`. This default expected range is due to effects that calculate the center of the keyboard for their animations. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents `{ x, y }` coordinate `{ 0, 0 }` and the bottom right of your keyboard represents `{ 224, 64 }`. Using this as a basis, you can use the following formula to calculate the physical position:
|
The first part, `// Key Matrix to LED Index`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `// LED Index to Physical Position` represents the LED's physical `{ x, y }` position on the keyboard. The default expected range of values for `{ x, y }` is the inclusive range `{ 0..224, 0..64 }`. This default expected range is due to effects that calculate the center of the keyboard for their animations. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents `{ x, y }` coordinate `{ 0, 0 }` and the bottom right of your keyboard represents `{ 224, 64 }`. Using this as a basis, you can use the following formula to calculate the physical position:
|
||||||
|
|
||||||
```C
|
```c
|
||||||
x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION
|
x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION
|
||||||
y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION
|
y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION
|
||||||
```
|
```
|
||||||
@@ -157,7 +157,7 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{
|
|||||||
|
|
||||||
`// LED Index to Flag` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type.
|
`// LED Index to Flag` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type.
|
||||||
|
|
||||||
## Flags
|
## Flags :id=flags
|
||||||
|
|
||||||
|Define |Description |
|
|Define |Description |
|
||||||
|------------------------------------|-------------------------------------------|
|
|------------------------------------|-------------------------------------------|
|
||||||
@@ -169,7 +169,7 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{
|
|||||||
|`#define LED_FLAG_UNDERGLOW 0x02` |If the LED is for underglow. |
|
|`#define LED_FLAG_UNDERGLOW 0x02` |If the LED is for underglow. |
|
||||||
|`#define LED_FLAG_KEYLIGHT 0x04` |If the LED is for key backlight. |
|
|`#define LED_FLAG_KEYLIGHT 0x04` |If the LED is for key backlight. |
|
||||||
|
|
||||||
## Keycodes
|
## Keycodes :id=keycodes
|
||||||
|
|
||||||
All RGB keycodes are currently shared with the RGBLIGHT system:
|
All RGB keycodes are currently shared with the RGBLIGHT system:
|
||||||
|
|
||||||
@@ -189,11 +189,11 @@ All RGB keycodes are currently shared with the RGBLIGHT system:
|
|||||||
|
|
||||||
* `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system
|
* `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system
|
||||||
|
|
||||||
## RGB Matrix Effects
|
## RGB Matrix Effects :id=rgb-matrix-effects
|
||||||
|
|
||||||
All effects have been configured to support current configuration values (Hue, Saturation, Value, & Speed) unless otherwise noted below. These are the effects that are currently available:
|
All effects have been configured to support current configuration values (Hue, Saturation, Value, & Speed) unless otherwise noted below. These are the effects that are currently available:
|
||||||
|
|
||||||
```C
|
```c
|
||||||
enum rgb_matrix_effects {
|
enum rgb_matrix_effects {
|
||||||
RGB_MATRIX_NONE = 0,
|
RGB_MATRIX_NONE = 0,
|
||||||
RGB_MATRIX_SOLID_COLOR = 1, // Static single hue, no speed support
|
RGB_MATRIX_SOLID_COLOR = 1, // Static single hue, no speed support
|
||||||
@@ -285,7 +285,7 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
|
|||||||
|`#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Disables `RGB_MATRIX_SOLID_MULTISPLASH` |
|
|`#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Disables `RGB_MATRIX_SOLID_MULTISPLASH` |
|
||||||
|
|
||||||
|
|
||||||
## Custom RGB Matrix Effects
|
## Custom RGB Matrix Effects :id=custom-rgb-matrix-effects
|
||||||
|
|
||||||
By setting `RGB_MATRIX_CUSTOM_USER` (and/or `RGB_MATRIX_CUSTOM_KB`) in `rules.mk`, new effects can be defined directly from userspace, without having to edit any QMK core files.
|
By setting `RGB_MATRIX_CUSTOM_USER` (and/or `RGB_MATRIX_CUSTOM_KB`) in `rules.mk`, new effects can be defined directly from userspace, without having to edit any QMK core files.
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ To declare new effects, create a new `rgb_matrix_user/kb.inc` that looks somethi
|
|||||||
`rgb_matrix_user.inc` should go in the root of the keymap directory.
|
`rgb_matrix_user.inc` should go in the root of the keymap directory.
|
||||||
`rgb_matrix_kb.inc` should go in the root of the keyboard directory.
|
`rgb_matrix_kb.inc` should go in the root of the keyboard directory.
|
||||||
|
|
||||||
```C
|
```c
|
||||||
// !!! DO NOT ADD #pragma once !!! //
|
// !!! DO NOT ADD #pragma once !!! //
|
||||||
|
|
||||||
// Step 1.
|
// Step 1.
|
||||||
@@ -341,7 +341,7 @@ static bool my_cool_effect2(effect_params_t* params) {
|
|||||||
For inspiration and examples, check out the built-in effects under `quantum/rgb_matrix_animation/`
|
For inspiration and examples, check out the built-in effects under `quantum/rgb_matrix_animation/`
|
||||||
|
|
||||||
|
|
||||||
## Colors
|
## Colors :id=colors
|
||||||
|
|
||||||
These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions.
|
These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions.
|
||||||
|
|
||||||
@@ -369,9 +369,9 @@ These are shorthands to popular colors. The `RGB` ones can be passed to the `set
|
|||||||
These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list!
|
These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list!
|
||||||
|
|
||||||
|
|
||||||
## Additional `config.h` Options
|
## Additional `config.h` Options :id=additional-configh-options
|
||||||
|
|
||||||
```C
|
```c
|
||||||
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||||
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
||||||
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||||
@@ -386,28 +386,102 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
|
|||||||
#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
|
#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
|
||||||
```
|
```
|
||||||
|
|
||||||
## EEPROM storage
|
## EEPROM storage :id=eeprom-storage
|
||||||
|
|
||||||
The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with:
|
The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with:
|
||||||
|
|
||||||
```C
|
```c
|
||||||
#define EECONFIG_RGB_MATRIX (uint32_t *)28
|
#define EECONFIG_RGB_MATRIX (uint32_t *)28
|
||||||
```
|
```
|
||||||
|
|
||||||
Where `28` is an unused index from `eeconfig.h`.
|
Where `28` is an unused index from `eeconfig.h`.
|
||||||
|
|
||||||
## Suspended state
|
## Functions :id=functions
|
||||||
|
|
||||||
To use the suspend feature, add this to your `<keyboard>.c`:
|
### Direct Operation :id=direct-operation
|
||||||
|
|Function |Description |
|
||||||
|
|--------------------------------------------|-------------|
|
||||||
|
|`rgb_matrix_set_color_all(r, g, b)` |Set all of the LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||||
|
|`rgb_matrix_set_color(index, r, g, b)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255, and `index` is between 0 and `DRIVER_LED_TOTAL` (not written to EEPROM) |
|
||||||
|
|
||||||
```C
|
### Disable/Enable Effects :id=disable-enable-effects
|
||||||
void suspend_power_down_kb(void)
|
|Function |Description |
|
||||||
{
|
|--------------------------------------------|-------------|
|
||||||
|
|`rgb_matrix_toggle()` |Toggle effect range LEDs between on and off |
|
||||||
|
|`rgb_matrix_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) |
|
||||||
|
|`rgb_matrix_enable()` |Turn effect range LEDs on, based on their previous state |
|
||||||
|
|`rgb_matrix_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) |
|
||||||
|
|`rgb_matrix_disable()` |Turn effect range LEDs off |
|
||||||
|
|`rgb_matrix_disable_noeeprom()` |Turn effect range LEDs off (not written to EEPROM) |
|
||||||
|
|
||||||
|
### Change Effect Mode :id=change-effect-mode
|
||||||
|
|Function |Description |
|
||||||
|
|--------------------------------------------|-------------|
|
||||||
|
|`rgb_matrix_mode(mode)` |Set the mode, if RGB animations are enabled |
|
||||||
|
|`rgb_matrix_mode_noeeprom(mode)` |Set the mode, if RGB animations are enabled (not written to EEPROM) |
|
||||||
|
|`rgb_matrix_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
|
||||||
|
|`rgb_matrix_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
|
||||||
|
|`rgb_matrix_increase_speed()` |Increases the speed of the animations |
|
||||||
|
|`rgb_matrix_decrease_speed()` |Decreases the speed of the animations |
|
||||||
|
|
||||||
|
### Change Color :id=change-color
|
||||||
|
|Function |Description |
|
||||||
|
|--------------------------------------------|-------------|
|
||||||
|
|`rgb_matrix_increase_hue()` |Increase the hue for effect range LEDs. This wraps around at maximum hue |
|
||||||
|
|`rgb_matrix_decrease_hue()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue |
|
||||||
|
|`rgb_matrix_increase_sat()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation |
|
||||||
|
|`rgb_matrix_decrease_sat()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation |
|
||||||
|
|`rgb_matrix_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value |
|
||||||
|
|`rgb_matrix_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value |
|
||||||
|
|`rgb_matrix_sethsv(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 |
|
||||||
|
|`rgb_matrix_sethsv_noeeprom(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||||
|
|
||||||
|
### Query Current Status :id=query-current-status
|
||||||
|
|Function |Description |
|
||||||
|
|---------------------------------|---------------------------|
|
||||||
|
|`rgb_matrix_is_enabled()` |Gets current on/off status |
|
||||||
|
|`rgb_matrix_get_mode()` |Gets current mode |
|
||||||
|
|`rgb_matrix_get_hue()` |Gets current hue |
|
||||||
|
|`rgb_matrix_get_sat()` |Gets current sat |
|
||||||
|
|`rgb_matrix_get_val()` |Gets current val |
|
||||||
|
|`rgb_matrix_get_hsv()` |Gets hue, sat, and val and returns a [`HSV` structure](https://github.com/qmk/qmk_firmware/blob/7ba6456c0b2e041bb9f97dbed265c5b8b4b12192/quantum/color.h#L56-L61)|
|
||||||
|
|`rgb_matrix_get_speed()` |Gets current speed |
|
||||||
|
|`rgb_matrix_get_suspend_state()` |Gets current suspend state |
|
||||||
|
|
||||||
|
## Callbacks :id=callbacks
|
||||||
|
|
||||||
|
### Indicators :id=indicators
|
||||||
|
|
||||||
|
If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `rgb_matrix_indicators_kb` or `rgb_matrix_indicators_user` function for that:
|
||||||
|
```c
|
||||||
|
void rgb_matrix_indicators_kb(void) {
|
||||||
|
rgb_matrix_set_color(index, red, green, blue);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Suspended state :id=suspended-state
|
||||||
|
To use the suspend feature, make sure that `#define RGB_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file.
|
||||||
|
|
||||||
|
Additionally add this to your `<keyboard>.c`:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void suspend_power_down_kb(void) {
|
||||||
|
rgb_matrix_set_suspend_state(true);
|
||||||
|
suspend_power_down_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void suspend_wakeup_init_kb(void) {
|
||||||
|
rgb_matrix_set_suspend_state(false);
|
||||||
|
suspend_wakeup_init_user();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
or add this to your `keymap.c`:
|
||||||
|
```c
|
||||||
|
void suspend_power_down_user(void) {
|
||||||
rgb_matrix_set_suspend_state(true);
|
rgb_matrix_set_suspend_state(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void suspend_wakeup_init_kb(void)
|
void suspend_wakeup_init_user(void) {
|
||||||
{
|
|
||||||
rgb_matrix_set_suspend_state(false);
|
rgb_matrix_set_suspend_state(false);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@@ -94,6 +94,7 @@ if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a n
|
|||||||
|`RGBLIGHT_MODE_STATIC_GRADIENT`| 0,1,..,9 |Static gradient |
|
|`RGBLIGHT_MODE_STATIC_GRADIENT`| 0,1,..,9 |Static gradient |
|
||||||
|`RGBLIGHT_MODE_RGB_TEST` | *None* |RGB Test |
|
|`RGBLIGHT_MODE_RGB_TEST` | *None* |RGB Test |
|
||||||
|`RGBLIGHT_MODE_ALTERNATING` | *None* |Alternating |
|
|`RGBLIGHT_MODE_ALTERNATING` | *None* |Alternating |
|
||||||
|
|`RGBLIGHT_MODE_TWINKLE` | 0,1,2,3,4,5 |Twinkle |
|
||||||
|
|
||||||
Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstration.
|
Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstration.
|
||||||
|
|
||||||
@@ -103,8 +104,8 @@ Note: For versions older than 0.6.117, The mode numbers were written directly. I
|
|||||||
|
|
||||||
Use these defines to add or remove animations from the firmware. When you are running low on flash space, it can be helpful to disable animations you are not using.
|
Use these defines to add or remove animations from the firmware. When you are running low on flash space, it can be helpful to disable animations you are not using.
|
||||||
|
|
||||||
|Define |Default |Description |
|
|Define |Default |Description |
|
||||||
|------------------------------------|-------------|-------------------------------------------------------------------------------------|
|
|------------------------------------|-------------|-------------------------------------------------------------------------|
|
||||||
|`RGBLIGHT_ANIMATIONS` |*Not defined*|Enable all additional animation modes. |
|
|`RGBLIGHT_ANIMATIONS` |*Not defined*|Enable all additional animation modes. |
|
||||||
|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|Enable alternating animation mode. |
|
|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|Enable alternating animation mode. |
|
||||||
|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|Enable breathing animation mode. |
|
|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|Enable breathing animation mode. |
|
||||||
@@ -115,6 +116,7 @@ Use these defines to add or remove animations from the firmware. When you are ru
|
|||||||
|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|Enable RGB test animation mode. |
|
|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|Enable RGB test animation mode. |
|
||||||
|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|Enable snake animation mode. |
|
|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|Enable snake animation mode. |
|
||||||
|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|Enable static gradient mode. |
|
|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|Enable static gradient mode. |
|
||||||
|
|`RGBLIGHT_EFFECT_TWINKLE` |*Not defined*|Enable twinkle animation mode. |
|
||||||
|
|
||||||
### Effect and Animation Settings
|
### Effect and Animation Settings
|
||||||
|
|
||||||
@@ -131,6 +133,8 @@ The following options are used to tweak the various animations:
|
|||||||
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|
||||||
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls |
|
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls |
|
||||||
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
||||||
|
|`RGBLIGHT_EFFECT_TWINKLE_LIFE` |`75` |Adjusts how quickly each LED brightens and dims when twinkling (in animation steps) |
|
||||||
|
|`RGBLIGHT_EFFECT_TWINKLE_PROBABILITY`|`1/127` |Adjusts how likely each LED is to twinkle (on each animation step) |
|
||||||
|
|
||||||
### Example Usage to Reduce Memory Footprint
|
### Example Usage to Reduce Memory Footprint
|
||||||
1. Remove `RGBLIGHT_ANIMATIONS` from `config.h`.
|
1. Remove `RGBLIGHT_ANIMATIONS` from `config.h`.
|
||||||
@@ -168,6 +172,9 @@ const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20};
|
|||||||
// How long (in milliseconds) to wait between animation steps for each of the "Knight" animations
|
// How long (in milliseconds) to wait between animation steps for each of the "Knight" animations
|
||||||
const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31};
|
const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31};
|
||||||
|
|
||||||
|
// How long (in milliseconds) to wait between animation steps for each of the "Twinkle" animations
|
||||||
|
const uint8_t RGBLED_TWINKLE_INTERVALS[] PROGMEM = {50, 25, 10};
|
||||||
|
|
||||||
// These control which hues are selected for each of the "Static gradient" modes
|
// These control which hues are selected for each of the "Static gradient" modes
|
||||||
const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
|
const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
|
||||||
```
|
```
|
||||||
@@ -175,23 +182,27 @@ const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
|
|||||||
## Lighting Layers
|
## Lighting Layers
|
||||||
|
|
||||||
By including `#define RGBLIGHT_LAYERS` in your `config.h` file you can enable lighting layers. These make
|
By including `#define RGBLIGHT_LAYERS` in your `config.h` file you can enable lighting layers. These make
|
||||||
it easy to use your underglow LEDs as status indicators to show which keyboard layer is currently active, or the state of caps lock, all without disrupting any animations. [Here's a video](https://youtu.be/uLGE1epbmdY) showing an example of what you can do.
|
it easy to use your underglow LEDs as status indicators to show which keyboard layer is currently active, or the state of caps lock, all without disrupting any animations. [Here's a video](https://youtu.be/uLGE1epbmdY) showing an example of what you can do.
|
||||||
|
|
||||||
|
### Defining Lighting Layers :id=defining-lighting-layers
|
||||||
|
|
||||||
|
By default, 8 layers are possible. This can be expanded to as many as 32 by overriding the definition of `RGBLIGHT_MAX_LAYERS` in `config.h` (e.g. `#define RGBLIGHT_MAX_LAYERS 32`). Please note, if you use a split keyboard, you will need to flash both sides of the split after changing this. Also, increasing the maximum will increase the firmware size, and will slow sync on split keyboards.
|
||||||
|
|
||||||
To define a layer, we modify `keymap.c` to list out LED ranges and the colors we want to overlay on them using an array of `rgblight_segment_t` using the `RGBLIGHT_LAYER_SEGMENTS` macro. We can define multiple layers and enable/disable them independently:
|
To define a layer, we modify `keymap.c` to list out LED ranges and the colors we want to overlay on them using an array of `rgblight_segment_t` using the `RGBLIGHT_LAYER_SEGMENTS` macro. We can define multiple layers and enable/disable them independently:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
// Light LEDs 6 to 9 and 12 to 15 red when caps lock is active. Hard to ignore!
|
// Light LEDs 6 to 9 and 12 to 15 red when caps lock is active. Hard to ignore!
|
||||||
const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||||
{6, 4, HSV_RED}, // Light 4 LEDs, starting with LED 6
|
{6, 4, HSV_RED}, // Light 4 LEDs, starting with LED 6
|
||||||
{12, 4, HSV_RED} // Light 4 LEDs, starting with LED 12
|
{12, 4, HSV_RED} // Light 4 LEDs, starting with LED 12
|
||||||
);
|
);
|
||||||
// Light LEDs 9 & 10 in cyan when keyboard layer 1 is active
|
// Light LEDs 9 & 10 in cyan when keyboard layer 1 is active
|
||||||
const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||||
{9, 2, HSV_CYAN}
|
{9, 2, HSV_CYAN}
|
||||||
);
|
);
|
||||||
// Light LEDs 11 & 12 in purple when keyboard layer 2 is active
|
// Light LEDs 11 & 12 in purple when keyboard layer 2 is active
|
||||||
const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||||
{11, 2, HSV_PURPLE},
|
{11, 2, HSV_PURPLE}
|
||||||
);
|
);
|
||||||
// etc..
|
// etc..
|
||||||
```
|
```
|
||||||
@@ -201,30 +212,69 @@ We combine these layers into an array using the `RGBLIGHT_LAYERS_LIST` macro, an
|
|||||||
```c
|
```c
|
||||||
// Now define the array of layers. Later layers take precedence
|
// Now define the array of layers. Later layers take precedence
|
||||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
||||||
my_capslock_layer,
|
my_capslock_layer,
|
||||||
my_layer1_layer, // Overrides caps lock layer
|
my_layer1_layer, // Overrides caps lock layer
|
||||||
my_layer2_layer // Overrides other layers
|
my_layer2_layer // Overrides other layers
|
||||||
);
|
);
|
||||||
|
|
||||||
void keyboard_post_init_user(void) {
|
void keyboard_post_init_user(void) {
|
||||||
// Enable the LED layers
|
// Enable the LED layers
|
||||||
rgblight_layers = my_rgb_layers;
|
rgblight_layers = my_rgb_layers;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Note: For split keyboards with two controllers, both sides need to be flashed when updating the contents of rgblight_layers.
|
||||||
|
|
||||||
Finally, we enable and disable the lighting layers whenever the state of the keyboard changes:
|
### Enabling and disabling lighting layers :id=enabling-lighting-layers
|
||||||
|
|
||||||
|
Everything above just configured the definition of each lighting layer.
|
||||||
|
We can now enable and disable the lighting layers whenever the state of the keyboard changes:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
// Both layers will light up if both kb layers are active
|
// Both layers will light up if both kb layers are active
|
||||||
rgblight_set_layer_state(1, layer_state_cmp(state, 1));
|
rgblight_set_layer_state(1, layer_state_cmp(state, 1));
|
||||||
rgblight_set_layer_state(2, layer_state_cmp(state, 2));
|
rgblight_set_layer_state(2, layer_state_cmp(state, 2));
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_user(led_t led_state) {
|
bool led_update_user(led_t led_state) {
|
||||||
rgblight_set_layer_state(0, led_state.caps_lock);
|
rgblight_set_layer_state(0, led_state.caps_lock);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Lighting layer blink :id=lighting-layer-blink
|
||||||
|
|
||||||
|
By including `#define RGBLIGHT_LAYER_BLINK` in your `config.h` file you can turn a lighting
|
||||||
|
layer on for a specified duration. Once the specified number of milliseconds has elapsed
|
||||||
|
the layer will be turned off. This is useful, e.g., if you want to acknowledge some
|
||||||
|
action (e.g. toggling some setting):
|
||||||
|
|
||||||
|
```c
|
||||||
|
const rgblight_segment_t PROGMEM _yes_layer[] = RGBLIGHT_LAYER_SEGMENTS( {9, 6, HSV_GREEN} );
|
||||||
|
const rgblight_segment_t PROGMEM _no_layer[] = RGBLIGHT_LAYER_SEGMENTS( {9, 6, HSV_RED} );
|
||||||
|
|
||||||
|
const rgblight_segment_t* const PROGMEM _rgb_layers[] =
|
||||||
|
RGBLIGHT_LAYERS_LIST( _yes_layer, _no_layer );
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
rgblight_layers = _rgb_layers;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note we user post_process_record_user because we want the state
|
||||||
|
// after the flag has been flipped...
|
||||||
|
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case DEBUG:
|
||||||
|
rgblight_blink_layer(debug_enable ? 0 : 1, 500);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NK_TOGG:
|
||||||
|
case NK_ON:
|
||||||
|
case NK_OFF:
|
||||||
|
rgblight_blink_layer(keymap_config.nkro ? 0 : 1, 500);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -326,12 +376,14 @@ rgblight_sethsv(HSV_GREEN, 2); // led 2
|
|||||||
|`rgblight_set_layer_state(i, is_on)` |Enable or disable lighting layer `i` based on value of `bool is_on` |
|
|`rgblight_set_layer_state(i, is_on)` |Enable or disable lighting layer `i` based on value of `bool is_on` |
|
||||||
|
|
||||||
#### query
|
#### query
|
||||||
|Function |Description |
|
|Function |Description |
|
||||||
|-----------------------|-----------------|
|
|-----------------------|---------------------------|
|
||||||
|`rgblight_get_mode()` |Get current mode |
|
|`rgblight_is_enabled()`|Gets current on/off status |
|
||||||
|`rgblight_get_hue()` |Get current hue |
|
|`rgblight_get_mode()` |Gets current mode |
|
||||||
|`rgblight_get_sat()` |Get current sat |
|
|`rgblight_get_hue()` |Gets current hue |
|
||||||
|`rgblight_get_val()` |Get current val |
|
|`rgblight_get_sat()` |Gets current sat |
|
||||||
|
|`rgblight_get_val()` |Gets current val |
|
||||||
|
|`rgblight_get_speed()` |Gets current speed |
|
||||||
|
|
||||||
## Colors
|
## Colors
|
||||||
|
|
||||||
|
@@ -8,9 +8,20 @@ QMK Firmware has a generic implementation that is usable by any board, as well a
|
|||||||
|
|
||||||
For this, we will mostly be talking about the generic implementation used by the Let's Split and other keyboards.
|
For this, we will mostly be talking about the generic implementation used by the Let's Split and other keyboards.
|
||||||
|
|
||||||
!> ARM is not yet supported for Split Keyboards. Progress is being made, but we are not quite there, yet.
|
!> ARM is not yet fully supported for Split Keyboards and has many limitations. Progress is being made, but we have not yet reached 100% feature parity.
|
||||||
|
|
||||||
|
|
||||||
|
## Compatibility Overview
|
||||||
|
|
||||||
|
| Transport | AVR | ARM |
|
||||||
|
|------------------------------|--------------------|--------------------|
|
||||||
|
| ['serial'](serial_driver.md) | :heavy_check_mark: | :white_check_mark: <sup>1</sup> |
|
||||||
|
| I2C | :heavy_check_mark: | |
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
|
||||||
|
1. Both hardware and software limitations are detailed within the [driver documentation](serial_driver.md).
|
||||||
|
|
||||||
## Hardware Configuration
|
## Hardware Configuration
|
||||||
|
|
||||||
This assumes that you're using two Pro Micro-compatible controllers, and are using TRRS jacks to connect to two halves.
|
This assumes that you're using two Pro Micro-compatible controllers, and are using TRRS jacks to connect to two halves.
|
||||||
|
@@ -1,16 +1,16 @@
|
|||||||
# Stenography in QMK
|
# Stenography in QMK :id=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).
|
[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
|
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 with QWERTY Keyboard :id=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.
|
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.
|
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 with Steno Protocol :id=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`.
|
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`.
|
||||||
|
|
||||||
@@ -20,26 +20,26 @@ In this mode Plover expects to speak with a steno machine over a serial port so
|
|||||||
|
|
||||||
> Note: Due to hardware limitations you may not be able to run both a virtual serial port and mouse emulation at the same time.
|
> 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 :id=tx-bolt
|
||||||
|
|
||||||
TX Bolt communicates the status of 24 keys over a very simple protocol in variable-sized (1-5 byte) packets.
|
TX Bolt communicates the status of 24 keys over a very simple protocol in variable-sized (1-5 byte) packets.
|
||||||
|
|
||||||
### GeminiPR
|
### GeminiPR :id=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.
|
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
|
## Configuring QMK for Steno :id=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.
|
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
|
```makefile
|
||||||
STENO_ENABLE = yes
|
STENO_ENABLE = yes
|
||||||
MOUSEKEY_ENABLE = no
|
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:
|
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
|
```c
|
||||||
void matrix_init_user() {
|
void matrix_init_user() {
|
||||||
steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT
|
steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT
|
||||||
}
|
}
|
||||||
@@ -49,37 +49,37 @@ Once you have your keyboard flashed launch Plover. Click the 'Configure...' butt
|
|||||||
|
|
||||||
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!
|
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
|
## Learning Stenography :id=learning-stenography
|
||||||
|
|
||||||
* [Learn Plover!](https://sites.google.com/site/learnplover/)
|
* [Learn Plover!](https://sites.google.com/site/learnplover/)
|
||||||
* [QWERTY Steno](http://qwertysteno.com/Home/)
|
* [QWERTY Steno](http://qwertysteno.com/Home/)
|
||||||
* [Steno Jig](https://joshuagrams.github.io/steno-jig/)
|
* [Steno Jig](https://joshuagrams.github.io/steno-jig/)
|
||||||
* More resources at the Plover [Learning Stenography](https://github.com/openstenoproject/plover/wiki/Learning-Stenography) wiki
|
* More resources at the Plover [Learning Stenography](https://github.com/openstenoproject/plover/wiki/Learning-Stenography) wiki
|
||||||
|
|
||||||
## Interfacing with the code
|
## Interfacing with the code :id=interfacing-with-the-code
|
||||||
|
|
||||||
The steno code has three interceptible hooks. If you define these functions, they will be called at certain points in processing; if they return true, processing continues, otherwise it's assumed you handled things.
|
The steno code has three interceptible hooks. If you define these functions, they will be called at certain points in processing; if they return true, processing continues, otherwise it's assumed you handled things.
|
||||||
|
|
||||||
```C
|
```c
|
||||||
bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]);
|
bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]);
|
||||||
```
|
```
|
||||||
|
|
||||||
This function is called when a chord is about to be sent. Mode will be one of `STENO_MODE_BOLT` or `STENO_MODE_GEMINI`. This represents the actual chord that would be sent via whichever protocol. You can modify the chord provided to alter what gets sent. Remember to return true if you want the regular sending process to happen.
|
This function is called when a chord is about to be sent. Mode will be one of `STENO_MODE_BOLT` or `STENO_MODE_GEMINI`. This represents the actual chord that would be sent via whichever protocol. You can modify the chord provided to alter what gets sent. Remember to return true if you want the regular sending process to happen.
|
||||||
|
|
||||||
```C
|
```c
|
||||||
bool process_steno_user(uint16_t keycode, keyrecord_t *record) { return true; }
|
bool process_steno_user(uint16_t keycode, keyrecord_t *record) { return true; }
|
||||||
```
|
```
|
||||||
|
|
||||||
This function is called when a keypress has come in, before it is processed. The keycode should be one of `QK_STENO_BOLT`, `QK_STENO_GEMINI`, or one of the `STN_*` key values.
|
This function is called when a keypress has come in, before it is processed. The keycode should be one of `QK_STENO_BOLT`, `QK_STENO_GEMINI`, or one of the `STN_*` key values.
|
||||||
|
|
||||||
```C
|
```c
|
||||||
bool postprocess_steno_user(uint16_t keycode, keyrecord_t *record, steno_mode_t mode, uint8_t chord[6], int8_t pressed);
|
bool postprocess_steno_user(uint16_t keycode, keyrecord_t *record, steno_mode_t mode, uint8_t chord[6], int8_t pressed);
|
||||||
```
|
```
|
||||||
|
|
||||||
This function is called after a key has been processed, but before any decision about whether or not to send a chord. If `IS_PRESSED(record->event)` is false, and `pressed` is 0 or 1, the chord will be sent shortly, but has not yet been sent. This is where to put hooks for things like, say, live displays of steno chords or keys.
|
This function is called after a key has been processed, but before any decision about whether or not to send a chord. If `IS_PRESSED(record->event)` is false, and `pressed` is 0 or 1, the chord will be sent shortly, but has not yet been sent. This is where to put hooks for things like, say, live displays of steno chords or keys.
|
||||||
|
|
||||||
|
|
||||||
## Keycode Reference
|
## Keycode Reference :id=keycode-reference
|
||||||
|
|
||||||
As defined in `keymap_steno.h`.
|
As defined in `keymap_steno.h`.
|
||||||
|
|
||||||
|
@@ -28,3 +28,4 @@ Note that the array indices are reversed same as the matrix and the values are o
|
|||||||
|`SH_MOFF` |Momentarily turns off swap. |
|
|`SH_MOFF` |Momentarily turns off swap. |
|
||||||
|`SH_TG` |Toggles swap on and off with every key press. |
|
|`SH_TG` |Toggles swap on and off with every key press. |
|
||||||
|`SH_TT` |Toggles with a tap; momentary when held. |
|
|`SH_TT` |Toggles with a tap; momentary when held. |
|
||||||
|
|`SH_OS` |One shot swap hands: toggles while pressed or until next key press. |
|
||||||
|
@@ -90,13 +90,15 @@ Unicode input in QMK works by inputting a sequence of characters to the OS, sort
|
|||||||
|
|
||||||
The following input modes are available:
|
The following input modes are available:
|
||||||
|
|
||||||
* **`UC_OSX`**: macOS built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with Unicode Map).
|
* **`UC_MAC`**: macOS built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with Unicode Map).
|
||||||
|
|
||||||
To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar.
|
To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar.
|
||||||
By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_OSX`](#input-key-configuration) with another keycode.
|
By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_MAC`](#input-key-configuration) with another keycode.
|
||||||
|
|
||||||
!> Using the _Unicode Hex Input_ input source may disable some Option based shortcuts, such as Option + Left Arrow and Option + Right Arrow.
|
!> Using the _Unicode Hex Input_ input source may disable some Option based shortcuts, such as Option + Left Arrow and Option + Right Arrow.
|
||||||
|
|
||||||
|
!> `UC_OSX` is a deprecated alias of `UC_MAC` that will be removed in a future version of QMK.
|
||||||
|
|
||||||
* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points).
|
* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points).
|
||||||
|
|
||||||
Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else.
|
Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else.
|
||||||
@@ -124,7 +126,7 @@ You can switch the input mode at any time by using one of the following keycodes
|
|||||||
|----------------------|---------|------------|--------------------------------------------------------------|
|
|----------------------|---------|------------|--------------------------------------------------------------|
|
||||||
|`UNICODE_MODE_FORWARD`|`UC_MOD` |Next in list|[Cycle](#input-mode-cycling) through selected modes |
|
|`UNICODE_MODE_FORWARD`|`UC_MOD` |Next in list|[Cycle](#input-mode-cycling) through selected modes |
|
||||||
|`UNICODE_MODE_REVERSE`|`UC_RMOD`|Prev in list|[Cycle](#input-mode-cycling) through selected modes in reverse|
|
|`UNICODE_MODE_REVERSE`|`UC_RMOD`|Prev in list|[Cycle](#input-mode-cycling) through selected modes in reverse|
|
||||||
|`UNICODE_MODE_OSX` |`UC_M_OS`|`UC_OSX` |Switch to macOS input |
|
|`UNICODE_MODE_MAC` |`UC_M_MA`|`UC_MAC` |Switch to macOS input |
|
||||||
|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input |
|
|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input |
|
||||||
|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input |
|
|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input |
|
||||||
|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input (not implemented) |
|
|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input (not implemented) |
|
||||||
@@ -145,9 +147,9 @@ If you have the [Audio feature](feature_audio.md) enabled on the board, you can
|
|||||||
For instance, you can add these definitions to your `config.h` file:
|
For instance, you can add these definitions to your `config.h` file:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#define UNICODE_SONG_OSX COIN_SOUND
|
#define UNICODE_SONG_MAC AUDIO_ON_SOUND
|
||||||
#define UNICODE_SONG_LNX UNICODE_LINUX
|
#define UNICODE_SONG_LNX UNICODE_LINUX
|
||||||
#define UNICODE_SONG_BSD MARIO_GAMEOVER
|
#define UNICODE_SONG_BSD TERMINAL_SOUND
|
||||||
#define UNICODE_SONG_WIN UNICODE_WINDOWS
|
#define UNICODE_SONG_WIN UNICODE_WINDOWS
|
||||||
#define UNICODE_SONG_WINC UNICODE_WINDOWS
|
#define UNICODE_SONG_WINC UNICODE_WINDOWS
|
||||||
```
|
```
|
||||||
@@ -171,7 +173,7 @@ You can customize the keys used to trigger Unicode input for macOS, Linux and Wi
|
|||||||
|
|
||||||
|Define |Type |Default |Example |
|
|Define |Type |Default |Example |
|
||||||
|------------------|----------|------------------|-------------------------------------------|
|
|------------------|----------|------------------|-------------------------------------------|
|
||||||
|`UNICODE_KEY_OSX` |`uint8_t` |`KC_LALT` |`#define UNICODE_KEY_OSX KC_RALT` |
|
|`UNICODE_KEY_MAC` |`uint8_t` |`KC_LALT` |`#define UNICODE_KEY_MAC KC_RALT` |
|
||||||
|`UNICODE_KEY_LNX` |`uint16_t`|`LCTL(LSFT(KC_U))`|`#define UNICODE_KEY_LNX LCTL(LSFT(KC_E))`|
|
|`UNICODE_KEY_LNX` |`uint16_t`|`LCTL(LSFT(KC_U))`|`#define UNICODE_KEY_LNX LCTL(LSFT(KC_E))`|
|
||||||
|`UNICODE_KEY_WINC`|`uint8_t` |`KC_RALT` |`#define UNICODE_KEY_WINC KC_RGUI` |
|
|`UNICODE_KEY_WINC`|`uint8_t` |`KC_RALT` |`#define UNICODE_KEY_WINC KC_RGUI` |
|
||||||
|
|
||||||
@@ -180,7 +182,7 @@ You can customize the keys used to trigger Unicode input for macOS, Linux and Wi
|
|||||||
You can choose which input modes are available for cycling through. By default, this is disabled. If you want to enable it, limiting it to just the modes you use makes sense. Note that the values in the list are comma-delimited.
|
You can choose which input modes are available for cycling through. By default, this is disabled. If you want to enable it, limiting it to just the modes you use makes sense. Note that the values in the list are comma-delimited.
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WIN, UC_WINC
|
#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX, UC_WIN, UC_WINC
|
||||||
```
|
```
|
||||||
|
|
||||||
You can cycle through the selected modes by using the `UC_MOD`/`UC_RMOD` keycodes, or by calling `cycle_unicode_input_mode(offset)` in your code (`offset` is how many modes to move forward by, so +1 corresponds to `UC_MOD`).
|
You can cycle through the selected modes by using the `UC_MOD`/`UC_RMOD` keycodes, or by calling `cycle_unicode_input_mode(offset)` in your code (`offset` is how many modes to move forward by, so +1 corresponds to `UC_MOD`).
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# Userspace: Sharing Code Between Keymaps
|
# 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:
|
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)
|
* `/users/<name>/` (added to the path automatically)
|
||||||
* `readme.md` (optional, recommended)
|
* `readme.md` (optional, recommended)
|
||||||
@@ -73,7 +73,7 @@ The reason for this, is that `<name>.h` won't be added in time to add settings (
|
|||||||
|
|
||||||
## Readme (`readme.md`)
|
## Readme (`readme.md`)
|
||||||
|
|
||||||
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).
|
Please include authorship (your name, GitHub username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses).
|
||||||
|
|
||||||
You can use this as a template:
|
You can use this as a template:
|
||||||
```
|
```
|
||||||
@@ -93,17 +93,29 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
```
|
```
|
||||||
|
|
||||||
You'd want to replace the year, name, email and github username with your info.
|
You'd want to replace the year, name, email and GitHub username with your info.
|
||||||
|
|
||||||
Additionally, this is a good place to document your code, if you wish to share it with others.
|
Additionally, this is a good place to document your code, if you wish to share it with others.
|
||||||
|
|
||||||
# Examples
|
## Build All Keyboards That Support a Specific Keymap
|
||||||
|
|
||||||
|
Want to check all your keymaps build in a single command? You can run:
|
||||||
|
|
||||||
|
make all:<name>
|
||||||
|
|
||||||
|
For example,
|
||||||
|
|
||||||
|
make all:jack
|
||||||
|
|
||||||
|
This is ideal for when you want ensure everything compiles successfully when preparing a [_Pull request_](https://github.com/qmk/qmk_firmware/pulls).
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
For a brief example, checkout [`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna).
|
For a brief example, checkout [`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna).
|
||||||
For a more complicated example, checkout [`/users/drashna/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna)'s userspace.
|
For a more complicated example, checkout [`/users/drashna/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna)'s userspace.
|
||||||
|
|
||||||
|
|
||||||
## Customized Functions
|
### Customized Functions
|
||||||
|
|
||||||
QMK has a bunch of [functions](custom_quantum_functions.md) that have [`_quantum`, `_kb`, and `_user` versions](custom_quantum_functions.md#a-word-on-core-vs-keyboards-vs-keymap) that you can use. You will pretty much always want to use the user version of these functions. But the problem is that if you use them in your userspace, then you don't have a version that you can use in your keymap.
|
QMK has a bunch of [functions](custom_quantum_functions.md) that have [`_quantum`, `_kb`, and `_user` versions](custom_quantum_functions.md#a-word-on-core-vs-keyboards-vs-keymap) that you can use. You will pretty much always want to use the user version of these functions. But the problem is that if you use them in your userspace, then you don't have a version that you can use in your keymap.
|
||||||
|
|
||||||
@@ -130,7 +142,7 @@ The `_keymap` part here doesn't matter, it just needs to be something other than
|
|||||||
|
|
||||||
You can see a list of this and other common functions in [`template.c`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.c) in [`users/drashna`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna).
|
You can see a list of this and other common functions in [`template.c`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.c) in [`users/drashna`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna).
|
||||||
|
|
||||||
## Custom Features
|
### Custom Features
|
||||||
|
|
||||||
Since the Userspace feature can support a staggering number of boards, you may have boards that you want to enable certain functionality for, but not for others. And you can actually create "features" that you can enable or disable in your own userspace.
|
Since the Userspace feature can support a staggering number of boards, you may have boards that you want to enable certain functionality for, but not for others. And you can actually create "features" that you can enable or disable in your own userspace.
|
||||||
|
|
||||||
@@ -166,7 +178,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Consolidated Macros
|
### Consolidated Macros
|
||||||
|
|
||||||
If you wanted to consolidate macros and other functions into your userspace for all of your keymaps, you can do that. This builds upon the [Customized Functions](#customized-functions) example above. This lets you maintain a bunch of macros that are shared between the different keyboards, and allow for keyboard specific macros, too.
|
If you wanted to consolidate macros and other functions into your userspace for all of your keymaps, you can do that. This builds upon the [Customized Functions](#customized-functions) example above. This lets you maintain a bunch of macros that are shared between the different keyboards, and allow for keyboard specific macros, too.
|
||||||
|
|
||||||
|
25
docs/feature_wpm.md
Normal file
25
docs/feature_wpm.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Word Per Minute (WPM) Calculcation
|
||||||
|
|
||||||
|
The WPM feature uses time between keystrokes to compute a rolling average words
|
||||||
|
per minute rate and makes this available for various uses.
|
||||||
|
|
||||||
|
Enable the WPM system by adding this to your `rules.mk`:
|
||||||
|
|
||||||
|
WPM_ENABLE = yes
|
||||||
|
|
||||||
|
For split keyboards using soft serial, the computed WPM
|
||||||
|
score will be available on the master AND slave half.
|
||||||
|
|
||||||
|
## Public Functions
|
||||||
|
|
||||||
|
`uint8_t get_current_wpm(void);`
|
||||||
|
This function returns the current WPM as an unsigned integer.
|
||||||
|
|
||||||
|
|
||||||
|
## Customized keys for WPM calc
|
||||||
|
|
||||||
|
By default, the WPM score only includes letters, numbers, space and some
|
||||||
|
punctuation. If you want to change the set of characters considered as part of
|
||||||
|
the WPM calculation, you can implement `wpm_keycode_user(uint16_t keycode)`
|
||||||
|
and return true for any characters you would like included in the calculation,
|
||||||
|
or false to not count that particular keycode.
|
@@ -26,7 +26,6 @@ Compatible flashers:
|
|||||||
|
|
||||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
|
* [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)
|
* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` in QMK (recommended command line)
|
||||||
* [Atmel's Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (not recommended)
|
|
||||||
|
|
||||||
Flashing sequence:
|
Flashing sequence:
|
||||||
|
|
||||||
|
@@ -4,8 +4,8 @@
|
|||||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
[](https://travis-ci.org/qmk/qmk_firmware)
|
||||||
[](https://discord.gg/Uq7gcHh)
|
[](https://discord.gg/Uq7gcHh)
|
||||||
[](https://docs.qmk.fm)
|
[](https://docs.qmk.fm)
|
||||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||||
[](https://github.com/qmk/qmk_firmware/)
|
[](https://github.com/qmk/qmk_firmware/)
|
||||||
|
|
||||||
## Qu'est-ce que QMK Firmware ?
|
## Qu'est-ce que QMK Firmware ?
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ QMK (*Quantum Mechanical Keyboard*) est une communauté open source qui maintien
|
|||||||
|
|
||||||
## Comment l'obtenir
|
## Comment l'obtenir
|
||||||
|
|
||||||
Si vous souhaitez contribuer à une disposition de clavier (keymap), ou à des fonctionnalités de QMK alors le plus simple est de [forker le dépôt avec Github](https://github.com/qmk/qmk_firmware#fork-destination-box) puis cloner le dépôt localement pour y faire des changements. Vous pourrez pousser vos changements sur github puis ouvrir un [Pull Request](https://github.com/qmk/qmk_firmware/pulls) depuis votre fork Github.
|
Si vous souhaitez contribuer à une disposition de clavier (keymap), ou à des fonctionnalités de QMK alors le plus simple est de [forker le dépôt avec GitHub](https://github.com/qmk/qmk_firmware#fork-destination-box) puis cloner le dépôt localement pour y faire des changements. Vous pourrez pousser vos changements sur GitHub puis ouvrir un [Pull Request](https://github.com/qmk/qmk_firmware/pulls) depuis votre fork GitHub.
|
||||||
|
|
||||||
Sinon, vous pouvez aussi le télécharger directement en ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), ou le cloner avec git en ssh (`git@github.com:qmk/qmk_firmware.git`), ou https (`https://github.com/qmk/qmk_firmware.git`).
|
Sinon, vous pouvez aussi le télécharger directement en ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), ou le cloner avec git en ssh (`git@github.com:qmk/qmk_firmware.git`), ou https (`https://github.com/qmk/qmk_firmware.git`).
|
||||||
|
|
||||||
|
@@ -101,7 +101,8 @@
|
|||||||
* [Guide des claviers soudés à la main](fr-fr/hand_wire.md)
|
* [Guide des claviers soudés à la main](fr-fr/hand_wire.md)
|
||||||
* [Guide de flash de l’ISP](fr-fr/isp_flashing_guide.md)
|
* [Guide de flash de l’ISP](fr-fr/isp_flashing_guide.md)
|
||||||
* [Guide du débogage ARM](fr-fr/arm_debugging.md)
|
* [Guide du débogage ARM](fr-fr/arm_debugging.md)
|
||||||
* [Drivers i2c](fr-fr/i2c_driver.md)
|
* [Drivers I2C](fr-fr/i2c_driver.md)
|
||||||
|
* [Drivers SPI](fr-fr/spi_driver.md)
|
||||||
* [Contrôles des GPIO](fr-fr/internals_gpio_control.md)
|
* [Contrôles des GPIO](fr-fr/internals_gpio_control.md)
|
||||||
* [Conversion en Proton C](fr-fr/proton_c_conversion.md)
|
* [Conversion en Proton C](fr-fr/proton_c_conversion.md)
|
||||||
|
|
||||||
|
@@ -101,7 +101,7 @@ Ceci est fait immédiatement après la fusion de la branche `future` précédent
|
|||||||
* [ ] Regroupe ChangeLog dans un fichier.
|
* [ ] Regroupe ChangeLog dans un fichier.
|
||||||
* [ ] `git commit -m 'Merge point for <DATE> Breaking Change'`
|
* [ ] `git commit -m 'Merge point for <DATE> Breaking Change'`
|
||||||
* [ ] `git push origin future`
|
* [ ] `git push origin future`
|
||||||
* Actions sur Github
|
* Actions sur GitHub
|
||||||
* [ ] Crée un PR pour `future`
|
* [ ] Crée un PR pour `future`
|
||||||
* [ ] S'assurer que Travis ne relève aucun problème
|
* [ ] S'assurer que Travis ne relève aucun problème
|
||||||
* [ ] Fusion le PR `future`
|
* [ ] Fusion le PR `future`
|
||||||
|
@@ -155,11 +155,3 @@ Pour le moment, l'origine du problème n'est pas comprise, mais certaines option
|
|||||||
|
|
||||||
https://github.com/tmk/tmk_keyboard/issues/266
|
https://github.com/tmk/tmk_keyboard/issues/266
|
||||||
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
||||||
|
|
||||||
## FLIP ne marche pas
|
|
||||||
|
|
||||||
### `AtLibUsbDfu.dll` Not Found
|
|
||||||
|
|
||||||
Supprimez le pilote actuel et réinstallez celui donné par FLIP dans le gestionnaire de périphériques.
|
|
||||||
|
|
||||||
http://imgur.com/a/bnwzy
|
|
||||||
|
@@ -26,7 +26,6 @@ Méthodes de flash compatibles :
|
|||||||
|
|
||||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé)
|
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé)
|
||||||
* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` avec QMK (outil en ligne de commande recommandé)
|
* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` avec QMK (outil en ligne de commande recommandé)
|
||||||
* [Atmel's Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (non recommandé)
|
|
||||||
|
|
||||||
Ordre des actions :
|
Ordre des actions :
|
||||||
|
|
||||||
|
@@ -6,11 +6,11 @@ GitHub peut être un peu compliqué pour ceux qui n'y sont pas familier. Ce guid
|
|||||||
|
|
||||||
Commencez par la [page GitHub de QMK](https://github.com/qmk/qmk_firmware), et vous verrez un bouton dans le coin en haut à droite qui indique "Fork":
|
Commencez par la [page GitHub de QMK](https://github.com/qmk/qmk_firmware), et vous verrez un bouton dans le coin en haut à droite qui indique "Fork":
|
||||||
|
|
||||||

|

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

|

|
||||||
|
|
||||||
Faites attention à sélectionner "HTTPS", et sélectionnez le lien et copiez-le:
|
Faites attention à sélectionner "HTTPS", et sélectionnez le lien et copiez-le:
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@ git pull upstream master
|
|||||||
git push origin master
|
git push origin master
|
||||||
```
|
```
|
||||||
|
|
||||||
Cela vous change la branche courante en master, synchronise les données de références du dépôt QMK vers votre ordinateur. La commande pull tire les données de références vers votre branche courante puis les y téleverse. La commande push permet de pousser la branche courante (master) vers votre fork github.
|
Cela vous change la branche courante en master, synchronise les données de références du dépôt QMK vers votre ordinateur. La commande pull tire les données de références vers votre branche courante puis les y téleverse. La commande push permet de pousser la branche courante (master) vers votre fork GitHub.
|
||||||
|
|
||||||
### Faire des changements
|
### Faire des changements
|
||||||
|
|
||||||
|
47
docs/getting_started_docker.md
Normal file
47
docs/getting_started_docker.md
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
# Docker Quick Start
|
||||||
|
|
||||||
|
This project includes a Docker workflow that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else and the QMK build infrastructure. This makes it much easier for people to help you troubleshoot any issues you encounter.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
The main prerequisite is a working `docker` install.
|
||||||
|
* [Docker CE](https://docs.docker.com/install/#supported-platforms)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Acquire a local copy of the QMK's repository (including submodules):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git
|
||||||
|
cd qmk_firmware
|
||||||
|
```
|
||||||
|
|
||||||
|
Run the following command to build a keymap:
|
||||||
|
```bash
|
||||||
|
util/docker_build.sh <keyboard>:<keymap>
|
||||||
|
# For example: util/docker_build.sh planck/rev6:default
|
||||||
|
```
|
||||||
|
|
||||||
|
This will compile the desired keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, all keymaps are used. Note that the parameter format is the same as when building with `make`.
|
||||||
|
|
||||||
|
There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
util/docker_build.sh keyboard:keymap:target
|
||||||
|
# For example: util/docker_build.sh planck/rev6:default:flash
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
util/docker_build.sh
|
||||||
|
# Reads parameters as input (leave blank for all keyboards/keymaps)
|
||||||
|
```
|
||||||
|
|
||||||
|
## FAQ
|
||||||
|
|
||||||
|
### Why can't I flash on Windows/macOS
|
||||||
|
|
||||||
|
On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use [QMK Toolbox](https://github.com/qmk/qmk_toolbox) instead.
|
||||||
|
|
||||||
|
!> Docker for Windows requires [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) to be enabled. This means that it cannot work on versions of Windows which don't have Hyper-V, such as Windows 7, Windows 8 and **Windows 10 Home**.
|
@@ -1,16 +1,16 @@
|
|||||||
# 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.
|
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.
|
||||||
|
|
||||||
?> This guide assumes you're somewhat comfortable with running things at the command line, and have git installed on your system.
|
?> This guide assumes you're somewhat comfortable with running things at the command line, and have git installed on your system.
|
||||||
|
|
||||||
Start on the [QMK Github page](https://github.com/qmk/qmk_firmware), and you'll see a button in the upper right that says "Fork":
|
Start on the [QMK GitHub page](https://github.com/qmk/qmk_firmware), and you'll see a button in the upper right that says "Fork":
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
If you're a part of an organization, you'll need to choose which account to fork it to. In most circumstances, you'll want to fork it to your personal account. Once your fork is completed (sometimes this takes a little while), click the "Clone or Download" button:
|
If you're a part of an organization, you'll need to choose which account to fork it to. In most circumstances, you'll want to fork it to your personal account. Once your fork is completed (sometimes this takes a little while), click the "Clone or Download" button:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
And be sure to select "HTTPS", and select the link and copy it:
|
And be sure to select "HTTPS", and select the link and copy it:
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ To https://github.com/whoeveryouare/qmk_firmware.git
|
|||||||
+ 20043e64...7da94ac5 master -> master
|
+ 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:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@@ -20,7 +20,6 @@ The "easy" way to flash the firmware is using a tool from your host OS:
|
|||||||
|
|
||||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (recommended)
|
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (recommended)
|
||||||
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html)
|
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html)
|
||||||
* [Atmel FLIP](http://www.atmel.com/tools/flip.aspx)
|
|
||||||
|
|
||||||
If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version.
|
If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version.
|
||||||
|
|
||||||
|
@@ -61,10 +61,76 @@ This file is used by the [QMK API](https://github.com/qmk/qmk_api). It contains
|
|||||||
|
|
||||||
All projects need to have a `config.h` file that sets things like the matrix size, product name, USB VID/PID, description and other settings. In general, use this file to set essential information and defaults for your keyboard that will always work.
|
All projects need to have a `config.h` file that sets things like the matrix size, product name, USB VID/PID, description and other settings. In general, use this file to set essential information and defaults for your keyboard that will always work.
|
||||||
|
|
||||||
|
The `config.h` files can also be placed in sub-folders, and the order in which they are read is as follows:
|
||||||
|
|
||||||
|
* `keyboards/top_folder/config.h`
|
||||||
|
* `keyboards/top_folder/sub_1/config.h`
|
||||||
|
* `keyboards/top_folder/sub_1/sub_2/config.h`
|
||||||
|
* `keyboards/top_folder/sub_1/sub_2/sub_3/config.h`
|
||||||
|
* `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/config.h`
|
||||||
|
* `users/a_user_folder/config.h`
|
||||||
|
* `keyboards/top_folder/keymaps/a_keymap/config.h`
|
||||||
|
* `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/post_config.h`
|
||||||
|
* `keyboards/top_folder/sub_1/sub_2/sub_3/post_config.h`
|
||||||
|
* `keyboards/top_folder/sub_1/sub_2/post_config.h`
|
||||||
|
* `keyboards/top_folder/sub_1/post_config.h`
|
||||||
|
* `keyboards/top_folder/post_config.h`
|
||||||
|
|
||||||
|
The `post_config.h` file can be used for additional post-processing, depending on what is specified in the `config.h` file. For example, if you define the `IOS_DEVICE_ENABLE` macro in your keymap-level `config.h` file as follows, you can configure more detailed settings accordingly in the `post_config.h` file:
|
||||||
|
|
||||||
|
* `keyboards/top_folder/keymaps/a_keymap/config.h`
|
||||||
|
```c
|
||||||
|
#define IOS_DEVICE_ENABLE
|
||||||
|
```
|
||||||
|
* `keyboards/top_folder/post_config.h`
|
||||||
|
```c
|
||||||
|
#ifndef IOS_DEVICE_ENABLE
|
||||||
|
// USB_MAX_POWER_CONSUMPTION value for this keyboard
|
||||||
|
#define USB_MAX_POWER_CONSUMPTION 400
|
||||||
|
#else
|
||||||
|
// fix iPhone and iPad power adapter issue
|
||||||
|
// iOS device need lessthan 100
|
||||||
|
#define USB_MAX_POWER_CONSUMPTION 100
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
#ifndef IOS_DEVICE_ENABLE
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 200
|
||||||
|
#define RGBLIGHT_VAL_STEP 17
|
||||||
|
#else
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 35
|
||||||
|
#define RGBLIGHT_VAL_STEP 4
|
||||||
|
#endif
|
||||||
|
#ifndef RGBLIGHT_HUE_STEP
|
||||||
|
#define RGBLIGHT_HUE_STEP 10
|
||||||
|
#endif
|
||||||
|
#ifndef RGBLIGHT_SAT_STEP
|
||||||
|
#define RGBLIGHT_SAT_STEP 17
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
```
|
||||||
|
|
||||||
|
?> If you define options using `post_config.h` as in the above example, you should not define the same options in the keyboard- or user-level `config.h`.
|
||||||
|
|
||||||
### `rules.mk`
|
### `rules.mk`
|
||||||
|
|
||||||
The presence of this file means that the folder is a keyboard target and can be used in `make` commands. This is where you setup the build environment for your keyboard and configure the default set of features.
|
The presence of this file means that the folder is a keyboard target and can be used in `make` commands. This is where you setup the build environment for your keyboard and configure the default set of features.
|
||||||
|
|
||||||
|
The `rules.mk` file can also be placed in a sub-folder, and its reading order is as follows:
|
||||||
|
|
||||||
|
* `keyboards/top_folder/rules.mk`
|
||||||
|
* `keyboards/top_folder/sub_1/rules.mk`
|
||||||
|
* `keyboards/top_folder/sub_1/sub_2/rules.mk`
|
||||||
|
* `keyboards/top_folder/sub_1/sub_2/sub_3/rules.mk`
|
||||||
|
* `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/rules.mk`
|
||||||
|
* `keyboards/top_folder/keymaps/a_keymap/rules.mk`
|
||||||
|
* `users/a_user_folder/rules.mk`
|
||||||
|
* `common_features.mk`
|
||||||
|
|
||||||
|
Many of the settings written in the `rules.mk` file are interpreted by `common_features.mk`, which sets the necessary source files and compiler options.
|
||||||
|
|
||||||
|
?> See `build_keyboard.mk` and `common_features.mk` for more details.
|
||||||
|
|
||||||
### `<keyboard_name.c>`
|
### `<keyboard_name.c>`
|
||||||
|
|
||||||
This is where you will write custom code for your keyboard. Typically you will write code to initialize and interface with the hardware in your keyboard. If your keyboard consists of only a key matrix with no LEDs, speakers, or other auxiliary hardware this file can be blank.
|
This is where you will write custom code for your keyboard. Typically you will write code to initialize and interface with the hardware in your keyboard. If your keyboard consists of only a key matrix with no LEDs, speakers, or other auxiliary hardware this file can be blank.
|
||||||
|
@@ -14,7 +14,7 @@ QMK (*Quantum Mechanical Keyboard*) היא קהילת קוד פתוח (open sour
|
|||||||
|
|
||||||
## איך להשיג אותה
|
## איך להשיג אותה
|
||||||
|
|
||||||
אם אתם מתכננים לתרום מיפוי מקשים, מקלדת או יכולת ל QMK, הדבר הקל ביותר הוא [לעשות פורק לריפו בGithub](https://github.com/qmk/qmk_firmware#fork-destination-box), ולעשות קלון לריפו בסביבה המקומית ושם לבצע את השינויים שלכם, לדחוף אותם ולפתוח [Pull Request](https://github.com/qmk/qmk_firmware/pulls) מהפורק שלך.
|
אם אתם מתכננים לתרום מיפוי מקשים, מקלדת או יכולת ל QMK, הדבר הקל ביותר הוא [לעשות פורק לריפו בGitHub](https://github.com/qmk/qmk_firmware#fork-destination-box), ולעשות קלון לריפו בסביבה המקומית ושם לבצע את השינויים שלכם, לדחוף אותם ולפתוח [Pull Request](https://github.com/qmk/qmk_firmware/pulls) מהפורק שלך.
|
||||||
|
|
||||||
אחרת, אפשר להוריד את הקושחה באופן ישיר ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), או לשכפל אותה באמצעות git (`git@github.com:qmk/qmk_firmware.git`), או https (`https://github.com/qmk/qmk_firmware.git`).
|
אחרת, אפשר להוריד את הקושחה באופן ישיר ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), או לשכפל אותה באמצעות git (`git@github.com:qmk/qmk_firmware.git`), או https (`https://github.com/qmk/qmk_firmware.git`).
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* [מקורות ללמידה](he-il/newbs_learn_more_resources.md)
|
* [מקורות ללמידה](he-il/newbs_learn_more_resources.md)
|
||||||
* [בסיס QMK](he-il/README.md)
|
* [בסיס QMK](he-il/README.md)
|
||||||
* [מבוא לQMK](he-il/getting_started_introduction.md)
|
* [מבוא לQMK](he-il/getting_started_introduction.md)
|
||||||
* [איך להשתמש בGithub](he-il/getting_started_github.md)
|
* [איך להשתמש בGitHub](he-il/getting_started_github.md)
|
||||||
* [קבלת עזרה](he-il/getting_started_getting_help.md)
|
* [קבלת עזרה](he-il/getting_started_getting_help.md)
|
||||||
* [שאלות נפוצות](he-il/faq.md)
|
* [שאלות נפוצות](he-il/faq.md)
|
||||||
* [שאלות נפוצות כלליות](he-il/faq_general.md)
|
* [שאלות נפוצות כלליות](he-il/faq_general.md)
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
* [QMK CLI](he-il/cli.md)
|
* [QMK CLI](he-il/cli.md)
|
||||||
* [QMK CLI Config](he-il/cli_configuration.md)
|
* [QMK CLI Config](he-il/cli_configuration.md)
|
||||||
* [תרומה ל QMK](he-il/contributing.md)
|
* [תרומה ל QMK](he-il/contributing.md)
|
||||||
* [איך להשתמש בGithub](he-il/getting_started_github.md)
|
* [איך להשתמש בGitHub](he-il/getting_started_github.md)
|
||||||
* [קבלת עזרה](he-il/getting_started_getting_help.md)
|
* [קבלת עזרה](he-il/getting_started_getting_help.md)
|
||||||
|
|
||||||
* [שינויים משמעותיים](he-il/breaking_changes.md)
|
* [שינויים משמעותיים](he-il/breaking_changes.md)
|
||||||
@@ -114,6 +114,7 @@
|
|||||||
* [מדריך לצריבת ISP](he-il/isp_flashing_guide.md)
|
* [מדריך לצריבת ISP](he-il/isp_flashing_guide.md)
|
||||||
* [מדריך לדיבאגינג ARM](he-il/arm_debugging.md)
|
* [מדריך לדיבאגינג ARM](he-il/arm_debugging.md)
|
||||||
* [מנהל התקן I2C](he-il/i2c_driver.md)
|
* [מנהל התקן I2C](he-il/i2c_driver.md)
|
||||||
|
* [מנהל התקן SPI](he-il/spi_driver.md)
|
||||||
* [בקרת GPIO](he-il/internals_gpio_control.md)
|
* [בקרת GPIO](he-il/internals_gpio_control.md)
|
||||||
* [המרת Proton C](he-il/proton_c_conversion.md)
|
* [המרת Proton C](he-il/proton_c_conversion.md)
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
הפורום הרשמי של QMK נמצא ב - [/r/olkb](https://reddit.com/r/olkb) באתר [reddit.com](https://reddit.com).
|
הפורום הרשמי של QMK נמצא ב - [/r/olkb](https://reddit.com/r/olkb) באתר [reddit.com](https://reddit.com).
|
||||||
|
|
||||||
## סוגיות Github
|
## סוגיות GitHub
|
||||||
|
|
||||||
ניתן לפתוח [סוגייה ב-GitHub](https://github.com/qmk/qmk_firmware/issues). הדבר שימושי במיוחד כאשר הסוגיה דורשת דיון עמוק וארוך או דיבאגינג.
|
ניתן לפתוח [סוגייה ב-GitHub](https://github.com/qmk/qmk_firmware/issues). הדבר שימושי במיוחד כאשר הסוגיה דורשת דיון עמוק וארוך או דיבאגינג.
|
||||||
</div>
|
</div>
|
@@ -1,17 +1,17 @@
|
|||||||
<div dir="rtl" markdown="1">
|
<div dir="rtl" markdown="1">
|
||||||
# איך להשתמש ב-Github עם QMK
|
# איך להשתמש ב-GitHub עם QMK
|
||||||
|
|
||||||
Github עלול להיות קצת טריקי למי שלא מכיר את העבודה איתו - מדריך זה ילווה אתכם שלב אחר שלב דרך ביצוע פעולות fork, clone ו-pull request עם QMK.
|
GitHub עלול להיות קצת טריקי למי שלא מכיר את העבודה איתו - מדריך זה ילווה אתכם שלב אחר שלב דרך ביצוע פעולות fork, clone ו-pull request עם QMK.
|
||||||
|
|
||||||
?> מדריך זה מניח שאתם מרגישים בנוח עם הרצה של פקודות בסביבת command line (שורת הפקודה) ו-git מותקן במערכת שלכם.
|
?> מדריך זה מניח שאתם מרגישים בנוח עם הרצה של פקודות בסביבת command line (שורת הפקודה) ו-git מותקן במערכת שלכם.
|
||||||
|
|
||||||
התחילו ב- [עמוד של QMK ב-Github](https://github.com/qmk/qmk_firmware), ותצמאו כפתור בחלק העליון מימין עם התיכוב "Fork":
|
התחילו ב- [עמוד של QMK ב-GitHub](https://github.com/qmk/qmk_firmware), ותצמאו כפתור בחלק העליון מימין עם התיכוב "Fork":
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
אם אתם חלק מארגון, תצטרכו לבחור לאיזה חשבון לבצע פעולת fork. ברוב המבקרים, תרצו לבצע fork לתוך החשבון הפרטי שלכם. ברגע שה-fork הסתיים (לפעמים זה יכול לקחת קצת זמן) הקליקו על כפתור ה-"Clone or Download":
|
אם אתם חלק מארגון, תצטרכו לבחור לאיזה חשבון לבצע פעולת fork. ברוב המבקרים, תרצו לבצע fork לתוך החשבון הפרטי שלכם. ברגע שה-fork הסתיים (לפעמים זה יכול לקחת קצת זמן) הקליקו על כפתור ה-"Clone or Download":
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
תוודאו שאתם בוחרים באופצייה של "HTTPS", בחרו את הקישור והעתיקו אותו:
|
תוודאו שאתם בוחרים באופצייה של "HTTPS", בחרו את הקישור והעתיקו אותו:
|
||||||
|
|
||||||
|
@@ -1,33 +1,46 @@
|
|||||||
# I2C Master Driver
|
# I2C Master Driver :id=i2c-master-driver
|
||||||
|
|
||||||
The I2C Master drivers used in QMK have a set of common functions to allow portability between MCUs.
|
The I2C Master drivers used in QMK have a set of common functions to allow portability between MCUs.
|
||||||
|
|
||||||
## Available functions
|
## An important note on I2C Addresses :id=note-on-i2c-addresses
|
||||||
|
|
||||||
|
All of the addresses expected by this driver should be pushed to the upper 7 bits of the address byte. Setting
|
||||||
|
the lower bit (indicating read/write) will be done by the respective functions. Almost all I2C addresses listed
|
||||||
|
on datasheets and the internet will be represented as 7 bits occupying the lower 7 bits and will need to be
|
||||||
|
shifted to the left (more significant) by one bit. This is easy to do via the bitwise shift operator `<< 1`.
|
||||||
|
|
||||||
|
You can either do this on each call to the functions below, or once in your definition of the address. For example if your device has an address of `0x18`:
|
||||||
|
|
||||||
|
`#define MY_I2C_ADDRESS (0x18 << 1)`
|
||||||
|
|
||||||
|
See https://www.robot-electronics.co.uk/i2c-tutorial for more information about I2C addressing and other technical details.
|
||||||
|
|
||||||
|
## Available functions :id=available-functions
|
||||||
|
|
||||||
|Function |Description |
|
|Function |Description |
|
||||||
|------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|`void i2c_init(void);` |Initializes the I2C driver. This function should be called once before any transaction is initiated. |
|
|`void i2c_init(void);` |Initializes the I2C driver. This function should be called once before any transaction is initiated. |
|
||||||
|`uint8_t i2c_start(uint8_t address, uint16_t timeout);` |Starts an I2C transaction. Address is the 7-bit slave address without the direction bit. |
|
|`i2c_status_t i2c_start(uint8_t address, uint16_t timeout);` |Starts an I2C transaction. Address is the 7-bit slave address without the direction bit. |
|
||||||
|`uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Transmit data over I2C. Address is the 7-bit slave address without the direction. Returns status of transaction. |
|
|`i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Transmit data over I2C. Address is the 7-bit slave address without the direction. Returns status of transaction. |
|
||||||
|`uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Receive data over I2C. Address is the 7-bit slave address without the direction. Saves number of bytes specified by `length` in `data` array. Returns status of transaction. |
|
|`i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Receive data over I2C. Address is the 7-bit slave address without the direction. Saves number of bytes specified by `length` in `data` array. Returns status of transaction. |
|
||||||
|`uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_transmit` function but `regaddr` sets where in the slave the data will be written. |
|
|`i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_transmit` function but `regaddr` sets where in the slave the data will be written. |
|
||||||
|`uint8_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_receive` function but `regaddr` sets from where in the slave the data will be read. |
|
|`i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_receive` function but `regaddr` sets from where in the slave the data will be read. |
|
||||||
|`uint8_t i2c_stop(void);` |Ends an I2C transaction. |
|
|`i2c_status_t i2c_stop(void);` |Ends an I2C transaction. |
|
||||||
|
|
||||||
### Function Return
|
### Function Return :id=function-return
|
||||||
|
|
||||||
All the above functions, except `void i2c_init(void);` return the following truth table:
|
All the above functions, except `void i2c_init(void);` return the following truth table:
|
||||||
|
|
||||||
|Return Value |Description |
|
|Return Constant |Value|Description |
|
||||||
|---------------|---------------------------------------------------|
|
|--------------------|-----|--------------------------------|
|
||||||
|0 |Operation executed successfully. |
|
|`I2C_STATUS_SUCCESS`|0 |Operation executed successfully.|
|
||||||
|-1 |Operation failed. |
|
|`I2C_STATUS_ERROR` |-1 |Operation failed. |
|
||||||
|-2 |Operation timed out. |
|
|`I2C_STATUS_TIMEOUT`|-2 |Operation timed out. |
|
||||||
|
|
||||||
|
|
||||||
## AVR
|
## AVR :id=avr
|
||||||
|
|
||||||
### Configuration
|
### Configuration :id=avr-configuration
|
||||||
|
|
||||||
The following defines can be used to configure the I2C master driver.
|
The following defines can be used to configure the I2C master driver.
|
||||||
|
|
||||||
@@ -37,12 +50,12 @@ The following defines can be used to configure the I2C master driver.
|
|||||||
|
|
||||||
AVRs usually have set GPIO which turn into I2C pins, therefore no further configuration is required.
|
AVRs usually have set GPIO which turn into I2C pins, therefore no further configuration is required.
|
||||||
|
|
||||||
## ARM
|
## ARM :id=arm
|
||||||
|
|
||||||
For ARM the Chibios I2C HAL driver is under the hood.
|
For ARM the Chibios I2C HAL driver is under the hood.
|
||||||
This section assumes an STM32 MCU.
|
This section assumes an STM32 MCU.
|
||||||
|
|
||||||
### Configuration
|
### Configuration :id=arm-configuration
|
||||||
|
|
||||||
The configuration for ARM MCUs can be quite complex as often there are multiple I2C drivers which can be assigned to a variety of ports.
|
The configuration for ARM MCUs can be quite complex as often there are multiple I2C drivers which can be assigned to a variety of ports.
|
||||||
|
|
||||||
@@ -77,7 +90,7 @@ The ChibiOS I2C driver configuration depends on STM32 MCU:
|
|||||||
STM32F1xx, STM32F2xx, STM32F4xx, STM32L0xx and STM32L1xx use I2Cv1;
|
STM32F1xx, STM32F2xx, STM32F4xx, STM32L0xx and STM32L1xx use I2Cv1;
|
||||||
STM32F0xx, STM32F3xx, STM32F7xx and STM32L4xx use I2Cv2;
|
STM32F0xx, STM32F3xx, STM32F7xx and STM32L4xx use I2Cv2;
|
||||||
|
|
||||||
#### I2Cv1
|
#### I2Cv1 :id=i2cv1
|
||||||
STM32 MCUs allow for different clock and duty parameters when configuring I2Cv1. These can be modified using the following parameters, using <https://www.playembedded.org/blog/stm32-i2c-chibios/#I2Cv1_configuration_structure> as a reference:
|
STM32 MCUs allow for different clock and duty parameters when configuring I2Cv1. These can be modified using the following parameters, using <https://www.playembedded.org/blog/stm32-i2c-chibios/#I2Cv1_configuration_structure> as a reference:
|
||||||
|
|
||||||
| Variable | Default |
|
| Variable | Default |
|
||||||
@@ -86,7 +99,7 @@ STM32 MCUs allow for different clock and duty parameters when configuring I2Cv1.
|
|||||||
| `I2C1_CLOCK_SPEED` | `100000` |
|
| `I2C1_CLOCK_SPEED` | `100000` |
|
||||||
| `I2C1_DUTY_CYCLE` | `STD_DUTY_CYCLE` |
|
| `I2C1_DUTY_CYCLE` | `STD_DUTY_CYCLE` |
|
||||||
|
|
||||||
#### I2Cv2
|
#### I2Cv2 :id=i2cv2
|
||||||
STM32 MCUs allow for different timing parameters when configuring I2Cv2. These can be modified using the following parameters, using <https://www.st.com/en/embedded-software/stsw-stm32126.html> as a reference:
|
STM32 MCUs allow for different timing parameters when configuring I2Cv2. These can be modified using the following parameters, using <https://www.st.com/en/embedded-software/stsw-stm32126.html> as a reference:
|
||||||
|
|
||||||
| Variable | Default |
|
| Variable | Default |
|
||||||
@@ -104,10 +117,10 @@ STM32 MCUs allow for different "alternate function" modes when configuring GPIO
|
|||||||
| `I2C1_SCL_PAL_MODE` | `4` |
|
| `I2C1_SCL_PAL_MODE` | `4` |
|
||||||
| `I2C1_SDA_PAL_MODE` | `4` |
|
| `I2C1_SDA_PAL_MODE` | `4` |
|
||||||
|
|
||||||
#### Other
|
#### Other :id=other
|
||||||
You can also overload the `void i2c_init(void)` function, which has a weak attribute. If you do this the configuration variables above will not be used. Please consult the datasheet of your MCU for the available GPIO configurations. The following is an example initialization function:
|
You can also overload the `void i2c_init(void)` function, which has a weak attribute. If you do this the configuration variables above will not be used. Please consult the datasheet of your MCU for the available GPIO configurations. The following is an example initialization function:
|
||||||
|
|
||||||
```C
|
```c
|
||||||
void i2c_init(void)
|
void i2c_init(void)
|
||||||
{
|
{
|
||||||
setPinInput(B6); // Try releasing special pins for a short time
|
setPinInput(B6); // Try releasing special pins for a short time
|
||||||
|
@@ -32,7 +32,8 @@
|
|||||||
|
|
||||||
// Moved pages
|
// Moved pages
|
||||||
'/adding_a_keyboard_to_qmk': '/hardware_keyboard_guidelines',
|
'/adding_a_keyboard_to_qmk': '/hardware_keyboard_guidelines',
|
||||||
'/build_environment_setup': '/getting_started_build_tools',
|
'/build_environment_setup': '/newbs_getting_started',
|
||||||
|
'/cli_dev_configuration': '/cli_configuration',
|
||||||
'/dynamic_macros': '/feature_dynamic_macros',
|
'/dynamic_macros': '/feature_dynamic_macros',
|
||||||
'/feature_common_shortcuts': '/feature_advanced_keycodes',
|
'/feature_common_shortcuts': '/feature_advanced_keycodes',
|
||||||
'/glossary': '/reference_glossary',
|
'/glossary': '/reference_glossary',
|
||||||
@@ -44,6 +45,7 @@
|
|||||||
'/tap_dance': '/feature_tap_dance',
|
'/tap_dance': '/feature_tap_dance',
|
||||||
'/unicode': '/feature_unicode',
|
'/unicode': '/feature_unicode',
|
||||||
'/python_development': '/cli_development',
|
'/python_development': '/cli_development',
|
||||||
|
'/getting_started_build_tools':'/newbs_getting_started',
|
||||||
},
|
},
|
||||||
basePath: '/',
|
basePath: '/',
|
||||||
name: 'QMK Firmware',
|
name: 'QMK Firmware',
|
||||||
|
@@ -1,22 +1,23 @@
|
|||||||
# GPIO Control
|
# GPIO Control :id=gpio-control
|
||||||
|
|
||||||
QMK has a GPIO control abstraction layer which is microcontroller agnostic. This is done to allow easy access to pin control across different platforms.
|
QMK has a GPIO control abstraction layer which is microcontroller agnostic. This is done to allow easy access to pin control across different platforms.
|
||||||
|
|
||||||
## Functions
|
## Functions :id=functions
|
||||||
|
|
||||||
The following functions can provide basic control of GPIOs and are found in `quantum/quantum.h`.
|
The following functions can provide basic control of GPIOs and are found in `quantum/quantum.h`.
|
||||||
|
|
||||||
|Function |Description | Old AVR Examples | Old ChibiOS/ARM Examples |
|
|Function |Description | Old AVR Examples | Old ChibiOS/ARM Examples |
|
||||||
|----------------------|------------------------------------------------------------------|------------------------------------------------|-------------------------------------------------|
|
|------------------------|--------------------------------------------------|-------------------------------------------------|-------------------------------------------------|
|
||||||
|`setPinInput(pin)` |Set pin as input with high impedance (High-Z) | `DDRB &= ~(1<<2)` | `palSetLineMode(pin, PAL_MODE_INPUT)` |
|
| `setPinInput(pin)` | Set pin as input with high impedance (High-Z) | `DDRB &= ~(1<<2)` | `palSetLineMode(pin, PAL_MODE_INPUT)` |
|
||||||
|`setPinInputHigh(pin)`|Set pin as input with builtin pull-up resistor | `DDRB &= ~(1<<2); PORTB \|= (1<<2)` | `palSetLineMode(pin, PAL_MODE_INPUT_PULLUP)` |
|
| `setPinInputHigh(pin)` | Set pin as input with builtin pull-up resistor | `DDRB &= ~(1<<2); PORTB \|= (1<<2)` | `palSetLineMode(pin, PAL_MODE_INPUT_PULLUP)` |
|
||||||
|`setPinInputLow(pin)` |Set pin as input with builtin pull-down resistor | N/A (Not supported on AVR) | `palSetLineMode(pin, PAL_MODE_INPUT_PULLDOWN)` |
|
| `setPinInputLow(pin)` | Set pin as input with builtin pull-down resistor | N/A (Not supported on AVR) | `palSetLineMode(pin, PAL_MODE_INPUT_PULLDOWN)` |
|
||||||
|`setPinOutput(pin)` |Set pin as output | `DDRB \|= (1<<2)` | `palSetLineMode(pin, PAL_MODE_OUTPUT_PUSHPULL)` |
|
| `setPinOutput(pin)` | Set pin as output | `DDRB \|= (1<<2)` | `palSetLineMode(pin, PAL_MODE_OUTPUT_PUSHPULL)` |
|
||||||
|`writePinHigh(pin)` |Set pin level as high, assuming it is an output | `PORTB \|= (1<<2)` | `palSetLine(pin)` |
|
| `writePinHigh(pin)` | Set pin level as high, assuming it is an output | `PORTB \|= (1<<2)` | `palSetLine(pin)` |
|
||||||
|`writePinLow(pin)` |Set pin level as low, assuming it is an output | `PORTB &= ~(1<<2)` | `palClearLine(pin)` |
|
| `writePinLow(pin)` | Set pin level as low, assuming it is an output | `PORTB &= ~(1<<2)` | `palClearLine(pin)` |
|
||||||
|`writePin(pin, level)`|Set pin level, assuming it is an output | `(level) ? PORTB \|= (1<<2) : PORTB &= ~(1<<2)` | `(level) ? palSetLine(pin) : palClearLine(pin)` |
|
| `writePin(pin, level)` | Set pin level, assuming it is an output | `(level) ? PORTB \|= (1<<2) : PORTB &= ~(1<<2)` | `(level) ? palSetLine(pin) : palClearLine(pin)` |
|
||||||
|`readPin(pin)` |Returns the level of the pin | `_SFR_IO8(pin >> 4) & _BV(pin & 0xF)` | `palReadLine(pin)` |
|
| `readPin(pin)` | Returns the level of the pin | `_SFR_IO8(pin >> 4) & _BV(pin & 0xF)` | `palReadLine(pin)` |
|
||||||
|
| `togglePin(pin)` | Invert pin level, assuming it is an output | `PORTB ^= (1<<2)` | `palToggleLine(pin)` |
|
||||||
|
|
||||||
## Advanced Settings
|
## Advanced Settings :id=advanced-settings
|
||||||
|
|
||||||
Each microcontroller can have multiple advanced settings regarding its GPIO. This abstraction layer does not limit the use of architecture-specific functions. Advanced users should consult the datasheet of their desired device and include any needed libraries. For AVR, the standard avr/io.h library is used; for STM32, the ChibiOS [PAL library](http://chibios.sourceforge.net/docs3/hal/group___p_a_l.html) is used.
|
Each microcontroller can have multiple advanced settings regarding its GPIO. This abstraction layer does not limit the use of architecture-specific functions. Advanced users should consult the datasheet of their desired device and include any needed libraries. For AVR, the standard avr/io.h library is used; for STM32, the ChibiOS [PAL library](http://chibios.sourceforge.net/docs3/hal/group___p_a_l.html) is used.
|
||||||
|
@@ -115,12 +115,18 @@ The simplest and quickest way to get things back to normal is to flash only a bo
|
|||||||
|
|
||||||
You can find the stock bootloaders in the [`util/` folder](https://github.com/qmk/qmk_firmware/tree/master/util). Be sure to flash the correct bootloader for your chip:
|
You can find the stock bootloaders in the [`util/` folder](https://github.com/qmk/qmk_firmware/tree/master/util). Be sure to flash the correct bootloader for your chip:
|
||||||
|
|
||||||
* [`atmega32u4`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1_0_0.hex) - Most keyboards, Planck Rev 1-5, Preonic Rev 1-2
|
* **Atmel DFU**
|
||||||
* [`Pro Micro`](https://github.com/sparkfun/Arduino_Boards/blob/master/sparkfun/avr/bootloaders/caterina/Caterina-promicro16.hex) - The default bootloader for Pro Micro controllers
|
* [ATmega16U4](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega16u4_1.0.1.hex)
|
||||||
* [`at90usb1286`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_at90usb128x_1_0_1.hex) - Planck Light Rev 1
|
* [ATmega32U4](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1.0.0.hex)
|
||||||
* [`atmega32a`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32a_1_0_0.hex) - jj40, and other V-USB/ps2avrGB keyboards
|
* [AT90USB64](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_at90usb64_1.0.0.hex)
|
||||||
|
* [AT90USB128](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_at90usb128_1.0.1.hex)
|
||||||
|
* **Caterina**
|
||||||
|
* [Pro Micro (5V/16MHz)](https://github.com/sparkfun/Arduino_Boards/blob/master/sparkfun/avr/bootloaders/caterina/Caterina-promicro16.hex)
|
||||||
|
* [Pro Micro (3.3V/8MHz)](https://github.com/sparkfun/Arduino_Boards/blob/master/sparkfun/avr/bootloaders/caterina/Caterina-promicro8.hex)
|
||||||
|
* **BootloadHID (PS2AVRGB)**
|
||||||
|
* [ATmega32A](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_ps2avrgb_bootloadhid_1.0.1.hex)
|
||||||
|
|
||||||
If you're not sure what your board uses, look in the `rules.mk` file for the keyboard in QMK. The `MCU =` line will have the value you need. It may differ between different versions of the board.
|
If you're not sure what your board uses, look in the `rules.mk` file for the keyboard in QMK. The `MCU` and `BOOTLOADER` lines will have the value you need. It may differ between different versions of the board.
|
||||||
|
|
||||||
### Production Techniques
|
### Production Techniques
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
# Quantum Mechanical Keyboard Firmware
|
# Quantum Mechanical Keyboard Firmware
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: eae21eed7:docs/README.md
|
original document: 0.8.58:docs/README.md
|
||||||
git diff eae21eed7 HEAD -- docs/README.md | cat
|
git diff 0.8.58 HEAD -- docs/README.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
[](https://github.com/qmk/qmk_firmware/tags)
|
[](https://github.com/qmk/qmk_firmware/tags)
|
||||||
@@ -12,26 +12,37 @@
|
|||||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||||
[](https://github.com/qmk/qmk_firmware/)
|
[](https://github.com/qmk/qmk_firmware/)
|
||||||
|
|
||||||
## QMK ファームウェアとは何か?
|
## QMK ファームウェアとは何でしょうか?
|
||||||
|
|
||||||
QMK (*Quantum Mechanical Keyboard*)は QMK ファームウェア、QMK ツールボックス、qmk.fm およびそれらのドキュメントを保守するオープンソースコミュニティです。QMK ファームウェアは[tmk\_keyboard](http://github.com/tmk/tmk_keyboard) を元にしたキーボードファームウェアで、Atmel AVR コントローラ、より具体的には [OLKB 製品](http://olkb.com)、[ErgoDox EZ](http://www.ergodox-ez.com) キーボードおよび [Clueboard 製品](http://clueboard.co/) のための幾つかの便利な機能を持ちます。また、ChibiOS を使って ARM チップに移植されています。これを使ってあなたの作った手配線のキーボードあるいはカスタムキーボード PCB で作ったキーボードを動かすことができます。
|
QMK (*Quantum Mechanical Keyboard*)は、コンピュータ入力デバイスの開発を中心としたオープンソースコミュニティです。コミュニティには、キーボード、マウス、MIDI デバイスなど、全ての種類の入力デバイスが含まれます。協力者の中心グループは、[QMK ファームウェア](https://github.com/qmk/qmk_firmware)、[QMK Configurator](https://config.qmk.fm)、[QMK ツールボックス](https://github.com/qmk/qmk_toolbox)、[qmk.fm](https://qmk.fm)、そして、このドキュメントを、あなたのようなコミュニティメンバーの助けを借りて保守しています。
|
||||||
|
|
||||||
## 入手方法
|
## 始めましょう
|
||||||
|
|
||||||
QMK のキーマップ、キーボード、機能に貢献をする予定がある場合、最も簡単なのは、[Github を介してリポジトリをフォークし](https://github.com/qmk/qmk_firmware#fork-destination-box)、リポジトリをあなたの開発環境にクローンして変更を加え、それらをプッシュし、[プルリクエスト](https://github.com/qmk/qmk_firmware/pulls)を開くことです。
|
QMK は初めてですか?始めるには2つの方法があります:
|
||||||
|
|
||||||
それ以外の場合は、`git clone https://github.com/qmk/qmk_firmware` を介して直接クローンすることができます。zip または tar ファイルをダウンロードしないでください。コンパイルするためのサブモジュールをダウンロードするために git リポジトリが必要です。
|
* 基本: [QMK Configurator](https://config.qmk.fm)
|
||||||
|
* ドロップダウンからあなたのキーボードを選択し、キーボードをプログラムします。
|
||||||
|
* 見ることができる [紹介ビデオ](https://www.youtube.com/watch?v=-imgglzDMdY) があります。
|
||||||
|
* 読むことができる概要 [ドキュメント](ja/newbs_building_firmware_configurator.md) があります。
|
||||||
|
* 発展: [ソースを使用します](ja/newbs.md)
|
||||||
|
* より強力ですが、使うのはより困難です。
|
||||||
|
|
||||||
## コンパイル方法
|
## 自分用にアレンジします
|
||||||
|
|
||||||
コンパイルをする前に、AVR または ARM 開発のための[環境をインストール](ja/getting_started_build_tools.md)する必要があります。それが完了したら、`make` コマンドを使用して、以下の表記でキーボードとキーマップをビルドします。
|
QMK には、探求すべき多くの[機能](ja/features.md)と、深く知るためのリファレンスドキュメントがたくさんあります。ほとんどの機能は[キーマップ](ja/keymap.md)を変更し、[キーコード](ja/keycodes.md)を変更することで活用されます。
|
||||||
|
|
||||||
make planck/rev4:default
|
## 手助けが必要ですか?
|
||||||
|
|
||||||
これは、`planck` の `rev4` リビジョンを `default` キーマップでビルドします。全てのキーボードにリビジョン(サブプロジェクトまたはフォルダとも呼ばれます)があるわけではありません。その場合は省略されます:
|
[サポートページ](ja/support.md) をチェックして、QMK の使い方について手助けを得る方法を確認してください。
|
||||||
|
|
||||||
make preonic:default
|
## 貢献する
|
||||||
|
|
||||||
## カスタマイズ方法
|
QMK コミュニティに貢献する方法はたくさんあります。始める最も簡単な方法は、それを使って友人に QMK という単語を広めることです。
|
||||||
|
|
||||||
QMK には、探求すべき多くの[機能](ja/features.md)と、深堀りするための[リファレンス ドキュメント](http://docs.qmk.fm)がたくさんあります。ほとんどの機能は[キーマップ](ja/keymap.md)を変更し、[キーコード](ja/keycodes.md)を変更することで活用されます。
|
* フォーラムやチャットルームで人々を支援します:
|
||||||
|
* [/r/olkb](https://www.reddit.com/r/olkb/)
|
||||||
|
* [Discord サーバ](https://discord.gg/Uq7gcHh)
|
||||||
|
* 下にある「Edit This Page」をクリックしてドキュメントに貢献します
|
||||||
|
* [ドキュメントをあなたの言語に翻訳します](ja/translating.md)
|
||||||
|
* [バグを報告します](https://github.com/qmk/qmk_firmware/issues/new/choose)
|
||||||
|
* [プルリクエストを開きます](ja/contributing.md)
|
||||||
|
@@ -1,130 +1,163 @@
|
|||||||
* [完全な初心者のガイド](ja/newbs.md)
|
* チュートリアル
|
||||||
* [はじめに](ja/newbs_getting_started.md)
|
* [入門](ja/newbs.md)
|
||||||
* [初めてのファームウェアの構築](ja/newbs_building_firmware.md)
|
* [セットアップ](ja/newbs_getting_started.md)
|
||||||
* [ファームウェアのフラッシュ](ja/newbs_flashing.md)
|
* [初めてのファームウェアの構築](ja/newbs_building_firmware.md)
|
||||||
* [テストとデバッグ](ja/newbs_testing_debugging.md)
|
* [ファームウェアのフラッシュ](ja/newbs_flashing.md)
|
||||||
* [QMK における Git 運用作法](ja/newbs_git_best_practices.md)
|
* [テストとデバッグ](ja/newbs_testing_debugging.md)
|
||||||
* [あなたのフォークの master ブランチ](ja/newbs_git_using_your_master_branch.md)
|
* [手助けを得る/サポート](ja/support.md)
|
||||||
* [マージの競合の解決](ja/newbs_git_resolving_merge_conflicts.md)
|
* [他のリソース](ja/newbs_learn_more_resources.md)
|
||||||
* [同期のとれていない git ブランチの再同期](ja/newbs_git_resynchronize_a_branch.md)
|
|
||||||
* [学習リソース](ja/newbs_learn_more_resources.md)
|
|
||||||
|
|
||||||
* [QMKの基本](ja/README.md)
|
* FAQ
|
||||||
* [QMK の導入](ja/getting_started_introduction.md)
|
* [一般的な FAQ](ja/faq_general.md)
|
||||||
* [QMK CLI](ja/cli.md)
|
* [QMK のビルド/コンパイル](ja/faq_build.md)
|
||||||
* [QMK CLI 設定](ja/cli_configuration.md)
|
* [QMK のデバッグ/トラブルシューティング](ja/faq_debug.md)
|
||||||
* [QMK への貢献](ja/contributing.md)
|
* [キーマップ FAQ](ja/faq_keymap.md)
|
||||||
* [Github の使い方](ja/getting_started_github.md)
|
* [用語](ja/reference_glossary.md)
|
||||||
* [ヘルプ](ja/getting_started_getting_help.md)
|
|
||||||
|
|
||||||
* [破壊的な変更](ja/breaking_changes.md)
|
* Configurator
|
||||||
* [プルリクエストにフラグが付けられた](ja/breaking_changes_instructions.md)
|
* [概要](ja/newbs_building_firmware_configurator.md)
|
||||||
* [2019年8月30日](ja/ChangeLog/20190830.md)
|
* [ステップ・バイ・ステップ](ja/configurator_step_by_step.md)
|
||||||
|
* [トラブルシューティング](ja/configurator_troubleshooting.md)
|
||||||
|
* QMK API
|
||||||
|
* [概要](ja/api_overview.md)
|
||||||
|
* [API ドキュメント](ja/api_docs.md)
|
||||||
|
* [キーボードサポート](ja/reference_configurator_support.md)
|
||||||
|
|
||||||
* [FAQ](ja/faq.md)
|
* CLI
|
||||||
* [一般的な FAQ](ja/faq_general.md)
|
* [概要](ja/cli.md)
|
||||||
* [QMK のビルド/コンパイル](ja/faq_build.md)
|
* [設定](ja/cli_configuration.md)
|
||||||
* [QMK のデバッグ/トラブルシューティング](ja/faq_debug.md)
|
* [コマンド](ja/cli_commands.md)
|
||||||
* [キーマップ](ja/faq_keymap.md)
|
|
||||||
* [Zadig を使ったドライバのインストール](ja/driver_installation_zadig.md)
|
|
||||||
|
|
||||||
* 詳細なガイド
|
* QMK を使う
|
||||||
* [ビルドツールのインストール](ja/getting_started_build_tools.md)
|
* ガイド
|
||||||
* [Vagrant のガイド](ja/getting_started_vagrant.md)
|
* [機能のカスタマイズ](ja/custom_quantum_functions.md)
|
||||||
* [ビルド/コンパイルの説明](ja/getting_started_make_guide.md)
|
* [Zadig を使ったドライバのインストール](ja/driver_installation_zadig.md)
|
||||||
* [ファームウェアのフラッシュ](ja/flashing.md)
|
* [キーマップの概要](ja/keymap.md)
|
||||||
* [機能のカスタマイズ](ja/custom_quantum_functions.md)
|
* [Vagrant のガイド](ja/getting_started_vagrant.md)
|
||||||
* [キーマップの概要](ja/keymap.md)
|
* 書き込み
|
||||||
|
* [書き込み](ja/flashing.md)
|
||||||
|
* [ATmega32A の書き込み (ps2avrgb)](ja/flashing_bootloadhid.md)
|
||||||
|
* IDE
|
||||||
|
* [Eclipse で QMK を使用](ja/other_eclipse.md)
|
||||||
|
* [VSCode で QMK を使用](ja/other_vscode.md)
|
||||||
|
* Git のベストプラクティス
|
||||||
|
* [入門](ja/newbs_git_best_practices.md)
|
||||||
|
* [フォーク](ja/newbs_git_using_your_master_branch.md)
|
||||||
|
* [マージの競合の解決](ja/newbs_git_resolving_merge_conflicts.md)
|
||||||
|
* [ブランチの修正](ja/newbs_git_resynchronize_a_branch.md)
|
||||||
|
* キーボードを作る
|
||||||
|
* [Hand Wiring ガイド](ja/hand_wire.md)
|
||||||
|
* [ISP 書き込みガイド](ja/isp_flashing_guide.md)
|
||||||
|
|
||||||
* [ハードウェア](ja/hardware.md)
|
* 単純なキーコード
|
||||||
* [互換性のあるマイクロコントローラ](ja/compatible_microcontrollers.md)
|
* [完全なリスト](ja/keycodes.md)
|
||||||
* [AVR プロセッサ](ja/hardware_avr.md)
|
* [基本的なキーコード](ja/keycodes_basic.md)
|
||||||
* [ドライバ](ja/hardware_drivers.md)
|
* [修飾キー](ja/feature_advanced_keycodes.md)
|
||||||
|
* [Quantum キーコード](ja/quantum_keycodes.md)
|
||||||
|
|
||||||
* リファレンス
|
* 高度なキーコード
|
||||||
* [キーボード ガイドライン](ja/hardware_keyboard_guidelines.md)
|
* [コマンド](ja/feature_command.md)
|
||||||
* [設定オプション](ja/config_options.md)
|
* [動的マクロ](ja/feature_dynamic_macros.md)
|
||||||
* [キーコード](ja/keycodes.md)
|
* [グレイブ エスケープ](ja/feature_grave_esc.md)
|
||||||
* [コーディング規約 - C](ja/coding_conventions_c.md)
|
* [リーダーキー](ja/feature_leader_key.md)
|
||||||
* [コーディング規約 - Python](ja/coding_conventions_python.md)
|
* [モッドタップ](ja/mod_tap.md)
|
||||||
* [ドキュメント ベストプラクティス](ja/documentation_best_practices.md)
|
* [マクロ](ja/feature_macros.md)
|
||||||
* [ドキュメント テンプレート](ja/documentation_templates.md)
|
* [マウスキー](ja/feature_mouse_keys.md)
|
||||||
* [用語](ja/reference_glossary.md)
|
* [Space Cadet Shift](ja/feature_space_cadet.md)
|
||||||
* [ユニットテスト](ja/unit_testing.md)
|
* [US ANSI シフトキー](ja/keycodes_us_ansi_shifted.md)
|
||||||
* [便利な関数](ja/ref_functions.md)
|
|
||||||
* [Configurator サポート](ja/reference_configurator_support.md)
|
|
||||||
* [info.json 形式](ja/reference_info_json.md)
|
|
||||||
* [Python CLI 開発](ja/cli_development.md)
|
|
||||||
|
|
||||||
* [機能](ja/features.md)
|
* ソフトウェア機能
|
||||||
* [基本的なキーコード](ja/keycodes_basic.md)
|
* [自動シフト](ja/feature_auto_shift.md)
|
||||||
* [US ANSI シフトキー](ja/keycodes_us_ansi_shifted.md)
|
* [コンボ](ja/feature_combo.md)
|
||||||
* [Quantum キーコード](ja/quantum_keycodes.md)
|
* [デバウンス API](ja/feature_debounce_type.md)
|
||||||
* [Advanced キーコード](ja/feature_advanced_keycodes.md)
|
* [キーロック](ja/feature_key_lock.md)
|
||||||
* [オーディオ](ja/feature_audio.md)
|
* [レイヤー](ja/feature_layers.md)
|
||||||
* [自動シフト](ja/feature_auto_shift.md)
|
* [One Shot Keys](ja/one_shot_keys.md)
|
||||||
* [バックライト](ja/feature_backlight.md)
|
* [ポインティング デバイス](ja/feature_pointing_device.md)
|
||||||
* [ブルートゥース](ja/feature_bluetooth.md)
|
* [Swap Hands](ja/feature_swap_hands.md)
|
||||||
* [ブートマジック](ja/feature_bootmagic.md)
|
* [タップダンス](ja/feature_tap_dance.md)
|
||||||
* [コンボ](ja/feature_combo.md)
|
* [タップホールド設定](ja/tap_hold.md)
|
||||||
* [コマンド](ja/feature_command.md)
|
* [ターミナル](ja/feature_terminal.md)
|
||||||
* [デバウンス API](ja/feature_debounce_type.md)
|
* [ユニコード](ja/feature_unicode.md)
|
||||||
* [DIP スイッチ](ja/feature_dip_switch.md)
|
* [ユーザスペース](ja/feature_userspace.md)
|
||||||
* [動的マクロ](ja/feature_dynamic_macros.md)
|
* [WPM 計算](ja/feature_wpm.md)
|
||||||
* [エンコーダ](ja/feature_encoders.md)
|
|
||||||
* [グレイブ エスケープ](ja/feature_grave_esc.md)
|
|
||||||
* [触覚フィードバック](ja/feature_haptic_feedback.md)
|
|
||||||
* [HD44780 LCD コントローラ](ja/feature_hd44780.md)
|
|
||||||
* [キーロック](ja/feature_key_lock.md)
|
|
||||||
* [レイアウト](ja/feature_layouts.md)
|
|
||||||
* [リーダー キー](ja/feature_leader_key.md)
|
|
||||||
* [LED マトリクス](ja/feature_led_matrix.md)
|
|
||||||
* [マクロ](ja/feature_macros.md)
|
|
||||||
* [マウスキー](ja/feature_mouse_keys.md)
|
|
||||||
* [OLED ドライバ](ja/feature_oled_driver.md)
|
|
||||||
* [One Shot Keys](ja/one_shot_keys.md)
|
|
||||||
* [ポインティング デバイス](ja/feature_pointing_device.md)
|
|
||||||
* [PS/2 マウス](ja/feature_ps2_mouse.md)
|
|
||||||
* [RGB ライト](ja/feature_rgblight.md)
|
|
||||||
* [RGB マトリクス](ja/feature_rgb_matrix.md)
|
|
||||||
* [Space Cadet](ja/feature_space_cadet.md)
|
|
||||||
* [分割キーボード](ja/feature_split_keyboard.md)
|
|
||||||
* [Stenography](ja/feature_stenography.md)
|
|
||||||
* [Swap Hands](ja/feature_swap_hands.md)
|
|
||||||
* [タップ ダンス](ja/feature_tap_dance.md)
|
|
||||||
* [ターミナル](ja/feature_terminal.md)
|
|
||||||
* [感熱式プリンタ](ja/feature_thermal_printer.md)
|
|
||||||
* [ユニコード](ja/feature_unicode.md)
|
|
||||||
* [ユーザスペース](ja/feature_userspace.md)
|
|
||||||
* [Velocikey](ja/feature_velocikey.md)
|
|
||||||
|
|
||||||
* メーカーおよびモッダーのために
|
* ハードウェア機能
|
||||||
* [Hand Wiring ガイド](ja/hand_wire.md)
|
* 表示
|
||||||
* [ISP 書き込みガイド](ja/isp_flashing_guide.md)
|
* [HD44780 LCD コントローラ](ja/feature_hd44780.md)
|
||||||
* [ARM デバッグ ガイド](ja/arm_debugging.md)
|
* [OLED ドライバ](ja/feature_oled_driver.md)
|
||||||
* [ADC ドライバ](ja/adc_driver.md)
|
* 電飾
|
||||||
* [I2C ドライバ](ja/i2c_driver.md)
|
* [バックライト](ja/feature_backlight.md)
|
||||||
* [WS2812 ドライバ](ja/ws2812_driver.md)
|
* [LED マトリックス](ja/feature_led_matrix.md)
|
||||||
* [EEPROM ドライバ](ja/eeprom_driver.md)
|
* [RGB ライト](ja/feature_rgblight.md)
|
||||||
* [GPIO コントロール](ja/internals_gpio_control.md)
|
* [RGB マトリックス](ja/feature_rgb_matrix.md)
|
||||||
* [カスタムマトリックス](ja/custom_matrix.md)
|
* [オーディオ](ja/feature_audio.md)
|
||||||
* [Proton C 規約](ja/proton_c_conversion.md)
|
* [Bluetooth](ja/feature_bluetooth.md)
|
||||||
|
* [ブートマジック](ja/feature_bootmagic.md)
|
||||||
|
* [カスタムマトリックス](ja/custom_matrix.md)
|
||||||
|
* [DIP スイッチ](ja/feature_dip_switch.md)
|
||||||
|
* [エンコーダ](ja/feature_encoders.md)
|
||||||
|
* [触覚フィードバック](ja/feature_haptic_feedback.md)
|
||||||
|
* [Proton C 規約](ja/proton_c_conversion.md)
|
||||||
|
* [PS/2 マウス](ja/feature_ps2_mouse.md)
|
||||||
|
* [分割キーボード](ja/feature_split_keyboard.md)
|
||||||
|
* [Stenography](ja/feature_stenography.md)
|
||||||
|
* [感熱式プリンタ](ja/feature_thermal_printer.md)
|
||||||
|
* [Velocikey](ja/feature_velocikey.md)
|
||||||
|
|
||||||
* より深く知るために
|
* QMK の開発
|
||||||
* [キーボードがどのように動作するか](ja/how_keyboards_work.md)
|
* 破壊的な変更
|
||||||
* [QMK の理解](ja/understanding_qmk.md)
|
* [概要](ja/breaking_changes.md)
|
||||||
|
* [プルリクエストにフラグが付けられた](ja/breaking_changes_instructions.md)
|
||||||
|
* 履歴
|
||||||
|
* [2020年2月29日](ja/ChangeLog/20200229.md)
|
||||||
|
* [2019年8月30日](ja/ChangeLog/20190830.md)
|
||||||
|
|
||||||
* 他の話題
|
* C 開発
|
||||||
* [Eclipse で QMK を使用](ja/other_eclipse.md)
|
* [ARM デバッグ ガイド](ja/arm_debugging.md)
|
||||||
* [VSCode で QMK を使用](ja/other_vscode.md)
|
* [AVR プロセッサ](ja/hardware_avr.md)
|
||||||
* [サポート](ja/getting_started_getting_help.md)
|
* [コーディング規約](ja/coding_conventions_c.md)
|
||||||
* [翻訳を追加する方法](ja/translating.md)
|
* [互換性のあるマイクロコントローラ](ja/compatible_microcontrollers.md)
|
||||||
|
* [ドライバ](ja/hardware_drivers.md)
|
||||||
|
* [ADC ドライバ](ja/adc_driver.md)
|
||||||
|
* [I2C ドライバ](ja/i2c_driver.md)
|
||||||
|
* [SPI ドライバ](ja/spi_driver.md)
|
||||||
|
* [WS2812 ドライバ](ja/ws2812_driver.md)
|
||||||
|
* [EEPROM ドライバ](ja/eeprom_driver.md)
|
||||||
|
* [GPIO コントロール](ja/internals_gpio_control.md)
|
||||||
|
* [キーボード ガイドライン](ja/hardware_keyboard_guidelines.md)
|
||||||
|
|
||||||
* QMK の内部詳細(作成中)
|
* Python 開発
|
||||||
* [定義](ja/internals_defines.md)
|
* [コーディング規約](ja/coding_conventions_python.md)
|
||||||
* [Input Callback Reg](ja/internals_input_callback_reg.md)
|
* [QMK CLI 開発](ja/cli_development.md)
|
||||||
* [Midi ドライバ](ja/internals_midi_device.md)
|
|
||||||
* [Midi デバイスのセットアップ手順](ja/internals_midi_device_setup_process.md)
|
* Configurator 開発
|
||||||
* [Midi ユーティリティ](ja/internals_midi_util.md)
|
* QMK API
|
||||||
* [Send Functions](ja/internals_send_functions.md)
|
* [開発環境](ja/api_development_environment.md)
|
||||||
* [Sysex Tools](ja/internals_sysex_tools.md)
|
* [アーキテクチャの概要](ja/api_development_overview.md)
|
||||||
|
|
||||||
|
* QMK Reference
|
||||||
|
* [QMK への貢献](ja/contributing.md)
|
||||||
|
* [QMK ドキュメントの翻訳](ja/translating.md)
|
||||||
|
* [設定オプション](ja/config_options.md)
|
||||||
|
* [Make ドキュメント](ja/getting_started_make_guide.md)
|
||||||
|
* [ドキュメント ベストプラクティス](ja/documentation_best_practices.md)
|
||||||
|
* [ドキュメント テンプレート](ja/documentation_templates.md)
|
||||||
|
* [コミュニティレイアウト](ja/feature_layouts.md)
|
||||||
|
* [ユニットテスト](ja/unit_testing.md)
|
||||||
|
* [便利な関数](ja/ref_functions.md)
|
||||||
|
* [info.json 形式](ja/reference_info_json.md)
|
||||||
|
|
||||||
|
* より深く知るために
|
||||||
|
* [キーボードがどのように動作するか](ja/how_keyboards_work.md)
|
||||||
|
* [マトリックスがどのように動作するか](ja/how_a_matrix_works.md)
|
||||||
|
* [QMK を理解する](ja/understanding_qmk.md)
|
||||||
|
|
||||||
|
* QMK の内部詳細(作成中)
|
||||||
|
* [定義](ja/internals_defines.md)
|
||||||
|
* [Input Callback Reg](ja/internals_input_callback_reg.md)
|
||||||
|
* [Midi デバイス](ja/internals_midi_device.md)
|
||||||
|
* [Midi デバイスのセットアップ手順](ja/internals_midi_device_setup_process.md)
|
||||||
|
* [Midi ユーティリティ](ja/internals_midi_util.md)
|
||||||
|
* [Send Functions](ja/internals_send_functions.md)
|
||||||
|
* [Sysex Tools](ja/internals_sysex_tools.md)
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
# Eclipse を使った ARM デバッグ
|
# Eclipse を使った ARM デバッグ
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: eae21eed7:docs/arm_debugging.md
|
original document: 0.8.58:docs/arm_debugging.md
|
||||||
git diff eae21eed7 HEAD -- docs/arm_debugging.md | cat
|
git diff 0.8.58 HEAD -- docs/arm_debugging.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
このページでは、SWD アダプタとオープンソース/フリーツールを使って ARM MCU をデバッグするためのセットアップ方法について説明します。このガイドでは、GNU MCU Eclipse IDE for C/C++ Developers および OpenOCD を必要な依存関係と一緒にインストールします。
|
このページでは、SWD アダプタとオープンソース/フリーツールを使って ARM MCU をデバッグするためのセットアップ方法について説明します。このガイドでは、GNU MCU Eclipse IDE for C/C++ Developers および OpenOCD を必要な依存関係と一緒にインストールします。
|
||||||
@@ -60,7 +60,7 @@ Java は Eclipse で必要とされるため、[ここ](https://www.oracle.com/t
|
|||||||
|
|
||||||
Eclipse に QMK をビルドしようとするデバイスを教える必要があります。QMK フォルダを右クリック -> Properties -> C/C++ Build -> Settings を選択します。Devices タブを選択し、Devices の下から MCU の適切な種類を選択します。私の例では、STM32F303CC です。
|
Eclipse に QMK をビルドしようとするデバイスを教える必要があります。QMK フォルダを右クリック -> Properties -> C/C++ Build -> Settings を選択します。Devices タブを選択し、Devices の下から MCU の適切な種類を選択します。私の例では、STM32F303CC です。
|
||||||
|
|
||||||
この間に、Build コマンドもセットアップしましょう。C/C++ Build を選択し、Behavior タブを選択します。build コマンドのところで、`all` を必要な make コマンドに置き換えます。例えば、rev6 Planck の default キーマップの場合、これは `planck/rev6:default` になります。Apply and Close を選択します。
|
この間に、Build コマンドもセットアップしましょう。C/C++ Build を選択し、Behavior タブを選択します。Build コマンドのところで、`all` を必要な make コマンドに置き換えます。例えば、rev6 Planck の default キーマップの場合、これは `planck/rev6:default` になります。Apply and Close を選択します。
|
||||||
|
|
||||||
## ビルド
|
## ビルド
|
||||||
|
|
||||||
@@ -70,13 +70,13 @@ Eclipse に QMK をビルドしようとするデバイスを教える必要が
|
|||||||
|
|
||||||
### デバッガの接続
|
### デバッガの接続
|
||||||
|
|
||||||
ARM MCU は、クロック信号(SWCLK) とデータ信号(SWDIO) で構成される Single Wire Debug (SWD) プロトコルを使います。MCU を 完全に操作するには、この2本のワイヤとグラウンドを接続するだけで十分です。ここでは、キーボードは USB を介して電力が供給されると想定しています。手動でリセットボタンを使えるため、RESET 信号は必要ありません。より高度なセットアップのために printf と scanf をホストに非同期にパイプする SWO 信号を使用できますが、私たちのセットアップでは無視します。
|
ARM MCU は、クロック信号(SWCLK) とデータ信号(SWDIO) で構成される Single Wire Debug (SWD) プロトコルを使います。MCU を完全に操作するには、この2本のワイヤとグラウンドを接続するだけで十分です。ここでは、キーボードは USB を介して電力が供給されると想定しています。手動でリセットボタンを使えるため、RESET 信号は必要ありません。より高度なセットアップのために printf と scanf をホストに非同期にパイプする SWO 信号を使用できますが、私たちのセットアップでは無視します。
|
||||||
|
|
||||||
注意: SWCLK と SWDIO ピンがキーボードのマトリックスで使われていないことを確認してください。もし使われている場合は、一時的に他のピンに切り替えることができます。
|
注意: SWCLK と SWDIO ピンがキーボードのマトリックスで使われていないことを確認してください。もし使われている場合は、一時的に他のピンに切り替えることができます。
|
||||||
|
|
||||||
### デバッガの設定
|
### デバッガの設定
|
||||||
|
|
||||||
QMK フォルダを右クリックし、Debug As -> Debug Configurations... を選択します。ここで、GDB OpenOCD Debugging をダブルクリックします。Debugger タブを選択し、MCU に必要な設定を入力します。これを見つけるにはいじったりググったりする必要があるかもしれません。STM32F3 用のデフォルトスクリプトは stm32f3discovery.cfg と呼ばれます。OpenOCD に伝えるには、Config options で `-f board/stm32f3discovery.cfg` と入力します。
|
QMK フォルダを右クリックし、Debug As -> Debug Configurations... を選択します。ここで、GDB OpenOCD Debugging をダブルクリックします。Debugger タブを選択し、MCU に必要な設定を入力します。これを見つけるにはいじったりググったりする必要があるかもしれません。STM32F3 用のデフォルトスクリプトは `stm32f3discovery.cfg` と呼ばれます。OpenOCD に伝えるには、Config options で `-f board/stm32f3discovery.cfg` と入力します。
|
||||||
|
|
||||||
注意: 私の場合、この設定スクリプトはリセット操作を無効にするために編集が必要です。スクリプトの場所は、通常はパス `openocd/version/.content/scripts/board` の下の実際の実行可能フィールドの中で見つかります。ここで、私は `reset_config srst_only` を `reset_config none` に編集しました。
|
注意: 私の場合、この設定スクリプトはリセット操作を無効にするために編集が必要です。スクリプトの場所は、通常はパス `openocd/version/.content/scripts/board` の下の実際の実行可能フィールドの中で見つかります。ここで、私は `reset_config srst_only` を `reset_config none` に編集しました。
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ Apply and Close を選択します。
|
|||||||
|
|
||||||
キーボードをリセットしてください。
|
キーボードをリセットしてください。
|
||||||
|
|
||||||
虫アイコンをクリックし、もし全てうまく行けば Debug パースペクティブに移動します。ここでは、main 関数の最初でプログラムカウンタが停止するので、Play ボタンを押します。全てのデバッガのほとんどの機能は ARM MCU で動作しますが、正確な詳細については google があなたのお友達です!
|
虫アイコンをクリックし、もし全てうまく行けば Debug パースペクティブに移動します。ここでは、main 関数の最初でプログラムカウンタが停止し、Play ボタンが押されるのを待ちます。全てのデバッガのほとんどの機能は Arm MCU で動作しますが、正確な詳細については Google があなたのお友達です!
|
||||||
|
|
||||||
|
|
||||||
ハッピーデバッギング!
|
ハッピーデバッギング!
|
||||||
|
272
docs/ja/cli.md
272
docs/ja/cli.md
@@ -1,29 +1,19 @@
|
|||||||
# QMK CLI
|
# QMK CLI :id=qmk-cli
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 79e6b7866:docs/cli.md
|
original document: 0.8.58:docs/cli.md
|
||||||
git diff 79e6b7866 HEAD -- docs/cli.md | cat
|
git diff 0.8.58 HEAD -- docs/cli.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
このページは QMK CLI のセットアップと使用方法について説明します。
|
## 概要 :id=overview
|
||||||
|
|
||||||
# 概要
|
|
||||||
|
|
||||||
QMK CLI を使用すると QMK キーボードの構築と作業が簡単になります。QMK ファームウェアの取得とコンパイル、キーマップの作成などのようなタスクを簡素化し合理化するためのコマンドを多く提供します。
|
QMK CLI を使用すると QMK キーボードの構築と作業が簡単になります。QMK ファームウェアの取得とコンパイル、キーマップの作成などのようなタスクを簡素化し合理化するためのコマンドを多く提供します。
|
||||||
|
|
||||||
* [グローバル CLI](#global-cli)
|
### 必要事項 :id=requirements
|
||||||
* [ローカル CLI](#local-cli)
|
|
||||||
* [CLI コマンド](#cli-commands)
|
|
||||||
|
|
||||||
# 必要事項
|
CLI は Python 3.5 以上を必要とします。我々は必要事項の数を少なくしようとしていますが、[`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt) に列挙されているパッケージもインストールする必要があります。これらは QMK CLI をインストールするときに自動的にインストールされます。
|
||||||
|
|
||||||
CLI は Python 3.5 以上を必要とします。我々は必要事項の数を少なくしようとしていますが、[`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt) にリストされているパッケージもインストールする必要があります。
|
### Homebrew を使ったインストール (macOS、いくつかの Linux) :id=install-using-homebrew
|
||||||
|
|
||||||
# グローバル CLI :id=global-cli
|
|
||||||
|
|
||||||
QMK は、QMK ビルド環境のセットアップ、QMK の操作、および `qmk_firmware` の複数のコピーの操作を容易にできるインストール可能な CLI を提供します。これを定期的にインストールおよび更新することをお勧めします。
|
|
||||||
|
|
||||||
## Homebrew を使ったインストール (macOS、いくつかの Linux)
|
|
||||||
|
|
||||||
[Homebrew](https://brew.sh) をインストールしている場合は、タップして QMK をインストールすることができます:
|
[Homebrew](https://brew.sh) をインストールしている場合は、タップして QMK をインストールすることができます:
|
||||||
|
|
||||||
@@ -34,7 +24,7 @@ export QMK_HOME='~/qmk_firmware' # オプション、`qmk_firmware` の場所を
|
|||||||
qmk setup # これは `qmk/qmk_firmware` をクローンし、オプションでビルド環境をセットアップします
|
qmk setup # これは `qmk/qmk_firmware` をクローンし、オプションでビルド環境をセットアップします
|
||||||
```
|
```
|
||||||
|
|
||||||
## easy_install あるいは pip を使ってインストール
|
### easy_install あるいは pip を使ってインストール :id=install-using-easy_install-or-pip
|
||||||
|
|
||||||
上のリストにあなたのシステムがない場合は、QMK を手動でインストールすることができます。最初に、python 3.5 (以降)をインストールしていて、pip をインストールしていることを確認してください。次に以下のコマンドを使って QMK をインストールします:
|
上のリストにあなたのシステムがない場合は、QMK を手動でインストールすることができます。最初に、python 3.5 (以降)をインストールしていて、pip をインストールしていることを確認してください。次に以下のコマンドを使って QMK をインストールします:
|
||||||
|
|
||||||
@@ -44,7 +34,7 @@ export QMK_HOME='~/qmk_firmware' # オプション、`qmk_firmware` の場所を
|
|||||||
qmk setup # これは `qmk/qmk_firmware` をクローンし、オプションでビルド環境をセットアップします
|
qmk setup # これは `qmk/qmk_firmware` をクローンし、オプションでビルド環境をセットアップします
|
||||||
```
|
```
|
||||||
|
|
||||||
## 他のオペレーティングシステムのためのパッケージ
|
### 他のオペレーティングシステムのためのパッケージ :id=packaging-for-other-operating-systems
|
||||||
|
|
||||||
より多くのオペレーティングシステム用に `qmk` パッケージを作成および保守する人を探しています。OS 用のパッケージを作成する場合は、以下のガイドラインに従ってください:
|
より多くのオペレーティングシステム用に `qmk` パッケージを作成および保守する人を探しています。OS 用のパッケージを作成する場合は、以下のガイドラインに従ってください:
|
||||||
|
|
||||||
@@ -52,247 +42,3 @@ qmk setup # これは `qmk/qmk_firmware` をクローンし、オプション
|
|||||||
* 逸脱する場合は、理由をコメントに文章化してください。
|
* 逸脱する場合は、理由をコメントに文章化してください。
|
||||||
* virtualenv を使ってインストールしてください
|
* virtualenv を使ってインストールしてください
|
||||||
* 環境変数 `QMK_HOME` を設定して、ファームウェアソースを `~/qmk_firmware` 以外のどこかにチェックアウトするようにユーザに指示してください。
|
* 環境変数 `QMK_HOME` を設定して、ファームウェアソースを `~/qmk_firmware` 以外のどこかにチェックアウトするようにユーザに指示してください。
|
||||||
|
|
||||||
# ローカル CLI :id=local-cli
|
|
||||||
|
|
||||||
グローバル CLI を使いたくない場合は、`qmk_firmware` に付属のローカル CLI があります。`qmk_firmware/bin/qmk` で見つけることができます。任意のディレクトリから `qmk` コマンドを実行でき、常に `qmk_firmware` のコピー上で動作します。
|
|
||||||
|
|
||||||
**例**:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ ~/qmk_firmware/bin/qmk hello
|
|
||||||
Ψ Hello, World!
|
|
||||||
```
|
|
||||||
|
|
||||||
## ローカル CLI の制限
|
|
||||||
|
|
||||||
グローバル CLI と比較して、ローカル CLI には幾つかの制限があります:
|
|
||||||
|
|
||||||
* ローカル CLI は `qmk setup` あるいは `qmk clone` をサポートしません。
|
|
||||||
* 複数のリポジトリがクローンされている場合でも、ローカル CLI は常に `qmk_firmware` ツリー上で動作します。
|
|
||||||
* ローカル CLI は virtualenv で動作しません。そのため依存関係が競合する可能性があります
|
|
||||||
|
|
||||||
# CLI コマンド :id=cli-commands
|
|
||||||
|
|
||||||
## `qmk cformat`
|
|
||||||
|
|
||||||
このコマンドは clang-format を使って C コードを整形します。引数無しで実行して全てのコアコードを整形するか、コマンドラインでファイル名を渡して特定のファイルに対して実行します。
|
|
||||||
|
|
||||||
**使用法**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk cformat [file1] [file2] [...] [fileN]
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk compile`
|
|
||||||
|
|
||||||
このコマンドにより、任意のディレクトリからファームウェアをコンパイルすることができます。<https://config.qmk.fm> からエクスポートした JSON をコンパイルするか、リポジトリ内でキーマップをコンパイルするか、現在の作業ディレクトリでキーボードをコンパイルすることができます。
|
|
||||||
|
|
||||||
**Configurator Exports での使い方**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk compile <configuratorExport.json>
|
|
||||||
```
|
|
||||||
|
|
||||||
**キーマップでの使い方**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk compile -kb <keyboard_name> -km <keymap_name>
|
|
||||||
```
|
|
||||||
|
|
||||||
**キーボードディレクトリでの使い方**:
|
|
||||||
|
|
||||||
default キーマップのあるキーボードディレクトリ、キーボードのキーマップディレクトリ、`--keymap <keymap_name>` で与えられるキーマップディレクトリにいなければなりません。
|
|
||||||
```
|
|
||||||
qmk compile
|
|
||||||
```
|
|
||||||
|
|
||||||
**例**:
|
|
||||||
```
|
|
||||||
$ qmk config compile.keymap=default
|
|
||||||
$ cd ~/qmk_firmware/keyboards/planck/rev6
|
|
||||||
$ qmk compile
|
|
||||||
Ψ Compiling keymap with make planck/rev6:default
|
|
||||||
...
|
|
||||||
```
|
|
||||||
あるいはオプションのキーマップ引数を指定して
|
|
||||||
|
|
||||||
```
|
|
||||||
$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4
|
|
||||||
$ qmk compile -km 66_iso
|
|
||||||
Ψ Compiling keymap with make clueboard/66/rev4:66_iso
|
|
||||||
...
|
|
||||||
```
|
|
||||||
あるいはキーマップディレクトリで
|
|
||||||
|
|
||||||
```
|
|
||||||
$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
|
|
||||||
$ qmk compile
|
|
||||||
Ψ Compiling keymap with make make gh60/satan:colemak
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
**レイアウトディレクトリでの使い方**:
|
|
||||||
|
|
||||||
`qmk_firmware/layouts/` 以下のキーマップディレクトリにいなければなりません。
|
|
||||||
```
|
|
||||||
qmk compile -kb <keyboard_name>
|
|
||||||
```
|
|
||||||
|
|
||||||
**例**:
|
|
||||||
```
|
|
||||||
$ cd ~/qmk_firmware/layouts/community/60_ansi/mechmerlin-ansi
|
|
||||||
$ qmk compile -kb dz60
|
|
||||||
Ψ Compiling keymap with make dz60:mechmerlin-ansi
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk flash`
|
|
||||||
|
|
||||||
このコマンドは `qmk compile` に似ていますが、ブートローダを対象にすることもできます。ブートローダはオプションで、デフォルトでは `:flash` に設定されています。
|
|
||||||
違うブートローダを指定するには、`-bl <bootloader>` を使ってください。利用可能なブートローダの詳細については、<https://docs.qmk.fm/#/ja/flashing>
|
|
||||||
を見てください。
|
|
||||||
|
|
||||||
**Configurator Exports での使い方**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk flash <configuratorExport.json> -bl <bootloader>
|
|
||||||
```
|
|
||||||
|
|
||||||
**キーマップでの使い方**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk flash -kb <keyboard_name> -km <keymap_name> -bl <bootloader>
|
|
||||||
```
|
|
||||||
|
|
||||||
**ブートローダのリスト**
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk flash -b
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk config`
|
|
||||||
|
|
||||||
このコマンドにより QMK の挙動を設定することができます。完全な `qmk config` のドキュメントについては、[CLI 設定](ja/cli_configuration.md)を見てください。
|
|
||||||
|
|
||||||
**使用法**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk docs`
|
|
||||||
|
|
||||||
このコマンドは、ドキュメントを参照または改善するために使うことができるローカル HTTP サーバを起動します。デフォルトのポートは 8936 です。
|
|
||||||
|
|
||||||
**使用法**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk docs [-p PORT]
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk doctor`
|
|
||||||
|
|
||||||
このコマンドは環境を調査し、潜在的なビルドあるいは書き込みの問題について警告します。必要に応じてそれらの多くを修正できます。
|
|
||||||
|
|
||||||
**使用法**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk doctor [-y] [-n]
|
|
||||||
```
|
|
||||||
|
|
||||||
**例**:
|
|
||||||
|
|
||||||
環境に問題がないか確認し、それらを修正するよう促します:
|
|
||||||
|
|
||||||
qmk doctor
|
|
||||||
|
|
||||||
環境を確認し、見つかった問題を自動的に修正します:
|
|
||||||
|
|
||||||
qmk doctor -y
|
|
||||||
|
|
||||||
環境を確認し、問題のみをレポートします:
|
|
||||||
|
|
||||||
qmk doctor -n
|
|
||||||
|
|
||||||
## `qmk json2c`
|
|
||||||
|
|
||||||
QMK Configurator からエクスポートしたものから keymap.c を生成します。
|
|
||||||
|
|
||||||
**使用法**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk json2c [-o OUTPUT] filename
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk kle2json`
|
|
||||||
|
|
||||||
このコマンドにより、生の KLE データから QMK Configurator の JSON へ変換することができます。絶対パスあるいは現在のディレクトリ内のファイル名のいずれかを受け取ります。デフォルトでは、`info.json` が既に存在している場合は上書きしません。上書きするには、`-f` あるいは `--force` フラグを使ってください。
|
|
||||||
|
|
||||||
**使用法**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk kle2json [-f] <filename>
|
|
||||||
```
|
|
||||||
|
|
||||||
**例**:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ qmk kle2json kle.txt
|
|
||||||
☒ File info.json already exists, use -f or --force to overwrite.
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
$ qmk kle2json -f kle.txt -f
|
|
||||||
Ψ Wrote out to info.json
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk list-keyboards`
|
|
||||||
|
|
||||||
このコマンドは現在 `qmk_firmware` で定義されている全てのキーボードをリスト化します。
|
|
||||||
|
|
||||||
**使用法**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk list-keyboards
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk list-keymaps`
|
|
||||||
|
|
||||||
このコマンドは指定されたキーボード(とリビジョン)の全てのキーマップをリスト化します。
|
|
||||||
|
|
||||||
**使用法**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk list-keymaps -kb planck/ez
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk new-keymap`
|
|
||||||
|
|
||||||
このコマンドは、キーボードの既存のデフォルトのキーマップに基づいて新しいキーマップを作成します。
|
|
||||||
|
|
||||||
**使用法**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk pyformat`
|
|
||||||
|
|
||||||
このコマンドは `qmk_firmware` 内の python コードを整形します。
|
|
||||||
|
|
||||||
**使用法**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk pyformat
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk pytest`
|
|
||||||
|
|
||||||
このコマンドは python のテストスィートを実行します。python コードに変更を加えた場合、これの実行が成功することを確認する必要があります。
|
|
||||||
|
|
||||||
**使用法**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk pytest
|
|
||||||
```
|
|
||||||
|
258
docs/ja/cli_commands.md
Normal file
258
docs/ja/cli_commands.md
Normal file
@@ -0,0 +1,258 @@
|
|||||||
|
# QMK CLI コマンド
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 0.8.58:docs/cli.md
|
||||||
|
git diff 0.8.58 HEAD -- docs/cli.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
# CLI コマンド
|
||||||
|
|
||||||
|
## `qmk cformat`
|
||||||
|
|
||||||
|
このコマンドは clang-format を使って C コードを整形します。
|
||||||
|
|
||||||
|
引数無しで実行すると、変更された全てのコアコードを整形します。デフォルトでは `git diff` で `origin/master` をチェックし、ブランチは `-b <branch_name>` を使って変更できます。
|
||||||
|
|
||||||
|
`-a` で全てのコアコードを整形するか、コマンドラインでファイル名を渡して特定のファイルに対して実行します。
|
||||||
|
|
||||||
|
**指定したファイルに対する使い方**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk cformat [file1] [file2] [...] [fileN]
|
||||||
|
```
|
||||||
|
|
||||||
|
**全てのコアファイルに対する使い方**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk cformat -a
|
||||||
|
```
|
||||||
|
|
||||||
|
**origin/master で変更されたファイルのみに対する使い方**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk cformat
|
||||||
|
```
|
||||||
|
|
||||||
|
**branch_name で変更されたファイルのみに対する使い方**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk cformat -b branch_name
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk compile`
|
||||||
|
|
||||||
|
このコマンドにより、任意のディレクトリからファームウェアをコンパイルすることができます。<https://config.qmk.fm> からエクスポートした JSON をコンパイルするか、リポジトリ内でキーマップをコンパイルするか、現在の作業ディレクトリでキーボードをコンパイルすることができます。
|
||||||
|
|
||||||
|
**Configurator Exports での使い方**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk compile <configuratorExport.json>
|
||||||
|
```
|
||||||
|
|
||||||
|
**キーマップでの使い方**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk compile -kb <keyboard_name> -km <keymap_name>
|
||||||
|
```
|
||||||
|
|
||||||
|
**キーボードディレクトリでの使い方**:
|
||||||
|
|
||||||
|
default キーマップのあるキーボードディレクトリ、キーボードのキーマップディレクトリ、`--keymap <keymap_name>` で与えられるキーマップディレクトリにいなければなりません。
|
||||||
|
```
|
||||||
|
qmk compile
|
||||||
|
```
|
||||||
|
|
||||||
|
**指定したキーマップをサポートする全てのキーボードをビルドする場合の使い方**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk compile -kb all -km <keymap_name>
|
||||||
|
```
|
||||||
|
|
||||||
|
**例**:
|
||||||
|
```
|
||||||
|
$ qmk config compile.keymap=default
|
||||||
|
$ cd ~/qmk_firmware/keyboards/planck/rev6
|
||||||
|
$ qmk compile
|
||||||
|
Ψ Compiling keymap with make planck/rev6:default
|
||||||
|
...
|
||||||
|
```
|
||||||
|
あるいはオプションのキーマップ引数を指定して
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4
|
||||||
|
$ qmk compile -km 66_iso
|
||||||
|
Ψ Compiling keymap with make clueboard/66/rev4:66_iso
|
||||||
|
...
|
||||||
|
```
|
||||||
|
あるいはキーマップディレクトリで
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
|
||||||
|
$ qmk compile
|
||||||
|
Ψ Compiling keymap with make make gh60/satan:colemak
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
**レイアウトディレクトリでの使い方**:
|
||||||
|
|
||||||
|
`qmk_firmware/layouts/` 以下のキーマップディレクトリにいなければなりません。
|
||||||
|
```
|
||||||
|
qmk compile -kb <keyboard_name>
|
||||||
|
```
|
||||||
|
|
||||||
|
**例**:
|
||||||
|
```
|
||||||
|
$ cd ~/qmk_firmware/layouts/community/60_ansi/mechmerlin-ansi
|
||||||
|
$ qmk compile -kb dz60
|
||||||
|
Ψ Compiling keymap with make dz60:mechmerlin-ansi
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk flash`
|
||||||
|
|
||||||
|
このコマンドは `qmk compile` に似ていますが、ブートローダを対象にすることもできます。ブートローダはオプションで、デフォルトでは `:flash` に設定されています。
|
||||||
|
違うブートローダを指定するには、`-bl <bootloader>` を使ってください。利用可能なブートローダの詳細については、[ファームウェアを書き込む](ja/flashing.md)を見てください。
|
||||||
|
|
||||||
|
**Configurator Exports での使い方**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk flash <configuratorExport.json> -bl <bootloader>
|
||||||
|
```
|
||||||
|
|
||||||
|
**キーマップでの使い方**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk flash -kb <keyboard_name> -km <keymap_name> -bl <bootloader>
|
||||||
|
```
|
||||||
|
|
||||||
|
**ブートローダの列挙**
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk flash -b
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk config`
|
||||||
|
|
||||||
|
このコマンドにより QMK の挙動を設定することができます。完全な `qmk config` のドキュメントについては、[CLI 設定](ja/cli_configuration.md)を見てください。
|
||||||
|
|
||||||
|
**使用法**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk docs`
|
||||||
|
|
||||||
|
このコマンドは、ドキュメントを参照または改善するために使うことができるローカル HTTP サーバを起動します。デフォルトのポートは 8936 です。
|
||||||
|
|
||||||
|
**使用法**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk docs [-p PORT]
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk doctor`
|
||||||
|
|
||||||
|
このコマンドは環境を調査し、潜在的なビルドあるいは書き込みの問題について警告します。必要に応じてそれらの多くを修正できます。
|
||||||
|
|
||||||
|
**使用法**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk doctor [-y] [-n]
|
||||||
|
```
|
||||||
|
|
||||||
|
**例**:
|
||||||
|
|
||||||
|
環境に問題がないか確認し、それらを修正するよう促します:
|
||||||
|
|
||||||
|
qmk doctor
|
||||||
|
|
||||||
|
環境を確認し、見つかった問題を自動的に修正します:
|
||||||
|
|
||||||
|
qmk doctor -y
|
||||||
|
|
||||||
|
環境を確認し、問題のみをレポートします:
|
||||||
|
|
||||||
|
qmk doctor -n
|
||||||
|
|
||||||
|
## `qmk json2c`
|
||||||
|
|
||||||
|
QMK Configurator からエクスポートしたものから keymap.c を生成します。
|
||||||
|
|
||||||
|
**使用法**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk json2c [-o OUTPUT] filename
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk kle2json`
|
||||||
|
|
||||||
|
このコマンドにより、生の KLE データから QMK Configurator の JSON へ変換することができます。絶対パスあるいは現在のディレクトリ内のファイル名のいずれかを受け取ります。デフォルトでは、`info.json` が既に存在している場合は上書きしません。上書きするには、`-f` あるいは `--force` フラグを使ってください。
|
||||||
|
|
||||||
|
**使用法**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk kle2json [-f] <filename>
|
||||||
|
```
|
||||||
|
|
||||||
|
**例**:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ qmk kle2json kle.txt
|
||||||
|
☒ File info.json already exists, use -f or --force to overwrite.
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
$ qmk kle2json -f kle.txt -f
|
||||||
|
Ψ Wrote out to info.json
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk list-keyboards`
|
||||||
|
|
||||||
|
このコマンドは現在 `qmk_firmware` で定義されている全てのキーボードを列挙します。
|
||||||
|
|
||||||
|
**使用法**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk list-keyboards
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk list-keymaps`
|
||||||
|
|
||||||
|
このコマンドは指定されたキーボード(とリビジョン)の全てのキーマップを列挙します。
|
||||||
|
|
||||||
|
**使用法**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk list-keymaps -kb planck/ez
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk new-keymap`
|
||||||
|
|
||||||
|
このコマンドは、キーボードの既存のデフォルトのキーマップに基づいて新しいキーマップを作成します。
|
||||||
|
|
||||||
|
**使用法**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk pyformat`
|
||||||
|
|
||||||
|
このコマンドは `qmk_firmware` 内の python コードを整形します。
|
||||||
|
|
||||||
|
**使用法**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk pyformat
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk pytest`
|
||||||
|
|
||||||
|
このコマンドは python のテストスィートを実行します。python コードに変更を加えた場合、これの実行が成功することを確認する必要があります。
|
||||||
|
|
||||||
|
**使用法**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk pytest
|
||||||
|
```
|
@@ -113,7 +113,7 @@ compile.keymap: skully -> None
|
|||||||
|-----|---------------|-------------|
|
|-----|---------------|-------------|
|
||||||
| user.keyboard | None | キーボードのパス (例: `clueboard/66/rev4`) |
|
| user.keyboard | None | キーボードのパス (例: `clueboard/66/rev4`) |
|
||||||
| user.keymap | None | キーマップ名 (例: `default`) |
|
| user.keymap | None | キーマップ名 (例: `default`) |
|
||||||
| user.name | None | ユーザの github のユーザ名。 |
|
| user.name | None | ユーザの GitHub のユーザ名。 |
|
||||||
|
|
||||||
# 全ての設定オプション
|
# 全ての設定オプション
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
# QMK の設定
|
# QMK の設定
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 2fe288d01:docs/config_options.md
|
original document: 0.8.62:docs/config_options.md
|
||||||
git diff 2fe288d01 HEAD -- docs/config_options.md | cat
|
git diff 0.8.62 HEAD -- docs/config_options.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
QMK はほぼ無制限に設定可能です。可能なところはいかなるところでも、やりすぎな程、ユーザーがコードサイズを犠牲にしてでも彼らのキーボードをカスタマイズをすることを許しています。ただし、このレベルの柔軟性により設定が困難になります。
|
QMK はほぼ無制限に設定可能です。可能なところはいかなるところでも、やりすぎな程、ユーザーがコードサイズを犠牲にしてでも彼らのキーボードをカスタマイズをすることを許しています。ただし、このレベルの柔軟性により設定が困難になります。
|
||||||
@@ -39,167 +39,173 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
|
|||||||
|
|
||||||
## ハードウェアオプション
|
## ハードウェアオプション
|
||||||
* `#define VENDOR_ID 0x1234`
|
* `#define VENDOR_ID 0x1234`
|
||||||
* VID を定義します。ほとんどの DIY プロジェクトにおいて、任意のものを定義できます
|
* VID を定義します。ほとんどの DIY プロジェクトにおいて、任意のものを定義できます
|
||||||
* `#define PRODUCT_ID 0x5678`
|
* `#define PRODUCT_ID 0x5678`
|
||||||
* PID を定義します。ほとんどの DIY プロジェクトでは、任意のものを定義できます
|
* PID を定義します。ほとんどの DIY プロジェクトでは、任意のものを定義できます
|
||||||
* `#define DEVICE_VER 0`
|
* `#define DEVICE_VER 0`
|
||||||
* デバイスのバージョンを定義します (多くの場合リビジョンに使われます)
|
* デバイスのバージョンを定義します (多くの場合リビジョンに使われます)
|
||||||
* `#define MANUFACTURER Me`
|
* `#define MANUFACTURER Me`
|
||||||
* 一般的に、誰もしくはどのブランドがボードを作成したか
|
* 一般的に、誰もしくはどのブランドがボードを作成したか
|
||||||
* `#define PRODUCT Board`
|
* `#define PRODUCT Board`
|
||||||
* キーボードの名前
|
* キーボードの名前
|
||||||
* `#define DESCRIPTION a keyboard`
|
* `#define DESCRIPTION a keyboard`
|
||||||
* キーボードの簡単な説明
|
* キーボードの簡単な説明
|
||||||
* `#define MATRIX_ROWS 5`
|
* `#define MATRIX_ROWS 5`
|
||||||
* キーボードのマトリックスの行の数
|
* キーボードのマトリックスの行の数
|
||||||
* `#define MATRIX_COLS 15`
|
* `#define MATRIX_COLS 15`
|
||||||
* キーボードのマトリックスの列の数
|
* キーボードのマトリックスの列の数
|
||||||
* `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }`
|
* `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }`
|
||||||
* 行のピン、上から下へ
|
* 行のピン、上から下へ
|
||||||
* `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }`
|
* `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }`
|
||||||
* 列のピン、左から右へ
|
* 列のピン、左から右へ
|
||||||
|
* `#define MATRIX_IO_DELAY 30`
|
||||||
|
* マトリックスピン状態の変更と値の読み取り間のマイクロ秒単位の遅延
|
||||||
* `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }`
|
* `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }`
|
||||||
* 参考として、キーボードで使われていないピン
|
* 参考として、キーボードで使われていないピン
|
||||||
* `#define MATRIX_HAS_GHOST`
|
* `#define MATRIX_HAS_GHOST`
|
||||||
* マトリックスにゴーストがあるか(ありそうにないか)定義します
|
* マトリックスにゴーストがあるか(ありそうにないか)定義します
|
||||||
* `#define DIODE_DIRECTION COL2ROW`
|
* `#define DIODE_DIRECTION COL2ROW`
|
||||||
* COL2ROW あるいは ROW2COL - マトリックスがどのように設定されているか。COL2ROW は、スイッチとロウ(行)ラインの間にダイオードが黒い印をロウ(行)ラインに向けて置いてあることを意味します。
|
* COL2ROW あるいは ROW2COL - マトリックスがどのように設定されているか。COL2ROW は、スイッチとロウ(行)ラインの間にダイオードが黒い印をロウ(行)ラインに向けて置いてあることを意味します。
|
||||||
* `#define DIRECT_PINS { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
|
* `#define DIRECT_PINS { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
|
||||||
* ロウ(行)ラインとカラム(列)ラインにマップされているピンを左から右に。各スイッチが個別のピンとグラウンドに接続されているマトリックスを定義します。
|
* ロウ(行)ラインとカラム(列)ラインにマップされているピンを左から右に。各スイッチが個別のピンとグラウンドに接続されているマトリックスを定義します。
|
||||||
* `#define AUDIO_VOICES`
|
* `#define AUDIO_VOICES`
|
||||||
* (循環させるために)代替音声を有効にします
|
* (循環させるために)代替音声を有効にします
|
||||||
* `#define C4_AUDIO`
|
* `#define C4_AUDIO`
|
||||||
* ピン C4 のオーディオを有効にします
|
* ピン C4 のオーディオを有効にします
|
||||||
* `#define C5_AUDIO`
|
* `#define C5_AUDIO`
|
||||||
* ピン C5 のオーディオを有効にします
|
* ピン C5 のオーディオを有効にします
|
||||||
* `#define C6_AUDIO`
|
* `#define C6_AUDIO`
|
||||||
* ピン C6 のオーディオを有効にします
|
* ピン C6 のオーディオを有効にします
|
||||||
* `#define B5_AUDIO`
|
* `#define B5_AUDIO`
|
||||||
* ピン B5 のオーディオを有効にします (C[4-6]\_AUDIO の1つとともに B[5-7]\_AUDIO の1つが有効にされている場合、疑似ステレオが有効にされます)
|
* ピン B5 のオーディオを有効にします (C[4-6]\_AUDIO の1つとともに B[5-7]\_AUDIO の1つが有効にされている場合、疑似ステレオが有効にされます)
|
||||||
* `#define B6_AUDIO`
|
* `#define B6_AUDIO`
|
||||||
* ピン B6 のオーディオを有効にします (C[4-6]\_AUDIO の1つとともに B[5-7]\_AUDIO の1つが有効にされている場合、疑似ステレオが有効にされます)
|
* ピン B6 のオーディオを有効にします (C[4-6]\_AUDIO の1つとともに B[5-7]\_AUDIO の1つが有効にされている場合、疑似ステレオが有効にされます)
|
||||||
* `#define B7_AUDIO`
|
* `#define B7_AUDIO`
|
||||||
* ピン B7 のオーディオを有効にします (C[4-6]\_AUDIO の1つとともに B[5-7]\_AUDIO の1つが有効にされている場合、疑似ステレオが有効にされます)
|
* ピン B7 のオーディオを有効にします (C[4-6]\_AUDIO の1つとともに B[5-7]\_AUDIO の1つが有効にされている場合、疑似ステレオが有効にされます)
|
||||||
* `#define BACKLIGHT_PIN B7`
|
* `#define BACKLIGHT_PIN B7`
|
||||||
* バックライトのピン
|
* バックライトのピン
|
||||||
* `#define BACKLIGHT_LEVELS 3`
|
* `#define BACKLIGHT_LEVELS 3`
|
||||||
* バックライトのレベル数 (off を除いて最大31)
|
* バックライトのレベル数 (off を除いて最大31)
|
||||||
* `#define BACKLIGHT_BREATHING`
|
* `#define BACKLIGHT_BREATHING`
|
||||||
* バックライトのブレスを有効にします
|
* バックライトのブレスを有効にします
|
||||||
* `#define BREATHING_PERIOD 6`
|
* `#define BREATHING_PERIOD 6`
|
||||||
* 1つのバックライトの "ブレス" の長さの秒数
|
* 1つのバックライトの "ブレス" の長さの秒数
|
||||||
* `#define DEBOUNCE 5`
|
* `#define DEBOUNCE 5`
|
||||||
* ピンの値を読み取る時の遅延 (5がデフォルト)
|
* ピンの値を読み取る時の遅延 (5がデフォルト)
|
||||||
* `#define LOCKING_SUPPORT_ENABLE`
|
* `#define LOCKING_SUPPORT_ENABLE`
|
||||||
* メカニカルロックのサポート。キーマップで KC_LCAP、 KC_LNUM そして KC_LSCR を使えるようにします
|
* メカニカルロックのサポート。キーマップで KC_LCAP、 KC_LNUM そして KC_LSCR を使えるようにします
|
||||||
* `#define LOCKING_RESYNC_ENABLE`
|
* `#define LOCKING_RESYNC_ENABLE`
|
||||||
* キーボードの LED の状態をスイッチの状態と一致させ続けようとします
|
* キーボードの LED の状態をスイッチの状態と一致させ続けようとします
|
||||||
* `#define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)`
|
* `#define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)`
|
||||||
* マジックコマンドの使用を可能にするキーの組み合わせ (デバッグに便利です)
|
* マジックコマンドの使用を可能にするキーの組み合わせ (デバッグに便利です)
|
||||||
* `#define USB_MAX_POWER_CONSUMPTION 500`
|
* `#define USB_MAX_POWER_CONSUMPTION 500`
|
||||||
* デバイスの USB 経由の最大電力(mA) を設定します (デフォルト: 500)
|
* デバイスの USB 経由の最大電力(mA) を設定します (デフォルト: 500)
|
||||||
* `#define USB_POLLING_INTERVAL_MS 10`
|
* `#define USB_POLLING_INTERVAL_MS 10`
|
||||||
* キーボード、マウス および 共有 (NKRO/メディアキー) インタフェースのための USB ポーリングレートをミリ秒で設定します
|
* キーボード、マウス および 共有 (NKRO/メディアキー) インタフェースのための USB ポーリングレートをミリ秒で設定します
|
||||||
* `#define F_SCL 100000L`
|
* `#define F_SCL 100000L`
|
||||||
* I2C を使用するキーボードのための I2C クロックレート速度を設定します。デフォルトは `400000L` ですが、`split_common` を使っているキーボードは別でデフォルトは `100000L` です。
|
* I2C を使用するキーボードのための I2C クロックレート速度を設定します。デフォルトは `400000L` ですが、`split_common` を使っているキーボードは別でデフォルトは `100000L` です。
|
||||||
|
|
||||||
## 無効にできる機能
|
## 無効にできる機能
|
||||||
|
|
||||||
これらのオプションを定義すると、関連する機能が無効になり、コードサイズを節約できます。
|
これらのオプションを定義すると、関連する機能が無効になり、コードサイズを節約できます。
|
||||||
|
|
||||||
* `#define NO_DEBUG`
|
* `#define NO_DEBUG`
|
||||||
* デバッグを無効にします
|
* デバッグを無効にします
|
||||||
* `#define NO_PRINT`
|
* `#define NO_PRINT`
|
||||||
* hid_listen を使った出力やデバッグを無効にします
|
* hid_listen を使った出力やデバッグを無効にします
|
||||||
* `#define NO_ACTION_LAYER`
|
* `#define NO_ACTION_LAYER`
|
||||||
* レイヤーを無効にします
|
* レイヤーを無効にします
|
||||||
* `#define NO_ACTION_TAPPING`
|
* `#define NO_ACTION_TAPPING`
|
||||||
* タップダンスと他のタップ機能を無効にします
|
* タップダンスと他のタップ機能を無効にします
|
||||||
* `#define NO_ACTION_ONESHOT`
|
* `#define NO_ACTION_ONESHOT`
|
||||||
* ワンショットモディファイアを無効にします
|
* ワンショットモディファイアを無効にします
|
||||||
* `#define NO_ACTION_MACRO`
|
* `#define NO_ACTION_MACRO`
|
||||||
* 古い形式のマクロ処理を無効にします: MACRO() & action_get_macro
|
* 古い形式のマクロ処理を無効にします: MACRO() & action_get_macro
|
||||||
* `#define NO_ACTION_FUNCTION`
|
* `#define NO_ACTION_FUNCTION`
|
||||||
* fn_actions 配列(非推奨)からの action_function() の呼び出しを無効にします
|
* fn_actions 配列(非推奨)からの action_function() の呼び出しを無効にします
|
||||||
|
|
||||||
## 有効にできる機能
|
## 有効にできる機能
|
||||||
|
|
||||||
これらのオプションを定義すると、関連する機能が有効になり、コードサイズが大きくなるかもしれません。
|
これらのオプションを定義すると、関連する機能が有効になり、コードサイズが大きくなるかもしれません。
|
||||||
|
|
||||||
* `#define FORCE_NKRO`
|
* `#define FORCE_NKRO`
|
||||||
* NKRO をデフォルトでオンにする必要があります。これにより EEPROM の設定に関係なく、キーボードの起動時に NKRO が強制的にオンになります。NKRO は引き続きオフにできますが、キーボードを再起動すると再びオンになります。
|
* NKRO をデフォルトでオンにする必要があります。これにより EEPROM の設定に関係なく、キーボードの起動時に NKRO が強制的にオンになります。NKRO は引き続きオフにできますが、キーボードを再起動すると再びオンになります。
|
||||||
* `#define STRICT_LAYER_RELEASE`
|
* `#define STRICT_LAYER_RELEASE`
|
||||||
* キーリリースがどのレイヤーから来たのかを覚えるのではなく、現在のレイヤースタックを使って強制的に評価されるようにします (高度なケースに使われます)
|
* キーリリースがどのレイヤーから来たのかを覚えるのではなく、現在のレイヤースタックを使って強制的に評価されるようにします (高度なケースに使われます)
|
||||||
|
|
||||||
## 設定可能な挙動
|
## 設定可能な挙動
|
||||||
|
|
||||||
* `#define TAPPING_TERM 200`
|
* `#define TAPPING_TERM 200`
|
||||||
* タップがホールドになるまでの時間。500以上に設定された場合、タップ期間中にタップされたキーもホールドになります。(訳注: PERMISSIVE_HOLDも参照)
|
* タップがホールドになるまでの時間。500以上に設定された場合、タップ期間中にタップされたキーもホールドになります。(訳注: PERMISSIVE_HOLDも参照)
|
||||||
* `#define TAPPING_TERM_PER_KEY`
|
* `#define TAPPING_TERM_PER_KEY`
|
||||||
* キーごとの `TAPPING_TERM` 設定の処理を有効にします
|
* キーごとの `TAPPING_TERM` 設定の処理を有効にします
|
||||||
* `#define RETRO_TAPPING`
|
* `#define RETRO_TAPPING`
|
||||||
* 押下とリリースの間に他のキーによる中断がなければ、TAPPING_TERM の後であってもとにかくタップします
|
* 押下とリリースの間に他のキーによる中断がなければ、TAPPING_TERM の後であってもとにかくタップします
|
||||||
* 詳細は [Retro Tapping](ja/feature_advanced_keycodes.md#retro-tapping) を見てください
|
* 詳細は [Retro Tapping](ja/tap_hold.md#retro-tapping) を見てください
|
||||||
* `#define TAPPING_TOGGLE 2`
|
* `#define TAPPING_TOGGLE 2`
|
||||||
* トグルを引き起こす前のタップ数
|
* トグルを引き起こす前のタップ数
|
||||||
* `#define PERMISSIVE_HOLD`
|
* `#define PERMISSIVE_HOLD`
|
||||||
* `TAPPING_TERM` にヒットしていなくても、リリースする前に別のキーが押されると、タップとフォールドキーがホールドを引き起こします
|
* `TAPPING_TERM` にヒットしていなくても、リリースする前に別のキーが押されると、タップとホールドキーがホールドを引き起こします
|
||||||
* 詳細は [Permissive Hold](ja/feature_advanced_keycodes.md#permissive-hold) を見てください
|
* 詳細は [Permissive Hold](ja/tap_hold.md#permissive-hold) を見てください
|
||||||
|
* `#define PERMISSIVE_HOLD_PER_KEY`
|
||||||
|
* キーごとの `PERMISSIVE_HOLD` 設定の処理を有効にします
|
||||||
* `#define IGNORE_MOD_TAP_INTERRUPT`
|
* `#define IGNORE_MOD_TAP_INTERRUPT`
|
||||||
* 両方のキーに `TAPPING_TERM` を適用することで、ホールド時に他のキーに変換するキーを使ってローリングコンボ (zx) をすることができるようにします
|
* 両方のキーに `TAPPING_TERM` を適用することで、ホールド時に他のキーに変換するキーを使ってローリングコンボ (zx) をすることができるようにします
|
||||||
* 詳細は [Mod tap interrupt](ja/feature_advanced_keycodes.md#ignore-mod-tap-interrupt) を見てください
|
* 詳細は [Ignore Mod Tap Interrupt](ja/tap_hold.md#ignore-mod-tap-interrupt) を見てください
|
||||||
* `#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY`
|
* `#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY`
|
||||||
* キーごとの `IGNORE_MOD_TAP_INTERRUPT` 設定の処理を有効にします
|
* キーごとの `IGNORE_MOD_TAP_INTERRUPT` 設定の処理を有効にします
|
||||||
* `#define TAPPING_FORCE_HOLD`
|
* `#define TAPPING_FORCE_HOLD`
|
||||||
* タップされた直後に、デュアルロールキーを修飾子として使用できるようにします
|
* タップされた直後に、デュアルロールキーを修飾子として使用できるようにします
|
||||||
* [Hold after tap](ja/feature_advanced_keycodes.md#tapping-force-hold)を見てください
|
* [Tapping Force Hold](ja/tap_hold.md#tapping-force-hold)を見てください
|
||||||
* タップトグル機能を無効にします (`TT` あるいは One Shot Tap Toggle)
|
* タップトグル機能を無効にします (`TT` あるいは One Shot Tap Toggle)
|
||||||
* `#define TAPPING_FORCE_HOLD_PER_KEY`
|
* `#define TAPPING_FORCE_HOLD_PER_KEY`
|
||||||
* キーごとの `TAPPING_FORCE_HOLD` 設定処理を有効にします。
|
* キーごとの `TAPPING_FORCE_HOLD` 設定処理を有効にします。
|
||||||
* `#define LEADER_TIMEOUT 300`
|
* `#define LEADER_TIMEOUT 300`
|
||||||
* リーダーキーがタイムアウトするまでの時間
|
* リーダーキーがタイムアウトするまでの時間
|
||||||
* タイムアウトする前にシーケンスを終了できない場合は、タイムアウトの設定を増やす必要があるかもしれません。あるいは、`LEADER_PER_KEY_TIMING` オプションを有効にすると良いでしょう。これは各キーがタップされた後でタイムアウトを再設定します。
|
* タイムアウトする前にシーケンスを終了できない場合は、タイムアウトの設定を増やす必要があるかもしれません。あるいは、`LEADER_PER_KEY_TIMING` オプションを有効にすると良いでしょう。これは各キーがタップされた後でタイムアウトを再設定します。
|
||||||
* `#define LEADER_PER_KEY_TIMING`
|
* `#define LEADER_PER_KEY_TIMING`
|
||||||
* 全体では無く各キーを押すたびに実行されるリーダーキーコードのタイマーを設定します
|
* 全体では無く各キーを押すたびに実行されるリーダーキーコードのタイマーを設定します
|
||||||
* `#define LEADER_KEY_STRICT_KEY_PROCESSING`
|
* `#define LEADER_KEY_STRICT_KEY_PROCESSING`
|
||||||
* Mod-Tap および Layer-Tap キーコードのためのキーコードフィルタリングを無効にします。例えば、これを有効にすると、`KC_A` を使いたい場合は `MT(MOD_CTL, KC_A)` を指定する必要があります。
|
* Mod-Tap および Layer-Tap キーコードのためのキーコードフィルタリングを無効にします。例えば、これを有効にすると、`KC_A` を使いたい場合は `MT(MOD_CTL, KC_A)` を指定する必要があります。
|
||||||
* `#define ONESHOT_TIMEOUT 300`
|
* `#define ONESHOT_TIMEOUT 300`
|
||||||
* ワンショットがタイムアウトするまでの時間
|
* ワンショットがタイムアウトするまでの時間
|
||||||
* `#define ONESHOT_TAP_TOGGLE 2`
|
* `#define ONESHOT_TAP_TOGGLE 2`
|
||||||
* ワンショットトグルが引き起こされるまでのタップ数
|
* ワンショットトグルが引き起こされるまでのタップ数
|
||||||
* `#define QMK_KEYS_PER_SCAN 4`
|
* `#define QMK_KEYS_PER_SCAN 4`
|
||||||
* 走査ごとに1つ以上のキーを送信できるようにします。デフォルトでは、走査ごとに `process_record()` 経由で1つのキーイベントのみが送信されます。これはほとんどのタイピングにほとんど影響しませんが、多くのコードを入力しているか、走査レートが最初から遅い場合、キーイベントの処理に多少の遅延が生じる可能性があります。それぞれのプレスとリリースは別のイベントです。スキャン時間が 1ms 程度のキーボードの場合、とても高速なタイピストでさえ、実際にキーボードから数 ms 以上の遅延を発生させるのに必要な 500 キーストロークを1秒間に生成することはないでしょう。しかし、3~4ms の走査時間でコードを入力している場合はどうでしょうか?おそらくこれが必要です。
|
* 走査ごとに1つ以上のキーを送信できるようにします。デフォルトでは、走査ごとに `process_record()` 経由で1つのキーイベントのみが送信されます。これはほとんどのタイピングにほとんど影響しませんが、多くのコードを入力しているか、走査レートが最初から遅い場合、キーイベントの処理に多少の遅延が生じる可能性があります。それぞれのプレスとリリースは別のイベントです。スキャン時間が 1ms 程度のキーボードの場合、とても高速なタイピストでさえ、実際にキーボードから数 ms 以上の遅延を発生させるのに必要な 500 キーストロークを1秒間に生成することはないでしょう。しかし、3~4ms の走査時間でコードを入力している場合はどうでしょうか?おそらくこれが必要です。
|
||||||
* `#define COMBO_COUNT 2`
|
* `#define COMBO_COUNT 2`
|
||||||
* [コンボ](ja/feature_combo.md)機能で使っているコンボの数にこれを設定します。
|
* [コンボ](ja/feature_combo.md)機能で使っているコンボの数にこれを設定します。
|
||||||
* `#define COMBO_TERM 200`
|
* `#define COMBO_TERM 200`
|
||||||
* コンボキーが検出されるまでの時間。定義されていない場合は、デフォルトは `TAPPING_TERM` です。
|
* コンボキーが検出されるまでの時間。定義されていない場合は、デフォルトは `TAPPING_TERM` です。
|
||||||
* `#define TAP_CODE_DELAY 100`
|
* `#define TAP_CODE_DELAY 100`
|
||||||
* 適切な登録に問題がある場合(VUSB ボードで珍しくない)、`register_code` と `unregister_code` の間の遅延を設定します。値はミリ秒です。
|
* 適切な登録に問題がある場合(VUSB ボードで珍しくない)、`register_code` と `unregister_code` の間の遅延を設定します。値はミリ秒です。
|
||||||
* `#define TAP_HOLD_CAPS_DELAY 80`
|
* `#define TAP_HOLD_CAPS_DELAY 80`
|
||||||
* MacOS で特別な処理が行われるため、`KC_CAPSLOCK` を使う時にタップホールドキー (`LT`, `MT`) に遅延を設定します。この値はミリ秒で、定義されていない場合はデフォルトは80msです。macOS については、これを200以上に設定すると良いでしょう。
|
* MacOS で特別な処理が行われるため、`KC_CAPSLOCK` を使う時にタップホールドキー (`LT`, `MT`) に遅延を設定します。この値はミリ秒で、定義されていない場合はデフォルトは80msです。macOS については、これを200以上に設定すると良いでしょう。
|
||||||
|
|
||||||
## RGB ライト設定 :id=rgb-light-configuration
|
## RGB ライト設定 :id=rgb-light-configuration
|
||||||
|
|
||||||
* `#define RGB_DI_PIN D7`
|
* `#define RGB_DI_PIN D7`
|
||||||
* WS2812 の DI 端子につなぐピン
|
* WS2812 の DI 端子につなぐピン
|
||||||
* `#define RGBLIGHT_ANIMATIONS`
|
* `#define RGBLIGHT_ANIMATIONS`
|
||||||
* RGB アニメーションを実行します
|
* RGB アニメーションを実行します
|
||||||
|
* `#define RGBLIGHT_LAYERS`
|
||||||
|
* オンとオフを切り替えることができる [ライトレイヤー](ja/feature_rgblight.md) を定義できます。現在のキーボードレイヤーまたは Caps Lock 状態を表示するのに最適です。
|
||||||
* `#define RGBLED_NUM 12`
|
* `#define RGBLED_NUM 12`
|
||||||
* LED の数
|
* LED の数
|
||||||
* `#define RGBLIGHT_SPLIT`
|
* `#define RGBLIGHT_SPLIT`
|
||||||
* 分割キーボードの左半分の RGB LED の出力を右半分の RGB LED の入力につなげるかわりに、それぞれの側で個別にコントローラの出力ピンが直接 RGB LED の入力に繋がっているときは、この定義が必要です。
|
* 分割キーボードの左半分の RGB LED の出力を右半分の RGB LED の入力につなげるかわりに、それぞれの側で個別にコントローラの出力ピンが直接 RGB LED の入力に繋がっているときは、この定義が必要です。
|
||||||
* `#define RGBLED_SPLIT { 6, 6 }`
|
* `#define RGBLED_SPLIT { 6, 6 }`
|
||||||
* 分割キーボードの各半分の `RGB_DI_PIN` に直接配線されている接続されている LED の数
|
* 分割キーボードの各半分の `RGB_DI_PIN` に直接配線されている接続されている LED の数
|
||||||
* 最初の値は左半分の LED の数を示し、2番目の値は右半分です。
|
* 最初の値は左半分の LED の数を示し、2番目の値は右半分です。
|
||||||
* RGBLED_SPLIT が定義されている場合、RGBLIGHT_SPLIT は暗黙的に定義されます。
|
* RGBLED_SPLIT が定義されている場合、RGBLIGHT_SPLIT は暗黙的に定義されます。
|
||||||
* `#define RGBLIGHT_HUE_STEP 12`
|
* `#define RGBLIGHT_HUE_STEP 12`
|
||||||
* 色相の増減時のステップ単位
|
* 色相の増減時のステップ単位
|
||||||
* `#define RGBLIGHT_SAT_STEP 25`
|
* `#define RGBLIGHT_SAT_STEP 25`
|
||||||
* 彩度の増減時のステップ単位
|
* 彩度の増減時のステップ単位
|
||||||
* `#define RGBLIGHT_VAL_STEP 12`
|
* `#define RGBLIGHT_VAL_STEP 12`
|
||||||
* 値(明度)の増減時のステップ単位
|
* 値(明度)の増減時のステップ単位
|
||||||
* `#define RGBW`
|
* `#define RGBW`
|
||||||
* RGBW LED のサポートを有効にします
|
* RGBW LED のサポートを有効にします
|
||||||
|
|
||||||
## マウスキーオプション
|
## マウスキーオプション
|
||||||
|
|
||||||
@@ -214,7 +220,7 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
|
|||||||
分割キーボード固有のオプション。あなたの rules.mk に 'SPLIT_KEYBOARD = yes' が有ることを確認してください。
|
分割キーボード固有のオプション。あなたの rules.mk に 'SPLIT_KEYBOARD = yes' が有ることを確認してください。
|
||||||
|
|
||||||
* `SPLIT_TRANSPORT = custom`
|
* `SPLIT_TRANSPORT = custom`
|
||||||
* 標準の分割通信ルーチンをカスタムのものに置き換えることができます。現在、ARM ベースの分割キーボードはこれを使わなければなりません。
|
* 標準の分割通信ルーチンをカスタムのものに置き換えることができます。現在、ARM ベースの分割キーボードはこれを使わなければなりません。
|
||||||
|
|
||||||
### 左右の設定
|
### 左右の設定
|
||||||
|
|
||||||
@@ -233,52 +239,52 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
|
|||||||
#### 左右を定義します
|
#### 左右を定義します
|
||||||
|
|
||||||
* `#define SPLIT_HAND_PIN B7`
|
* `#define SPLIT_HAND_PIN B7`
|
||||||
* high/low ピンを使って左右を決定します。low = 右手、high = 左手。`B7` を使っているピンに置き換えます。これはオプションで、`SPLIT_HAND_PIN` が未定義のままである場合、EE_HANDS メソッドまたは標準の Let's Splitが使っている MASTER_LEFT / MASTER_RIGHT 定義をまだ使うことができます。
|
* high/low ピンを使って左右を決定します。low = 右手、high = 左手。`B7` を使っているピンに置き換えます。これはオプションで、`SPLIT_HAND_PIN` が未定義のままである場合、EE_HANDS メソッドまたは標準の Let's Splitが使っている MASTER_LEFT / MASTER_RIGHT 定義をまだ使うことができます。
|
||||||
|
|
||||||
* `#define EE_HANDS` (`SPLIT_HAND_PIN` が定義されていない場合のみ動作します)
|
* `#define EE_HANDS` (`SPLIT_HAND_PIN` が定義されていない場合のみ動作します)
|
||||||
* `eeprom-lefthand.eep`/`eeprom-righthand.eep` がそれぞれの半分に書き込まれた後で、EEPROM 内に格納されている左右の設定の値を読み込みます。
|
* `eeprom-lefthand.eep`/`eeprom-righthand.eep` がそれぞれの半分に書き込まれた後で、EEPROM 内に格納されている左右の設定の値を読み込みます。
|
||||||
|
|
||||||
* `#define MASTER_RIGHT`
|
* `#define MASTER_RIGHT`
|
||||||
* マスター側が右側と定義されます。
|
* マスター側が右側と定義されます。
|
||||||
|
|
||||||
### 他のオプション
|
### 他のオプション
|
||||||
|
|
||||||
* `#define USE_I2C`
|
* `#define USE_I2C`
|
||||||
* Serial の代わりに I2C を使う場合 (デフォルトは serial)
|
* Serial の代わりに I2C を使う場合 (デフォルトは serial)
|
||||||
|
|
||||||
* `#define SOFT_SERIAL_PIN D0`
|
* `#define SOFT_SERIAL_PIN D0`
|
||||||
* serial を使う場合、これを定義します。`D0` あるいは `D1`,`D2`,`D3`,`E6`。
|
* serial を使う場合、これを定義します。`D0` あるいは `D1`,`D2`,`D3`,`E6`。
|
||||||
|
|
||||||
* `#define MATRIX_ROW_PINS_RIGHT { <row pins> }`
|
* `#define MATRIX_ROW_PINS_RIGHT { <row pins> }`
|
||||||
* `#define MATRIX_COL_PINS_RIGHT { <col pins> }`
|
* `#define MATRIX_COL_PINS_RIGHT { <col pins> }`
|
||||||
* 右半分に左半分と異なるピン配置を指定したい場合は、`MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT` を定義することができます。現在のところ、`MATRIX_ROW_PINS` のサイズは `MATRIX_ROW_PINS_RIGHT` と同じでなければならず、列の定義も同様です。
|
* 右半分に左半分と異なるピン配置を指定したい場合は、`MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT` を定義することができます。現在のところ、`MATRIX_ROW_PINS` のサイズは `MATRIX_ROW_PINS_RIGHT` と同じでなければならず、列の定義も同様です。
|
||||||
|
|
||||||
* `#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
|
* `#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
|
||||||
* 右半分に左半分と異なる直接ピン配置を指定したい場合は、`DIRECT_PINS_RIGHT` を定義することができます。現在のところ、`DIRECT_PINS` のサイズは `DIRECT_PINS_RIGHT` と同じでなければなりません。
|
* 右半分に左半分と異なる直接ピン配置を指定したい場合は、`DIRECT_PINS_RIGHT` を定義することができます。現在のところ、`DIRECT_PINS` のサイズは `DIRECT_PINS_RIGHT` と同じでなければなりません。
|
||||||
|
|
||||||
* `#define RGBLED_SPLIT { 6, 6 }`
|
* `#define RGBLED_SPLIT { 6, 6 }`
|
||||||
* [RGB ライト設定](#rgb-light-configuration)を見てください。
|
* [RGB ライト設定](#rgb-light-configuration)を見てください。
|
||||||
|
|
||||||
* `#define SELECT_SOFT_SERIAL_SPEED <speed>` (デフォルトの速度は1です)
|
* `#define SELECT_SOFT_SERIAL_SPEED <speed>` (デフォルトの速度は1です)
|
||||||
* serial 通信を使う時のプロトコルの速度を設定します。
|
* serial 通信を使う時のプロトコルの速度を設定します。
|
||||||
* 速度:
|
* 速度:
|
||||||
* 0: 約 189kbps (実験目的のみ)
|
* 0: 約 189kbps (実験目的のみ)
|
||||||
* 1: 約 137kbps (デフォルト)
|
* 1: 約 137kbps (デフォルト)
|
||||||
* 2: 約 75kbps
|
* 2: 約 75kbps
|
||||||
* 3: 約 39kbps
|
* 3: 約 39kbps
|
||||||
* 4: 約 26kbps
|
* 4: 約 26kbps
|
||||||
* 5: 約 20kbps
|
* 5: 約 20kbps
|
||||||
|
|
||||||
* `#define SPLIT_USB_DETECT`
|
* `#define SPLIT_USB_DETECT`
|
||||||
* マスタ/スレーブを委任する時に(タイムアウト付きで) USB 接続を検出します
|
* マスタ/スレーブを委任する時に(タイムアウト付きで) USB 接続を検出します
|
||||||
* ARM についてはデフォルトの挙動
|
* ARM についてはデフォルトの挙動
|
||||||
* AVR Teensy については必須
|
* AVR Teensy については必須
|
||||||
|
|
||||||
* `#define SPLIT_USB_TIMEOUT 2000`
|
* `#define SPLIT_USB_TIMEOUT 2000`
|
||||||
* `SPLIT_USB_DETECT` を使う時のマスタ/スレーブを検出する場合の最大タイムアウト
|
* `SPLIT_USB_DETECT` を使う時のマスタ/スレーブを検出する場合の最大タイムアウト
|
||||||
|
|
||||||
* `#define SPLIT_USB_TIMEOUT_POLL 10`
|
* `#define SPLIT_USB_TIMEOUT_POLL 10`
|
||||||
* `SPLIT_USB_DETECT` を使う時のマスタ/スレーブを検出する場合のポーリング頻度
|
* `SPLIT_USB_DETECT` を使う時のマスタ/スレーブを検出する場合のポーリング頻度
|
||||||
|
|
||||||
# `rules.mk` ファイル
|
# `rules.mk` ファイル
|
||||||
|
|
||||||
@@ -287,11 +293,11 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
|
|||||||
## ビルドオプション
|
## ビルドオプション
|
||||||
|
|
||||||
* `DEFAULT_FOLDER`
|
* `DEFAULT_FOLDER`
|
||||||
* キーボードに1つ以上のサブフォルダがある場合にデフォルトのフォルダを指定するために使われます。
|
* キーボードに1つ以上のサブフォルダがある場合にデフォルトのフォルダを指定するために使われます。
|
||||||
* `FIRMWARE_FORMAT`
|
* `FIRMWARE_FORMAT`
|
||||||
* ビルドの後でルート `qmk_firmware` フォルダにコピーされる形式 (bin, hex) を定義します。
|
* ビルドの後でルート `qmk_firmware` フォルダにコピーされる形式 (bin, hex) を定義します。
|
||||||
* `SRC`
|
* `SRC`
|
||||||
* コンパイル・リンクリストにファイルを追加するために使われます。
|
* コンパイル・リンクリストにファイルを追加するために使われます。
|
||||||
* `LIB_SRC`
|
* `LIB_SRC`
|
||||||
* コンパイル・リンクリストにライブラリとしてファイルを追加するために使われます。
|
* コンパイル・リンクリストにライブラリとしてファイルを追加するために使われます。
|
||||||
`LIB_SRC` で指定されたファイルは、`SRC` で指定されたファイルの後にリンクされます。
|
`LIB_SRC` で指定されたファイルは、`SRC` で指定されたファイルの後にリンクされます。
|
||||||
@@ -307,11 +313,11 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
|
|||||||
... a.o c.o ... lib_b.a lib_d.a ...
|
... a.o c.o ... lib_b.a lib_d.a ...
|
||||||
```
|
```
|
||||||
* `LAYOUTS`
|
* `LAYOUTS`
|
||||||
* このキーボードがサポートする[レイアウト](ja/feature_layouts.md)のリスト
|
* このキーボードがサポートする[レイアウト](ja/feature_layouts.md)のリスト
|
||||||
* `LINK_TIME_OPTIMIZATION_ENABLE`
|
* `LINK_TIME_OPTIMIZATION_ENABLE`
|
||||||
* キーボードをコンパイルする時に、Link Time Optimization (`LTO`) を有効にします。これは処理に時間が掛かりますが、コンパイルされたサイズを大幅に減らします (そして、ファームウェアが小さいため、追加の時間は分からないくらいです)。ただし、`LTO` が有効な場合、古いマクロと関数の機能が壊れるため、自動的にこれらの機能を無効にします。これは `NO_ACTION_MACRO` と `NO_ACTION_FUNCTION` を自動的に定義することで行われます。
|
* キーボードをコンパイルする時に、Link Time Optimization (`LTO`) を有効にします。これは処理に時間が掛かりますが、コンパイルされたサイズを大幅に減らします (そして、ファームウェアが小さいため、追加の時間は分からないくらいです)。ただし、`LTO` が有効な場合、古いマクロと関数の機能が壊れるため、自動的にこれらの機能を無効にします。これは `NO_ACTION_MACRO` と `NO_ACTION_FUNCTION` を自動的に定義することで行われます。
|
||||||
* `LTO_ENABLE`
|
* `LTO_ENABLE`
|
||||||
* LINK_TIME_OPTIMIZATION_ENABLE と同じ意味です。`LINK_TIME_OPTIMIZATION_ENABLE` の代わりに `LTO_ENABLE` を使うことができます。
|
* LINK_TIME_OPTIMIZATION_ENABLE と同じ意味です。`LINK_TIME_OPTIMIZATION_ENABLE` の代わりに `LTO_ENABLE` を使うことができます。
|
||||||
|
|
||||||
## AVR MCU オプション
|
## AVR MCU オプション
|
||||||
* `MCU = atmega32u4`
|
* `MCU = atmega32u4`
|
||||||
@@ -320,56 +326,56 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
|
|||||||
* `F_USB = $(F_CPU)`
|
* `F_USB = $(F_CPU)`
|
||||||
* `OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT`
|
* `OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT`
|
||||||
* `BOOTLOADER = atmel-dfu` と以下のオプション:
|
* `BOOTLOADER = atmel-dfu` と以下のオプション:
|
||||||
* `atmel-dfu`
|
* `atmel-dfu`
|
||||||
* `lufa-dfu`
|
* `lufa-dfu`
|
||||||
* `qmk-dfu`
|
* `qmk-dfu`
|
||||||
* `halfkay`
|
* `halfkay`
|
||||||
* `caterina`
|
* `caterina`
|
||||||
* `bootloadHID`
|
* `bootloadHID`
|
||||||
* `USBasp`
|
* `USBasp`
|
||||||
|
|
||||||
## 機能オプション
|
## 機能オプション :id=feature-options
|
||||||
|
|
||||||
これらを使って特定の機能のビルドを有効または無効にします。有効にすればするほどファームウェアが大きくなり、MCU には大きすぎるファームウェアを構築するリスクがあります。
|
これらを使って特定の機能のビルドを有効または無効にします。有効にすればするほどファームウェアが大きくなり、MCU には大きすぎるファームウェアを構築するリスクがあります。
|
||||||
|
|
||||||
* `BOOTMAGIC_ENABLE`
|
* `BOOTMAGIC_ENABLE`
|
||||||
* 仮想 DIP スイッチ設定
|
* 仮想 DIP スイッチ設定
|
||||||
* `MOUSEKEY_ENABLE`
|
* `MOUSEKEY_ENABLE`
|
||||||
* マウスキー
|
* マウスキー
|
||||||
* `EXTRAKEY_ENABLE`
|
* `EXTRAKEY_ENABLE`
|
||||||
* オーディオ制御とシステム制御
|
* オーディオ制御とシステム制御
|
||||||
* `CONSOLE_ENABLE`
|
* `CONSOLE_ENABLE`
|
||||||
* デバッグ用コンソール
|
* デバッグ用コンソール
|
||||||
* `COMMAND_ENABLE`
|
* `COMMAND_ENABLE`
|
||||||
* デバッグ及び設定用のコマンド
|
* デバッグ及び設定用のコマンド
|
||||||
* `COMBO_ENABLE`
|
* `COMBO_ENABLE`
|
||||||
* キーコンボ機能
|
* キーコンボ機能
|
||||||
* `NKRO_ENABLE`
|
* `NKRO_ENABLE`
|
||||||
* USB N-キーロールオーバー - これが動作しない場合は、ここを見てください: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
* USB N-キーロールオーバー - これが動作しない場合は、ここを見てください: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
* `AUDIO_ENABLE`
|
* `AUDIO_ENABLE`
|
||||||
* オーディオサブシステムを有効にします。
|
* オーディオサブシステムを有効にします。
|
||||||
* `RGBLIGHT_ENABLE`
|
* `RGBLIGHT_ENABLE`
|
||||||
* キーボードアンダーライト機能を有効にします
|
* キーボードアンダーライト機能を有効にします
|
||||||
* `LEADER_ENABLE`
|
* `LEADER_ENABLE`
|
||||||
* リーダーキーコードを有効にします
|
* リーダーキーコードを有効にします
|
||||||
* `MIDI_ENABLE`
|
* `MIDI_ENABLE`
|
||||||
* MIDI 制御
|
* MIDI 制御
|
||||||
* `UNICODE_ENABLE`
|
* `UNICODE_ENABLE`
|
||||||
* Unicode
|
* Unicode
|
||||||
* `BLUETOOTH_ENABLE`
|
* `BLUETOOTH_ENABLE`
|
||||||
* Adafruit EZ-Key HID で Bluetooth を有効にするレガシーオプション。BLUETOOTH を見てください
|
* Adafruit EZ-Key HID で Bluetooth を有効にするレガシーオプション。BLUETOOTH を見てください
|
||||||
* `BLUETOOTH`
|
* `BLUETOOTH`
|
||||||
* 現在のオプションは、AdafruitEzKey、AdafruitBLE、RN42
|
* 現在のオプションは、AdafruitEzKey、AdafruitBLE、RN42
|
||||||
* `SPLIT_KEYBOARD`
|
* `SPLIT_KEYBOARD`
|
||||||
* 分割キーボード (let's split や bakingpy のキーボードのようなデュアル MCU) のサポートを有効にし、quantum/split_common にある全ての必要なファイルをインクルードします
|
* 分割キーボード (let's split や bakingpy のキーボードのようなデュアル MCU) のサポートを有効にし、quantum/split_common にある全ての必要なファイルをインクルードします
|
||||||
* `CUSTOM_MATRIX`
|
* `CUSTOM_MATRIX`
|
||||||
* 標準マトリックス走査ルーチンを独自のものに置き換えることができます。
|
* 標準マトリックス走査ルーチンを独自のものに置き換えることができます。
|
||||||
* `DEBOUNCE_TYPE`
|
* `DEBOUNCE_TYPE`
|
||||||
* 標準キーデバウンスルーチンを代替または独自のものに置き換えることができます。
|
* 標準キーデバウンスルーチンを代替または独自のものに置き換えることができます。
|
||||||
* `WAIT_FOR_USB`
|
* `WAIT_FOR_USB`
|
||||||
* キーボードが起動する前に、USB 接続が確立されるのをキーボードに待機させます
|
* キーボードが起動する前に、USB 接続が確立されるのをキーボードに待機させます
|
||||||
* `NO_USB_STARTUP_CHECK`
|
* `NO_USB_STARTUP_CHECK`
|
||||||
* キーボードの起動後の usb サスペンドチェックを無効にします。通常、キーボードはタスクが実行される前にホストがウェイク アップするのを待ちます。分割キーボードは半分はウェイクアップコールを取得できませんが、マスタにコマンドを送信する必要があるため、役に立ちます。
|
* キーボードの起動後の usb サスペンドチェックを無効にします。通常、キーボードはタスクが実行される前にホストがウェイク アップするのを待ちます。分割キーボードは半分はウェイクアップコールを取得できませんが、マスタにコマンドを送信する必要があるため、役に立ちます。
|
||||||
|
|
||||||
## USB エンドポイントの制限
|
## USB エンドポイントの制限
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
# 貢献方法
|
# 貢献方法
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: d47809575:docs/contributing.md
|
original document: 0.8.62:docs/contributing.md
|
||||||
git diff d47809575 HEAD -- docs/contributing.md | cat
|
git diff 0.8.62 HEAD -- docs/contributing.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
👍🎉 まず、これを読み貢献する時間を作ってくれてありがとうございます!🎉👍
|
👍🎉 まず、これを読み貢献する時間を作ってくれてありがとうございます!🎉👍
|
||||||
@@ -106,7 +106,7 @@ enum my_keycodes {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
### ドキュメントのプレビュー
|
### ドキュメントのプレビュー :id=previewing-the-documentation
|
||||||
|
|
||||||
開発環境をセットアップした場合は、プルリクエストを開く前に以下のコマンドを `qmk_firmware/` フォルダから実行することで、あなたの変更をプレビューすることができます:
|
開発環境をセットアップした場合は、プルリクエストを開く前に以下のコマンドを `qmk_firmware/` フォルダから実行することで、あなたの変更をプレビューすることができます:
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ enum my_keycodes {
|
|||||||
|
|
||||||
ほとんどの初めての QMK 貢献者は、個人のキーマップから始めます。キーマップの標準はかなりカジュアルなものにしようとしています(キーマップは結局のところ作成者の性格を反映しています)が、他の人があなたのキーマップを簡単に見つけて学ぶことができるように、これらのガイドラインに従うようにお願いします。
|
ほとんどの初めての QMK 貢献者は、個人のキーマップから始めます。キーマップの標準はかなりカジュアルなものにしようとしています(キーマップは結局のところ作成者の性格を反映しています)が、他の人があなたのキーマップを簡単に見つけて学ぶことができるように、これらのガイドラインに従うようにお願いします。
|
||||||
|
|
||||||
* [the template](documentation_templates.md) を使って `readme.md` を書きます。
|
* [テンプレート](documentation_templates.md) を使って `readme.md` を書きます。
|
||||||
* 全てのキーマップの PR は squash されるため、コミットがどのように squash されるかを気にする場合は、自分で行う必要があります。
|
* 全てのキーマップの PR は squash されるため、コミットがどのように squash されるかを気にする場合は、自分で行う必要があります。
|
||||||
* キーマップの PR に機能をまとめないでください。最初に機能をサブミットし、次にキーマップのための2つ目の PR をサブミットします。
|
* キーマップの PR に機能をまとめないでください。最初に機能をサブミットし、次にキーマップのための2つ目の PR をサブミットします。
|
||||||
* `Makefile` をキーマップフォルダに含めないでください(もう使われていません)。
|
* `Makefile` をキーマップフォルダに含めないでください(もう使われていません)。
|
||||||
@@ -134,7 +134,7 @@ enum my_keycodes {
|
|||||||
|
|
||||||
また以下のガイドラインに従うことをお願いします:
|
また以下のガイドラインに従うことをお願いします:
|
||||||
|
|
||||||
* [the template](ja/documentation_templates.md) を使って `readme.md` を書きます。
|
* [テンプレート](ja/documentation_templates.md) を使って `readme.md` を書きます。
|
||||||
* コミットの数を適切に保ってください。そうでなければあなたの PR を squash します。
|
* コミットの数を適切に保ってください。そうでなければあなたの PR を squash します。
|
||||||
* コア機能を新しいキーボードにまとめないでください。最初に機能をサブミットし、次にキーボード用に別の PR をサブミットしてください。
|
* コア機能を新しいキーボードにまとめないでください。最初に機能をサブミットし、次にキーボード用に別の PR をサブミットしてください。
|
||||||
* `.c`/`.h` ファイルにすぐ上の親フォルダに従って名前を付けます。例えば、`/keyboards/<kb1>/<kb2>/<kb2>.[ch]`
|
* `.c`/`.h` ファイルにすぐ上の親フォルダに従って名前を付けます。例えば、`/keyboards/<kb1>/<kb2>/<kb2>.[ch]`
|
||||||
|
114
docs/ja/custom_matrix.md
Normal file
114
docs/ja/custom_matrix.md
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
# カスタムマトリックス
|
||||||
|
|
||||||
|
<!---
|
||||||
|
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||||
|
original document: 0.8.46:docs/custom_matrix.md
|
||||||
|
git diff 0.8.46 HEAD -- docs/custom_matrix.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
QMKは、デフォルトのマトリックススキャンルーチンを独自のコードで部分的に入れ替えたり全部入れ替えたりしたりするメカニズムを提供します。
|
||||||
|
|
||||||
|
この機能を使用する理由は次のとおりです:
|
||||||
|
|
||||||
|
* キーボードのスイッチと MCU ピンの間に追加のハードウェアがある場合
|
||||||
|
* I/O マルチプレクサ
|
||||||
|
* ラインデコーダー
|
||||||
|
* 一般的ではないキースイッチマトリックス
|
||||||
|
* `COL2ROW` と `ROW2COL` の同時使用
|
||||||
|
|
||||||
|
## 前提条件
|
||||||
|
|
||||||
|
カスタムマトリックスの実装には、通常、追加のソースファイルのコンパイルが含まれます。
|
||||||
|
一貫性を保つために、このソースファイルのファイル名は `matrix.c` とすることをお勧めします。
|
||||||
|
|
||||||
|
あなたのキーボードディレクトリに新しいファイルを追加します:
|
||||||
|
```text
|
||||||
|
keyboards/<keyboard>/matrix.c
|
||||||
|
```
|
||||||
|
|
||||||
|
そして、新しいファイルのコンパイルを指定するため、以下を `rules.mk` に追加します
|
||||||
|
```make
|
||||||
|
SRC += matrix.c
|
||||||
|
```
|
||||||
|
|
||||||
|
## マトリックスコードの部分置き換え
|
||||||
|
|
||||||
|
カスタムマトリックスを実装する際、定型コードを書かなくてすむように、さまざまなスキャン関数のデフォルト実装を提供しています。
|
||||||
|
|
||||||
|
設定するには、以下を `rules.mk` に追加します:
|
||||||
|
```make
|
||||||
|
CUSTOM_MATRIX = lite
|
||||||
|
```
|
||||||
|
|
||||||
|
そして、キーボードディレクトリの `matrix.c` ファイルに次の関数を実装します。
|
||||||
|
|
||||||
|
```c
|
||||||
|
void matrix_init_custom(void) {
|
||||||
|
// TODO: ここでハードウェアの初期化をする
|
||||||
|
}
|
||||||
|
|
||||||
|
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||||
|
bool matrix_has_changed = false;
|
||||||
|
|
||||||
|
// TODO: ここで、マトリックススキャンを行なう
|
||||||
|
|
||||||
|
return matrix_has_changed;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## マトリックスコードの全面置き換え
|
||||||
|
|
||||||
|
スキャンルーチンをさらに変更する必要がある場合は、完全なスキャンルーチンを実装することを選択できます。
|
||||||
|
|
||||||
|
設定するには、以下を `rules.mk` に追加します:
|
||||||
|
```make
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
```
|
||||||
|
|
||||||
|
そして、キーボードディレクトリの `matrix.c` ファイルに次の関数を実装します。
|
||||||
|
|
||||||
|
```c
|
||||||
|
matrix_row_t matrix_get_row(uint8_t row) {
|
||||||
|
// TODO: 要求された行データを返します
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void) {
|
||||||
|
// TODO: printf() を使って現在のマトリックスの状態をコンソールにダンプします
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void) {
|
||||||
|
// TODO: ここでハードウェアとグローバルマトリックスの状態を初期化します
|
||||||
|
|
||||||
|
// ハードウェアによるデバウンスがない場合 - 設定されているデバウンスルーチンを初期化します
|
||||||
|
debounce_init(MATRIX_ROWS);
|
||||||
|
|
||||||
|
// 正しいキーボード動作のためにこれを呼び出す*必要があります*
|
||||||
|
matrix_init_quantum();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void) {
|
||||||
|
bool matrix_has_changed = false;
|
||||||
|
|
||||||
|
// TODO: ここにマトリックススキャンルーチンを追加します
|
||||||
|
|
||||||
|
// ハードウェアによるデバウンスがない場合 - 設定されているデバウンスルーチンを使用します
|
||||||
|
debounce(raw_matrix, matrix, MATRIX_ROWS, changed);
|
||||||
|
|
||||||
|
// 正しいキーボード動作のためにこれを呼び出す*必要があります*
|
||||||
|
matrix_scan_quantum();
|
||||||
|
|
||||||
|
return matrix_has_changed;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
また、次のコールバックのデフォルトも提供します。
|
||||||
|
|
||||||
|
```c
|
||||||
|
__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_init_user(void) {}
|
||||||
|
|
||||||
|
__attribute__((weak)) void matrix_scan_user(void) {}
|
||||||
|
```
|
@@ -1,8 +1,8 @@
|
|||||||
# キーボードの挙動をカスタマイズする方法
|
# キーボードの挙動をカスタマイズする方法
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 7494490d6:docs/custom_quantum_functions.md
|
original document: 0.8.62:docs/custom_quantum_functions.md
|
||||||
git diff 7494490d6 HEAD -- docs/custom_quantum_functions.md | cat
|
git diff 0.8.62 HEAD -- docs/custom_quantum_functions.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
多くの人にとって、カスタムキーボードはボタンの押下をコンピュータに送信するだけではありません。単純なボタンの押下やマクロよりも複雑なことを実行できるようにしたいでしょう。QMK にはコードを挿入したり、機能を上書きしたり、様々な状況でキーボードの挙動をカスタマイズできるフックがあります。
|
多くの人にとって、カスタムキーボードはボタンの押下をコンピュータに送信するだけではありません。単純なボタンの押下やマクロよりも複雑なことを実行できるようにしたいでしょう。QMK にはコードを挿入したり、機能を上書きしたり、様々な状況でキーボードの挙動をカスタマイズできるフックがあります。
|
||||||
@@ -39,7 +39,7 @@ enum my_keycodes {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
## 任意のキーコードの挙動のプログラミング
|
## 任意のキーコードの挙動のプログラミング :id=programming-the-behavior-of-any-keycode
|
||||||
|
|
||||||
既存のキーの挙動を上書きしたい場合、あるいは新しいキーについて挙動を定義する場合、`process_record_kb()` および `process_record_user()` 関数を使うべきです。これらは実際のキーイベントが処理される前のキー処理中に QMK によって呼び出されます。これらの関数が `true` を返す場合、QMK はキーコードを通常通りに処理します。これは、キーを置き換えるのではなく、キーの機能を拡張するのに便利です。これらの関数が `false` を返す場合、QMK は通常のキー処理をスキップし、必要なキーのアップまたはダウンイベントを送信するのかはユーザ次第です。
|
既存のキーの挙動を上書きしたい場合、あるいは新しいキーについて挙動を定義する場合、`process_record_kb()` および `process_record_user()` 関数を使うべきです。これらは実際のキーイベントが処理される前のキー処理中に QMK によって呼び出されます。これらの関数が `true` を返す場合、QMK はキーコードを通常通りに処理します。これは、キーを置き換えるのではなく、キーの機能を拡張するのに便利です。これらの関数が `false` を返す場合、QMK は通常のキー処理をスキップし、必要なキーのアップまたはダウンイベントを送信するのかはユーザ次第です。
|
||||||
|
|
||||||
@@ -316,7 +316,7 @@ void suspend_wakeup_init_user(void) {
|
|||||||
* キーボード/リビジョン : `void suspend_power_down_kb(void)` および `void suspend_wakeup_init_user(void)`
|
* キーボード/リビジョン : `void suspend_power_down_kb(void)` および `void suspend_wakeup_init_user(void)`
|
||||||
* キーマップ: `void suspend_power_down_kb(void)` および `void suspend_wakeup_init_user(void)`
|
* キーマップ: `void suspend_power_down_kb(void)` および `void suspend_wakeup_init_user(void)`
|
||||||
|
|
||||||
# レイヤー切り替えコード
|
# レイヤー切り替えコード :id=layer-change-code
|
||||||
|
|
||||||
これはレイヤーが切り替えられるたびにコードを実行します。レイヤー表示あるいはカスタムレイヤー処理に役立ちます。
|
これはレイヤーが切り替えられるたびにコードを実行します。レイヤー表示あるいはカスタムレイヤー処理に役立ちます。
|
||||||
|
|
||||||
@@ -491,14 +491,24 @@ void eeconfig_init_user(void) { // EEPROM がリセットされます!
|
|||||||
|
|
||||||
# カスタムタッピング期間
|
# カスタムタッピング期間
|
||||||
|
|
||||||
デフォルトでは、タッピング期間はグローバルに設定されていて、キーでは設定することができません。ほとんどのユーザにとって、これは全然問題ありません。しかし、場合によっては、`LT` キーとは異なるタイムアウトによって、デュアルファンクションキーが大幅に改善されます。なぜなら、一部のキーは他のキーよりも押し続けやすいためです。それぞれにカスタムキーコードを使う代わりに、キーごとに設定可能な `TAPPING_TERM` を使用できます。
|
デフォルトでは、タッピング期間と(`IGNORE_MOD_TAP_INTERRUPT` のような)関連オプションはグローバルに設定されていて、キーでは設定することができません。ほとんどのユーザにとって、これは全然問題ありません。しかし、場合によっては、`LT` キーとは異なるタイムアウトによって、デュアルファンクションキーが大幅に改善されます。なぜなら、一部のキーは他のキーよりも押し続けやすいためです。それぞれにカスタムキーコードを使う代わりに、キーごとに設定可能なタイムアウトの挙動を設定できます。
|
||||||
|
|
||||||
この機能を有効にするには、最初に `config.h` に `#define TAPPING_TERM_PER_KEY` を追加する必要があります。
|
キーごとのタイムアウトの挙動を制御するための2つの設定可能なオプションがあります:
|
||||||
|
|
||||||
|
- `TAPPING_TERM_PER_KEY`
|
||||||
|
- `IGNORE_MOD_TAP_INTERRUPT_PER_KEY`
|
||||||
|
|
||||||
|
必要な機能ごとに、`config.h` に `#define` 行を追加する必要があります。
|
||||||
|
|
||||||
|
```
|
||||||
|
#define TAPPING_TERM_PER_KEY
|
||||||
|
#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## `get_tapping_term` の実装例
|
## `get_tapping_term` の実装例
|
||||||
|
|
||||||
キーコードに基づいて `TAPPING TERM` を変更するには、次のようなものを `keymap.c` ファイルに追加します:
|
キーコードに基づいて `TAPPING_TERM` を変更するには、次のようなものを `keymap.c` ファイルに追加します:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
uint16_t get_tapping_term(uint16_t keycode) {
|
uint16_t get_tapping_term(uint16_t keycode) {
|
||||||
@@ -513,6 +523,21 @@ uint16_t get_tapping_term(uint16_t keycode) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### `get_tapping_term` 関数のドキュメント
|
## `get_ignore_mod_tap_interrupt` の実装例
|
||||||
|
|
||||||
|
キーコードに基づいて `IGNORE_MOD_TAP_INTERRUPT` の値を変更するには、次のようなものを `keymap.c` ファイルに追加します:
|
||||||
|
|
||||||
|
```c
|
||||||
|
bool get_ignore_mod_tap_interrupt(uint16_t keycode) {
|
||||||
|
switch (keycode) {
|
||||||
|
case SFT_T(KC_SPC):
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## `get_tapping_term` / `get_ignore_mod_tap_interrupt` 関数のドキュメント
|
||||||
|
|
||||||
ここにある他の多くの関数とは異なり、quantum あるいはキーボードレベルの関数を持つ必要はありません (または理由さえありません)。ここではユーザレベルの関数だけが有用なため、そのようにマークする必要はありません。
|
ここにある他の多くの関数とは異なり、quantum あるいはキーボードレベルの関数を持つ必要はありません (または理由さえありません)。ここではユーザレベルの関数だけが有用なため、そのようにマークする必要はありません。
|
||||||
|
@@ -1,11 +0,0 @@
|
|||||||
# よくある質問
|
|
||||||
|
|
||||||
<!---
|
|
||||||
original document: d598f01cb:docs/faq.md
|
|
||||||
git diff d598f01cb HEAD -- docs/faq.md | cat
|
|
||||||
-->
|
|
||||||
|
|
||||||
* [一般](ja/faq_general.md)
|
|
||||||
* [QMK のビルドあるいはコンパイル](ja/faq_build.md)
|
|
||||||
* [QMK のデバッグとトラブルシューティング](ja/faq_debug.md)
|
|
||||||
* [キーマップ](ja/faq_keymap.md)
|
|
@@ -152,10 +152,3 @@ https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
|
|||||||
|
|
||||||
https://github.com/tmk/tmk_keyboard/issues/266
|
https://github.com/tmk/tmk_keyboard/issues/266
|
||||||
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## FLIP が動作しない
|
|
||||||
### `AtLibUsbDfu.dll` が見つかりません
|
|
||||||
デバイスマネージャから現在のドライバを削除し、FLIP が提供するものを再インストールします。
|
|
||||||
http://imgur.com/a/bnwzy
|
|
||||||
|
@@ -1,14 +1,52 @@
|
|||||||
# よくある質問
|
# よくある質問
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: d598f01cb:docs/faq_general.md
|
original document: 0.8.62:docs/faq_general.md
|
||||||
git diff d598f01cb HEAD -- docs/faq_general.md | cat
|
git diff 0.8.62 HEAD -- docs/faq_general.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
## QMK とは何か?
|
## QMK とは何か?
|
||||||
|
|
||||||
Quantum Mechanical Keyboard の略である [QMK](https://github.com/qmk) は、カスタムキーボードのためのツールをビルドしている人々のグループです。[TMK](https://github.com/tmk/tmk_keyboard) の大幅に修正されたフォークである [QMK ファームウェア](https://github.com/qmk/qmk_firmware)から始まりました。
|
Quantum Mechanical Keyboard の略である [QMK](https://github.com/qmk) は、カスタムキーボードのためのツールをビルドしている人々のグループです。[TMK](https://github.com/tmk/tmk_keyboard) の大幅に修正されたフォークである [QMK ファームウェア](https://github.com/qmk/qmk_firmware)から始まりました。
|
||||||
|
|
||||||
|
## どこから始めればいいかわかりません!
|
||||||
|
|
||||||
|
この場合は、[初心者ガイド](ja/newbs.md) から始めるべきです。ここには多くの素晴らしい情報があり、それらはあなたが始めるのに必要な全てをカバーするはずです。
|
||||||
|
|
||||||
|
問題がある場合は、[QMK Configurator](https://config.qmk.fm)にアクセスしてください。あなたが必要なものの大部分が処理されます。
|
||||||
|
|
||||||
|
## ビルドしたファームウェアを書き込むにはどうすればいいですか?
|
||||||
|
|
||||||
|
まず、[コンパイル/書き込み FAQ ページ](ja/faq-build.md) に進みます。そこにはたくさんの情報があり、そこには一般的な問題に対する多くの解決策があります。
|
||||||
|
|
||||||
|
## ここで取り上げていない問題がある場合はどうしますか?
|
||||||
|
|
||||||
|
OK、問題ありません。[GitHub で issue を開く](https://github.com/qmk/qmk_firmware/issues) をチェックして、誰かが同じこと(似ているかだけでなく実際に同じであることを確認してください)を経験しているかどうかを確認してください。
|
||||||
|
|
||||||
|
もし何も見つからない場合は、[新しい issue](https://github.com/qmk/qmk_firmware/issues/new) を開いてください!
|
||||||
|
|
||||||
|
## バグを見つけたらどうしますか?
|
||||||
|
|
||||||
|
[issue](https://github.com/qmk/qmk_firmware/issues/new) を開いてください。そしてもし修正方法を知っている場合は、GitHub で修正のプルリクエストを開いてください。
|
||||||
|
|
||||||
|
## しかし、`git` と `GitHub` は怖いです!
|
||||||
|
|
||||||
|
心配しないでください。開発を容易にするために `git` と GitHub を使い始めるための、かなり良い [ガイドライン](ja/newbs_git_best_practices.md) があります。
|
||||||
|
|
||||||
|
さらに、追加の `git` と GitHub の関連リンクを [ここ](ja/newbs_learn_more_resources.md) に見つけることができます。
|
||||||
|
|
||||||
|
## サポートを追加したいキーボードがあります
|
||||||
|
|
||||||
|
素晴らしい!プルリクエストを開いてください。私たちはコードをレビューし、マージします!
|
||||||
|
|
||||||
|
### `QMK` でブランドしたい場合はどうればいいですか?
|
||||||
|
|
||||||
|
素晴らしい!私たちはあなたを支援したいと思います!
|
||||||
|
|
||||||
|
実際、私たちにはあなたのページとキーボードに QMK ブランドを追加するための [完全なページ](https://qmk.fm/powered/) があります。これは QMK を公式にサポートするために必要なほぼ全て(知識と画像)をカバーしています。
|
||||||
|
|
||||||
|
これについて質問がある場合は、issue を開くか、[Discord](https://discord.gg/Uq7gcHh) に進んでください。
|
||||||
|
|
||||||
## QMK と TMK の違いは何か?
|
## QMK と TMK の違いは何か?
|
||||||
|
|
||||||
TMK は [Jun Wako](https://github.com/tmk) によって設計され実装されました。QMK は [Jack Humbert](https://github.com/jackhumbert) の Planck 用 TMK のフォークとして始まりました。しばらくして、Jack のフォークは TMK からかなり分岐し、2015年に Jack はフォークを QMK に名前を変えることにしました。
|
TMK は [Jun Wako](https://github.com/tmk) によって設計され実装されました。QMK は [Jack Humbert](https://github.com/jackhumbert) の Planck 用 TMK のフォークとして始まりました。しばらくして、Jack のフォークは TMK からかなり分岐し、2015年に Jack はフォークを QMK に名前を変えることにしました。
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
# キーマップの FAQ
|
# キーマップの FAQ
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: 376419a4f:docs/faq_keymap.md
|
original document: 0.8.62:docs/faq_keymap.md
|
||||||
git diff 376419a4f HEAD -- docs/faq_keymap.md | cat
|
git diff 0.8.62 HEAD -- docs/faq_keymap.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
このページは人々がキーマップについてしばしば持つ疑問について説明します。まだ読んだことが無い場合には、[キーマップの概要](ja/keymap.md)を最初に読むべきです。
|
このページは人々がキーマップについてしばしば持つ疑問について説明します。まだ読んだことが無い場合には、[キーマップの概要](ja/keymap.md)を最初に読むべきです。
|
||||||
@@ -19,9 +19,20 @@
|
|||||||
<!-- Source for this image: http://www.keyboard-layout-editor.com/#/gists/bf431647d1001cff5eff20ae55621e9a -->
|
<!-- Source for this image: http://www.keyboard-layout-editor.com/#/gists/bf431647d1001cff5eff20ae55621e9a -->
|
||||||

|

|
||||||
|
|
||||||
|
## 複雑なキーコードのカスタム名を作成する方法はありますか?
|
||||||
|
|
||||||
|
時には、読みやすくするために、一部のキーコードにカスタム名を定義すると役に立ちます。人々は、しばしば `#define` を使ってカスタム名を定義します。例えば:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define FN_CAPS LT(_FL, KC_CAPSLOCK)
|
||||||
|
#define ALT_TAB LALT(KC_TAB)
|
||||||
|
```
|
||||||
|
|
||||||
|
これにより、キーマップで `FN_CAPS` と `ALT_TAB` を使えるようになり、読みやすくなります。
|
||||||
|
|
||||||
## 一部のキーが入れ替わっているか、または動作しない
|
## 一部のキーが入れ替わっているか、または動作しない
|
||||||
|
|
||||||
QMK には2つの機能、ブートマジックとコマンドがあり、これによりその場でキーボードの動作を変更することができます。これには Ctrl/Caps の交換、Gui の無効化、Alt/GUI の交換、Backspace/Backslash の交換、全てのキーの無効化およびその他の動作の変更が含まれますが、これらに限定されません。
|
QMK には2つの機能、ブートマジックとコマンドがあり、これによりその場でキーボードの動作を変更することができます。これには Ctrl/Caps の交換、Gui の無効化、Alt/Gui の交換、Backspace/Backslash の交換、全てのキーの無効化およびその他の動作の変更が含まれますが、これらに限定されません。
|
||||||
|
|
||||||
迅速な解決策として、キーボードを接続している時に `Space`+`Backspace` を押してみてください。これはキーボードに保存されている設定をリセットし、これらのキーを通常の操作に戻します。うまく行かない場合は、以下を見てください:
|
迅速な解決策として、キーボードを接続している時に `Space`+`Backspace` を押してみてください。これはキーボードに保存されている設定をリセットし、これらのキーを通常の操作に戻します。うまく行かない場合は、以下を見てください:
|
||||||
|
|
||||||
|
85
docs/ja/feature_advanced_keycodes.md
Normal file
85
docs/ja/feature_advanced_keycodes.md
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
# レイヤーの切り替えとトグル :id=switching-and-toggling-layers
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 5d5ff80:docs/feature_advanced_keycodes.md
|
||||||
|
git diff 5d5ff80 HEAD -- docs/feature_advanced_keycodes.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
これらの機能により、様々な方法でレイヤーをアクティブ化することができます。レイヤーは一般的に独立したレイアウトでは無いことに注意してください -- 複数のレイヤーを一度にアクティブ化することができ、レイヤーが `KC_TRNS` を使ってキーの押下を下のレイヤーに渡すことが一般的です。レイヤーの詳細については、[キーマップの概要](ja/keymap.md#keymap-and-layers)を見てください。MO()、LM()、TT() あるいは LT() を使って一時的なレイヤーの切り替えを使う場合、上のレイヤーのキーを透過にするようにしてください。さもないと意図したように動作しないかもしれません。
|
||||||
|
|
||||||
|
* `DF(layer)` - デフォルトレイヤーを切り替えます。デフォルトレイヤーは、他のレイヤーがその上に積み重なっている、常にアクティブな基本レイヤーです。デフォルトレイヤーの詳細については以下を見てください。これは QWERTY から Dvorak レイアウトに切り替えるために使うことができます。(これは一時的な切り替えであり、キーボードの電源が切れるまでしか持続しないことに注意してください。デフォルトレイヤーを永続的に変更するには、[process_record_user](ja/custom_quantum_functions.md#programming-the-behavior-of-any-keycode) 内で `set_single_persistent_default_layer` 関数を呼び出すなど、より深いカスタマイズが必要です。)
|
||||||
|
* `MO(layer)` - 一時的に*レイヤー*をアクティブにします。キーを放すとすぐに、レイヤーは非アクティブになります。
|
||||||
|
* `LM(layer, mod)` - (`MO` のように)一時的に*レイヤー*をアクティブにしますが、モディファイア *mod* がアクティブな状態です。layer 0-15 と、左モディファイアのみをサポートします: `MOD_LCTL`、`MOD_LSFT`、`MOD_LALT`、`MOD_LGUI` (`KC_` の代わりに `MOD_` 定数を使うことに注意してください)。これらのモディファイアは、例えば `LM(_RAISE, MOD_LCTL | MOD_LALT)` のように、ビット単位の OR を使って組み合わせることができます。
|
||||||
|
* `LT(layer, kc)` - ホールドされた時に*レイヤー*を一時的にアクティブにし、タップされた時に *kc* を送信します。layer 0-15 のみをサポートします。
|
||||||
|
* `OSL(layer)` - 次のキーが押されるまで、一時的に*レイヤー*をアクティブにします。詳細と追加機能については、[ワンショットキー](ja/one_shot_keys.md)を見てください。
|
||||||
|
* `TG(layer)` - *レイヤー*を切り替えます。非アクティブな場合はアクティブにし、逆も同様です。
|
||||||
|
* `TO(layer)` - *レイヤー*をアクティブにし、他の全てのレイヤー(デフォルトレイヤーを除く)を非アクティブにします。この関数は特別です。1つのレイヤーをアクティブなレイヤースタックに追加/削除する代わりに、現在のアクティブなレイヤーを完全に置き換え、唯一上位のレイヤーを下位のレイヤーで置き換えることができるからです。これはキーダウンで(キーが押されるとすぐに)アクティブになります。
|
||||||
|
* `TT(layer)` - レイヤーのタップ切り替え。キーを押したままにすると*レイヤー*がアクティブにされ、放すと非アクティブになります (`MO` 風)。繰り返しタップすると、レイヤーはオンあるいはオフを切り替えます (`TG` 風)。デフォルトでは5回のタップが必要ですが、`TAPPING_TOGGLE` を定義することで変更することができます -- 例えば、2回のタップだけで切り替えるには、`#define TAPPING_TOGGLE 2` を定義します。
|
||||||
|
|
||||||
|
## 注意事項
|
||||||
|
|
||||||
|
現在のところ、`LT()` と `MT()` は[基本的なキーコードセット](ja/keycodes_basic.md)に制限されています。つまり、`LCTL()`、`KC_TILD` あるいは `0xFF` より大きなキーコードを使うことができません。レイヤータップあるいはモッドタップのキーコードの一部として指定されたモディファイアは無視されます。タップしたキーコードにモディファイアを適用する必要がある場合は、[タップダンス](ja/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys)を使うことができます。
|
||||||
|
|
||||||
|
さらに、モッドタップあるいはレイヤータップで少なくとも1つの右手用のモディファイアが指定された場合、指定された全てのモディファイアが右手用になるため、2つをうまく組み合わせて一致させることはできません。
|
||||||
|
|
||||||
|
# レイヤーの使用
|
||||||
|
|
||||||
|
レイヤーを切り替える時は注意してください。(キーボードを取り外さずに)そのレイヤーを非アクティブにすることができずレイヤーから移動できなくなる可能性があります。最も一般的な問題を避けるためのガイドラインを作成しました。
|
||||||
|
|
||||||
|
## 初心者
|
||||||
|
|
||||||
|
QMK を使い始めたばかりの場合は、全てを単純にしたいでしょう。レイヤーをセットアップする時は、これらのガイドラインに従ってください:
|
||||||
|
|
||||||
|
* デフォルトの "base" レイヤーとして、layer 0 をセットアップします。これは通常の入力レイヤーであり、任意のレイアウト (qwerty、dvorak、colemak など)にすることができます。通常はキーボードのキーのほとんどまたは全てが定義されているため、これを最下位のレイヤーとして設定することが重要です。そうすることで、もしそれが他のレイヤーの上 (つまりレイヤー番号が大きい)にある場合の影響を防ぎます。
|
||||||
|
* layer 0 をルートとして、レイヤーを "ツリー" レイアウトに配置します。他の複数のレイヤーから同じレイヤーに行こうとしないでください。
|
||||||
|
* 各レイヤーのキーマップでは、より高い番号のレイヤーのみを参照します。レイヤーは最大の番号(最上位)のアクティブレイヤーから処理されるため、下位レイヤーの状態を変更するのは難しくエラーが発生しやすくなります。
|
||||||
|
|
||||||
|
## 中級ユーザ
|
||||||
|
|
||||||
|
複数の基本レイヤーが必要な場合があります。例えば、QWERTY と Dvorak を切り替える場合、国ごとに異なるレイアウトを切り替える場合、あるいは異なるビデオゲームごとにレイアウトを切り替える場合などです。基本レイヤーは常に最小の番号のレイヤーである必要があります。複数の基本レイヤーがある場合、常にそれらを相互排他的に扱う必要があります。1つの基本レイヤーがオンの場合、他をオフにします。
|
||||||
|
|
||||||
|
## 上級ユーザ
|
||||||
|
|
||||||
|
レイヤーがどのように動作し、何ができるかを理解したら、より創造的になります。初心者のセクションで列挙されている規則は、幾つかの巧妙な詳細を回避するのに役立ちますが、特に超コンパクトなキーボードのユーザにとって制約になる場合があります。レイヤーの仕組みを理解することで、レイヤーをより高度な方法で使うことができます。
|
||||||
|
|
||||||
|
レイヤーは番号順に上に積み重なっています。キーの押下の動作を決定する時に、QMK は上から順にレイヤーを走査し、`KC_TRNS` に設定されていない最初のアクティブなレイヤーに到達すると停止します。結果として、現在のレイヤーよりも数値的に低いレイヤーをアクティブにし、現在のレイヤー(あるいはアクティブでターゲットレイヤーよりも高い別のレイヤー)に `KC_TRNS` 以外のものがある場合、それが送信されるキーであり、アクティブ化したばかりのレイヤー上のキーではありません。これが、ほとんどの人の "なぜレイヤーが切り替わらないのか" 問題の原因です。
|
||||||
|
|
||||||
|
場合によっては、マクロ内あるいはタップダンスルーチンの一部としてレイヤーを切り替えほうが良いかもしれません。`layer_on` はレイヤーをアクティブにし、`layer_off` はそれを非アクティブにします。もっと多くのレイヤーに関する関数は、[action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h) で見つけることができます。
|
||||||
|
|
||||||
|
# 修飾キー :id=modifier-keys
|
||||||
|
|
||||||
|
以下のようにキーコードとモディファイアを組み合わせることができます。押すと、モディファイアのキーダウンイベントが送信され、次に `kc` のキーダウンイベントが送信されます。放すと、`kc` のキーアップイベントが送信され、次にモディファイアのキーアップイベントが送信されます。
|
||||||
|
|
||||||
|
| キー | エイリアス | 説明 |
|
||||||
|
|----------|-------------------------------|----------------------------------------------------|
|
||||||
|
| `LCTL(kc)` | `C(kc)` | 左 Control を押しながら `kc` を押します。 |
|
||||||
|
| `LSFT(kc)` | `S(kc)` | 左 Shift を押しながら `kc` を押します。 |
|
||||||
|
| `LALT(kc)` | `A(kc)`, `LOPT(kc)` | 左 Alt を押しながら `kc`を押します。 |
|
||||||
|
| `LGUI(kc)` | `G(kc)`, `LCMD(kc)`, `LWIN(kc)` | 左 GUI を押しながら `kc` を押します。 |
|
||||||
|
| `RCTL(kc)` | | 右 Control を押しながら `kc` を押します。 |
|
||||||
|
| `RSFT(kc)` | | 右 Shift を押しながら `kc` を押します。 |
|
||||||
|
| `RALT(kc)` | `ROPT(kc)`, `ALGR(kc)` | 右 Alt を押しながら `kc` を押します。 |
|
||||||
|
| `RGUI(kc)` | `RCMD(kc)`, `LWIN(kc)` | 右 GUI を押しながら `kc` を押します。 |
|
||||||
|
| `SGUI(kc)` | `SCMD(kc)`, `SWIN(kc)` | 左 Shift と左 GUI を押しながら `kc` を押します。 |
|
||||||
|
| `LCA(kc)` | | 左 Control と左 Alt を押しながら `kc` を押します。 |
|
||||||
|
| `LCAG(kc)` | | 左 Control、左 Alt、左 GUI を押しながら `kc` を押します。 |
|
||||||
|
| `MEH(kc)` | | 左 Control、左 Shift、左 Alt を押しながら `kc` を押します。 |
|
||||||
|
| `HYPR(kc)` | | 左 Control、左 Shift、左 Alt、左 GUI を押しながら `kc` を押します。 |
|
||||||
|
|
||||||
|
また、それらを繋げることができます。例えば、`LCTL(LALT(KC_DEL))` は1回のキー押下で Control+Alt+Delete を送信するキーを作成します。
|
||||||
|
|
||||||
|
# 過去の内容
|
||||||
|
|
||||||
|
このページには多くの機能が含まれていました。このページを構成していた多くのセクションをそれぞれのページに移動しました。これより下は全て単なるリダイレクトであるため、web上で古いリンクをたどっている人は探しているものを見つけることができます。
|
||||||
|
|
||||||
|
## モッドタップ :id=mod-tap
|
||||||
|
|
||||||
|
* [モッドタップ](ja/mod_tap.md)
|
||||||
|
|
||||||
|
## ワンショットキー :id=one-shot-keys
|
||||||
|
|
||||||
|
* [ワンショットキー](ja/one_shot_keys.md)
|
||||||
|
|
||||||
|
## タップホールド設定オプション :id=tap-hold-configuration-options
|
||||||
|
|
||||||
|
* [タップホールド設定オプション](ja/tap_hold.md)
|
328
docs/ja/feature_audio.md
Normal file
328
docs/ja/feature_audio.md
Normal file
@@ -0,0 +1,328 @@
|
|||||||
|
# オーディオ
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 5d5ff80:docs/feature_audio.md
|
||||||
|
git diff 5d5ff80 HEAD -- docs/feature_audio.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
キーボードは音を出すことができます!Planck、Preonic あるいは特定の PWM 対応ピンにアクセスできる AVR キーボードがある場合は、単純なスピーカーを接続してビープ音を鳴らすことができます。これらのビープ音を使ってレイヤーの変化、モディファイア、特殊キーを示したり、あるいは単にイカした8ビットの曲を鳴らすことができます。
|
||||||
|
|
||||||
|
最大2つの同時オーディオ音声がサポートされ、1つはタイマー1によってもう一つはタイマー3によって駆動されます。以下のピンは config.h の中でオーディオ出力として定義することができます:
|
||||||
|
|
||||||
|
Timer 1:
|
||||||
|
`#define B5_AUDIO`
|
||||||
|
`#define B6_AUDIO`
|
||||||
|
`#define B7_AUDIO`
|
||||||
|
|
||||||
|
Timer 3:
|
||||||
|
`#define C4_AUDIO`
|
||||||
|
`#define C5_AUDIO`
|
||||||
|
`#define C6_AUDIO`
|
||||||
|
|
||||||
|
`rules.mk` に `AUDIO_ENABLE = yes` を追加すると、他の設定無しで自動的に有効になる幾つかの異なるサウンドがあります:
|
||||||
|
|
||||||
|
```
|
||||||
|
STARTUP_SONG // キーボードの起動時に再生 (audio.c)
|
||||||
|
GOODBYE_SONG // RESET キーを押すと再生 (quantum.c)
|
||||||
|
AG_NORM_SONG // AG_NORM キーを押すと再生 (quantum.c)
|
||||||
|
AG_SWAP_SONG // AG_SWAP キーを押すと再生 (quantum.c)
|
||||||
|
CG_NORM_SONG // CG_NORM キーを押すと再生 (quantum.c)
|
||||||
|
CG_SWAP_SONG // CG_SWAP キーを押すと再生 (quantum.c)
|
||||||
|
MUSIC_ON_SONG // 音楽モードがアクティブになると再生 (process_music.c)
|
||||||
|
MUSIC_OFF_SONG // 音楽モードが非アクティブになると再生 (process_music.c)
|
||||||
|
CHROMATIC_SONG // 半音階音楽モードが選択された時に再生 (process_music.c)
|
||||||
|
GUITAR_SONG // ギター音楽モードが選択された時に再生 (process_music.c)
|
||||||
|
VIOLIN_SONG // バイオリン音楽モードが選択された時に再生 (process_music.c)
|
||||||
|
MAJOR_SONG // メジャー音楽モードが選択された時に再生 (process_music.c)
|
||||||
|
```
|
||||||
|
|
||||||
|
`config.h` の中で以下のような操作を行うことで、デフォルトの曲を上書きすることができます:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define STARTUP_SONG SONG(STARTUP_SOUND)
|
||||||
|
#endif
|
||||||
|
```
|
||||||
|
|
||||||
|
サウンドの完全なリストは、[quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) で見つかります - このリストに自由に追加してください!利用可能な音は [quantum/audio/musical_notes.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/musical_notes.h) で見つかります。
|
||||||
|
|
||||||
|
特定の時にカスタムサウンドを再生するために、以下のように曲を定義することができます(ファイルの上部付近に):
|
||||||
|
|
||||||
|
```c
|
||||||
|
float my_song[][2] = SONG(QWERTY_SOUND);
|
||||||
|
```
|
||||||
|
|
||||||
|
以下のように曲を再生します:
|
||||||
|
|
||||||
|
```c
|
||||||
|
PLAY_SONG(my_song);
|
||||||
|
```
|
||||||
|
|
||||||
|
または、以下のようにループで再生することができます:
|
||||||
|
|
||||||
|
```c
|
||||||
|
PLAY_LOOP(my_song);
|
||||||
|
```
|
||||||
|
|
||||||
|
オーディオがキーボードに組み込まれていない時に問題が起きる事を避けるために、`#ifdef AUDIO_ENABLE` / `#endif` で全てのオーディオ機能をくるむことをお勧めします。
|
||||||
|
|
||||||
|
オーディオで利用可能なキーコードは以下の通りです:
|
||||||
|
|
||||||
|
* `AU_ON` - オーディオ機能をオン
|
||||||
|
* `AU_OFF` - オーディオ機能をオフ
|
||||||
|
* `AU_TOG` - オーディオ機能を切り替え
|
||||||
|
|
||||||
|
!> これらのキーコードは全てのオーディオ機能をオンおよびオフにします。オフにするとオーディオフィードバック、オーディオクリック、音楽モードなどが完全に無効になります。
|
||||||
|
|
||||||
|
## ARM オーディオボリューム
|
||||||
|
|
||||||
|
ARM デバイスの場合、DAC サンプル値を調整できます。キーボードがあなたやあなたの同僚にとって騒々しい場合、`config.h` 内の `DAC_SAMPLE_MAX` を使って最大量を設定することができます:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define DAC_SAMPLE_MAX 65535U
|
||||||
|
```
|
||||||
|
|
||||||
|
## 音楽モード
|
||||||
|
|
||||||
|
音楽モードは列を半音階に、行をオクターブにマップします。これは格子配列キーボードで最適に動作しますが、他のものでも動作させることができます。`0xFF` 未満の全てのキーコードはブロックされるため、音の演奏中は入力できません - 特別なキー/mod があればそれらは引き続き動作します。これを回避するには、音楽モードを有効にする前(あるいは後)で、KC_NO を使って別のレイヤーにジャンプします。
|
||||||
|
|
||||||
|
メモリの問題により、録音は実験的です - 奇妙な動作が発生した場合は、キーボードの取り外しと再接続で問題が解決するでしょう。
|
||||||
|
|
||||||
|
利用可能なキーコード:
|
||||||
|
|
||||||
|
* `MU_ON` - 音楽モードをオン
|
||||||
|
* `MU_OFF` - 音楽モードをオフ
|
||||||
|
* `MU_TOG` - 音楽モードの切り替え
|
||||||
|
* `MU_MOD` - 音楽モードの循環
|
||||||
|
* `CHROMATIC_MODE` - 半音階。行はオクターブを変更します
|
||||||
|
* `GUITAR_MODE` - 半音階、ただし行は弦を変更します (+5 階)
|
||||||
|
* `VIOLIN_MODE` - 半音階。ただし行は弦を変換します (+7 階)
|
||||||
|
* `MAJOR_MODE` - メージャースケール
|
||||||
|
|
||||||
|
音楽モードでは、以下のキーコードは動作が異なり、通過しません:
|
||||||
|
|
||||||
|
* `LCTL` - 録音を開始
|
||||||
|
* `LALT` - 録音を停止/演奏を停止
|
||||||
|
* `LGUI` - 録音を再生
|
||||||
|
* `KC_UP` - 再生をスピードアップ
|
||||||
|
* `KC_DOWN` - 再生をスローダウン
|
||||||
|
|
||||||
|
ピッチ標準 (`PITCH_STANDARD_A`) はデフォルトで 440.0f です - これを変更するには、`config.h` に以下のようなものを追加します:
|
||||||
|
|
||||||
|
#define PITCH_STANDARD_A 432.0f
|
||||||
|
|
||||||
|
音楽モードも完全に無効にすることができます。コントローラの容量が足りなくて困っている場合に役に立ちます。無効にするには、これを `config.h` に追加します:
|
||||||
|
|
||||||
|
#define NO_MUSIC_MODE
|
||||||
|
|
||||||
|
### 音楽マスク
|
||||||
|
|
||||||
|
デフォルトで、`MUSIC_MASK` は `keycode < 0xFF` に設定されます。これは、`0xFF` 未満のキーコードが音に変換され、何も出力しないことを意味します。`config.h` の中で以下のものを定義することで、これを変更することができます:
|
||||||
|
|
||||||
|
#define MUSIC_MASK keycode != KC_NO
|
||||||
|
|
||||||
|
これは全てのキーコードを捕捉します - これは、キーボードを再起動するまで、音楽モードで動けなくなることに注意してください!
|
||||||
|
|
||||||
|
どのキーコードを引き続き処理するかを制御する、より高度な方法については、`<keyboard>.c` の中の `music_mask_kb(keycode)` および `keymap.c` の中の `music_mask_user(keycode)` を使うことができます:
|
||||||
|
|
||||||
|
bool music_mask_user(uint16_t keycode) {
|
||||||
|
switch (keycode) {
|
||||||
|
case RAISE:
|
||||||
|
case LOWER:
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
false を返すものはマスクの一部では無く、常に処理されます。
|
||||||
|
|
||||||
|
### 音楽マップ
|
||||||
|
|
||||||
|
デフォルトでは、音楽モードはキーのスケールを決定するために列と行を使います。キーボードレイアウトに一致する長方形のマトリックスを使うキーボードの場合、これで十分です。しかし、(Planck Rev6 あるいは多くの分割キーボードなどのように)より複雑なマトリックスを使うキーボードの場合、非常に歪んだ感じを受けることになります。
|
||||||
|
|
||||||
|
しかしながら、音楽マップオプションにより、音楽モードのためにスケーリングを再マップすることができるため、レイアウトに一致し、より自然になります。
|
||||||
|
|
||||||
|
この機能を使うには、`#define MUSIC_MAP` を `config.h` ファイルに追加します。そして、`キーボードの名前.c` または `keymap.c` に `uint8_t music_map` を追加します。
|
||||||
|
|
||||||
|
```c
|
||||||
|
const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_ortho_4x12(
|
||||||
|
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
||||||
|
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
|
||||||
|
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
|
||||||
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
キーボードが使用する `LAYOUT` マクロも使用したいでしょう。これは正しいキーの位置にマップします。キーボードレイアウトの左下から開始し、右に移動してさらに上に移動します。完全なマトリックスができるまで、全てのエントリを入力します。
|
||||||
|
|
||||||
|
これを実装する方法の例として、[Planck Keyboard](https://github.com/qmk/qmk_firmware/blob/e9ace1487887c1f8b4a7e8e6d87c322988bec9ce/keyboards/planck/planck.c#L24-L29) を見ることができます。
|
||||||
|
|
||||||
|
## オーディオクリック
|
||||||
|
|
||||||
|
これは、ボタンを押すたびにクリック音を追加し、キーボードからのクリック音をシミュレートします。キーを押すたびにわずかに音が異なるため、すばやく入力しても長い単一の音のようには聞こえません。
|
||||||
|
|
||||||
|
* `CK_TOGG` - ステータスを切り替えます (有効にされた場合、音を再生します)
|
||||||
|
* `CK_ON` - オーディオクリックをオンにします (音を再生します)
|
||||||
|
* `CK_OFF` - オーディオクリックをオフにします (音を再生しません)
|
||||||
|
* `CK_RST` - 周波数をデフォルトの状態に再設定します (デフォルトの周波数で音を再生します)
|
||||||
|
* `CK_UP` - クリック音の周波数を増やします (新しい周波数で音を再生します)
|
||||||
|
* `CK_DOWN` - クリック音の周波数を減らします (新しい周波数で音を再生します)
|
||||||
|
|
||||||
|
|
||||||
|
容量を節約するためにデフォルトではこの機能は無効です。有効にするには、`config.h` に以下を追加します:
|
||||||
|
|
||||||
|
#define AUDIO_CLICKY
|
||||||
|
|
||||||
|
|
||||||
|
これらの値を定義することで、デフォルト、最小および最大周波数、ステッピングおよび組み込みのランダム性を設定することができます:
|
||||||
|
|
||||||
|
| オプション | デフォルト値 | 説明 |
|
||||||
|
|--------|---------------|-------------|
|
||||||
|
| `AUDIO_CLICKY_FREQ_DEFAULT` | 440.0f | クリック音のデフォルト/開始音の周波数を設定します。 |
|
||||||
|
| `AUDIO_CLICKY_FREQ_MIN` | 65.0f | 最小周波数を設定します (60f 未満は少しバグがあります)。 |
|
||||||
|
| `AUDIO_CLICKY_FREQ_MAX` | 1500.0f | 最大周波数を設定します。高すぎると同僚があなたを攻撃する可能性があります。 |
|
||||||
|
| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f | UP/DOWN キーコードのステップを設定します。これは掛け算の係数です。デフォルトでは、音楽のマイナーの1/3ずつ、周波数を上げ/下げします。 |
|
||||||
|
| `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | クリックのランダム性の係数を設定します。これを `0f` に設定すると各クリックが同一になり、`1.0f` に設定するとこの音は90年代のコンピュータ画面のスクロール/タイピングの効果があります。 |
|
||||||
|
| `AUDIO_CLICKY_DELAY_DURATION` | 1 | 1がテンポの 1/16、または64分音符である整数音符の長さ (実装の詳細については、`quantum/audio/musical_notes.h` を見てください)。メインのクリック効果は、この時間だけ遅れます。これらを6-12前後の値に調整すると、うるさいスイッチの補正に役立ちます。 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## MIDI 機能
|
||||||
|
|
||||||
|
これはまだ WIP ですが、何が起きているかを見るために、`quantum/process_keycode/process_midi.c` を調べてください。Makefile から有効にします。
|
||||||
|
|
||||||
|
|
||||||
|
## オーディオキーコード
|
||||||
|
|
||||||
|
| キー | エイリアス | 説明 |
|
||||||
|
|----------------|---------|----------------------------------|
|
||||||
|
| `AU_ON` | | オーディオモードオン |
|
||||||
|
| `AU_OFF` | | オーディオモードオフ |
|
||||||
|
| `AU_TOG` | | オーディオモードを切り替えます |
|
||||||
|
| `CLICKY_TOGGLE` | `CK_TOGG` | オーディオクリックモードを切り替えます |
|
||||||
|
| `CLICKY_UP` | `CK_UP` | クリック音の周波数を増やします |
|
||||||
|
| `CLICKY_DOWN` | `CK_DOWN` | クリック音の周波数を減らします |
|
||||||
|
| `CLICKY_RESET` | `CK_RST` | 周波数をデフォルトに再設定します |
|
||||||
|
| `MU_ON` | | 音楽モードをオンにします |
|
||||||
|
| `MU_OFF` | | 音楽モードをオフにします |
|
||||||
|
| `MU_TOG` | | 音楽モードを切り替えます |
|
||||||
|
| `MU_MOD` | | 音楽モードを循環します |
|
||||||
|
|
||||||
|
<!-- 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
|
||||||
|
|
||||||
|
-->
|
135
docs/ja/feature_auto_shift.md
Normal file
135
docs/ja/feature_auto_shift.md
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
# 自動シフト: なぜシフトキーが必要ですか?
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 5d5ff80:docs/feature_auto_shift.md
|
||||||
|
git diff 5d5ff80 HEAD -- docs/feature_auto_shift.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
キーをタップすると、その文字を取得します。キーをタップするが、*わずかに*長く押し続けると、シフト状態になります。ほら!シフトキーは必要ありません!
|
||||||
|
|
||||||
|
## なぜ自動シフトなのですか?
|
||||||
|
|
||||||
|
多くの人が腱鞘炎などの症状に苦しんでいます。一般的な原因は、指を繰り返し長い距離を伸ばすことです。私たちはキーボード上でシフトキーに手を伸ばすためにあまりにも頻繁に小指を伸ばします。自動シフトキーはそれを軽減しようとしています。
|
||||||
|
|
||||||
|
## どのように動作しますか?
|
||||||
|
|
||||||
|
キーをタップする時に、キーを放す前にほんの短い間押したままにします。この押したままにする時間は全ての人にとって異なる長さです。自動シフトは、定数 `AUTO_SHIFT_TIMEOUT` を定義し、これは普段の押された状態の時間の2倍に通常は設定されます。タイマーは、キーを押す時に開始され、キーを放す時に止まります。押された時間が `AUTO_SHIFT_TIMEOUT` 以上の場合に、キーのシフトバージョンが発行されます。時間が `AUTO_SHIFT_TIMEOUT` 時間よりも短い場合は、通常の状態が発行されます。
|
||||||
|
|
||||||
|
## 自動シフトには制限がありますか?
|
||||||
|
|
||||||
|
残念ながらあります。
|
||||||
|
|
||||||
|
1. キーリピートが動作しなくなります。例えば、20個の 'a' 文字が必要な場合、'a' キーを1、2秒押し続けるかもしれません。オペレーティングシステムに押されたキーの状態を発行する代わりに押された時間を計るので、自動シフトでは動作しません。
|
||||||
|
2. シフトをするつもりがない時にシフトされた文字を取得し、シフトしたい時にそうではない他の文字を取得するでしょう。これは結局は練習になります。急いでいる時は、シフトされたバージョンのために十分長くキーを押したと思うかもしれませんが、そうではありませんでした。一方、キーをタップしていると思うかもしれませんが、実際には予想よりも少し長い間押していました。
|
||||||
|
|
||||||
|
## どうやって自動シフトを有効にしますか?
|
||||||
|
|
||||||
|
キーマップフォルダの `rules.mk` に追加します:
|
||||||
|
|
||||||
|
AUTO_SHIFT_ENABLE = yes
|
||||||
|
|
||||||
|
`rules.mk` が存在しない場合、それを作成することができます。
|
||||||
|
|
||||||
|
そして自動シフトキーを有効にした新しいファームウェアをコンパイルしてインストールします!以上です!
|
||||||
|
|
||||||
|
## モディファイア
|
||||||
|
|
||||||
|
デフォルトで、1つ以上のモディファイアと一緒にキーが押されると自動シフトは無効になります。従って、本当に長い間 Ctrl+A を保持しても、Ctrl+Shift+A と同じではありません。
|
||||||
|
|
||||||
|
`config.h` に定義を追加することで、モディファイアの自動シフトを再度有効にすることができます
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define AUTO_SHIFT_MODIFIERS
|
||||||
|
```
|
||||||
|
|
||||||
|
この場合、`AUTO_SHIFT_TIMEOUT` を超えて押された Ctrl+A は Ctrl+Shift+A として送信されます
|
||||||
|
|
||||||
|
|
||||||
|
## 自動シフトの設定
|
||||||
|
|
||||||
|
必要に応じて、自動シフトの挙動を変更することができる幾つかの設定があります。キーマップフォルダにある `config.h` に様々な変数を設定することで行われます。`config.h` ファイルが存在しない場合、それを作成することができます。
|
||||||
|
|
||||||
|
例
|
||||||
|
|
||||||
|
```c
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define AUTO_SHIFT_TIMEOUT 150
|
||||||
|
#define NO_AUTO_SHIFT_SPECIAL
|
||||||
|
```
|
||||||
|
|
||||||
|
### AUTO_SHIFT_TIMEOUT (単位: ミリ秒)
|
||||||
|
|
||||||
|
これは、シフトされた状態を取得するためにどれだけ長くキーを押し続けなければならないかを制御します。
|
||||||
|
明らかにこれは人によって異なります。一般的な人にとって、135 から 150 の設定がうまく機能します。ただし、少なくとも 175 の値から開始する必要があります。これはデフォルト値です。その後、ここから下げていきます。間違って検出することなくシフトされた状態を取得するのに必要な、最も短い時間を得るという考え方です。
|
||||||
|
|
||||||
|
完璧に動作するまで、いろいろな値を試してみます。多くの人は、全てが所定の値で適切に動作するものの、時々、1つあるいは2つのキーがシフト状態を発行することが分かるでしょう。これは単に習慣と、幾つかのキーを他のキーよりも少し長く押し続けることによるものです。この値を見つけたら、問題のキーを通常よりも少し早くタップするとともに、その値を設定します。
|
||||||
|
|
||||||
|
?> 自動シフトには、この値を素早く取得するのに役立つ3つの特別なキーがあります。詳細は「自動シフトのセットアップ」を見てください!
|
||||||
|
|
||||||
|
### NO_AUTO_SHIFT_SPECIAL (単純にこのように定義します)
|
||||||
|
|
||||||
|
-\_, =+, [{, ]}, ;:, '", ,<, .> および /? を含む特殊キーを自動シフトしません
|
||||||
|
|
||||||
|
### NO_AUTO_SHIFT_NUMERIC (単純にこのように定義します)
|
||||||
|
|
||||||
|
0から9までの数字キーを自動シフトしません。
|
||||||
|
|
||||||
|
### NO_AUTO_SHIFT_ALPHA (単純にこのように定義します)
|
||||||
|
|
||||||
|
AからZを含むアルファベット文字を自動シフトしません。
|
||||||
|
|
||||||
|
## 自動シフトセットアップの使用
|
||||||
|
|
||||||
|
これにより、`AUTO_SHIFT_TIMEOUT` で設定している時間を一時的に増減させたり報告するために、3つのキーを定義することができます。
|
||||||
|
|
||||||
|
### セットアップ
|
||||||
|
|
||||||
|
3つのキーを一時的にキーマップにマップします:
|
||||||
|
|
||||||
|
| キー名 | 説明 |
|
||||||
|
|----------|-----------------------------------------------------|
|
||||||
|
| KC_ASDN | 自動シフトタイムアウト変数を下げる |
|
||||||
|
| KC_ASUP | 自動シフトタイムアウト変数を上げる |
|
||||||
|
| KC_ASRP | 現在の自動シフトタイムアウト値を報告する |
|
||||||
|
| KC_ASON | 自動シフト機能をオンにする |
|
||||||
|
| KC_ASOFF | 自動シフト機能をオフにする |
|
||||||
|
| KC_ASTG | 自動シフト機能の状態を切り替える |
|
||||||
|
|
||||||
|
新しいファームウェアをコンパイルしてアップロードします。
|
||||||
|
|
||||||
|
### 使い方
|
||||||
|
|
||||||
|
これらのテスト中は、完全に普段通り入力する必要があり、意図的にシフトされたキーを使わずに入力するように注意する必要があります。
|
||||||
|
|
||||||
|
1. アルファベットの複数の文を入力します。
|
||||||
|
2. 大文字に注意してください。
|
||||||
|
3. 大文字が存在しない場合は、自動シフトタイムアウト値を減らすために `KC_ASDN` にマップしたキーを押し、ステップ1に戻ります。
|
||||||
|
4. 大文字が幾つかある場合は、押す時間を短くしてこれらのキーをタップする必要があるか、あるいはタイムアウトを増やす必要があるかを決定します。
|
||||||
|
5. タイムアウトを増やすことに決めた場合は、`KC_ASUP` にマップしたキーを押し、ステップ1に戻ります。
|
||||||
|
6. 結果に満足したら、`KC_ASRP` にマップしたキーを押します。キーボードは `AUTO_SHIFT_TIMEOUT` の値を自動的に入力します。
|
||||||
|
7. 報告された値で `config.h` の `AUTO_SHIFT_TIMEOUT` を更新します。
|
||||||
|
8. `config.h` から `AUTO_SHIFT_SETUP` を削除します。
|
||||||
|
9. `KC_ASDN`、`KC_ASUP` および `KC_ASRP` のキーバインディングを削除します。
|
||||||
|
10. 新しいファームウェアをコンパイルしてアップロードします。
|
||||||
|
|
||||||
|
#### 実行例
|
||||||
|
|
||||||
|
hello world. my name is john doe. i am a computer programmer playing with
|
||||||
|
keyboards right now.
|
||||||
|
|
||||||
|
[KC_ASDN を何度か押します]
|
||||||
|
|
||||||
|
heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
|
||||||
|
KEYboArDS RiGHT NOw.
|
||||||
|
|
||||||
|
[KC_ASUP を数回押します]
|
||||||
|
|
||||||
|
hello world. my name is john Doe. i am a computer programmer playing with
|
||||||
|
keyboarDs right now.
|
||||||
|
|
||||||
|
[KC_ASRPを押します]
|
||||||
|
|
||||||
|
115
|
||||||
|
|
||||||
|
キーボードは現在の `AUTO_SHIFT_TIMEOUT` 値を表す `115` を入力しました。これで設定が完了しました!テスト中に現れる *D* キーを少し練習してください。それで完璧です。
|
253
docs/ja/feature_backlight.md
Normal file
253
docs/ja/feature_backlight.md
Normal file
@@ -0,0 +1,253 @@
|
|||||||
|
# バックライト
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 5d5ff80:docs/feature_backlight.md
|
||||||
|
git diff 5d5ff80 HEAD -- docs/feature_backlight.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
多くのキーボードは、キースイッチを貫通して配置されたり、キースイッチの下に配置された個々の LED によって、バックライトキーをサポートします。この機能は通常スイッチごとに単一の色しか使用できないため、[RGB アンダーグロー](ja/feature_rgblight.md)および [RGB マトリックス](ja/feature_rgb_matrix.md)機能のどちらとも異なりますが、キーボードに複数の異なる単一色の LED を取り付けることは当然可能です。
|
||||||
|
|
||||||
|
QMK は *パルス幅変調*(*Pulse Width Modulation*) すなわち PWM として知られている技術で急速にオンおよびオフを切り替えることで、これらの LED の輝度を制御できます。PWM 信号のデューティサイクルを変えることで、調光の錯覚を起こすことができます。
|
||||||
|
|
||||||
|
MCU は、GPIO ピンにはそんなに電流を供給できません。MCU から直接バックライトに給電せずに、バックライトピンは LED への電力を切り替えるトランジスタあるいは MOSFET に接続されます。
|
||||||
|
|
||||||
|
## 機能の設定
|
||||||
|
|
||||||
|
ほとんどのキーボードではバックライトをサポートしている場合にデフォルトで有効になっていますが、もし機能しない場合は `rules.mk` が以下を含んでいることを確認してください:
|
||||||
|
|
||||||
|
```makefile
|
||||||
|
BACKLIGHT_ENABLE = yes
|
||||||
|
```
|
||||||
|
|
||||||
|
## キーコード
|
||||||
|
有効にすると、以下のキーコードを使ってバックライトレベルを変更することができます。
|
||||||
|
|
||||||
|
| キー | 説明 |
|
||||||
|
|---------|------------------------------------------|
|
||||||
|
| `BL_TOGG` | バックライトをオンあるいはオフにする |
|
||||||
|
| `BL_STEP` | バックライトレベルを循環する |
|
||||||
|
| `BL_ON` | バックライトを最大輝度に設定する |
|
||||||
|
| `BL_OFF` | バックライトをオフにする |
|
||||||
|
| `BL_INC` | バックライトレベルを上げる |
|
||||||
|
| `BL_DEC` | バックライトレベルを下げる |
|
||||||
|
| `BL_BRTG` | バックライトの明滅動作を切り替える |
|
||||||
|
|
||||||
|
## バックライト関数群
|
||||||
|
|
||||||
|
| 関数 | 説明 |
|
||||||
|
|----------|-----------------------------------------------------------|
|
||||||
|
| `backlight_toggle()` | バックライトをオンあるいはオフにする |
|
||||||
|
| `backlight_enable()` | バックライトをオンにする |
|
||||||
|
| `backlight_disable()` | バックライトをオフにする |
|
||||||
|
| `backlight_step()` | バックライトレベルを循環する |
|
||||||
|
| `backlight_increase()` | バックライトレベルを上げる |
|
||||||
|
| `backlight_decrease()` | バックライトレベルを下げる |
|
||||||
|
| `backlight_level(x)` | バックライトのレベルを特定のレベルに設定する |
|
||||||
|
| `get_backlight_level()` | 現在のバックライトレベルを返す |
|
||||||
|
| `is_backlight_enabled()` | バックライトが現在オンかどうかを返す |
|
||||||
|
|
||||||
|
### バックライトの明滅動作の関数群
|
||||||
|
|
||||||
|
| 関数 | 説明 |
|
||||||
|
|----------|---------------------------------------------------|
|
||||||
|
| `breathing_toggle()` | バックライトの明滅動作をオンまたはオフにする |
|
||||||
|
| `breathing_enable()` | バックライトの明滅動作をオンにする |
|
||||||
|
| `breathing_disable()` | バックライトの明滅動作をオフにする |
|
||||||
|
|
||||||
|
## ドライバの設定
|
||||||
|
|
||||||
|
どのドライバを使うかを選択するには、以下を使って `rules.mk` を設定します:
|
||||||
|
|
||||||
|
```makefile
|
||||||
|
BACKLIGHT_DRIVER = software # 有効なドライバの値は 'pwm,software,no' です
|
||||||
|
```
|
||||||
|
|
||||||
|
各ドライバについてのヘルプは以下を見てください。
|
||||||
|
|
||||||
|
## 共通のドライバ設定
|
||||||
|
|
||||||
|
バックライトの挙動を変更するには、`config.h` の中で以下の `#define` をします:
|
||||||
|
|
||||||
|
| 定義 | デフォルト | 説明 |
|
||||||
|
|---------------------|-------------|--------------------------------------------------------------------------------------|
|
||||||
|
| `BACKLIGHT_LEVELS` | `3` | 輝度のレベルの数 (オフを除いて最大 31) |
|
||||||
|
| `BACKLIGHT_CAPS_LOCK` | *定義なし* | バックライトを使って Caps Lock のインジケータを有効にする (専用 LED の無いキーボードのため) |
|
||||||
|
| `BACKLIGHT_BREATHING` | *定義なし* | サポートされる場合は、バックライトの明滅動作を有効にする |
|
||||||
|
| `BREATHING_PERIOD` | `6` | 各バックライトの "明滅" の長さ(秒) |
|
||||||
|
| `BACKLIGHT_ON_STATE` | `0` | バックライトが "オン" の時のバックライトピンの状態 - high の場合は `1`、low の場合は `0` |
|
||||||
|
|
||||||
|
### バックライトオン状態
|
||||||
|
|
||||||
|
ほとんどのバックライトの回路は N チャンネルの MOSFET あるいは NPN トランジスタによって駆動されます。これは、トランジスタを*オン*にして LED を点灯させるには、ゲートまたはベースに接続されているバックライトピンを *high* に駆動する必要があることを意味します。
|
||||||
|
ただし、P チャンネルの MOSFET あるいは PNP トランジスタが使われる場合があります。この場合、トランジスタがオンの時、ピンは代わりに *low* で駆動されます。
|
||||||
|
|
||||||
|
この機能は `BACKLIGHT_ON_STATE` 定義することでキーボードレベルで設定されます。
|
||||||
|
|
||||||
|
## AVR ドライバ
|
||||||
|
|
||||||
|
AVR ボードでは、デフォルトのドライバは現在のところ最善のシナリオを選択するために構成を探っています。ドライバはデフォルトで設定されますが、rules.mk 内の同等の設定は以下の通りです:
|
||||||
|
```makefile
|
||||||
|
BACKLIGHT_DRIVER = pwm
|
||||||
|
```
|
||||||
|
|
||||||
|
### 注意事項
|
||||||
|
|
||||||
|
ハードウェア PWM は以下の表に従ってサポートされます:
|
||||||
|
|
||||||
|
| バックライトピン | AT90USB64/128 | ATmega16/32U4 | ATmega16/32U2 | ATmega32A | ATmega328P |
|
||||||
|
|-------------|-------------|-------------|-------------|---------|----------|
|
||||||
|
| `B1` | | | | | Timer 1 |
|
||||||
|
| `B2` | | | | | Timer 1 |
|
||||||
|
| `B5` | Timer 1 | Timer 1 | | | |
|
||||||
|
| `B6` | Timer 1 | Timer 1 | | | |
|
||||||
|
| `B7` | Timer 1 | Timer 1 | Timer 1 | | |
|
||||||
|
| `C4` | Timer 3 | | | | |
|
||||||
|
| `C5` | Timer 3 | | Timer 1 | | |
|
||||||
|
| `C6` | Timer 3 | Timer 3 | Timer 1 | | |
|
||||||
|
| `D4` | | | | Timer 1 | |
|
||||||
|
| `D5` | | | | Timer 1 | |
|
||||||
|
|
||||||
|
他の全てのピンはソフトウェア PWM を使います。[オーディオ](ja/feature_audio.md)機能が無効あるいは1つのタイマだけを使っている場合は、ハードウェアタイマによってバックライト PWM を引き起こすことができます:
|
||||||
|
|
||||||
|
| オーディオピン | オーディオタイマ | ソフトウェア PWM タイマ |
|
||||||
|
|---------|-----------|------------------|
|
||||||
|
| `C4` | Timer 3 | Timer 1 |
|
||||||
|
| `C5` | Timer 3 | Timer 1 |
|
||||||
|
| `C6` | Timer 3 | Timer 1 |
|
||||||
|
| `B5` | Timer 1 | Timer 3 |
|
||||||
|
| `B6` | Timer 1 | Timer 3 |
|
||||||
|
| `B7` | Timer 1 | Timer 3 |
|
||||||
|
|
||||||
|
両方のタイマーがオーディオのために使われている場合、バックライト PWM はハードウェアタイマを使いませんが、代わりにマトリックススキャンの間に引き起こされます。この場合、PWM の計算は十分なタイミングの精度で呼ばれないかもしれないため、バックライトの明滅はサポートされず、バックライトもちらつくかもしれません。
|
||||||
|
|
||||||
|
### AVR 設定
|
||||||
|
|
||||||
|
バックライトの挙動を変更するには、`config.h` の中で以下の `#define` をします:
|
||||||
|
|
||||||
|
| 定義 | デフォルト | 説明 |
|
||||||
|
|---------------------|-------------|--------------------------------------------------------------------------------------------------------------|
|
||||||
|
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||||
|
| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください |
|
||||||
|
| `BACKLIGHT_LEVELS` | `3` | 輝度のレベルの数 (オフを除いて最大 31) |
|
||||||
|
| `BACKLIGHT_CAPS_LOCK` | *定義なし* | バックライトを使って Caps Lock のインジケータを有効にする (専用 LED の無いキーボードのため) |
|
||||||
|
| `BACKLIGHT_BREATHING` | *定義なし* | サポートされる場合は、バックライトの明滅動作を有効にする |
|
||||||
|
| `BREATHING_PERIOD` | `6` | 各バックライトの "明滅" の長さ(秒) |
|
||||||
|
| `BACKLIGHT_ON_STATE` | `1` | バックライトが "オン" の時のバックライトピンの状態 - high の場合は `1`、low の場合は `0` |
|
||||||
|
|
||||||
|
### バックライトオン状態
|
||||||
|
|
||||||
|
ほとんどのバックライトの回路は N チャンネルの MOSFET あるいは NPN トランジスタによって駆動されます。これは、トランジスタを*オン*にして LED を点灯させるには、ゲートまたはベースに接続されているバックライトピンを *high* に駆動する必要があることを意味します。
|
||||||
|
ただし、P チャンネルの MOSFET あるいは PNP トランジスタが使われる場合があります。この場合、トランジスタがオンの時、ピンは代わりに *low* で駆動されます。
|
||||||
|
|
||||||
|
この機能は `BACKLIGHT_ON_STATE` 定義することでキーボードレベルで設定されます。
|
||||||
|
|
||||||
|
### 複数のバックライトピン
|
||||||
|
|
||||||
|
ほとんどのキーボードは、全てのバックライト LED を制御するたった1つのバックライトピンを持ちます (特にバックライトがハードウェア PWM ピンに接続されている場合)。
|
||||||
|
ソフトウェア PWM では、複数のバックライトピンを定義することができます。これらすべてのピンは PWM デューティサイクル時に同時にオンおよびオフになります。
|
||||||
|
この機能により、例えば Caps Lock LED (またはその他の制御可能な LED) の輝度を、バックライトの他の LED と同じレベルに設定することができます。Caps Lock の代わりに LCTRL をマップしていて、Caps Lock がオンの時に Caps Lock LED をアクティブにする代わりにバックライトの一部にする必要がある場合に便利です。
|
||||||
|
|
||||||
|
複数のバックライトピンをアクティブにするには、`config.h` に次のようなものを追加する必要があります:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define BACKLIGHT_LED_COUNT 2
|
||||||
|
#undef BACKLIGHT_PIN
|
||||||
|
#define BACKLIGHT_PINS { F5, B2 }
|
||||||
|
```
|
||||||
|
|
||||||
|
### ハードウェア PWM 実装
|
||||||
|
|
||||||
|
バックライト用にサポートされているピンを使う場合、QMK は PWM 信号を出力するように設定されたハードウェアタイマを使います。タイマーは 0 にリセットする前に `ICRx` (デフォルトでは `0xFFFF`) までカウントします。
|
||||||
|
希望の輝度が計算され、`OCRxx` レジスタ内に格納されます。カウンタがこの値まで達すると、バックライトピンは low になり、カウンタがリセットされると再び high になります。
|
||||||
|
このように `OCRxx` は基本的に LED のデューティサイクル、従って輝度を制御します。`0x0000` は完全にオフで、 `0xFFFF` は完全にオンです。
|
||||||
|
|
||||||
|
明滅動作の効果はカウンタがリセットされる(秒間あたりおよそ244回)たびに呼び出される `TIMER1_OVF_vect` の割り込みハンドラを登録することで可能になります。
|
||||||
|
このハンドラ内で、増分カウンタの値が事前に計算された輝度曲線にマップされます。明滅動作をオフにするには、割り込みを単純に禁止し、輝度を EEPROM に格納されているレベルに再設定します。
|
||||||
|
|
||||||
|
### タイマーにアシストされた PWM 実装
|
||||||
|
|
||||||
|
`BACKLIGHT_PIN` がハードウェアバックライトピンに設定されていない場合、QMK はソフトウェア割り込みを引き起こすように設定されているハードウェアタイマを使います。タイマーは 0 にリセットする前に `ICRx` (デフォルトでは `0xFFFF`) までカウントします。
|
||||||
|
0 に再設定すると、CPU は LED をオンにする OVF (オーバーフロー)割り込みを発火し、デューティサイクルを開始します。
|
||||||
|
希望の輝度が計算され、`OCRxx` レジスタ内に格納されます。カウンタがこの値に達すると、CPU は比較出力一致割り込みを発火し、LED をオフにします。
|
||||||
|
このように `OCRxx` は基本的に LED のデューティサイクル、従って輝度を制御します。 `0x0000` は完全にオフで、 `0xFFFF` は完全にオンです。
|
||||||
|
|
||||||
|
明滅の効果はハードウェア PWM 実装と同じです。
|
||||||
|
|
||||||
|
## ARM ドライバ
|
||||||
|
|
||||||
|
まだ初期段階ですが、ARM バックライトサポートは最終的に AVR と同等の機能を持つことを目指しています。ドライバはデフォルトで設定されますが、rules.mk 内の同等の設定は以下の通りです:
|
||||||
|
```makefile
|
||||||
|
BACKLIGHT_DRIVER = pwm
|
||||||
|
```
|
||||||
|
|
||||||
|
### 注意事項
|
||||||
|
|
||||||
|
現在のところ、ハードウェア PWM のみがサポートされ、タイマーはアシストされず、自動設定は提供されません。
|
||||||
|
|
||||||
|
?> STMF072 のバックライトサポートのテストは制限されています。人によって違うかもしれません。不明な場合は、rules.mk で `BACKLIGHT_ENABLE = no` を設定します。
|
||||||
|
|
||||||
|
### ARM 設定
|
||||||
|
|
||||||
|
バックライトの挙動を変更するには、`config.h` の中で以下の `#define` をします:
|
||||||
|
|
||||||
|
| 定義 | デフォルト | 説明 |
|
||||||
|
|------------------------|-------------|-------------------------------------------------------------------------------------------------------------|
|
||||||
|
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||||
|
| `BACKLIGHT_PWM_DRIVER` | `PWMD4` | 使用する PWM ドライバ。ピンから PWM タイマへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||||
|
| `BACKLIGHT_PWM_CHANNEL` | `3` | 使用する PWM チャンネル。ピンから PWM チャンネルへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||||
|
| `BACKLIGHT_PAL_MODE` | `2` | 使用するピンの代替機能。ピンの AF マッピングについては ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||||
|
|
||||||
|
## Software PWM Driver :id=software-pwm-driver
|
||||||
|
|
||||||
|
他のキーボードのタスクを実行中に PWM をエミュレートすることにより、追加のプラットフォーム設定なしで最大のハードウェア互換性を提供します。トレードオフは、キーボードが忙しい時にバックライトが揺れる可能性があることです。有効にするには、rules.mk に以下を追加します:
|
||||||
|
```makefile
|
||||||
|
BACKLIGHT_DRIVER = software
|
||||||
|
```
|
||||||
|
|
||||||
|
### ソフトウェア PWM 設定
|
||||||
|
|
||||||
|
バックライトの挙動を変更するには、`config.h` の中で以下の `#define` をします:
|
||||||
|
|
||||||
|
| 定義 | デフォルト | 説明 |
|
||||||
|
|-----------------|-------------|-------------------------------------------------------------------------------------------------------------|
|
||||||
|
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||||
|
| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください |
|
||||||
|
|
||||||
|
### 複数のバックライトピン
|
||||||
|
|
||||||
|
ほとんどのキーボードは、全てのバックライト LED を制御するたった1つのバックライトピンを持ちます (特にバックライトがハードウェア PWM ピンに接続されている場合)。
|
||||||
|
ソフトウェア PWM では、複数のバックライトピンを定義することができます。これらすべてのピンは PWM デューティサイクル時に同時にオンおよびオフになります。
|
||||||
|
この機能により、例えば Caps Lock LED (またはその他の制御可能な LED) の輝度を、バックライトの他の LED と同じレベルに設定することができます。Caps Lock の代わりに LCTRL をマップしていて、Caps Lock がオンの時に Caps Lock LED をアクティブにする代わりにバックライトの一部にする必要がある場合に便利です。
|
||||||
|
|
||||||
|
複数のバックライトピンをアクティブにするには、`config.h` に次のようなものを追加する必要があります:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#undef BACKLIGHT_PIN
|
||||||
|
#define BACKLIGHT_PINS { F5, B2 }
|
||||||
|
```
|
||||||
|
|
||||||
|
## カスタムドライバ
|
||||||
|
|
||||||
|
有効にするには、rules.mk に以下を追加します:
|
||||||
|
|
||||||
|
```makefile
|
||||||
|
BACKLIGHT_DRIVER = custom
|
||||||
|
```
|
||||||
|
|
||||||
|
カスタムドライバ API を実装する場合、提供されるキーボードフックは以下の通りです:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void backlight_init_ports(void) {
|
||||||
|
// オプション - 起動時に実行されます
|
||||||
|
// - 通常、ここでピンを設定します
|
||||||
|
}
|
||||||
|
void backlight_set(uint8_t level) {
|
||||||
|
// オプション - レベルの変更時に実行されます
|
||||||
|
// - 通常、ここで新しい値に応答します
|
||||||
|
}
|
||||||
|
|
||||||
|
void backlight_task(void) {
|
||||||
|
// オプション - 定期的に実行されます
|
||||||
|
// - ここで長時間実行されるアクションはパフォーマンスの問題を引き起こします
|
||||||
|
}
|
||||||
|
```
|
52
docs/ja/feature_bluetooth.md
Normal file
52
docs/ja/feature_bluetooth.md
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# Bluetooth
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 5d5ff80:docs/feature_bluetooth.md
|
||||||
|
git diff 5d5ff80 HEAD -- docs/feature_bluetooth.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
## Bluetooth の既知のサポートハードウェア
|
||||||
|
|
||||||
|
現在のところ Bluetooth のサポートは AVR ベースのチップに限られます。Bluetooth 2.1 については、QMK は RN-42 モジュールと、Bluefruit EZ-Key をサポートしますが、後者はもう生産されていません。より最近の BLE プロトコルについては、現在のところ Adafruit Bluefruit SPI Friend のみが直接サポートされています。iOS デバイスに接続するには、BLE が必要です。iOS はマウス入力をサポートしないことに注意してください。
|
||||||
|
|
||||||
|
| ボード | Bluetooth プロトコル | 接続タイプ | rules.mk | Bluetooth チップ |
|
||||||
|
|----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------|
|
||||||
|
| [Adafruit EZ-Key HID](https://www.adafruit.com/product/1535) | Bluetooth Classic | UART | `BLUETOOTH = AdafruitEZKey` | |
|
||||||
|
| Roving Networks RN-42 (Sparkfun Bluesmirf) | Bluetooth Classic | UART | `BLUETOOTH = RN42` | RN-42 |
|
||||||
|
| [Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633) | Bluetooth Low Energy | SPI | `BLUETOOTH = AdafruitBLE` | nRF51822 |
|
||||||
|
|
||||||
|
まだサポートされていませんが、可能性のあるもの:
|
||||||
|
* [Bluefruit LE UART Friend](https://www.adafruit.com/product/2479)。[tmk 実装がおそらく見つかります](https://github.com/tmk/tmk_keyboard/issues/514)
|
||||||
|
* RN-42 ファームウェアが書き込まれた HC-05 ボード。どちらも明らかに CSR BC417 チップを使っています。RN-42 ファームウェアを使って書き込むと、HID 機能が提供されます。
|
||||||
|
* Sparkfun Bluetooth Mate
|
||||||
|
* HM-13 ベースのボード
|
||||||
|
|
||||||
|
### Adafruit BLE SPI Friend
|
||||||
|
現在のところ QMK によってサポートされている唯一の bluetooth チップセットは、Adafruit Bluefruit SPI Friend です。Adafruit のカスタムファームウェアを実行する Nordic nRF5182 ベースのチップです。データは Hardware SPI を介した Adafruit の SDEP を使って転送されます。[Feather 32u4 Bluefruit LE](https://www.adafruit.com/product/2829) は Adafruit ファームウェアを搭載した Nordic BLE チップに SPI 経由で接続された AVR mcu であるため、サポートされます。SPI friend を使ってカスタムボードを構築する場合、32u4 feather が使用するピン選択を使うのが最も簡単ですが、以下の定義で config.h オプションでピンを変更することができます:
|
||||||
|
* #define AdafruitBleResetPin D4
|
||||||
|
* #define AdafruitBleCSPin B4
|
||||||
|
* #define AdafruitBleIRQPin E6
|
||||||
|
|
||||||
|
Bluefruit UART friend は SPI friend に変換することができますが、これにはMDBT40 チップへの直接の再書き込みとはんだ付けが[必要です](https://github.com/qmk/qmk_firmware/issues/2274)。
|
||||||
|
|
||||||
|
## Adafruit EZ-Key hid
|
||||||
|
これには[ハードウェアの変更](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts)が必要ですが、Makefile を使って有効にすることができます。ファームウェアは引き続き USB 経由で文字を出力するため、コンピュータ経由で充電する場合は注意してください。任意にオフにするために Bluefruit 上にスイッチを持つことは理にかなっています。
|
||||||
|
|
||||||
|
|
||||||
|
<!-- FIXME: Document bluetooth support more completely. -->
|
||||||
|
## Bluetooth の Rules.mk オプション
|
||||||
|
これらのうちの1つだけを使ってください
|
||||||
|
* BLUETOOTH_ENABLE = yes (レガシーオプション)
|
||||||
|
* BLUETOOTH = RN42
|
||||||
|
* BLUETOOTH = AdafruitEZKey
|
||||||
|
* BLUETOOTH = AdafruitBLE
|
||||||
|
|
||||||
|
## Bluetooth キーコード
|
||||||
|
|
||||||
|
これは複数のキーボードの出力が選択できる場合に使われます。現在のところ、これは USB と Bluetooth の両方をサポートするキーボードで、それらの間の切り替えのみが可能です。
|
||||||
|
|
||||||
|
| 名前 | 説明 |
|
||||||
|
|----------|----------------------------------------------|
|
||||||
|
| `OUT_AUTO` | USB と Bluetooth を自動的に切り替える |
|
||||||
|
| `OUT_USB` | USB のみ |
|
||||||
|
| `OUT_BT` | Bluetooth のみ |
|
171
docs/ja/feature_bootmagic.md
Normal file
171
docs/ja/feature_bootmagic.md
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
# ブートマジック
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 5d5ff80:docs/feature_bootmagic.md
|
||||||
|
git diff 5d5ff80 HEAD -- docs/feature_bootmagic.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
再書き込みせずにキーボードの挙動を変更することができる、3つの独立した関連する機能があります。それぞれは似たような機能を持ちますが、キーボードがどのように設定されているかによって異なる方法でアクセスされます。
|
||||||
|
|
||||||
|
**ブートマジック**は初期化の間にキーボードを設定するためのシステムです。ブートマジックコマンドを起動するには、ブートマジックキーと1つ以上のコマンドキーを押し続けます。
|
||||||
|
|
||||||
|
**ブートマジックキーコード** は前に `MAGIC_` が付いており、キーボードが初期化された*後で*ブートマジックの機能にアクセスすることができます。キーコードを使うには、他のキーコードと同じようにそれらをキーマップに割り当てます。
|
||||||
|
|
||||||
|
以前は**マジック**として知られていた**コマンド**は、キーボードの異なる側面を制御することができる別の機能です。ブートマジックと一部の機能を共有しますが、コンソールにバージョン情報を出力するような、ブートマジックにはできないこともできます。詳細は、[コマンド](ja/feature_command.md)を見てください。
|
||||||
|
|
||||||
|
一部のキーボードでは、ブートマジックはデフォルトで無効になっています。その場合、`rules.mk` 内で以下のように明示的に有効にする必要があります:
|
||||||
|
|
||||||
|
```make
|
||||||
|
BOOTMAGIC_ENABLE = full
|
||||||
|
```
|
||||||
|
|
||||||
|
?> `full` の代わりに `yes` が使われていることがあるかもしれませんが、これは問題ありません。ただし、`yes` は非推奨で、理想的には `full` (あるいは`lite`) が使われるべきです。
|
||||||
|
|
||||||
|
さらに、以下を `rules.mk` ファイルに追加することで、[ブートマジックライト](#bootmagic-lite) (スケールダウンした、とても基本的なバージョンのブートマジック)を使うことができます:
|
||||||
|
|
||||||
|
```make
|
||||||
|
BOOTMAGIC_ENABLE = lite
|
||||||
|
```
|
||||||
|
|
||||||
|
## ホットキー
|
||||||
|
|
||||||
|
キーボードを接続しながら、ブートマジックキー(デフォルトはスペース)と目的のホットキーを押します。例えば、スペースと `B` を押したままにすると、ブートローダに入ります。
|
||||||
|
|
||||||
|
| ホットキー | 説明 |
|
||||||
|
|------------------|---------------------------------------------|
|
||||||
|
| エスケープ | EEPROM のブートマジック設定を無視する |
|
||||||
|
| `B` | ブートローダに入る |
|
||||||
|
| `D` | シリアルを介するデバッグ出力の切り替え |
|
||||||
|
| `X` | キーマトリックスのデバッグ出力の切り替え |
|
||||||
|
| `K` | キーボードのデバッグの切り替え |
|
||||||
|
| `M` | マウスのデバッグの切り替え |
|
||||||
|
| `L` | EE_HANDS 左右設定に、"左手"を設定 |
|
||||||
|
| `R` | EE_HANDS 左右設定に、"右手"を設定 |
|
||||||
|
| Backspace | EEPROM をクリア |
|
||||||
|
| Caps Lock | Caps Lock を左コントロールとして扱うかを切り替え |
|
||||||
|
| 左 Control | Caps Lock と左コントロールの入れ替えを切り替え |
|
||||||
|
| 左 Alt | 左 Alt と左 GUI の入れ替えを切り替え |
|
||||||
|
| 右 Alt | 右 Alt と右 GUI の入れ替えを切り替え |
|
||||||
|
| 左 GUI | GUI キーの有効・無効を切り替え (ゲームの時に便利です) |
|
||||||
|
| <code>`</code> | <code>`</code> とエスケープの入れ替えを切り替え |
|
||||||
|
| `\` | `\` とバックスペースの入れ替えを切り替え |
|
||||||
|
| `N` | N キーロールオーバー (NKRO) の有効・無効を切り替え |
|
||||||
|
| `0` | レイヤー 0 をデフォルトレイヤーにする |
|
||||||
|
| `1` | レイヤー 1 をデフォルトレイヤーにする |
|
||||||
|
| `2` | レイヤー 2 をデフォルトレイヤーにする |
|
||||||
|
| `3` | レイヤー 3 をデフォルトレイヤーにする |
|
||||||
|
| `4` | レイヤー 4 をデフォルトレイヤーにする |
|
||||||
|
| `5` | レイヤー 5 をデフォルトレイヤーにする |
|
||||||
|
| `6` | レイヤー 6 をデフォルトレイヤーにする |
|
||||||
|
| `7` | レイヤー 7 をデフォルトレイヤーにする |
|
||||||
|
|
||||||
|
## キーコード :id=keycodes
|
||||||
|
|
||||||
|
| キー | エイリアス | 説明 |
|
||||||
|
|----------------------------------|---------|--------------------------------------------------------------------------|
|
||||||
|
| `MAGIC_SWAP_CONTROL_CAPSLOCK` | `CL_SWAP` | Caps Lock と左コントロールの入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_CONTROL_CAPSLOCK` | `CL_NORM` | Caps Lock と左コントロールの入れ替えの解除 |
|
||||||
|
| `MAGIC_CAPSLOCK_TO_CONTROL` | `CL_CTRL` | Caps Lock をコントロールとして扱う |
|
||||||
|
| `MAGIC_UNCAPSLOCK_TO_CONTROL` | `CL_CAPS` | Caps Lock をコントロールとして扱うことを止める |
|
||||||
|
| `MAGIC_SWAP_LCTL_LGUI` | `LCG_SWP` | 左コントロールと GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_LCTL_LGUI` | `LCG_NRM` | 左コントロールと GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_SWAP_RCTL_RGUI` | `RCG_SWP` | 右コントロールと GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_RCTL_RGUI` | `RCG_NRM` | 右コントロールと GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_SWAP_CTL_GUI` | `CG_SWAP` | 両側のコントロールと GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_CTL_GUI` | `CG_NORM` | 両側のコントロールと GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_TOGGLE_CTL_GUI` | `CG_TOGG` | 両側のコントロールと GUI の入れ替えの切り替え |
|
||||||
|
| `MAGIC_SWAP_LALT_LGUI` | `LAG_SWP` | 左 Alt と GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_LALT_LGUI` | `LAG_NRM` | 左 Alt と GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_SWAP_RALT_RGUI` | `RAG_SWP` | 右 Alt と GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_RALT_RGUI` | `RAG_NRM` | 右 Alt と GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_SWAP_ALT_GUI` | `AG_SWAP` | 両側の Alt と GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_ALT_GUI` | `AG_NORM` | 両側の Alt と GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_TOGGLE_ALT_GUI` | `AG_TOGG` | 両側の Alt と GUI の入れ替えの切り替え |
|
||||||
|
| `MAGIC_NO_GUI` | `GUI_OFF` | GUI キーを無効にする |
|
||||||
|
| `MAGIC_UNNO_GUI` | `GUI_ON` | GUI キーを有効にする |
|
||||||
|
| `MAGIC_SWAP_GRAVE_ESC` | `GE_SWAP` | <code>`</code> とエスケープの入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_GRAVE_ESC` | `GE_NORM` | <code>`</code> とエスケープの入れ替えを解除 |
|
||||||
|
| `MAGIC_SWAP_BACKSLASH_BACKSPACE` | `BS_SWAP` | `\` とバックスペースを入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_BACKSLASH_BACKSPACE` | `BS_NORM` | `\` とバックスペースの入れ替えを解除する |
|
||||||
|
| `MAGIC_HOST_NKRO` | `NK_ON` | N キーロールオーバーを有効にする |
|
||||||
|
| `MAGIC_UNHOST_NKRO` | `NK_OFF` | N キーロールオーバーを無効にする |
|
||||||
|
| `MAGIC_TOGGLE_NKRO` | `NK_TOGG` | N キーロールオーバーの有効・無効を切り替え |
|
||||||
|
| `MAGIC_EE_HANDS_LEFT` | `EH_LEFT` | 分割キーボードのマスター側を左手に設定(`EE_HANDS` 用) |
|
||||||
|
| `MAGIC_EE_HANDS_RIGHT` | `EH_RGHT` | 分割キーボードのマスター側を右手に設定(`EE_HANDS` 用) |
|
||||||
|
|
||||||
|
## 設定
|
||||||
|
|
||||||
|
ブートマジックのためのホットキーの割り当てを変更したい場合は、キーボードあるいはキーマップレベルのどちらかで、`config.h` にこれらを `#define` します。
|
||||||
|
|
||||||
|
| 定義 | デフォルト | 説明 |
|
||||||
|
|----------------------------------------|-------------|---------------------------------------------------|
|
||||||
|
| `BOOTMAGIC_KEY_SALT` | `KC_SPACE` | ブートマジックキー |
|
||||||
|
| `BOOTMAGIC_KEY_SKIP` | `KC_ESC` | EEPROM のブートマジック設定を無視する |
|
||||||
|
| `BOOTMAGIC_KEY_EEPROM_CLEAR` | `KC_BSPACE` | EEPROM 設定をクリアする |
|
||||||
|
| `BOOTMAGIC_KEY_BOOTLOADER` | `KC_B` | ブートローダに入る |
|
||||||
|
| `BOOTMAGIC_KEY_DEBUG_ENABLE` | `KC_D` | シリアルを介するデバッグ出力の切り替え |
|
||||||
|
| `BOOTMAGIC_KEY_DEBUG_MATRIX` | `KC_X` | マトリックスのデバッグを切り替え |
|
||||||
|
| `BOOTMAGIC_KEY_DEBUG_KEYBOARD` | `KC_K` | キーボードのデバッグの切り替え |
|
||||||
|
| `BOOTMAGIC_KEY_DEBUG_MOUSE` | `KC_M` | マウスのデバッグの切り替え |
|
||||||
|
| `BOOTMAGIC_KEY_EE_HANDS_LEFT` | `KC_L` | EE_HANDS 左右設定に、"左手"を設定 |
|
||||||
|
| `BOOTMAGIC_KEY_EE_HANDS_RIGHT` | `KC_R` | EE_HANDS 左右設定に、"右手"を設定 |
|
||||||
|
| `BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK` | `KC_LCTRL` | 左コントロールと Caps Lock の入れ替え |
|
||||||
|
| `BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL` | `KC_CAPSLOCK` | Caps Lock を左コントロールとして扱うかを切り替え |
|
||||||
|
| `BOOTMAGIC_KEY_SWAP_LALT_LGUI` | `KC_LALT` | 左 Alt と左 GUI の入れ替えを切り替え (macOS 用) |
|
||||||
|
| `BOOTMAGIC_KEY_SWAP_RALT_RGUI` | `KC_RALT` | 右 Alt と右 GUI の入れ替えを切り替え (macOS 用) |
|
||||||
|
| `BOOTMAGIC_KEY_NO_GUI` | `KC_LGUI` | GUI キーの有効・無効を切り替え (ゲームの時に便利です) |
|
||||||
|
| `BOOTMAGIC_KEY_SWAP_GRAVE_ESC` | `KC_GRAVE` | <code>`</code> とエスケープの入れ替えを切り替え |
|
||||||
|
| `BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE` | `KC_BSLASH` | `\` とバックスペースの入れ替えを切り替え |
|
||||||
|
| `BOOTMAGIC_HOST_NKRO` | `KC_N` | N キーロールオーバー (NKRO) の有効・無効を切り替え |
|
||||||
|
| `BOOTMAGIC_KEY_DEFAULT_LAYER_0` | `KC_0` | レイヤー 0 をデフォルトレイヤーにする |
|
||||||
|
| `BOOTMAGIC_KEY_DEFAULT_LAYER_1` | `KC_1` | レイヤー 1 をデフォルトレイヤーにする |
|
||||||
|
| `BOOTMAGIC_KEY_DEFAULT_LAYER_2` | `KC_2` | レイヤー 2 をデフォルトレイヤーにする |
|
||||||
|
| `BOOTMAGIC_KEY_DEFAULT_LAYER_3` | `KC_3` | レイヤー 3 をデフォルトレイヤーにする |
|
||||||
|
| `BOOTMAGIC_KEY_DEFAULT_LAYER_4` | `KC_4` | レイヤー 4 をデフォルトレイヤーにする |
|
||||||
|
| `BOOTMAGIC_KEY_DEFAULT_LAYER_5` | `KC_5` | レイヤー 5 をデフォルトレイヤーにする |
|
||||||
|
| `BOOTMAGIC_KEY_DEFAULT_LAYER_6` | `KC_6` | レイヤー 6 をデフォルトレイヤーにする |
|
||||||
|
| `BOOTMAGIC_KEY_DEFAULT_LAYER_7` | `KC_7` | レイヤー 7 をデフォルトレイヤーにする |
|
||||||
|
|
||||||
|
# ブートマジックライト :id=bootmagic-lite
|
||||||
|
|
||||||
|
本格的なブートマジック機能の他に、ブートローダへのジャンプのみを処理するブートマジックライトがあります。これは、物理的なリセットボタンが無くブートローダにジャンプする方法が必要だが、ブートマジックが引き起こす問題を扱いたくないキーボードに適しています。
|
||||||
|
|
||||||
|
ブートマジックのこのバージョンを有効にするには、以下を使って `rules.mk` で有効にする必要があります:
|
||||||
|
|
||||||
|
```make
|
||||||
|
BOOTMAGIC_ENABLE = lite
|
||||||
|
```
|
||||||
|
|
||||||
|
さらに、どのキーを使うかを指定したほうが良いかもしれません。これは普通ではないマトリックスを持つキーボードで特に便利です。そのためには、使いたいキーの行と列を指定する必要があります。`config.h` ファイルにこれらのエントリを追加します:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define BOOTMAGIC_LITE_ROW 0
|
||||||
|
#define BOOTMAGIC_LITE_COLUMN 1
|
||||||
|
```
|
||||||
|
|
||||||
|
デフォルトでは、これらは 0 と 0 に設定されます。これは通常はほとんどのキーボードで "ESC" キーです。
|
||||||
|
|
||||||
|
ブートローダを起動するには、キーボードを接続する時にこのキーを押し続けます。たった1つのキーです。
|
||||||
|
|
||||||
|
!> ブートマジックライトを使用すると、EEPROM を**常にリセットします**。つまり保存された全ての設定は失われます。
|
||||||
|
|
||||||
|
## 高度なブートマジックライト
|
||||||
|
|
||||||
|
`bootmagic_lite` 関数は必要に応じてコード内で置き換えることができるように、弱く定義されています。これの良い例は Zeal60 キーボードで、追加の処理が必要です。
|
||||||
|
|
||||||
|
関数を置き換えるには、以下のようなものをコードに追加するだけです:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void bootmagic_lite(void) {
|
||||||
|
matrix_scan();
|
||||||
|
wait_ms(DEBOUNCE * 2);
|
||||||
|
matrix_scan();
|
||||||
|
|
||||||
|
if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) {
|
||||||
|
// ブートローダにジャンプする。
|
||||||
|
bootloader_jump();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
追加の機能をここに追加することができます。例えば、eeprom のリセットやブートマジックを起動するために押す必要がある追加のキーです。`bootmagic_lite` はファームウェア内で大部分の機能が初期化される前に呼ばれることに注意してください。
|
108
docs/ja/feature_combo.md
Normal file
108
docs/ja/feature_combo.md
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
# コンボ
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 0.8.94:docs/feature_combo.md
|
||||||
|
git diff 0.8.94 HEAD -- docs/feature_combo.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
コンボ機能は、同時押し方式でのカスタムアクション追加機能です。同時に複数のキーを押して、異なる効果を生み出すことができます。例えば、タッピング時間内で `A` と `S` を押すと、代わりに `ESC` が押されます。もっと複雑なタスクを実行させることもできます。
|
||||||
|
|
||||||
|
この機能を有効にするには、`rules.mk` に `COMBO_ENABLE = yes` を追加する必要があります。
|
||||||
|
|
||||||
|
さらに、使用するコンボの数を `config.h` の中で、`#define COMBO_COUNT 1` (1を使用するコンボの数で置き換えます)と書いて、指定する必要があります。
|
||||||
|
<!-- At this time, this is necessary -->
|
||||||
|
|
||||||
|
また、デフォルトでは、コンボのタッピング時間は `TAPPING_TERM` と同じ値に設定されます (ほとんどのキーボードではデフォルトで 200)。ただし、`config.h` で定義することにより異なる値を指定することができます。例えば: `#define COMBO_TERM 300` はコンボのためのタイムアウト時間を 300ms に設定します。
|
||||||
|
|
||||||
|
次に、`keymap.c` ファイルに、`COMBO_END` で終了するキーのシーケンス、およびキーの組み合わせを列挙する構造体、その結果のアクションを定義する必要があります。
|
||||||
|
|
||||||
|
```c
|
||||||
|
const uint16_t PROGMEM test_combo[] = {KC_A, KC_B, COMBO_END};
|
||||||
|
combo_t key_combos[COMBO_COUNT] = {COMBO(test_combo, KC_ESC)};
|
||||||
|
```
|
||||||
|
|
||||||
|
これは、A と B のキーを押した場合に、"Escape" を送信します。
|
||||||
|
|
||||||
|
!> このメソッドは[基本的なキーコード](ja/keycodes_basic.md)のみをサポートします。詳細な制御については例を見てください。
|
||||||
|
|
||||||
|
## 例
|
||||||
|
|
||||||
|
リストを追加したい場合は、以下のようなものを使います:
|
||||||
|
|
||||||
|
```c
|
||||||
|
enum combos {
|
||||||
|
AB_ESC,
|
||||||
|
JK_TAB
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END};
|
||||||
|
const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
|
||||||
|
|
||||||
|
combo_t key_combos[COMBO_COUNT] = {
|
||||||
|
[AB_ESC] = COMBO(ab_combo, KC_ESC),
|
||||||
|
[JK_TAB] = COMBO(jk_combo, KC_TAB)
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
より複雑な実装として、カスタム処理を追加するために `process_combo_event` 関数を使うことができます。
|
||||||
|
|
||||||
|
```c
|
||||||
|
enum combo_events {
|
||||||
|
ZC_COPY,
|
||||||
|
XV_PASTE
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END};
|
||||||
|
const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END};
|
||||||
|
|
||||||
|
combo_t key_combos[COMBO_COUNT] = {
|
||||||
|
[ZC_COPY] = COMBO_ACTION(copy_combo),
|
||||||
|
[XV_PASTE] = COMBO_ACTION(paste_combo),
|
||||||
|
};
|
||||||
|
|
||||||
|
void process_combo_event(uint8_t combo_index, bool pressed) {
|
||||||
|
switch(combo_index) {
|
||||||
|
case ZC_COPY:
|
||||||
|
if (pressed) {
|
||||||
|
tap_code16(LCTL(KC_C));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case XV_PASTE:
|
||||||
|
if (pressed) {
|
||||||
|
tap_code16(LCTL(KC_V));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
これは、Z と C を押すと Ctrl+C を送信し、X と V を押すと Ctrl+V を送信します。これを変更して、レイヤーの変更、サウンドの再生、設定の変更などを行うこともできます。
|
||||||
|
|
||||||
|
## 追加の設定
|
||||||
|
|
||||||
|
長いコンボあるいはさらに長いコンボを使っている場合、構造体があなたのしていることに対応するのに十分な大きさで無いかもしれないため、問題が発生するかもしれません。
|
||||||
|
|
||||||
|
この場合、`config.h` ファイルに `#define EXTRA_LONG_COMBOS` または `#define EXTRA_EXTRA_LONG_COMBOS` のどちらかを追加することができます。
|
||||||
|
|
||||||
|
`COMBO_ALLOW_ACTION_KEYS` を定義することでアクションキーを有効にすることもできます。
|
||||||
|
|
||||||
|
## キーコード
|
||||||
|
|
||||||
|
その場でコンボ機能を有効、無効および切り替えすることができます。ゲームなどで、一時的にそれらを無効にする必要がある場合に便利です。
|
||||||
|
|
||||||
|
| キーコード | 説明 |
|
||||||
|
|----------|---------------------------------|
|
||||||
|
| `CMB_ON` | コンボ機能をオンにします |
|
||||||
|
| `CMB_OFF` | コンボ機能をオフにします |
|
||||||
|
| `CMB_TOG` | コンボ機能のオンとオフを切り替えます |
|
||||||
|
|
||||||
|
## ユーザコールバック
|
||||||
|
|
||||||
|
キーコードに加えて、状態を設定または状態をチェックするために使うことができる幾つかの関数があります:
|
||||||
|
|
||||||
|
| 関数 | 説明 |
|
||||||
|
|-----------|--------------------------------------------------------------------|
|
||||||
|
| `combo_enable()` | コンボ機能を有効にします |
|
||||||
|
| `combo_disable()` | コンボ機能を無効にし、コンボバッファをクリアします |
|
||||||
|
| `combo_toggle()` | コンボ機能の状態を切り替えます |
|
||||||
|
| `is_combo_enabled()` | コンボ機能の状態(true か false)を返します |
|
56
docs/ja/feature_command.md
Normal file
56
docs/ja/feature_command.md
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
# コマンド
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 0.8.94:docs/feature_command.md
|
||||||
|
git diff 0.8.94 HEAD -- docs/feature_command.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
コマンド(旧称:マジック)は、ファームウェアを書き込んだり、[ブートマジック](ja/feature_bootmagic.md)を使うためにプラグを抜いたりすることなくキーボードの挙動を変更する方法です。この機能と[ブートマジックキーコード](feature_bootmagic.md#keycodes)には多くの重複があります。可能な限り、コマンドでは無くブートマジックキーコードの機能を使うことをお勧めします。
|
||||||
|
|
||||||
|
一部のキーボードではコマンドがデフォルトで無効になっています。その場合、`rules.mk` 内で明示的に有効にする必要があります:
|
||||||
|
|
||||||
|
```make
|
||||||
|
COMMAND_ENABLE = yes
|
||||||
|
```
|
||||||
|
|
||||||
|
## 使用法
|
||||||
|
|
||||||
|
コマンドを使うには、`IS_COMMAND()` マクロで定義されたキーの組み合わせを押し続けます。デフォルトでは、これは「左Shift + 右Shift」です。次に、目的のコマンドに対応するキーを押します。例えば、現在の QMK バージョンを QMK Toolbox コンソールに出力するには、「左Shift + 右Shift + `V`」を押します。
|
||||||
|
|
||||||
|
## 設定
|
||||||
|
|
||||||
|
コマンドのためのキーの割り当てを変更したい場合は、キーボードあるいはキーマップレベルのどちらかで、`config.h` にこれらを `#define` します。ここで割り当てる全てのキーコードは `KC_` 接頭辞を省略する必要があります。
|
||||||
|
|
||||||
|
| 定義 | デフォルト | 説明 |
|
||||||
|
|------------------------------------|--------------------------------|------------------------------------------------|
|
||||||
|
| `IS_COMMAND()` | `(get_mods() == MOD_MASK_SHIFT)` | コマンドをアクティブにするキーの組み合わせ |
|
||||||
|
| `MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` | `true` | ファンクション行を使ってデフォルトレイヤーを設定 |
|
||||||
|
| `MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` | `true` | 数字キーでデフォルトレイヤーを設定 |
|
||||||
|
| `MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM` | `false` | `MAGIC_KEY_LAYER0..9` を使ってデフォルトレイヤーを設定 |
|
||||||
|
| `MAGIC_KEY_DEBUG` | `D` | シリアルを介するデバッグの切り替え |
|
||||||
|
| `MAGIC_KEY_DEBUG_MATRIX` | `X` | キーマトリックスのデバッグの切り替え |
|
||||||
|
| `MAGIC_KEY_DEBUG_KBD` | `K` | キーボードのデバッグの切り替え |
|
||||||
|
| `MAGIC_KEY_DEBUG_MOUSE` | `M` | マウスのデバッグの切り替え |
|
||||||
|
| `MAGIC_KEY_CONSOLE` | `C` | コマンドコンソールを有効にする |
|
||||||
|
| `MAGIC_KEY_VERSION` | `V` | コンソールに実行中の QMK バージョンを出力 |
|
||||||
|
| `MAGIC_KEY_STATUS` | `S` | コンソールに現在のキーボードの状態を出力 |
|
||||||
|
| `MAGIC_KEY_HELP` | `H` | コンソールにコマンドのヘルプを出力 |
|
||||||
|
| `MAGIC_KEY_HELP_ALT` | `SLASH` | コンソールにコマンドのヘルプを出力 (代替) |
|
||||||
|
| `MAGIC_KEY_LAYER0` | `0` | レイヤー 0 をデフォルトレイヤーにする |
|
||||||
|
| `MAGIC_KEY_LAYER0_ALT` | `GRAVE` | レイヤー 0 をデフォルトレイヤーにする (代替) |
|
||||||
|
| `MAGIC_KEY_LAYER1` | `1` | レイヤー 1 をデフォルトレイヤーにする |
|
||||||
|
| `MAGIC_KEY_LAYER2` | `2` | レイヤー 2 をデフォルトレイヤーにする |
|
||||||
|
| `MAGIC_KEY_LAYER3` | `3` | レイヤー 3 をデフォルトレイヤーにする |
|
||||||
|
| `MAGIC_KEY_LAYER4` | `4` | レイヤー 4 をデフォルトレイヤーにする |
|
||||||
|
| `MAGIC_KEY_LAYER5` | `5` | レイヤー 5 をデフォルトレイヤーにする |
|
||||||
|
| `MAGIC_KEY_LAYER6` | `6` | レイヤー 6 をデフォルトレイヤーにする |
|
||||||
|
| `MAGIC_KEY_LAYER7` | `7` | レイヤー 7 をデフォルトレイヤーにする |
|
||||||
|
| `MAGIC_KEY_LAYER8` | `8` | レイヤー 8 をデフォルトレイヤーにする |
|
||||||
|
| `MAGIC_KEY_LAYER9` | `9` | レイヤー 9 をデフォルトレイヤーにする |
|
||||||
|
| `MAGIC_KEY_BOOTLOADER` | `B` | ブートローダにジャンプする |
|
||||||
|
| `MAGIC_KEY_BOOTLOADER_ALT` | `ESC` | ブートローダにジャンプする (代替) |
|
||||||
|
| `MAGIC_KEY_LOCK` | `CAPS` | 何も入力できないようにキーボードをロック |
|
||||||
|
| `MAGIC_KEY_EEPROM` | `E` | 保存された EEPROM 設定をコンソールに出力 |
|
||||||
|
| `MAGIC_KEY_EEPROM_CLEAR` | `BSPACE` | EEPROM をクリア |
|
||||||
|
| `MAGIC_KEY_NKRO` | `N` | N キーロールオーバー (NKRO) の有効・無効を切り替え |
|
||||||
|
| `MAGIC_KEY_SLEEP_LED` | `Z` | コンピュータがスリープの時に LED を切り替え |
|
95
docs/ja/feature_dip_switch.md
Normal file
95
docs/ja/feature_dip_switch.md
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
# DIP スイッチ
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 0.8.94:docs/feature_dip_switch.md
|
||||||
|
git diff 0.8.94 HEAD -- docs/feature_dip_switch.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
DIP スイッチは、以下を `rules.mk` に追加することでサポートされます:
|
||||||
|
|
||||||
|
DIP_SWITCH_ENABLE = yes
|
||||||
|
|
||||||
|
さらに、以下を `config.h` に追加します:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define DIP_SWITCH_PINS { B14, A15, A10, B9 }
|
||||||
|
```
|
||||||
|
|
||||||
|
## コールバック
|
||||||
|
|
||||||
|
コールバック関数を `<keyboard>.c` に記述することができます:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void dip_switch_update_kb(uint8_t index, bool active) {
|
||||||
|
dip_switch_update_user(index, active);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
あるいは `keymap.c` に記述することもできます:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void dip_switch_update_user(uint8_t index, bool active) {
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
if(active) { audio_on(); } else { audio_off(); }
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if(active) { clicky_on(); } else { clicky_off(); }
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if(active) { music_on(); } else { music_off(); }
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
if (active) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(plover_song);
|
||||||
|
#endif
|
||||||
|
layer_on(_PLOVER);
|
||||||
|
} else {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(plover_gb_song);
|
||||||
|
#endif
|
||||||
|
layer_off(_PLOVER);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
更に、より複雑な処理ができるビットマスク関数をサポートします。
|
||||||
|
|
||||||
|
|
||||||
|
```c
|
||||||
|
void dip_switch_update_mask_kb(uint32_t state) {
|
||||||
|
dip_switch_update_mask_user(state);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
あるいは `keymap.c` に記述することもできます:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void dip_switch_update_mask_user(uint32_t state) {
|
||||||
|
if (state & (1UL<<0) && state & (1UL<<1)) {
|
||||||
|
layer_on(_ADJUST); // C on esc
|
||||||
|
} else {
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
if (state & (1UL<<0)) {
|
||||||
|
layer_on(_TEST_A); // A on ESC
|
||||||
|
} else {
|
||||||
|
layer_off(_TEST_A);
|
||||||
|
}
|
||||||
|
if (state & (1UL<<1)) {
|
||||||
|
layer_on(_TEST_B); // B on esc
|
||||||
|
} else {
|
||||||
|
layer_off(_TEST_B);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## ハードウェア
|
||||||
|
|
||||||
|
DIP スイッチの片側は MCU のピンへ直接配線し、もう一方の側はグラウンドに配線する必要があります。機能的に同じであるため、どちら側がどちらに接続されているかは問題にはならないはずです。
|
71
docs/ja/feature_dynamic_macros.md
Normal file
71
docs/ja/feature_dynamic_macros.md
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
# 動的マクロ: ランタイムでのマクロの記録および再生
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 0.8.123:docs/feature_dynamic_macros.md
|
||||||
|
git diff 0.8.123 HEAD -- docs/feature_dynamic_macros.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
QMK はその場で作られた一時的なマクロをサポートします。これらを動的マクロと呼びます。それらはユーザがキーボードから定義し、キーボードのプラグを抜くか再起動すると失われます。
|
||||||
|
|
||||||
|
1つまたは2つのマクロに合計128のキー押下を保存できます。RAM をより多く使用してサイズを増やすことができます。
|
||||||
|
|
||||||
|
有効にするには、最初に `rules.mk` に `DYNAMIC_MACRO_ENABLE = yes` を記述します。そして、以下のキーをキーマップに追加します:
|
||||||
|
|
||||||
|
| キー | Alias | 説明 |
|
||||||
|
|------------------|----------|---------------------------------------------------|
|
||||||
|
| `DYN_REC_START1` | `DM_REC1` | マクロ 1 の記録を開始します |
|
||||||
|
| `DYN_REC_START2` | `DM_REC2` | マクロ 2 の記録を開始します |
|
||||||
|
| `DYN_MACRO_PLAY1` | `DM_PLY1` | マクロ 1 を再生します |
|
||||||
|
| `DYN_MACRO_PLAY2` | `DM_PLY2` | マクロ 2 を再生します |
|
||||||
|
| `DYN_REC_STOP` | `DM_RSTP` | 現在記録中のマクロの記録を終了します。 |
|
||||||
|
|
||||||
|
これが必要な全てです。
|
||||||
|
|
||||||
|
マクロの記録を開始するには、`DYN_REC_START1` または `DYN_REC_START2` のどちらかを押します。
|
||||||
|
|
||||||
|
記録を終了するには、`DYN_REC_STOP` レイヤーボタンを押します。
|
||||||
|
|
||||||
|
マクロを再生するには、`DYN_MACRO_PLAY1` あるいは `DYN_MACRO_PLAY2` のどちらかを押します。
|
||||||
|
|
||||||
|
マクロの一部としてマクロを再生することができます。マクロ 1 を記録中にマクロ 2 を再生、またはその逆も問題ありません。ただし、再帰的なマクロ、つまりマクロ 1 を再生するマクロ 1 は作成しないでください。もしそうしてキーボードが反応しなくなった場合は、キーボードを取り外し再び接続します。これを完全に無効にするには、`config.h` ファイルで `DYNAMIC_MACRO_NO_NESTING` を定義します。
|
||||||
|
|
||||||
|
?> 動的マクロの内部の詳細については、`process_dynamic_macro.h` および `process_dynamic_macro.c` ファイルのコメントを読んでください。
|
||||||
|
|
||||||
|
## カスタマイズ
|
||||||
|
|
||||||
|
ある程度のカスタマイズを可能にするオプションがいくつか追加されています。
|
||||||
|
|
||||||
|
| 定義 | デフォルト | 説明 |
|
||||||
|
|----------------------------|----------------|-----------------------------------------------------------------------------------------------------------------|
|
||||||
|
| `DYNAMIC_MACRO_SIZE` | 128 | 動的マクロが使用できるメモリ量を設定します。これは限られたリソースであり、コントローラに依存します。 |
|
||||||
|
| `DYNAMIC_MACRO_USER_CALL` | *定義なし* | これを定義すると、ユーザの `keymap.c` ファイルを使ってマクロが起動されます。 |
|
||||||
|
| `DYNAMIC_MACRO_NO_NESTING` | *定義なし* | これを定義すると、別のマクロからマクロを呼び出す(入れ子になったマクロ)機能を無効にします。 |
|
||||||
|
|
||||||
|
|
||||||
|
記録中にキーを押すたびに LED が点滅し始めた場合は、マクロバッファにマクロを入れるスペースがもう無いことを意味します。マクロを入れるには、他のマクロ(それらは同じバッファを共有します)を短くするか、`config.h` に `DYNAMIC_MACRO_SIZE` 定義を追加することでバッファを増やします(デフォルト値: 128; ヘッダ内のコメントを読んでください)。
|
||||||
|
|
||||||
|
|
||||||
|
### DYNAMIC_MACRO_USER_CALL
|
||||||
|
|
||||||
|
以前のバージョンの動的マクロをお使いの方へ: 専用の `DYN_REC_STOP` キーを使わずに動的マクロキーへのアクセスに使われるレイヤーモディファイアのみを使って、マクロの記録を終了することもまだ可能です。この動作に戻したい場合は、`#define DYNAMIC_MACRO_USER_CALL` を `config.h` に追加し、以下のスニペットを `process_record_user()` 関数の先頭に記述します:
|
||||||
|
|
||||||
|
```c
|
||||||
|
uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode);
|
||||||
|
|
||||||
|
if (!process_record_dynamic_macro(macro_kc, record)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### ユーザフック
|
||||||
|
|
||||||
|
カスタム機能とフィードバックオプションを動的マクロ機能に追加するために使うことができるフックが幾つかあります。これによりある程度のカスタマイズが可能になります。
|
||||||
|
|
||||||
|
direction がどのマクロであるかを示すことに注意してください。`1` がマクロ 1、`-1` がマクロ 2、0 がマクロ無しです。
|
||||||
|
|
||||||
|
* `dynamic_macro_record_start_user(void)` - マクロの記録を開始する時に起動されます。
|
||||||
|
* `dynamic_macro_play_user(int8_t direction)` - マクロを再生する時に起動されます。
|
||||||
|
* `dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record)` - マクロの記録中に各キー押下で起動されます。
|
||||||
|
* `dynamic_macro_record_end_user(int8_t direction)` - マクロの記録を停止した時に起動されます。
|
||||||
|
|
||||||
|
さらに、動的マクロ機能が有効な場合にバックライトを点滅させるために `dynamic_macro_led_blink()` を呼び出すことができます。
|
81
docs/ja/feature_encoders.md
Normal file
81
docs/ja/feature_encoders.md
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
# エンコーダ
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 0.8.123:docs/feature_encoders.md
|
||||||
|
git diff 0.8.123 HEAD -- docs/feature_encoders.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
以下を `rules.mk` に追加することで基本的なエンコーダがサポートされます:
|
||||||
|
|
||||||
|
```make
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
|
```
|
||||||
|
|
||||||
|
さらに、以下を `config.h` に追加します:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define ENCODERS_PAD_A { B12 }
|
||||||
|
#define ENCODERS_PAD_B { B13 }
|
||||||
|
```
|
||||||
|
|
||||||
|
各 PAD_A/B 変数は配列を定義するため、複数のエンコーダを定義することができます。例えば:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define ENCODERS_PAD_A { encoder1a, encoder2a }
|
||||||
|
#define ENCODERS_PAD_B { encoder1b, encoder2b }
|
||||||
|
```
|
||||||
|
|
||||||
|
エンコーダの時計回りの方向が間違っている場合は、A と B のパッド定義を交換することができます。define を使って逆にすることもできます:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define ENCODER_DIRECTION_FLIP
|
||||||
|
```
|
||||||
|
|
||||||
|
さらに、解像度を同じファイルで指定することができます (デフォルトかつお勧めは4):
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define ENCODER_RESOLUTION 4
|
||||||
|
```
|
||||||
|
|
||||||
|
## 分割キーボード
|
||||||
|
|
||||||
|
分割キーボードのそれぞれの側のエンコーダに異なるピン配列を使っている場合、右側のピン配列を以下のように定義することができます:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
|
||||||
|
#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
|
||||||
|
```
|
||||||
|
|
||||||
|
## コールバック
|
||||||
|
|
||||||
|
コールバック関数を `<keyboard>.c` に記述することができます:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void encoder_update_kb(uint8_t index, bool clockwise) {
|
||||||
|
encoder_update_user(index, clockwise);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
あるいは `keymap.c` に記述することもできます:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) { /* First encoder */
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_PGDN);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_PGUP);
|
||||||
|
}
|
||||||
|
} else if (index == 1) { /* Second encoder */
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_DOWN);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_UP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## ハードウェア
|
||||||
|
|
||||||
|
エンコーダの A と B の線は MCU に直接配線し、C/common 線はグランドに配線する必要があります。
|
37
docs/ja/feature_grave_esc.md
Normal file
37
docs/ja/feature_grave_esc.md
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# グレイブエスケープ
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 0.8.123:docs/feature_grave_esc.md
|
||||||
|
git diff 0.8.123 HEAD -- docs/feature_grave_esc.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
60% キーボード、またはファンクションキー行の無い他のレイアウトを使っている場合、専用の Escape キーが無いことに気付くでしょう。グレイブエスケープは grave キー (<code>`</code> および `~`) を Escape と共有することができる機能です。
|
||||||
|
|
||||||
|
## 使用法
|
||||||
|
|
||||||
|
キーマップ内の `KC_GRAVE` キー (通常は`1` キーの左)を `KC_GESC` に置き換えます。ほとんどの場合、このキーは押された時に `KC_ESC` を出力します。ただし、Shift あるいは GUI を押したままにすると、代わりに `KC_GRV` を出力します。
|
||||||
|
|
||||||
|
## OS に見えるもの
|
||||||
|
|
||||||
|
メアリーがキーボードで GESC を押すと、OS には KC_ESC 文字が見えます。メアリーが Shift を押しながら GESC を押すと、`~` または Shift された時はバッククォートを出力します。彼女が GUI/CMD/WIN を押したままにすると、1つの <code>`</code> 文字を出力します。
|
||||||
|
|
||||||
|
## キーコード
|
||||||
|
|
||||||
|
| キー | エイリアス | 説明 |
|
||||||
|
|---------|-----------|------------------------------------------------------------------|
|
||||||
|
| `KC_GESC` | `GRAVE_ESC` | 押された場合に Escape。Shift あるいは GUI が押されたままの場合は <code>`</code> |
|
||||||
|
|
||||||
|
### 注意事項
|
||||||
|
|
||||||
|
macOS では、Command+<code>`</code> はデフォルトで "次のウィンドウを操作対象にする" にマップされます。つまりバッククォートを出力しません。さらに、ショートカットがキーボード環境設定で変更された場合でも、ターミナルは常にこのショートカットを認識してウィンドウを切り替えます。
|
||||||
|
|
||||||
|
## 設定
|
||||||
|
|
||||||
|
グレイブエスケープが壊す可能性のあるキーの組み合わせが幾つかあります。その中には、Windows では Control+Shift+Escape、macOSでは Command+Option+Escape があります。これを回避するには、`config.h` で以下のオプションを `#define` することができます:
|
||||||
|
|
||||||
|
| 定義 | 説明 |
|
||||||
|
|--------------------------|-----------------------------------------|
|
||||||
|
| `GRAVE_ESC_ALT_OVERRIDE` | Alt が押された場合、常に Escape を送信する |
|
||||||
|
| `GRAVE_ESC_CTRL_OVERRIDE` | Control が押された場合、常に Escape を送信する |
|
||||||
|
| `GRAVE_ESC_GUI_OVERRIDE` | GUI が押された場合、常に Escape を送信する |
|
||||||
|
| `GRAVE_ESC_SHIFT_OVERRIDE` | Shift が押された場合、常に Escape を送信する |
|
163
docs/ja/feature_haptic_feedback.md
Normal file
163
docs/ja/feature_haptic_feedback.md
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
# 触覚フィードバック
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 0.8.123:docs/feature_haptic_feedback.md
|
||||||
|
git diff 0.8.123 HEAD -- docs/feature_haptic_feedback.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
## 触覚フィードバック の rules.mk オプション
|
||||||
|
|
||||||
|
現在のところ、`rules.mk` で触覚フィードバック用に以下のオプションを利用可能です:
|
||||||
|
|
||||||
|
`HAPTIC_ENABLE += DRV2605L`
|
||||||
|
|
||||||
|
`HAPTIC_ENABLE += SOLENOID`
|
||||||
|
|
||||||
|
## サポートされる既知のハードウェア
|
||||||
|
|
||||||
|
| 名前 | 説明 |
|
||||||
|
|--------------------|-------------------------------------------------|
|
||||||
|
| [LV061228B-L65-A](https://www.digikey.com/product-detail/en/jinlong-machinery-electronics-inc/LV061228B-L65-A/1670-1050-ND/7732325) | z-axis 2v LRA |
|
||||||
|
| [Mini Motor Disc](https://www.adafruit.com/product/1201) | small 2-5v ERM |
|
||||||
|
|
||||||
|
## 触覚キーコード
|
||||||
|
|
||||||
|
以下のキーコードは、選択した触覚メカニズムに依存して動作するかどうか決まります。
|
||||||
|
|
||||||
|
| 名前 | 説明 |
|
||||||
|
|-----------|-------------------------------------------------------|
|
||||||
|
| `HPT_ON` | 触覚フィードバックをオン |
|
||||||
|
| `HPT_OFF` | 触覚フィードバックをオフ |
|
||||||
|
| `HPT_TOG` | 触覚フィードバックのオン/オフを切り替え |
|
||||||
|
| `HPT_RST` | 触覚フィードバック設定をデフォルトに戻す |
|
||||||
|
| `HPT_FBK` | キー押下またはリリースまたはその両方でフィードバックを切り替え |
|
||||||
|
| `HPT_BUZ` | ソレノイドの振動のオン/オフを切り替え |
|
||||||
|
| `HPT_MODI` | 次の DRV2605L 波形に移動 |
|
||||||
|
| `HPT_MODD` | 前の DRV2605L 波形に移動 |
|
||||||
|
| `HPT_CONT` | 連続触覚モードのオン/オフを切り替え |
|
||||||
|
| `HPT_CONI` | DRV2605L の連続触覚強度を増加 |
|
||||||
|
| `HPT_COND` | DRV2605L の連続触覚強度を減少 |
|
||||||
|
| `HPT_DWLI` | ソレノイドの滞留時間を増加 |
|
||||||
|
| `HPT_DWLD` | ソレノイドの滞留時間を減少 |
|
||||||
|
|
||||||
|
### ソレノイド
|
||||||
|
|
||||||
|
ほとんどの MCU はソレノイドのコイルを駆動するために必要な電流を供給できないため、最初に MOSFET を介してソレノイドを駆動する回路を構築する必要があります。
|
||||||
|
|
||||||
|
[Adafruit が提供する配線図](https://playground.arduino.cc/uploads/Learning/solenoid_driver.pdf)
|
||||||
|
|
||||||
|
|
||||||
|
| 設定 | デフォルト | 説明 |
|
||||||
|
|--------------------------|---------------|-------------------------------------------------------|
|
||||||
|
| `SOLENOID_PIN` | *定義なし* | ソレノイドが接続されているピンを設定する。 |
|
||||||
|
| `SOLENOID_DEFAULT_DWELL` | `12` ms | ソレノイドのデフォルトの滞留時間を設定する。 |
|
||||||
|
| `SOLENOID_MIN_DWELL` | `4` ms | 滞留時間の下限を設定する。 |
|
||||||
|
| `SOLENOID_MAX_DWELL` | `100` ms | 滞留時間の上限を設定する。 |
|
||||||
|
|
||||||
|
?> 滞留時間とは、「プランジャー」が作動したままになる時間です。滞留時間により、ソレノイドの音が変わります。
|
||||||
|
|
||||||
|
ブートローダ実行中に一部のピンが給電されているかもしれず (例えば、STM32F303 チップ上の A13)、そうすると書き込みプロセスの間ずっとソレノイドがオン状態になることに注意してください。これはソレノイドを加熱し損傷を与えるかもしれません。ソレノイドが接続されているピンがブートローダ/DFU 実行中にソレノイドをオンにしていることが分かった場合は、他のピンを選択してください。
|
||||||
|
|
||||||
|
### DRV2605L
|
||||||
|
|
||||||
|
DRV2605Lは i2c プロトコルで制御され、SDA および SCL ピンに接続する必要があります。これらは使用する MCU によって異なります。
|
||||||
|
|
||||||
|
#### フィードバックモータのセットアップ
|
||||||
|
|
||||||
|
このドライバは2つの異なるフィードバックモータをサポートします。選択したモータに基づいて、`config.h` で以下を設定します。
|
||||||
|
|
||||||
|
##### ERM
|
||||||
|
|
||||||
|
偏心回転質量振動モータ (ERM) は偏りのある重りが取り付けられたモータで、駆動信号が取り付けられると偏りのある重りが回転し、正弦波が振動に変換されます。
|
||||||
|
|
||||||
|
```
|
||||||
|
#define FB_ERM_LRA 0
|
||||||
|
#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
|
||||||
|
#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
|
||||||
|
|
||||||
|
/* 特定のモータに最適な設定については、データシートを参照してください。*/
|
||||||
|
#define RATED_VOLTAGE 3
|
||||||
|
#define V_PEAK 5
|
||||||
|
```
|
||||||
|
##### LRA
|
||||||
|
|
||||||
|
線形共振アクチュエータ (LRA、線形バイブレータとしても知られています)は、ERM と異なります。LRA は重りと磁石をバネで吊るしたものとボイスコイルで構成されています。駆動信号が印加されるとされると、重りは単一の軸で振動します (左右または上下)。重りはバネに取り付けられているため、特定の周波数で共振効果があります。この周波数は LRA が最も効率的に動作する箇所です。この周波数の推奨範囲については、モータのデータシートを参照してください。
|
||||||
|
|
||||||
|
```
|
||||||
|
#define FB_ERM_LRA 1
|
||||||
|
#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
|
||||||
|
#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
|
||||||
|
|
||||||
|
/* 特定のモータに最適な設定については、データシートを参照してください。*/
|
||||||
|
#define RATED_VOLTAGE 2
|
||||||
|
#define V_PEAK 2.8
|
||||||
|
#define V_RMS 2.0
|
||||||
|
#define V_PEAK 2.1
|
||||||
|
#define F_LRA 205 /* 共振周波数 */
|
||||||
|
```
|
||||||
|
|
||||||
|
#### DRV2605L 波形ライブラリ
|
||||||
|
|
||||||
|
DRV2605L には呼び出して再生できる様々な波形シーケンスのプリロードライブラリが同梱されています。マクロを書く場合、これらの波形は `DRV_pulse(*sequence name or number*)` を使って再生することができます
|
||||||
|
|
||||||
|
データシートの波形シーケンスのリスト
|
||||||
|
|
||||||
|
| seq# | シーケンス名 | seq# | シーケンス名 | seq# | シーケンス名 |
|
||||||
|
|-----|---------------------|-----|-----------------------------------|-----|--------------------------------------|
|
||||||
|
| 1 | strong_click | 43 | lg_dblclick_med_60 | 85 | transition_rampup_med_smooth2 |
|
||||||
|
| 2 | strong_click_60 | 44 | lg_dblsharp_tick | 86 | transition_rampup_short_smooth1 |
|
||||||
|
| 3 | strong_click_30 | 45 | lg_dblsharp_tick_80 | 87 | transition_rampup_short_smooth2 |
|
||||||
|
| 4 | sharp_click | 46 | lg_dblsharp_tick_60 | 88 | transition_rampup_long_sharp1 |
|
||||||
|
| 5 | sharp_click_60 | 47 | buzz | 89 | transition_rampup_long_sharp2 |
|
||||||
|
| 6 | sharp_click_30 | 48 | buzz_80 | 90 | transition_rampup_med_sharp1 |
|
||||||
|
| 7 | soft_bump | 49 | buzz_60 | 91 | transition_rampup_med_sharp2 |
|
||||||
|
| 8 | soft_bump_60 | 50 | buzz_40 | 92 | transition_rampup_short_sharp1 |
|
||||||
|
| 9 | soft_bump_30 | 51 | buzz_20 | 93 | transition_rampup_short_sharp2 |
|
||||||
|
| 10 | dbl_click | 52 | pulsing_strong | 94 | transition_rampdown_long_smooth1_50 |
|
||||||
|
| 11 | dbl_click_60 | 53 | pulsing_strong_80 | 95 | transition_rampdown_long_smooth2_50 |
|
||||||
|
| 12 | trp_click | 54 | pulsing_medium | 96 | transition_rampdown_med_smooth1_50 |
|
||||||
|
| 13 | soft_fuzz | 55 | pulsing_medium_80 | 97 | transition_rampdown_med_smooth2_50 |
|
||||||
|
| 14 | strong_buzz | 56 | pulsing_sharp | 98 | transition_rampdown_short_smooth1_50 |
|
||||||
|
| 15 | alert_750ms | 57 | pulsing_sharp_80 | 99 | transition_rampdown_short_smooth2_50 |
|
||||||
|
| 16 | alert_1000ms | 58 | transition_click | 100 | transition_rampdown_long_sharp1_50 |
|
||||||
|
| 17 | strong_click1 | 59 | transition_click_80 | 101 | transition_rampdown_long_sharp2_50 |
|
||||||
|
| 18 | strong_click2_80 | 60 | transition_click_60 | 102 | transition_rampdown_med_sharp1_50 |
|
||||||
|
| 19 | strong_click3_60 | 61 | transition_click_40 | 103 | transition_rampdown_med_sharp2_50 |
|
||||||
|
| 20 | strong_click4_30 | 62 | transition_click_20 | 104 | transition_rampdown_short_sharp1_50 |
|
||||||
|
| 21 | medium_click1 | 63 | transition_click_10 | 105 | transition_rampdown_short_sharp2_50 |
|
||||||
|
| 22 | medium_click2_80 | 64 | transition_hum | 106 | transition_rampup_long_smooth1_50 |
|
||||||
|
| 23 | medium_click3_60 | 65 | transition_hum_80 | 107 | transition_rampup_long_smooth2_50 |
|
||||||
|
| 24 | sharp_tick1 | 66 | transition_hum_60 | 108 | transition_rampup_med_smooth1_50 |
|
||||||
|
| 25 | sharp_tick2_80 | 67 | transition_hum_40 | 109 | transition_rampup_med_smooth2_50 |
|
||||||
|
| 26 | sharp_tick3_60 | 68 | transition_hum_20 | 110 | transition_rampup_short_smooth1_50 |
|
||||||
|
| 27 | sh_dblclick_str | 69 | transition_hum_10 | 111 | transition_rampup_short_smooth2_50 |
|
||||||
|
| 28 | sh_dblclick_str_80 | 70 | transition_rampdown_long_smooth1 | 112 | transition_rampup_long_sharp1_50 |
|
||||||
|
| 29 | sh_dblclick_str_60 | 71 | transition_rampdown_long_smooth2 | 113 | transition_rampup_long_sharp2_50 |
|
||||||
|
| 30 | sh_dblclick_str_30 | 72 | transition_rampdown_med_smooth1 | 114 | transition_rampup_med_sharp1_50 |
|
||||||
|
| 31 | sh_dblclick_med | 73 | transition_rampdown_med_smooth2 | 115 | transition_rampup_med_sharp2_50 |
|
||||||
|
| 32 | sh_dblclick_med_80 | 74 | transition_rampdown_short_smooth1 | 116 | transition_rampup_short_sharp1_50 |
|
||||||
|
| 33 | sh_dblclick_med_60 | 75 | transition_rampdown_short_smooth2 | 117 | transition_rampup_short_sharp2_50 |
|
||||||
|
| 34 | sh_dblsharp_tick | 76 | transition_rampdown_long_sharp1 | 118 | long_buzz_for_programmatic_stopping |
|
||||||
|
| 35 | sh_dblsharp_tick_80 | 77 | transition_rampdown_long_sharp2 | 119 | smooth_hum1_50 |
|
||||||
|
| 36 | sh_dblsharp_tick_60 | 78 | transition_rampdown_med_sharp1 | 120 | smooth_hum2_40 |
|
||||||
|
| 37 | lg_dblclick_str | 79 | transition_rampdown_med_sharp2 | 121 | smooth_hum3_30 |
|
||||||
|
| 38 | lg_dblclick_str_80 | 80 | transition_rampdown_short_sharp1 | 122 | smooth_hum4_20 |
|
||||||
|
| 39 | lg_dblclick_str_60 | 81 | transition_rampdown_short_sharp2 | 123 | smooth_hum5_10 |
|
||||||
|
| 40 | lg_dblclick_str_30 | 82 | transition_rampup_long_smooth1 | | |
|
||||||
|
| 41 | lg_dblclick_med | 83 | transition_rampup_long_smooth2 | | |
|
||||||
|
| 42 | lg_dblclick_med_80 | 84 | transition_rampup_med_smooth1 | | |
|
||||||
|
### オプションの DRV2605L の定義
|
||||||
|
|
||||||
|
```
|
||||||
|
#define DRV_GREETING *sequence name or number*
|
||||||
|
```
|
||||||
|
触覚フィードバッグが有効な場合、キーボード起動時に特定のシーケンスに合わせて振動します。以下の定義を使って選択することができます:
|
||||||
|
|
||||||
|
```
|
||||||
|
#define DRV_MODE_DEFAULT *sequence name or number*
|
||||||
|
```
|
||||||
|
これにより HPT_RST がアクティブモードとして設定するシーケンスを設定します。未定義の場合、HPT_RST が押された時にモードが 1 に設定されます。
|
||||||
|
|
||||||
|
### DRV2605L 連続触覚モード
|
||||||
|
|
||||||
|
このモードは強さを増減するオプションを使って連続触覚フィードバッグを設定します。
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user