mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-06 15:23:28 +00:00
Compare commits
502 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
94e94ffb5b | ||
![]() |
cfc9a358c5 | ||
![]() |
e4236278b5 | ||
![]() |
81a17f4270 | ||
![]() |
bb9fbd66e9 | ||
![]() |
5edce6ba26 | ||
![]() |
91b44016f9 | ||
![]() |
45e16fd543 | ||
![]() |
a7afaa36a1 | ||
![]() |
d7c1b890f1 | ||
![]() |
0dee334bce | ||
![]() |
a422309354 | ||
![]() |
683ba8b8d4 | ||
![]() |
aae3b35c0f | ||
![]() |
abf1902ff5 | ||
![]() |
aa90cf1da8 | ||
![]() |
7595f53856 | ||
![]() |
8af767cb1d | ||
![]() |
a9f65b760a | ||
![]() |
53f11668a3 | ||
![]() |
2ef68a84b6 | ||
![]() |
489bee0ee4 | ||
![]() |
ed8d1d1ae7 | ||
![]() |
f38a3b7408 | ||
![]() |
16fe4b8b77 | ||
![]() |
84ca67f158 | ||
![]() |
cb80b59e93 | ||
![]() |
95bbd799a4 | ||
![]() |
1ff5ee255f | ||
![]() |
9cd3ffa5ba | ||
![]() |
ff7f70314e | ||
![]() |
db829c9453 | ||
![]() |
bd1c048a76 | ||
![]() |
4d33d72975 | ||
![]() |
7ce5402417 | ||
![]() |
b5ebdf1b3a | ||
![]() |
d7c90d805f | ||
![]() |
5f2c434954 | ||
![]() |
f2eb080aa2 | ||
![]() |
f12dcb0659 | ||
![]() |
262a607334 | ||
![]() |
7ef98e7f61 | ||
![]() |
d46fa2274c | ||
![]() |
e024147ce5 | ||
![]() |
c60cafae41 | ||
![]() |
38162af5a7 | ||
![]() |
e680af98d2 | ||
![]() |
4ba0cb7ebc | ||
![]() |
4b839db384 | ||
![]() |
e041ec1655 | ||
![]() |
75201c73a0 | ||
![]() |
8e71d3d053 | ||
![]() |
e69da2db2c | ||
![]() |
dc40f00aaf | ||
![]() |
c1481629fd | ||
![]() |
83eecdce22 | ||
![]() |
780b7722fb | ||
![]() |
86ac56cd7f | ||
![]() |
c1e69bcef0 | ||
![]() |
78019c3e21 | ||
![]() |
76bc235508 | ||
![]() |
fed9c97ddb | ||
![]() |
9f0dbc21a3 | ||
![]() |
c731432765 | ||
![]() |
f450bdbb41 | ||
![]() |
4fa1924bd7 | ||
![]() |
7b33897b97 | ||
![]() |
d705918f50 | ||
![]() |
a3f1defcd4 | ||
![]() |
fb579aae49 | ||
![]() |
67654e4a82 | ||
![]() |
952a4c8312 | ||
![]() |
b9ea10a80d | ||
![]() |
4e72224aa3 | ||
![]() |
1bfec6ddd9 | ||
![]() |
db9204c7e1 | ||
![]() |
27b8046867 | ||
![]() |
359aff6c49 | ||
![]() |
36f4f1e9b8 | ||
![]() |
f487b726cd | ||
![]() |
5cecc1ea1e | ||
![]() |
b9ed9d33d3 | ||
![]() |
2ac0927fd7 | ||
![]() |
9dad914841 | ||
![]() |
50481ce7ed | ||
![]() |
74a2edd903 | ||
![]() |
805e13a6d0 | ||
![]() |
fcd55e2f04 | ||
![]() |
8685409784 | ||
![]() |
1d85fe176a | ||
![]() |
a42e3ba2cb | ||
![]() |
c745cbb77a | ||
![]() |
6b1ae7e6aa | ||
![]() |
a602ef75fb | ||
![]() |
1ba93875ba | ||
![]() |
33074bcbad | ||
![]() |
555b1640b2 | ||
![]() |
f149c07d68 | ||
![]() |
2c92ee1f56 | ||
![]() |
0c42f91f4c | ||
![]() |
8ef82c466e | ||
![]() |
ad86894ae7 | ||
![]() |
af455a8368 | ||
![]() |
ac37a94e49 | ||
![]() |
24ae9232e2 | ||
![]() |
14cb662280 | ||
![]() |
3d183ed7a0 | ||
![]() |
4e30f4d102 | ||
![]() |
329eb4b8df | ||
![]() |
bf92957ff2 | ||
![]() |
33bd17a68a | ||
![]() |
7daad08a91 | ||
![]() |
d689f76110 | ||
![]() |
5d2deaca06 | ||
![]() |
8e7517aebc | ||
![]() |
b5f425b275 | ||
![]() |
47ce1a9ed0 | ||
![]() |
85f344db49 | ||
![]() |
225af5d161 | ||
![]() |
870cc37365 | ||
![]() |
9093f877a2 | ||
![]() |
5e9c078c78 | ||
![]() |
fe50bee988 | ||
![]() |
999326acc8 | ||
![]() |
8cbaea9e8d | ||
![]() |
e7d8ccdbb2 | ||
![]() |
c45d7e526c | ||
![]() |
f078980fb1 | ||
![]() |
619eb0071e | ||
![]() |
2b9b267e8e | ||
![]() |
f9bd9d3b26 | ||
![]() |
168ce1a743 | ||
![]() |
120c42255b | ||
![]() |
f9853433c1 | ||
![]() |
caf61a19c6 | ||
![]() |
ca6a3e0832 | ||
![]() |
4b2da8daf4 | ||
![]() |
c3ce06c2e7 | ||
![]() |
9f1f43bb86 | ||
![]() |
c4d87f3073 | ||
![]() |
8bb2eeaabb | ||
![]() |
c492dd7912 | ||
![]() |
7622678bd0 | ||
![]() |
0728a6b753 | ||
![]() |
e468380be6 | ||
![]() |
8456625655 | ||
![]() |
6ad813e811 | ||
![]() |
4d22bc9de0 | ||
![]() |
d49dcdd667 | ||
![]() |
f952d4f7b7 | ||
![]() |
8be058d55d | ||
![]() |
40e694ea0d | ||
![]() |
445cd95d17 | ||
![]() |
7d5ba88e6f | ||
![]() |
704934c427 | ||
![]() |
47ea522e79 | ||
![]() |
f663ba5ed0 | ||
![]() |
de0153f339 | ||
![]() |
3633330e1a | ||
![]() |
855dd2d218 | ||
![]() |
aa1c1c3865 | ||
![]() |
de68d294ec | ||
![]() |
f0a1ab5488 | ||
![]() |
1a2a838bc2 | ||
![]() |
67474f7e3f | ||
![]() |
39c473a639 | ||
![]() |
f871f7a56f | ||
![]() |
e0bdd51177 | ||
![]() |
fba7d4e32f | ||
![]() |
cab49809ad | ||
![]() |
42696a4f8c | ||
![]() |
a4dfa45f37 | ||
![]() |
616dc7dd5d | ||
![]() |
44f9017cb8 | ||
![]() |
3c4fa68000 | ||
![]() |
cb556b7a16 | ||
![]() |
87317a3af6 | ||
![]() |
92b7dff3ae | ||
![]() |
0dc74dd8c4 | ||
![]() |
6529cbac0d | ||
![]() |
139d28eaae | ||
![]() |
a1f129edd5 | ||
![]() |
73699cccbc | ||
![]() |
229dbcc547 | ||
![]() |
c738ce2f65 | ||
![]() |
c0b3034721 | ||
![]() |
f90688e550 | ||
![]() |
0f453bc5f7 | ||
![]() |
21357b658a | ||
![]() |
2c5ad9189c | ||
![]() |
b0dbe7365b | ||
![]() |
af2c506383 | ||
![]() |
59d503e3b9 | ||
![]() |
b63b2106d8 | ||
![]() |
a2af0a352b | ||
![]() |
6aae926b5f | ||
![]() |
49dd1edb69 | ||
![]() |
7437a38899 | ||
![]() |
381884fa9b | ||
![]() |
f706e1e80e | ||
![]() |
46c77febf7 | ||
![]() |
fdbf67e0da | ||
![]() |
bb35f6a6f5 | ||
![]() |
c87b2efef8 | ||
![]() |
2a65709db6 | ||
![]() |
451e600476 | ||
![]() |
6f391094ab | ||
![]() |
5b067ffc16 | ||
![]() |
b4e7d4ffae | ||
![]() |
30c65a2547 | ||
![]() |
4d59657b83 | ||
![]() |
d46b8ef67c | ||
![]() |
adc06c5b3b | ||
![]() |
6c78f80fa1 | ||
![]() |
3d9fff1d28 | ||
![]() |
975c2422f3 | ||
![]() |
a4efb55a39 | ||
![]() |
96ac448a0f | ||
![]() |
216f9ed2c1 | ||
![]() |
c66d65df58 | ||
![]() |
f7e5d712c2 | ||
![]() |
49abff9071 | ||
![]() |
2d4ae0fe7b | ||
![]() |
4f923b1673 | ||
![]() |
cacf495c91 | ||
![]() |
a88cfa395b | ||
![]() |
6e78655e17 | ||
![]() |
b0c8cbe462 | ||
![]() |
962adbea3a | ||
![]() |
7c32fbf493 | ||
![]() |
459f672879 | ||
![]() |
cd0e32ff9e | ||
![]() |
7229997e7d | ||
![]() |
5fbd55999b | ||
![]() |
ff1b625168 | ||
![]() |
fe5bcae8b3 | ||
![]() |
cba4c1deb5 | ||
![]() |
d79fe65291 | ||
![]() |
ee6c86d8e9 | ||
![]() |
0a69225637 | ||
![]() |
b84b6107ff | ||
![]() |
bc79e51990 | ||
![]() |
a67b32425b | ||
![]() |
058737f116 | ||
![]() |
c9a06965c9 | ||
![]() |
2c9ffd4739 | ||
![]() |
f7cffcbcd4 | ||
![]() |
2e402741a8 | ||
![]() |
2013f63134 | ||
![]() |
32661df8cd | ||
![]() |
661f4aaa8a | ||
![]() |
27f9f3196d | ||
![]() |
89446bafb8 | ||
![]() |
2bcac45650 | ||
![]() |
c8cff1489a | ||
![]() |
c4f910b1b3 | ||
![]() |
edebe56f6b | ||
![]() |
3a8e13a74a | ||
![]() |
1afb394d59 | ||
![]() |
1aacbc44d1 | ||
![]() |
793de76bb4 | ||
![]() |
f176daa1ca | ||
![]() |
459ccb681f | ||
![]() |
1fe7743af8 | ||
![]() |
a0467fda38 | ||
![]() |
9e9b604234 | ||
![]() |
eb4cf713bc | ||
![]() |
9395a8700c | ||
![]() |
4bbef61d60 | ||
![]() |
266ff3339a | ||
![]() |
c01eb55109 | ||
![]() |
6e9b4a8309 | ||
![]() |
1e5df7117d | ||
![]() |
6888165b48 | ||
![]() |
8070b1ba88 | ||
![]() |
726499553c | ||
![]() |
1d7e57ab85 | ||
![]() |
0cb7133e0d | ||
![]() |
f63a60a72a | ||
![]() |
f68bb0cc3d | ||
![]() |
2f01c6ee18 | ||
![]() |
10f5767010 | ||
![]() |
b5d6f287d9 | ||
![]() |
3e5e4f7427 | ||
![]() |
a13e918d47 | ||
![]() |
b31df1af94 | ||
![]() |
7a2124db6b | ||
![]() |
45f044907c | ||
![]() |
01d2a03258 | ||
![]() |
1960e25048 | ||
![]() |
8fbea13a8f | ||
![]() |
d78a2b8145 | ||
![]() |
76e35e02cc | ||
![]() |
272b3309dd | ||
![]() |
11c308d436 | ||
![]() |
482c9fbbf2 | ||
![]() |
5ecb1b2d39 | ||
![]() |
8b90822f6e | ||
![]() |
9f36aa640e | ||
![]() |
284a5267d5 | ||
![]() |
d844f5af70 | ||
![]() |
2eeb30cd5a | ||
![]() |
1531087617 | ||
![]() |
c7599bf49f | ||
![]() |
45c2a05e3a | ||
![]() |
fbdc65e2e9 | ||
![]() |
34b9c51d9c | ||
![]() |
50835bb138 | ||
![]() |
e7acd39b78 | ||
![]() |
70fce6564f | ||
![]() |
323c6dfe72 | ||
![]() |
bb1550313c | ||
![]() |
28ff51175b | ||
![]() |
c16ee22784 | ||
![]() |
1b7101f065 | ||
![]() |
c4cc697aef | ||
![]() |
b6f9ca3b09 | ||
![]() |
603c8d1f06 | ||
![]() |
4a83021fe0 | ||
![]() |
9570b1bbb4 | ||
![]() |
4511201d80 | ||
![]() |
5f23f21216 | ||
![]() |
086c9c714e | ||
![]() |
9c596c1c5b | ||
![]() |
cd64425fdd | ||
![]() |
860deb774e | ||
![]() |
ec7ce15c11 | ||
![]() |
30ffae2317 | ||
![]() |
940280c435 | ||
![]() |
940c294d26 | ||
![]() |
f2dec4d3cf | ||
![]() |
ef7c79b781 | ||
![]() |
8711dda0d3 | ||
![]() |
8b9617f93d | ||
![]() |
96101adea9 | ||
![]() |
d828e991a9 | ||
![]() |
afb9179b65 | ||
![]() |
5faf5383ad | ||
![]() |
4bf5f9424e | ||
![]() |
2fbf68f2d2 | ||
![]() |
9c31a7adba | ||
![]() |
1ff51579ec | ||
![]() |
e52fc935b0 | ||
![]() |
539cc45fba | ||
![]() |
57dd756507 | ||
![]() |
e3395beda0 | ||
![]() |
7a3a57e457 | ||
![]() |
0fbb1e550a | ||
![]() |
0976db7e5e | ||
![]() |
207f0b00fa | ||
![]() |
4a37af79e9 | ||
![]() |
e4a4ed3b0c | ||
![]() |
7ddae97c89 | ||
![]() |
ea0cf42eef | ||
![]() |
bfbcfbc83e | ||
![]() |
967ed19d77 | ||
![]() |
342ab6ab80 | ||
![]() |
0b2eae7686 | ||
![]() |
924823cfb4 | ||
![]() |
ccab502241 | ||
![]() |
c23667608c | ||
![]() |
dc037f1391 | ||
![]() |
b86fa3daf3 | ||
![]() |
bc8fe91fd1 | ||
![]() |
e3f9569acd | ||
![]() |
ebbcb83998 | ||
![]() |
6bebb1233d | ||
![]() |
e4cf0a40a5 | ||
![]() |
b3508271f8 | ||
![]() |
c4eb0df428 | ||
![]() |
becaf325a3 | ||
![]() |
2f637e4ea1 | ||
![]() |
0384237544 | ||
![]() |
bc7a745227 | ||
![]() |
7f34a6b635 | ||
![]() |
9f0a2a78a0 | ||
![]() |
fee953c4f8 | ||
![]() |
fb4a6ad30e | ||
![]() |
a2ff3c4d14 | ||
![]() |
ed2ba645c0 | ||
![]() |
e1437c1859 | ||
![]() |
741856dd57 | ||
![]() |
3abb609348 | ||
![]() |
6eab8a0b61 | ||
![]() |
08ef4b4a96 | ||
![]() |
12fe78ee57 | ||
![]() |
bdb1b10e99 | ||
![]() |
a0efe93239 | ||
![]() |
bbfb709a6a | ||
![]() |
0140baf7e0 | ||
![]() |
b0024470ed | ||
![]() |
ccbbf16389 | ||
![]() |
a0305f5e7e | ||
![]() |
c2a0cebf8b | ||
![]() |
ef1b050b32 | ||
![]() |
4bee445c2f | ||
![]() |
7921c5d9b8 | ||
![]() |
72b1ff5899 | ||
![]() |
eee6dd3544 | ||
![]() |
510138f525 | ||
![]() |
07e37c857c | ||
![]() |
a21e487fbc | ||
![]() |
9eeb6048ff | ||
![]() |
f079dd90ed | ||
![]() |
b846480d5a | ||
![]() |
abec529e62 | ||
![]() |
bc010d62ca | ||
![]() |
bc15c4f4ab | ||
![]() |
f37a134f71 | ||
![]() |
f650b03fb7 | ||
![]() |
410d09675a | ||
![]() |
e9b3a12c6e | ||
![]() |
424eeb8af7 | ||
![]() |
97122d203b | ||
![]() |
06d4c0a396 | ||
![]() |
0050033aca | ||
![]() |
b58f9ef1e2 | ||
![]() |
02551ae499 | ||
![]() |
6499eb6a3c | ||
![]() |
2b9f200a2a | ||
![]() |
9e99a9b98c | ||
![]() |
e4d46a1c00 | ||
![]() |
7141de19d9 | ||
![]() |
c82865efab | ||
![]() |
d8d65bbf5f | ||
![]() |
58d7e9fa0e | ||
![]() |
6de4a53c7c | ||
![]() |
3d3c2e1d3f | ||
![]() |
3d4f0028d6 | ||
![]() |
6e948feb6a | ||
![]() |
076b9d482f | ||
![]() |
08f6e64137 | ||
![]() |
4b9c3dc2e5 | ||
![]() |
ba3ec0f081 | ||
![]() |
d3cea9ed93 | ||
![]() |
5f00df0c4c | ||
![]() |
cd73949682 | ||
![]() |
4e3a96ff3e | ||
![]() |
ae7a076964 | ||
![]() |
78d5224a1d | ||
![]() |
088888937a | ||
![]() |
9fe3fc4c04 | ||
![]() |
6b1c58629f | ||
![]() |
3b1abe0dee | ||
![]() |
3b14c032e0 | ||
![]() |
fb66f0a3fb | ||
![]() |
1d8b0ccc81 | ||
![]() |
92e5361fc5 | ||
![]() |
8ea8a80c5b | ||
![]() |
788cbcf828 | ||
![]() |
28e10eedda | ||
![]() |
6c3e404839 | ||
![]() |
f7ccbfcea8 | ||
![]() |
8ac9940a76 | ||
![]() |
ac24f203cc | ||
![]() |
d0eabd083e | ||
![]() |
e0b7c70743 | ||
![]() |
9bca381b98 | ||
![]() |
d612d617ee | ||
![]() |
687d05dfb1 | ||
![]() |
a8a714c46e | ||
![]() |
6e32dd123f | ||
![]() |
82a830196f | ||
![]() |
6a79d99ea2 | ||
![]() |
2e4a75e2bc | ||
![]() |
c3f3b34d7c | ||
![]() |
98278968b7 | ||
![]() |
361003934e | ||
![]() |
c10b011828 | ||
![]() |
6eefc20c2a | ||
![]() |
2282104526 | ||
![]() |
9b9587527f | ||
![]() |
461153150b | ||
![]() |
c1a6b5f430 | ||
![]() |
25e93b4b67 | ||
![]() |
2f26e14dc6 | ||
![]() |
bad589ec59 | ||
![]() |
eead2c6087 | ||
![]() |
04293bcd5b | ||
![]() |
e7cc5a35c2 | ||
![]() |
9808bfaf26 | ||
![]() |
2ab307a940 | ||
![]() |
4086729f5e | ||
![]() |
4701001524 | ||
![]() |
6e618baa57 | ||
![]() |
825ef0bd96 | ||
![]() |
58600d3f65 | ||
![]() |
f145696dad | ||
![]() |
7fe01239dd | ||
![]() |
32910738fd | ||
![]() |
4889625015 | ||
![]() |
744940bbd9 | ||
![]() |
0bec817479 | ||
![]() |
80fd81ad6b | ||
![]() |
d16d866597 | ||
![]() |
0032cb026b | ||
![]() |
854a94f383 | ||
![]() |
4a6cfb06c5 | ||
![]() |
a9a2817f3a | ||
![]() |
4286b81af0 | ||
![]() |
fa740c1286 | ||
![]() |
69804bb243 |
42
.github/labeler.yml
vendored
Normal file
42
.github/labeler.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
core:
|
||||
- quantum/**/*
|
||||
- tmk_core/**/*
|
||||
- drivers/**/*
|
||||
- tests/**/*
|
||||
- util/**/*
|
||||
- platforms/**/*
|
||||
- Makefile
|
||||
- '*.mk'
|
||||
dependencies:
|
||||
- any:
|
||||
- 'lib/**/*'
|
||||
- '!lib/python/**/*'
|
||||
keyboard:
|
||||
- any:
|
||||
- 'keyboards/**/*'
|
||||
- '!keyboards/**/keymaps/**/*'
|
||||
keymap:
|
||||
- users/**/*
|
||||
- layouts/**/*
|
||||
- keyboards/**/keymaps/**/*
|
||||
via:
|
||||
- keyboards/**/keymaps/via/*
|
||||
cli:
|
||||
- bin/qmk
|
||||
- requirements.txt
|
||||
- lib/python/**/*
|
||||
python:
|
||||
- '**/*.py'
|
||||
documentation:
|
||||
- docs/**/*
|
||||
translation:
|
||||
- docs/fr-fr/**/*
|
||||
- docs/es/**/*
|
||||
- docs/ja/**/*
|
||||
- docs/he-il/**/*
|
||||
- docs/pt-br/**/*
|
||||
- docs/zh-cn/**/*
|
||||
- docs/de/**/*
|
||||
- docs/ru-ru/**/*
|
||||
CI:
|
||||
- .github/**/*
|
42
.github/workflows/api.yml
vendored
Normal file
42
.github/workflows/api.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Update API Data
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'keyboards/**'
|
||||
- 'layouts/community/**'
|
||||
|
||||
jobs:
|
||||
api_data:
|
||||
runs-on: ubuntu-latest
|
||||
container: qmkfm/base_container
|
||||
|
||||
# protect against those who develop with their fork on master
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
persist-credentials: false
|
||||
|
||||
- name: Generate API Data
|
||||
run: qmk generate-api
|
||||
|
||||
- name: Install rsync
|
||||
run: |
|
||||
apt-get update && apt-get install -y rsync
|
||||
|
||||
- name: Upload API Data
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
with:
|
||||
ACCESS_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH: main
|
||||
FOLDER: api_data/v1
|
||||
CLEAN: true
|
||||
GIT_CONFIG_EMAIL: hello@qmk.fm
|
||||
REPOSITORY_NAME: qmk/qmk_keyboards
|
||||
TARGET_FOLDER: v1
|
43
.github/workflows/docs.yml
vendored
Normal file
43
.github/workflows/docs.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Generate Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'tmk_core/**'
|
||||
- 'quantum/**'
|
||||
- 'platforms/**'
|
||||
- 'docs/**'
|
||||
- '.github/workflows/docs.yml'
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
runs-on: ubuntu-latest
|
||||
container: qmkfm/base_container
|
||||
|
||||
# protect against those who develop with their fork on master
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update && apt-get install -y rsync nodejs npm doxygen
|
||||
npm install -g moxygen
|
||||
|
||||
- name: Build docs
|
||||
run: |
|
||||
qmk --verbose generate-docs
|
||||
|
||||
- name: Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BASE_BRANCH: master
|
||||
BRANCH: gh-pages
|
||||
FOLDER: .build/docs
|
||||
GIT_CONFIG_EMAIL: hello@qmk.fm
|
14
.github/workflows/labeler.yml
vendored
Normal file
14
.github/workflows/labeler.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
name: "Pull Request Labeler"
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened, ready_for_review, locked]
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@main
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: '.github/labeler.yml'
|
@@ -6,7 +6,7 @@ on:
|
||||
- 'keyboards/**'
|
||||
|
||||
jobs:
|
||||
info:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: qmkfm/base_container
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: trilom/file-changes-action@v1.2.3
|
||||
- uses: trilom/file-changes-action@v1.2.4
|
||||
id: file_changes
|
||||
with:
|
||||
output: '\n'
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
echo ${{ github.event.pull_request.base.sha }}
|
||||
echo '${{ steps.file_changes.outputs.files}}'
|
||||
|
||||
- name: Run qmk info
|
||||
- name: Run qmk lint
|
||||
shell: 'bash {0}'
|
||||
run: |
|
||||
QMK_CHANGES=$(echo -e '${{ steps.file_changes.outputs.files}}')
|
||||
@@ -45,10 +45,11 @@ jobs:
|
||||
if [[ $KEYMAP_ONLY -gt 0 ]]; then
|
||||
echo "linting ${KB}"
|
||||
|
||||
# TODO: info info always returns 0 - right now the only way to know failure is to inspect log lines
|
||||
qmk info -l -kb ${KB} 2>&1 | tee /tmp/$$
|
||||
!(grep -cq ☒ /tmp/$$)
|
||||
: $((exit_code = $exit_code + $?))
|
||||
qmk lint --keyboard ${KB} && qmk info -l --keyboard ${KB}
|
||||
exit_code=$(($exit_code + $?))
|
||||
fi
|
||||
done
|
||||
if [[ $exit_code -gt 255 ]]; then
|
||||
exit 255
|
||||
fi
|
||||
exit $exit_code
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -16,6 +16,7 @@
|
||||
*.swp
|
||||
tags
|
||||
*~
|
||||
api_data/v1
|
||||
build/
|
||||
.build/
|
||||
*.bak
|
||||
|
@@ -18,21 +18,16 @@ addons:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-7
|
||||
packages:
|
||||
- pandoc
|
||||
- diffutils
|
||||
- dos2unix
|
||||
- doxygen
|
||||
- clang-format-7
|
||||
- libstdc++-7-dev
|
||||
install:
|
||||
- npm install -g moxygen
|
||||
script:
|
||||
- git fetch --depth=50 origin $TRAVIS_BRANCH:$TRAVIS_BRANCH
|
||||
- git rev-parse --short HEAD
|
||||
- git diff --name-only HEAD $TRAVIS_BRANCH
|
||||
- bash util/travis_test.sh
|
||||
- bash util/travis_build.sh
|
||||
- bash util/travis_docs.sh
|
||||
after_script:
|
||||
bash util/travis_compiled_push.sh
|
||||
notifications:
|
||||
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -16,7 +16,8 @@
|
||||
"*.hpp": "cpp",
|
||||
"xstddef": "c",
|
||||
"type_traits": "c",
|
||||
"utility": "c"
|
||||
"utility": "c",
|
||||
"ranges": "c"
|
||||
},
|
||||
"[markdown]": {
|
||||
"editor.trimAutoWhitespace": false,
|
||||
|
1
api_data/_config.yml
Normal file
1
api_data/_config.yml
Normal file
@@ -0,0 +1 @@
|
||||
theme: jekyll-theme-cayman
|
5
api_data/readme.md
Normal file
5
api_data/readme.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# QMK Keyboard Metadata
|
||||
|
||||
This directory contains machine parsable data about keyboards supported by QMK. The latest version is always available online at <https://keyboards.qmk.fm>.
|
||||
|
||||
Do not edit anything here by hand. It is generated with the `qmk generate-api` command.
|
@@ -28,6 +28,7 @@
|
||||
# bootloadHID HIDBootFlash compatible (ATmega32A)
|
||||
# USBasp USBaspLoader (ATmega328P)
|
||||
# kiibohd Input:Club Kiibohd bootloader (only used on their boards)
|
||||
# stm32duino STM32Duino (STM32F103x8)
|
||||
#
|
||||
# BOOTLOADER_SIZE can still be defined manually, but it's recommended
|
||||
# you add any possible configuration to this list
|
||||
@@ -35,30 +36,30 @@
|
||||
ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
|
||||
OPT_DEFS += -DBOOTLOADER_DFU
|
||||
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifeq ($(strip $(MCU)), at90usb1286)
|
||||
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||
BOOTLOADER_SIZE = 8192
|
||||
endif
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_LUFA_DFU
|
||||
OPT_DEFS += -DBOOTLOADER_DFU
|
||||
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifeq ($(strip $(MCU)), at90usb1286)
|
||||
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||
BOOTLOADER_SIZE = 8192
|
||||
endif
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_QMK_DFU
|
||||
OPT_DEFS += -DBOOTLOADER_DFU
|
||||
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||
BOOTLOADER_SIZE = 4096
|
||||
endif
|
||||
ifeq ($(strip $(MCU)), at90usb1286)
|
||||
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||
BOOTLOADER_SIZE = 8192
|
||||
endif
|
||||
endif
|
||||
@@ -106,3 +107,14 @@ ifeq ($(strip $(BOOTLOADER)), kiibohd)
|
||||
DFU_ARGS = -d 1C11:B007
|
||||
DFU_SUFFIX_ARGS = -v 1C11 -p B007
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(BOOTLOADER)), stm32duino)
|
||||
OPT_DEFS += -DBOOTLOADER_STM32DUINO
|
||||
MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader
|
||||
BOARD = STM32_F103_STM32DUINO
|
||||
# STM32F103 does NOT have an USB bootloader in ROM (only serial), so setting anything here does not make much sense
|
||||
STM32_BOOTLOADER_ADDRESS = 0x80000000
|
||||
|
||||
DFU_ARGS = -d 1EAF:0003 -a2 -R
|
||||
DFU_SUFFIX_ARGS = -v 1EAF -p 0003
|
||||
endif
|
||||
|
@@ -17,6 +17,7 @@ SERIAL_PATH := $(QUANTUM_PATH)/serial_link
|
||||
|
||||
QUANTUM_SRC += \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/led.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
$(QUANTUM_DIR)/keycode_config.c
|
||||
|
||||
@@ -114,6 +115,17 @@ else
|
||||
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
|
||||
OPT_DEFS += -DEEPROM_EMU_STM32F072xB
|
||||
OPT_DEFS += -DSTM32_EEPROM_ENABLE
|
||||
else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F042x6)
|
||||
|
||||
# Stack sizes: Since this chip has limited RAM capacity, the stack area needs to be reduced.
|
||||
# This ensures that the EEPROM page buffer fits into RAM
|
||||
USE_PROCESS_STACKSIZE = 0x600
|
||||
USE_EXCEPTIONS_STACKSIZE = 0x300
|
||||
|
||||
SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
|
||||
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
|
||||
OPT_DEFS += -DEEPROM_EMU_STM32F042x6
|
||||
OPT_DEFS += -DSTM32_EEPROM_ENABLE
|
||||
else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),)
|
||||
OPT_DEFS += -DEEPROM_DRIVER
|
||||
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
||||
@@ -173,6 +185,10 @@ ifeq ($(filter $(RGB_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
|
||||
$(error RGB_MATRIX_ENABLE="$(RGB_MATRIX_ENABLE)" is not a valid matrix type)
|
||||
endif
|
||||
OPT_DEFS += -DRGB_MATRIX_ENABLE
|
||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2))
|
||||
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
|
||||
OPT_DEFS += -DLIB8_ATTINY
|
||||
endif
|
||||
SRC += $(QUANTUM_DIR)/color.c
|
||||
SRC += $(QUANTUM_DIR)/rgb_matrix.c
|
||||
SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
|
||||
@@ -397,9 +413,20 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Support for translating old names to new names:
|
||||
ifeq ($(strip $(DEBOUNCE_TYPE)),sym_g)
|
||||
DEBOUNCE_TYPE:=sym_defer_g
|
||||
else ifeq ($(strip $(DEBOUNCE_TYPE)),eager_pk)
|
||||
DEBOUNCE_TYPE:=sym_eager_pk
|
||||
else ifeq ($(strip $(DEBOUNCE_TYPE)),sym_pk)
|
||||
DEBOUNCE_TYPE:=sym_defer_pk
|
||||
else ifeq ($(strip $(DEBOUNCE_TYPE)),eager_pr)
|
||||
DEBOUNCE_TYPE:=sym_eager_pr
|
||||
endif
|
||||
|
||||
DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce
|
||||
# Debounce Modules. Set DEBOUNCE_TYPE=custom if including one manually.
|
||||
DEBOUNCE_TYPE?= sym_g
|
||||
DEBOUNCE_TYPE?= sym_defer_g
|
||||
ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
|
||||
QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c
|
||||
endif
|
||||
|
@@ -23,6 +23,7 @@
|
||||
* [Overview](api_overview.md)
|
||||
* [API Documentation](api_docs.md)
|
||||
* [Keyboard Support](reference_configurator_support.md)
|
||||
* [Adding Default Keymaps](configurator_default_keymaps.md)
|
||||
|
||||
* CLI
|
||||
* [Overview](cli.md)
|
||||
@@ -104,6 +105,7 @@
|
||||
* [Encoders](feature_encoders.md)
|
||||
* [Haptic Feedback](feature_haptic_feedback.md)
|
||||
* [Joystick](feature_joystick.md)
|
||||
* [LED Indicators](feature_led_indicators.md)
|
||||
* [Proton C Conversion](proton_c_conversion.md)
|
||||
* [PS/2 Mouse](feature_ps2_mouse.md)
|
||||
* [Split Keyboard](feature_split_keyboard.md)
|
||||
@@ -117,6 +119,7 @@
|
||||
* [Overview](breaking_changes.md)
|
||||
* [My Pull Request Was Flagged](breaking_changes_instructions.md)
|
||||
* History
|
||||
* [2020 Aug 29](ChangeLog/20200829.md)
|
||||
* [2020 May 30](ChangeLog/20200530.md)
|
||||
* [2020 Feb 29](ChangeLog/20200229.md)
|
||||
* [2019 Aug 30](ChangeLog/20190830.md)
|
||||
|
@@ -167,6 +167,35 @@ Creates a keymap.c from a QMK Configurator export.
|
||||
qmk json2c [-o OUTPUT] filename
|
||||
```
|
||||
|
||||
## `qmk c2json`
|
||||
|
||||
Creates a keymap.json from a keymap.c.
|
||||
**Note:** Parsing C source files is not easy, therefore this subcommand may not work your keymap. In some cases not using the C pre-processor helps.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk c2json [--no-cpp] [-o OUTPUT] filename
|
||||
```
|
||||
|
||||
## `qmk lint`
|
||||
|
||||
Checks over a keyboard and/or keymap and highlights common errors, problems, and anti-patterns.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk lint [-km KEYMAP] [-kb KEYBOARD] [--strict]
|
||||
```
|
||||
|
||||
This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory.
|
||||
|
||||
**Examples**:
|
||||
|
||||
Do a basic lint check:
|
||||
|
||||
qmk lint -kb rominronin/katana60/rev2
|
||||
|
||||
## `qmk list-keyboards`
|
||||
|
||||
This command lists all the keyboards currently defined in `qmk_firmware`
|
||||
@@ -201,6 +230,16 @@ This command is directory aware. It will automatically fill in KEYBOARD and/or K
|
||||
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
||||
```
|
||||
|
||||
## `qmk clean`
|
||||
|
||||
This command cleans up the `.build` folder. If `--all` is passed, any .hex or .bin files present in the `qmk_firmware` directory will also be deleted.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk clean [-a]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# Developer Commands
|
||||
@@ -247,6 +286,16 @@ This command starts a local HTTP server which you can use for browsing or improv
|
||||
qmk docs [-p PORT]
|
||||
```
|
||||
|
||||
## `qmk generate-docs`
|
||||
|
||||
This command allows you to generate QMK documentation locally. It can be uses for general browsing or improving the docs. External tools such as [serve](https://www.npmjs.com/package/serve) can be used to browse the generated files.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk generate-docs
|
||||
```
|
||||
|
||||
## `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.
|
||||
@@ -288,4 +337,3 @@ This command runs the python test suite. If you make changes to python code you
|
||||
```
|
||||
qmk pytest
|
||||
```
|
||||
|
||||
|
193
docs/configurator_default_keymaps.md
Normal file
193
docs/configurator_default_keymaps.md
Normal file
@@ -0,0 +1,193 @@
|
||||
# Adding Default Keymaps to QMK Configurator :id=adding-default-keymaps
|
||||
|
||||
This page covers how to add a default keymap for a keyboard to QMK Configurator.
|
||||
|
||||
|
||||
## Technical Information :id=technical-information
|
||||
|
||||
QMK Configurator uses JSON as its native file format for keymaps. As much as possible, these should be kept such that they behave the same as running `make <keyboard>:default` from `qmk_firmware`.
|
||||
|
||||
Keymaps in this directory require four key-value pairs:
|
||||
|
||||
* `keyboard` (string)
|
||||
* This is the name of the keyboard, the same as would be used when running a compile job through `make` (e.g. `make 1upkeyboards/1up60rgb:default`).
|
||||
* `keymap` (string)
|
||||
* Should be set to `default`.
|
||||
* `layout` (string)
|
||||
* This is the layout macro used by the default keymap.
|
||||
* `layers` (array)
|
||||
* The keymap itself. This key should contain one array per layer, which themselves should contain the keycodes that make up that layer.
|
||||
|
||||
Additionally, most keymaps contain a `commit` key. This key is not consumed by the API that back-stops QMK Configurator, but is used by Configurator's maintainers to tell which version of a keymap was used to create the JSON keymap in this repository. The value is the SHA of the last commit to modify a board's default `keymap.c` in the `qmk_firmware` repository. The SHA is found by checking out [the `master` branch of the `qmk/qmk_firmware` repository](https://github.com/qmk/qmk_firmware/tree/master/) and running `git log -1 --pretty=oneline -- keyboards/<keyboard>/keymaps/default/keymap.c` (use `keymap.json` if the keyboard in question has this file instead), which should return something similar to:
|
||||
|
||||
```shell
|
||||
f14629ed1cd7c7ec9089604d64f29a99981558e8 Remove/migrate action_get_macro()s from default keymaps (#5625)
|
||||
```
|
||||
|
||||
In this example, `f14629ed1cd7c7ec9089604d64f29a99981558e8` is the value that should be used for `commit`.
|
||||
|
||||
|
||||
## Example :id=example
|
||||
|
||||
If one wished to add a default keymap for the H87a by Hineybush, one would run the `git log` command above against the H87a's default keymap in `qmk_firmware`:
|
||||
|
||||
```shell
|
||||
user ~/qmk_firmware (master)
|
||||
$ git log -1 --pretty=oneline master -- keyboards/hineybush/h87a/keymaps/default/keymap.c
|
||||
ef8878fba5d3786e3f9c66436da63a560cd36ac9 Hineybush h87a lock indicators (#8237)
|
||||
```
|
||||
|
||||
Now that we have the commit hash, we need the keymap (edited for readability):
|
||||
|
||||
```c
|
||||
...
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[0] = LAYOUT_all(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
[1] = LAYOUT_all(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
};
|
||||
```
|
||||
|
||||
The default keymap uses the `LAYOUT_all` macro, so that will be the value of the `layout` key. Compiled to a QMK Configurator JSON keymap, our resulting file should be:
|
||||
|
||||
```json
|
||||
{
|
||||
"keyboard": "hineybush/h87a",
|
||||
"keymap": "default",
|
||||
"commit": "ef8878fba5d3786e3f9c66436da63a560cd36ac9",
|
||||
"layout": "LAYOUT_all",
|
||||
"layers": [
|
||||
[
|
||||
"KC_ESC", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_PSCR", "KC_SLCK", "KC_PAUS",
|
||||
"KC_GRV", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", "KC_BSPC", "KC_INS", "KC_HOME", "KC_PGUP",
|
||||
"KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_DEL", "KC_END", "KC_PGDN",
|
||||
"KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_NUHS", "KC_ENT",
|
||||
"KC_LSFT", "KC_NUBS", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_TRNS", "KC_UP",
|
||||
"KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_RGUI", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT"
|
||||
],
|
||||
[
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_HUD", "RGB_HUI", "RGB_SAD", "RGB_SAI", "RGB_VAD", "RGB_VAI", "BL_TOGG", "BL_DEC", "BL_INC",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_VOLU",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RESET", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MPLY", "KC_MNXT", "KC_VOLD",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"
|
||||
]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
The white space in the `layers` arrays have no effect on the functionality of the keymap, but are used to make these files easier for humans to read.
|
||||
|
||||
|
||||
## Caveats :id=caveats
|
||||
|
||||
### Layers can only be referenced by number :id=layer-references
|
||||
|
||||
A common QMK convention is to name layers using a series of `#define`s, or an `enum` statement:
|
||||
|
||||
```c
|
||||
enum layer_names {
|
||||
_BASE,
|
||||
_MEDIA,
|
||||
_FN
|
||||
};
|
||||
```
|
||||
|
||||
This works in C, but for Configurator, you *must* use the layer's numeric index – `MO(_FN)` would need to be `MO(2)` in the above example.
|
||||
|
||||
### No support for custom code of any kind :id=custom-code
|
||||
|
||||
Features that require adding functions to the keymap.c file, such as Tap Dance or Unicode, can not be compiled in Configurator **at all**. Even setting `TAP_DANCE_ENABLE = yes` in the `qmk_firmware` repository at the keyboard level will prevent Configurator from compiling **any** firmware for that keyboard. This is limited both by the API and the current spec of our JSON keymap format.
|
||||
|
||||
### Limited Support for Custom keycodes :id=custom-keycodes
|
||||
|
||||
There is a way to support custom keycodes: if the logic for a custom keycode is implemented at the keyboard level instead of the keymap level in qmk_firmware, that keycode *can* be used in Configurator and it *will* compile and work. Instead of using the following in your `keymap.c`:
|
||||
|
||||
```c
|
||||
enum custom_keycodes {
|
||||
MACRO_1 = SAFE_RANGE,
|
||||
MACRO_2,
|
||||
MACRO_3
|
||||
};
|
||||
...
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case MACRO_1:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #1.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_2:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #2.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_3:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #3.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
```
|
||||
|
||||
... add the keycode `enum` block to your keyboard's header file (`<keyboard>.h`) as follows (note that the `enum` is named `keyboard_keycodes` here):
|
||||
|
||||
```c
|
||||
enum keyboard_keycodes {
|
||||
MACRO_1 = SAFE_RANGE,
|
||||
MACRO_2,
|
||||
MACRO_3,
|
||||
NEW_SAFE_RANGE // Important!
|
||||
};
|
||||
```
|
||||
|
||||
... then the logic to your `<keyboard>.c` through `process_record_kb()`:
|
||||
|
||||
```c
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case MACRO_1:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #1.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_2:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #2.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_3:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #3.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return process_record_user(keycode, record);
|
||||
};
|
||||
```
|
||||
|
||||
Note the call to `process_record_user()` at the end. Additionally, users of the keyboard will need to use `NEW_SAFE_RANGE` instead of `SAFE_RANGE` if they wish to add their own custom keycodes at keymap level, beyond what is provided by the keyboard.
|
||||
|
||||
|
||||
## Additional Reading :id=additional-reading
|
||||
|
||||
For QMK Configurator to support your keyboard, your keyboard must be present in the `master` branch of the `qmk_firmware` repository. For instructions on this, please see [Supporting Your Keyboard in QMK Configurator](reference_configurator_support.md).
|
@@ -88,108 +88,6 @@ keyrecord_t record {
|
||||
}
|
||||
```
|
||||
|
||||
# LED Control
|
||||
|
||||
QMK provides methods to read 5 of the LEDs defined in the HID spec:
|
||||
|
||||
* Num Lock
|
||||
* Caps Lock
|
||||
* Scroll Lock
|
||||
* Compose
|
||||
* Kana
|
||||
|
||||
There are two ways to get the lock LED state:
|
||||
|
||||
* by implementing `bool led_update_kb(led_t led_state)` or `_user(led_t led_state)`; or
|
||||
* by calling `led_t host_keyboard_led_state()`
|
||||
|
||||
!> `host_keyboard_led_state()` may already reflect a new value before `led_update_user()` is called.
|
||||
|
||||
Two more deprecated functions exist that provide the LED state as a `uint8_t`:
|
||||
|
||||
* `uint8_t led_set_kb(uint8_t usb_led)` and `_user(uint8_t usb_led)`
|
||||
* `uint8_t host_keyboard_leds()`
|
||||
|
||||
## `led_update_user()`
|
||||
|
||||
This function will be called when the state of one of those 5 LEDs changes. It receives the LED state as a struct parameter.
|
||||
|
||||
By convention, return `true` from `led_update_user()` to get the `led_update_kb()` hook to run its code, and
|
||||
return `false` when you would prefer not to run the code in `led_update_kb()`.
|
||||
|
||||
Some examples include:
|
||||
|
||||
- overriding the LEDs to use them for something else like layer indication
|
||||
- return `false` because you do not want the `_kb()` function to run, as it would override your layer behavior.
|
||||
- play a sound when an LED turns on or off.
|
||||
- return `true` because you want the `_kb` function to run, and this is in addition to the default LED behavior.
|
||||
|
||||
?> Because the `led_set_*` functions return `void` instead of `bool`, they do not allow for overriding the keyboard LED control, and thus it's recommended to use `led_update_*` instead.
|
||||
|
||||
### Example `led_update_kb()` Implementation
|
||||
|
||||
```c
|
||||
bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if(res) {
|
||||
// writePin sets the pin high for 1 and low for 0.
|
||||
// In this example the pins are inverted, setting
|
||||
// it low/0 turns it on, and high/1 turns the LED off.
|
||||
// This behavior depends on whether the LED is between the pin
|
||||
// and VCC or the pin and GND.
|
||||
writePin(B0, !led_state.num_lock);
|
||||
writePin(B1, !led_state.caps_lock);
|
||||
writePin(B2, !led_state.scroll_lock);
|
||||
writePin(B3, !led_state.compose);
|
||||
writePin(B4, !led_state.kana);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
```
|
||||
|
||||
### Example `led_update_user()` Implementation
|
||||
|
||||
This incomplete example would play a sound if Caps Lock is turned on or off. It returns `true`, because you also want the LEDs to maintain their state.
|
||||
|
||||
```c
|
||||
#ifdef AUDIO_ENABLE
|
||||
float caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND);
|
||||
float caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND);
|
||||
#endif
|
||||
|
||||
bool led_update_user(led_t led_state) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
static uint8_t caps_state = 0;
|
||||
if (caps_state != led_state.caps_lock) {
|
||||
led_state.caps_lock ? PLAY_SONG(caps_on) : PLAY_SONG(caps_off);
|
||||
caps_state = led_state.caps_lock;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
```
|
||||
|
||||
### `led_update_*` Function Documentation
|
||||
|
||||
* Keyboard/Revision: `bool led_update_kb(led_t led_state)`
|
||||
* Keymap: `bool led_update_user(led_t led_state)`
|
||||
|
||||
## `host_keyboard_led_state()`
|
||||
|
||||
Call this function to get the last received LED state as a `led_t`. This is useful for reading the LED state outside `led_update_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code).
|
||||
|
||||
## Setting Physical LED State
|
||||
|
||||
Some keyboard implementations provide convenience methods for setting the state of the physical LEDs.
|
||||
|
||||
### Ergodox Boards
|
||||
|
||||
The Ergodox implementations provide `ergodox_right_led_1`/`2`/`3_on`/`off()` to turn individual LEDs on or off, as well as `ergodox_right_led_on`/`off(uint8_t led)` to turn them on or off by their index.
|
||||
|
||||
In addition, it is possible to specify the brightness level of all LEDs with `ergodox_led_all_set(uint8_t n)`; of individual LEDs with `ergodox_right_led_1`/`2`/`3_set(uint8_t n)`; or by index with `ergodox_right_led_set(uint8_t led, uint8_t n)`.
|
||||
|
||||
Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default).
|
||||
|
||||
# Keyboard Initialization Code
|
||||
|
||||
There are several steps in the keyboard initialization process. Depending on what you want to do, it will influence which function you should use.
|
||||
|
@@ -4,7 +4,7 @@ QMK presents itself to the host as a regular HID keyboard device, and as such re
|
||||
|
||||
There are two notable exceptions: the Caterina bootloader, usually seen on Pro Micros, and the HalfKay bootloader shipped with PJRC Teensys, appear as a serial port and a generic HID device respectively, and so do not require a driver.
|
||||
|
||||
We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with MSYS2 or WSL, the `qmk_install.sh` script will have asked if you want it to install the drivers for you.
|
||||
We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with MSYS2, the `qmk_install.sh` script will have already installed the drivers for you.
|
||||
|
||||
## Installation
|
||||
|
||||
|
@@ -13,65 +13,29 @@ An example of using `sudo`, when your controller is ATMega32u4:
|
||||
|
||||
or just:
|
||||
|
||||
$ sudo make <keyboard>:<keymap>:dfu
|
||||
$ sudo make <keyboard>:<keymap>:flash
|
||||
|
||||
Note that running `make` with `sudo` is generally ***not*** a good idea, and you should use one of the former methods, if possible.
|
||||
|
||||
### Linux `udev` Rules
|
||||
On Linux, you'll need proper privileges to access the MCU. You can either use
|
||||
`sudo` when flashing firmware, or place these files in `/etc/udev/rules.d/`. Once added run the following:
|
||||
```console
|
||||
|
||||
On Linux, you'll need proper privileges to communicate with the bootloader device. You can either use `sudo` when flashing firmware (not recommended), or place [this file](https://github.com/qmk/qmk_firmware/tree/master/util/udev/50-qmk.rules) into `/etc/udev/rules.d/`.
|
||||
|
||||
Once added, run the following:
|
||||
|
||||
```
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/50-atmel-dfu.rules:**
|
||||
```
|
||||
# Atmel ATMega32U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
# Atmel USBKEY AT90USB1287
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
# Atmel ATMega32U2
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/54-input-club-keyboard.rules:**
|
||||
**Note:** With older versions of ModemManager (< 1.12), filtering only works when not in strict mode. The following commands can update that setting:
|
||||
|
||||
```
|
||||
# Input Club keyboard bootloader
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/55-caterina.rules:**
|
||||
```
|
||||
# ModemManager should ignore the following devices
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
```
|
||||
|
||||
**Note:** With older (before 1.12) ModemManager, filtering only works when not in strict mode, the following commands can update that settings:
|
||||
```console
|
||||
printf '[Service]\nExecStart=\nExecStart=/usr/sbin/ModemManager --filter-policy=default' | sudo tee /etc/systemd/system/ModemManager.service.d/policy.conf
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart ModemManager
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/56-dfu-util.rules:**
|
||||
```
|
||||
# stm32duino
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
# Generic stm32
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/57-bootloadhid.rules:**
|
||||
```
|
||||
# bootloadHID
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
```
|
||||
|
||||
### Serial device is not detected in bootloader mode on Linux
|
||||
Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as
|
||||
Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options.
|
||||
@@ -96,46 +60,6 @@ You can buy a really unique VID:PID here. I don't think you need this for person
|
||||
- http://www.obdev.at/products/vusb/license.html
|
||||
- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
|
||||
|
||||
## BOOTLOADER_SIZE for AVR
|
||||
Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong comment.
|
||||
|
||||
```
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 2048
|
||||
# Atmel DFU loader 4096 (TMK Alt Controller)
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=2048
|
||||
```
|
||||
|
||||
## `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.
|
||||
|
||||
The solution is to remove and reinstall all affected modules.
|
||||
|
||||
```
|
||||
brew rm avr-gcc avr-gcc@8 dfu-programmer dfu-util gcc-arm-none-eabi arm-gcc-bin@8 avrdude qmk
|
||||
brew install qmk/qmk/qmk
|
||||
brew link --force avr-gcc@8
|
||||
brew link --force arm-gcc-bin@8
|
||||
```
|
||||
|
||||
### `avr-gcc` and LUFA
|
||||
|
||||
If you updated your `avr-gcc` and you see errors involving LUFA, for example:
|
||||
|
||||
`lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'`
|
||||
|
||||
For now, you need to rollback `avr-gcc` to 8 in Homebrew.
|
||||
|
||||
```
|
||||
brew uninstall --force avr-gcc
|
||||
brew install avr-gcc@8
|
||||
brew link --force avr-gcc@8
|
||||
```
|
||||
|
||||
### I just flashed my keyboard and it does nothing/keypresses don't register - it's also ARM (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019)
|
||||
Due to how EEPROM works on ARM based chips, saved settings may no longer be valid. This affects the default layers, and *may*, under certain circumstances we are still figuring out, make the keyboard unusable. Resetting the EEPROM will correct this.
|
||||
|
||||
|
@@ -31,20 +31,6 @@ Check:
|
||||
- try using 'print' function instead of debug print. See **common/print.h**.
|
||||
- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
|
||||
|
||||
## Linux or UNIX Like System Requires Super User Privilege
|
||||
Just use 'sudo' to execute *hid_listen* with privilege.
|
||||
```
|
||||
$ sudo hid_listen
|
||||
```
|
||||
|
||||
Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system.
|
||||
|
||||
File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu)
|
||||
```
|
||||
# tmk keyboard products https://github.com/tmk/tmk_keyboard
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
# Miscellaneous
|
||||
|
@@ -2,21 +2,24 @@
|
||||
|
||||
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.
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------|-------------------------------|----------------------------------------------------|
|
||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|
||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt 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` |
|
||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||
|`LCAG(kc)`| |Hold Left Control, Alt and GUI 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`|
|
||||
|Key |Aliases |Description |
|
||||
|----------|-------------------------------|------------------------------------------------------|
|
||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|
||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt 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` |
|
||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|
||||
|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` |
|
||||
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|
||||
|`LCAG(kc)`| |Hold Left Control, Alt and GUI 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` |
|
||||
|
||||
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.
|
||||
|
||||
|
@@ -26,7 +26,10 @@ A Bluefruit UART friend can be converted to an SPI friend, however this [require
|
||||
|
||||
<!-- FIXME: Document bluetooth support more completely. -->
|
||||
## Bluetooth Rules.mk Options
|
||||
Use only one of these
|
||||
|
||||
The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)](reference_glossary.md#n-key-rollover-nkro), so `rules.mk` must contain `NKRO_ENABLE = no`.
|
||||
|
||||
Use only one of these to enable Bluetooth:
|
||||
* BLUETOOTH_ENABLE = yes (Legacy Option)
|
||||
* BLUETOOTH = RN42
|
||||
* BLUETOOTH = AdafruitBLE
|
||||
|
@@ -55,7 +55,7 @@ combo_t key_combos[COMBO_COUNT] = {
|
||||
[XV_PASTE] = COMBO_ACTION(paste_combo),
|
||||
};
|
||||
|
||||
void process_combo_event(uint8_t combo_index, bool pressed) {
|
||||
void process_combo_event(uint16_t combo_index, bool pressed) {
|
||||
switch(combo_index) {
|
||||
case ZC_COPY:
|
||||
if (pressed) {
|
||||
|
@@ -1,43 +1,151 @@
|
||||
# Debounce algorithm
|
||||
# Contact bounce / contact chatter
|
||||
|
||||
Mechanical switches often don't have a clean single transition between pressed and unpressed states.
|
||||
|
||||
In an ideal world, when you press a switch, you would expect the digital pin to see something like this:
|
||||
(X axis showing time
|
||||
```
|
||||
voltage +----------------------
|
||||
^ |
|
||||
| |
|
||||
| ------------------+
|
||||
----> time
|
||||
```
|
||||
|
||||
However in the real world you will actually see contact bounce, which will look like multiple 1->0 and 0->1 transitions,
|
||||
until the value finally settles.
|
||||
```
|
||||
+-+ +--+ +-------------
|
||||
| | | | |
|
||||
| | | | |
|
||||
+-----------------+ +-+ +-+
|
||||
```
|
||||
The time it takes for the switch to settle might vary with switch type, age, and even pressing technique.
|
||||
|
||||
If the device chooses not to mitigate contact bounce, then often actions that happen when the switch is pressed are repeated
|
||||
multiple times.
|
||||
|
||||
There are many ways to handle contact bounce ("Debouncing"). Some include employing additional hardware, for example an RC filter,
|
||||
while there are various ways to do debouncing in software too, often called debounce algorithms. This page discusses software
|
||||
debouncing methods available in QMK.
|
||||
|
||||
While technically not considered contact bounce/contact chatter, some switch technologies are susceptible to noise, meaning,
|
||||
while the key is not changing state, sometimes short random 0->1 or 1->0 transitions might be read by the digital circuit, for example:
|
||||
```
|
||||
+-+
|
||||
| |
|
||||
| |
|
||||
+-----------------+ +--------------------
|
||||
```
|
||||
|
||||
Many debounce methods (but not all) will also make the device resistant to noise. If you are working with a technology that is
|
||||
susceptible to noise, you must choose a debounce method that will also mitigate noise for you.
|
||||
|
||||
## Types of debounce algorithms
|
||||
|
||||
1) Unit of time: Timestamp (milliseconds) vs Cycles (scans)
|
||||
* Debounce algorithms often have a 'debounce time' parameter, that specifies the maximum settling time of the switch contacts.
|
||||
This time might be measured in various units:
|
||||
* Cycles-based debouncing waits n cycles (scans), decreasing count by one each matrix_scan
|
||||
* Timestamp-based debouncing stores the millisecond timestamp a change occurred, and does substraction to figure out time elapsed.
|
||||
* Timestamp-based debouncing is usually superior, especially in the case of noise-resistant devices because settling times of physical
|
||||
switches is specified in units of time, and should not depend on the matrix scan-rate of the keyboard.
|
||||
* Cycles-based debouncing is sometimes considered inferior, because the settling time that it is able to compensate for depends on the
|
||||
performance of the matrix scanning code. If you use cycles-based debouncing, and you significantly improve the performance of your scanning
|
||||
code, you might end up with less effective debouncing. A situation in which cycles-based debouncing might be preferable is when
|
||||
noise is present, and the scanning algorithm is slow, or variable speed. Even if your debounce algorithm is fundamentally noise-resistant,
|
||||
if the scanning is slow, and you are using a timestamp-based algorithm, you might end up making a debouncing decision based on only two
|
||||
sampled values, which will limit the noise-resistance of the algorithm.
|
||||
* Currently all built-in debounce algorithms support timestamp-based debouncing only. In the future we might
|
||||
implement cycles-based debouncing, and it will be selectable via a ```config.h``` macro.
|
||||
|
||||
2) Symmetric vs Asymmetric
|
||||
* Symmetric - apply the same debouncing algorithm, to both key-up and key-down events.
|
||||
* Recommended naming convention: ```sym_*```
|
||||
* Asymmetric - apply different debouncing algorithms to key-down and key-up events. E.g. Eager key-down, Defer key-up.
|
||||
* Recommended naming convention: ```asym_*``` followed by details of the type of algorithm in use, in order, for key-down and then key-up
|
||||
|
||||
3) Eager vs Defer
|
||||
* Eager - any key change is reported immediately. All further inputs for DEBOUNCE ms are ignored.
|
||||
* Eager algorithms are not noise-resistant.
|
||||
* Recommended naming conventions:
|
||||
* ```sym_eager_*```
|
||||
* ```asym_eager_*_*```: key-down is using eager algorithm
|
||||
* ```asym_*_eager_*```: key-up is using eager algorithm
|
||||
* Defer - wait for no changes for DEBOUNCE ms before reporting change.
|
||||
* Defer algorithms are noise-resistant
|
||||
* Recommended naming conventions:
|
||||
* ```sym_defer_*```
|
||||
* ```asym_defer_*_*```: key-down is using defer algorithm
|
||||
* ```asym_*_defer_*```: key-up is using defer algorithm
|
||||
|
||||
4) Global vs Per-Key vs Per-Row
|
||||
* Global - one timer for all keys. Any key change state affects global timer
|
||||
* Recommended naming convention: ```*_g```
|
||||
* Per-key - one timer per key
|
||||
* Recommended naming convention: ```*_pk```
|
||||
* Per-row - one timer per row
|
||||
* Recommended naming convention: ```*_pr```
|
||||
* Per-key and per-row algorithms consume more resources (in terms of performance,
|
||||
and ram usage), but fast typists might prefer them over global.
|
||||
|
||||
## Debounce algorithms supported by QMK
|
||||
|
||||
QMK supports multiple debounce algorithms through its debounce API.
|
||||
|
||||
The logic for which debounce method called is below. It checks various defines that you have set in rules.mk
|
||||
The logic for which debounce method called is below. It checks various defines that you have set in ```rules.mk```
|
||||
|
||||
```
|
||||
DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce
|
||||
DEBOUNCE_TYPE?= sym_g
|
||||
DEBOUNCE_TYPE?= sym_defer_g
|
||||
ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
|
||||
QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c
|
||||
endif
|
||||
```
|
||||
|
||||
# Debounce selection
|
||||
### Debounce selection
|
||||
|
||||
| DEBOUNCE_TYPE | Description | What else is needed |
|
||||
| ------------- | --------------------------------------------------- | ----------------------------- |
|
||||
| Not defined | Use the default algorithm, currently sym_g | Nothing |
|
||||
| Not defined | Use the default algorithm, currently sym_defer_g | Nothing |
|
||||
| custom | Use your own debounce code | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions |
|
||||
| anything_else | Use another algorithm from quantum/debounce/* | Nothing |
|
||||
| Anything Else | Use another algorithm from quantum/debounce/* | Nothing |
|
||||
|
||||
**Regarding split keyboards**:
|
||||
The debounce code is compatible with split keyboards.
|
||||
|
||||
# Use your own debouncing code
|
||||
* Set ```DEBOUNCE_TYPE = custom```.
|
||||
* Add ```SRC += debounce.c```
|
||||
### Selecting an included debouncing method
|
||||
Keyboards may select one of the already implemented debounce methods, by adding to ```rules.mk``` the following line:
|
||||
```
|
||||
DEBOUNCE_TYPE = <name of algorithm>
|
||||
```
|
||||
Where name of algorithm is one of:
|
||||
* ```sym_defer_g``` - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occurred, all input changes are pushed.
|
||||
* This is the current default algorithm. This is the highest performance algorithm with lowest memory usage, and it's also noise-resistant.
|
||||
* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row.
|
||||
For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be
|
||||
appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
|
||||
* ```sym_eager_pk``` - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key
|
||||
* ```sym_defer_pk``` - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key status change is pushed.
|
||||
|
||||
### A couple algorithms that could be implemented in the future:
|
||||
* ```sym_defer_pr```
|
||||
* ```sym_eager_g```
|
||||
* ```asym_eager_defer_pk```
|
||||
|
||||
### Use your own debouncing code
|
||||
You have the option to implement you own debouncing algorithm. To do this:
|
||||
* Set ```DEBOUNCE_TYPE = custom``` in ```rules.mk```.
|
||||
* Add ```SRC += debounce.c``` in ```rules.mk```
|
||||
* Add your own ```debounce.c```. Look at current implementations in ```quantum/debounce``` for examples.
|
||||
* Debouncing occurs after every raw matrix scan.
|
||||
* Use num_rows rather than MATRIX_ROWS, so that split keyboards are supported correctly.
|
||||
* If the algorithm might be applicable to other keyboards, please consider adding it to ```quantum/debounce```
|
||||
|
||||
# Changing between included debouncing methods
|
||||
You can either use your own code, by including your own debounce.c, or switch to another included one.
|
||||
Included debounce methods are:
|
||||
* eager_pr - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row.
|
||||
For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be
|
||||
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
|
||||
* 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.
|
||||
### Old names
|
||||
The following old names for existing algorithms will continue to be supported, however it is recommended to use the new names instead.
|
||||
|
||||
* sym_g - old name for sym_defer_g
|
||||
* eager_pk - old name for sym_eager_pk
|
||||
* sym_pk - old name for sym_defer_pk
|
||||
* eager_pr - old name for sym_eager_pr
|
||||
|
||||
|
116
docs/feature_led_indicators.md
Normal file
116
docs/feature_led_indicators.md
Normal file
@@ -0,0 +1,116 @@
|
||||
# LED Indicators
|
||||
|
||||
QMK provides methods to read 5 of the LEDs defined in the HID spec:
|
||||
|
||||
* Num Lock
|
||||
* Caps Lock
|
||||
* Scroll Lock
|
||||
* Compose
|
||||
* Kana
|
||||
|
||||
There are three ways to get the lock LED state:
|
||||
* by specifying configuration options within `config.h`
|
||||
* by implementing `bool led_update_kb(led_t led_state)` or `_user(led_t led_state)`; or
|
||||
* by calling `led_t host_keyboard_led_state()`
|
||||
|
||||
!> `host_keyboard_led_state()` may already reflect a new value before `led_update_user()` is called.
|
||||
|
||||
Two more deprecated functions exist that provide the LED state as a `uint8_t`:
|
||||
|
||||
* `uint8_t led_set_kb(uint8_t usb_led)` and `_user(uint8_t usb_led)`
|
||||
* `uint8_t host_keyboard_leds()`
|
||||
|
||||
## Configuration Options
|
||||
|
||||
To configure the indicators, `#define` these in your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|---------------------|-------------|-------------------------------------------|
|
||||
|`LED_NUM_LOCK_PIN` |*Not defined*|The pin that controls the `Num Lock` LED |
|
||||
|`LED_CAPS_LOCK_PIN` |*Not defined*|The pin that controls the `Caps Lock` LED |
|
||||
|`LED_SCROLL_LOCK_PIN`|*Not defined*|The pin that controls the `Scroll Lock` LED|
|
||||
|`LED_COMPOSE_PIN` |*Not defined*|The pin that controls the `Compose` LED |
|
||||
|`LED_KANA_PIN` |*Not defined*|The pin that controls the `Kana` LED |
|
||||
|`LED_PIN_ON_STATE` |`1` |The state of the indicator pins when the LED is "on" - `1` for high, `0` for low|
|
||||
|
||||
Unless you are designing your own keyboard, you generally should not need to change the above config options.
|
||||
|
||||
## `led_update_*()`
|
||||
|
||||
When the configuration options do not provide enough flexibility, the API hooks provided allow custom control of the LED behavior. These functions will be called when the state of one of those 5 LEDs changes. It receives the LED state as a struct parameter.
|
||||
|
||||
By convention, return `true` from `led_update_user()` to get the `led_update_kb()` hook to run its code, and
|
||||
return `false` when you would prefer not to run the code in `led_update_kb()`.
|
||||
|
||||
Some examples include:
|
||||
|
||||
- overriding the LEDs to use them for something else like layer indication
|
||||
- return `false` because you do not want the `_kb()` function to run, as it would override your layer behavior.
|
||||
- play a sound when an LED turns on or off.
|
||||
- return `true` because you want the `_kb` function to run, and this is in addition to the default LED behavior.
|
||||
|
||||
?> Because the `led_set_*` functions return `void` instead of `bool`, they do not allow for overriding the keyboard LED control, and thus it's recommended to use `led_update_*` instead.
|
||||
|
||||
### Example `led_update_kb()` Implementation
|
||||
|
||||
```c
|
||||
bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if(res) {
|
||||
// writePin sets the pin high for 1 and low for 0.
|
||||
// In this example the pins are inverted, setting
|
||||
// it low/0 turns it on, and high/1 turns the LED off.
|
||||
// This behavior depends on whether the LED is between the pin
|
||||
// and VCC or the pin and GND.
|
||||
writePin(B0, !led_state.num_lock);
|
||||
writePin(B1, !led_state.caps_lock);
|
||||
writePin(B2, !led_state.scroll_lock);
|
||||
writePin(B3, !led_state.compose);
|
||||
writePin(B4, !led_state.kana);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
```
|
||||
|
||||
### Example `led_update_user()` Implementation
|
||||
|
||||
This incomplete example would play a sound if Caps Lock is turned on or off. It returns `true`, because you also want the LEDs to maintain their state.
|
||||
|
||||
```c
|
||||
#ifdef AUDIO_ENABLE
|
||||
float caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND);
|
||||
float caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND);
|
||||
#endif
|
||||
|
||||
bool led_update_user(led_t led_state) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
static uint8_t caps_state = 0;
|
||||
if (caps_state != led_state.caps_lock) {
|
||||
led_state.caps_lock ? PLAY_SONG(caps_on) : PLAY_SONG(caps_off);
|
||||
caps_state = led_state.caps_lock;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
```
|
||||
|
||||
### `led_update_*` Function Documentation
|
||||
|
||||
* Keyboard/Revision: `bool led_update_kb(led_t led_state)`
|
||||
* Keymap: `bool led_update_user(led_t led_state)`
|
||||
|
||||
## `host_keyboard_led_state()`
|
||||
|
||||
Call this function to get the last received LED state as a `led_t`. This is useful for reading the LED state outside `led_update_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code).
|
||||
|
||||
## Setting Physical LED State
|
||||
|
||||
Some keyboard implementations provide convenience methods for setting the state of the physical LEDs.
|
||||
|
||||
### Ergodox Boards
|
||||
|
||||
The Ergodox implementations provide `ergodox_right_led_1`/`2`/`3_on`/`off()` to turn individual LEDs on or off, as well as `ergodox_right_led_on`/`off(uint8_t led)` to turn them on or off by their index.
|
||||
|
||||
In addition, it is possible to specify the brightness level of all LEDs with `ergodox_led_all_set(uint8_t n)`; of individual LEDs with `ergodox_right_led_1`/`2`/`3_set(uint8_t n)`; or by index with `ergodox_right_led_set(uint8_t led, uint8_t n)`.
|
||||
|
||||
Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default).
|
@@ -140,8 +140,8 @@ void oled_task_user(void) {
|
||||
|---------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
|`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display |
|
||||
|`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts |
|
||||
|`OLED_FONT_START` |`0` |The starting characer index for custom fonts |
|
||||
|`OLED_FONT_END` |`223` |The ending characer index for custom fonts |
|
||||
|`OLED_FONT_START` |`0` |The starting character index for custom fonts |
|
||||
|`OLED_FONT_END` |`223` |The ending character index for custom fonts |
|
||||
|`OLED_FONT_WIDTH` |`6` |The font width |
|
||||
|`OLED_FONT_HEIGHT` |`8` |The font height (untested) |
|
||||
|`OLED_TIMEOUT` |`60000` |Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
|
||||
@@ -149,6 +149,7 @@ void oled_task_user(void) {
|
||||
|`OLED_SCROLL_TIMEOUT_RIGHT`|*Not defined* |Scroll timeout direction is right when defined, left when undefined. |
|
||||
|`OLED_IC` |`OLED_IC_SSD1306`|Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
|
||||
|`OLED_COLUMN_OFFSET` |`0` |(SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC.|
|
||||
|`OLED_BRIGHTNESS` |`255` |The default brightness level of the OLED, from 0 to 255. |
|
||||
|
||||
## 128x64 & Custom sized OLED Displays
|
||||
|
||||
@@ -300,6 +301,16 @@ bool oled_on(void);
|
||||
// Returns true if the screen was off or turns off
|
||||
bool oled_off(void);
|
||||
|
||||
// Returns true if the oled is currently on, false if it is
|
||||
// not
|
||||
bool is_oled_on(void);
|
||||
|
||||
// Sets the brightness level of the display
|
||||
uint8_t oled_set_brightness(uint8_t level);
|
||||
|
||||
// Gets the current brightness level of the display
|
||||
uint8_t oled_get_brightness(void);
|
||||
|
||||
// Basically it's oled_render, but with timeout management and oled_task_user calling!
|
||||
void oled_task(void);
|
||||
|
||||
|
@@ -129,7 +129,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:
|
||||
|
||||
```c
|
||||
const led_config_t g_led_config = { {
|
||||
led_config_t g_led_config = { {
|
||||
// Key Matrix to LED Index
|
||||
{ 5, NO_LED, NO_LED, 0 },
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED },
|
||||
|
@@ -41,6 +41,8 @@ Changing the **Hue** cycles around the circle.<br>
|
||||
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.<br>
|
||||
Changing the **Value** sets the overall brightness.<br>
|
||||
|
||||

|
||||
|
||||
## Keycodes
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|
@@ -48,11 +48,12 @@ However, USB cables, SATA cables, and even just 4 wires have been known to be us
|
||||
|
||||
### Serial Wiring
|
||||
|
||||
The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and D0 (aka PDO or pin 3) between the two Pro Micros.
|
||||
The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and D0/D1/D2/D3 (aka PD0/PD1/PD2/PD3) between the two Pro Micros.
|
||||
|
||||
?> Note that the pin used here is actually set by `SOFT_SERIAL_PIN` below.
|
||||
|
||||

|
||||
<img alt="sk-pd0-connection-mono" src="https://user-images.githubusercontent.com/2170248/92296488-28e9ad80-ef70-11ea-98be-c40cb48a0319.JPG" width="48%"/>
|
||||
<img alt="sk-pd2-connection-mono" src="https://user-images.githubusercontent.com/2170248/92296490-2d15cb00-ef70-11ea-801f-5ace313013e6.JPG" width="48%"/>
|
||||
|
||||
### I<sup>2</sup>C Wiring
|
||||
|
||||
@@ -60,7 +61,7 @@ The 4 wires of the TRRS cable need to connect GND, VCC, and SCL and SDA (aka PD0
|
||||
|
||||
The pull-up resistors may be placed on either half. If you wish to use the halves independently, it is also possible to use 4 resistors and have the pull-ups in both halves.
|
||||
|
||||

|
||||
<img alt="sk-i2c-connection-mono" src="https://user-images.githubusercontent.com/2170248/92297182-92b98580-ef77-11ea-9d7d-d6033914af43.JPG" width="50%"/>
|
||||
|
||||
## Firmware Configuration
|
||||
|
||||
|
@@ -3,6 +3,25 @@
|
||||
Since starting, QMK has grown by leaps and bounds thanks to people like you who contribute to creating and maintaining our community keyboards. As we've grown we've discovered some patterns that work well, and ask that you conform to them to make it easier for other people to benefit from your hard work.
|
||||
|
||||
|
||||
## Use QMK Lint
|
||||
|
||||
We have provided a tool, `qmk lint`, which will let you check over your keyboard for problems. We suggest using it frequently while working on your keyboard and keymap.
|
||||
|
||||
Example passing check:
|
||||
|
||||
```
|
||||
$ qmk lint -kb rominronin/katana60/rev2
|
||||
Ψ Lint check passed!
|
||||
```
|
||||
|
||||
Example failing check:
|
||||
|
||||
```
|
||||
$ qmk lint -kb clueboard/66/rev3
|
||||
☒ Missing keyboards/clueboard/66/rev3/readme.md
|
||||
☒ Lint check failed!
|
||||
```
|
||||
|
||||
## Naming Your Keyboard/Project
|
||||
|
||||
All keyboard names are in lower case, consisting only of letters, numbers, and underscore (`_`). Names may not begin with an underscore. Forward slash (`/`) is used as a sub-folder separation character.
|
||||
@@ -192,7 +211,7 @@ When developing your keyboard, keep in mind that all warnings will be treated as
|
||||
|
||||
## Copyright Blurb
|
||||
|
||||
If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, in this format:
|
||||
If you're adapting your keyboard's setup from another project, but not using the same code, be sure to update the copyright header at the top of the files to show your name, in this format:
|
||||
|
||||
Copyright 2017 Your Name <your@email.com>
|
||||
|
||||
|
@@ -46,6 +46,7 @@
|
||||
'/unicode': '/feature_unicode',
|
||||
'/python_development': '/cli_development',
|
||||
'/getting_started_build_tools':'/newbs_getting_started',
|
||||
'/tutorial':'/newbs',
|
||||
},
|
||||
basePath: '/',
|
||||
name: 'QMK Firmware',
|
||||
|
@@ -116,6 +116,7 @@
|
||||
* [概要](ja/breaking_changes.md)
|
||||
* [プルリクエストにフラグが付けられた](ja/breaking_changes_instructions.md)
|
||||
* 履歴
|
||||
* [2020年8月29日](ja/ChangeLog/20200829.md)
|
||||
* [2020年5月30日](ja/ChangeLog/20200530.md)
|
||||
* [2020年2月29日](ja/ChangeLog/20200229.md)
|
||||
* [2019年8月30日](ja/ChangeLog/20190830.md)
|
||||
|
8
docs/ja/api_development_environment.md
Normal file
8
docs/ja/api_development_environment.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# 開発環境のセットアップ
|
||||
|
||||
<!---
|
||||
original document: 0.9.50:docs/api_development_environment.md
|
||||
git diff 0.9.50 HEAD -- docs/api_development_environment.md | cat
|
||||
-->
|
||||
|
||||
開発環境をセットアップするには、[qmk_web_stack](https://github.com/qmk/qmk_web_stack) に行ってください。
|
49
docs/ja/api_development_overview.md
Normal file
49
docs/ja/api_development_overview.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# QMK コンパイラ開発ガイド
|
||||
|
||||
<!---
|
||||
original document: 0.9.50:docs/api_development_overview.md
|
||||
git diff 0.9.50 HEAD -- docs/api_development_overview.md | cat
|
||||
-->
|
||||
|
||||
このページでは、開発者に QMK コンパイラを紹介しようと思います。コードを読まなければならないような核心となる詳細に立ち入って調べることはしません。ここで得られるものは、コードを読んで理解を深めるためのフレームワークです。
|
||||
|
||||
# 概要
|
||||
|
||||
QMK Compile API は、いくつかの可動部分からできています:
|
||||
|
||||

|
||||
|
||||
API クライアントは API サービスと排他的にやりとりをします。ここでジョブをサブミットし、状態を調べ、結果をダウンロードします。API サービスはコンパイルジョブを [Redis Queue](https://python-rq.org) に挿入し、それらのジョブの結果について RQ と S3 の両方を調べます。
|
||||
|
||||
ワーカーは RQ から新しいコンパイルジョブを取り出し、ソースとバイナリを S3 互換のストレージエンジンにアップロードします。
|
||||
|
||||
# ワーカー
|
||||
|
||||
QMK コンパイラワーカーは実際のビルド作業に責任を持ちます。ワーカーは RQ からジョブを取り出し、ジョブを完了するためにいくつかの事を行います:
|
||||
|
||||
* 新しい qmk_firmware のチェックアウトを作成する
|
||||
* 指定されたレイヤーとキーボードメタデータを使って `keymap.c` をビルドする
|
||||
* ファームウェアをビルドする
|
||||
* ソースのコピーを zip 形式で圧縮する
|
||||
* ファームウェア、ソースの zip ファイル、メタデータファイルを S3 にアップロードする
|
||||
* ジョブの状態を RQ に送信する
|
||||
|
||||
# API サービス
|
||||
|
||||
API サービスは比較的単純な Flask アプリケーションです。理解しておくべきことが幾つかあります。
|
||||
|
||||
## @app.route('/v1/compile', methods=['POST'])
|
||||
|
||||
これは API の主なエントリーポイントです。クライアントとのやりとりはここから開始されます。クライアントはキーボードを表す JSON ドキュメントを POST し、API はコンパイルジョブをサブミットする前にいくらかの(とても)基本的な検証を行います。
|
||||
|
||||
## @app.route('/v1/compile/<string:job_id>', methods=['GET'])
|
||||
|
||||
これは最もよく呼ばれるエンドポイントです。ジョブの詳細が redis から利用可能であればそれを取り出し、そうでなければ S3 からキャッシュされたジョブの詳細を取り出します。
|
||||
|
||||
## @app.route('/v1/compile/<string:job_id>/download', methods=['GET'])
|
||||
|
||||
このメソッドによりユーザはコンパイルされたファームウェアファイルをダウンロードすることができます。
|
||||
|
||||
## @app.route('/v1/compile/<string:job_id>/source', methods=['GET'])
|
||||
|
||||
このメソッドによりユーザはファームウェアのソースをダウンロードすることができます。
|
73
docs/ja/api_docs.md
Normal file
73
docs/ja/api_docs.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# QMK API
|
||||
|
||||
<!---
|
||||
original document: 0.9.50:docs/api_docs.md
|
||||
git diff 0.9.50 HEAD -- docs/api_docs.md | cat
|
||||
-->
|
||||
|
||||
このページは QMK API の使い方を説明します。もしあなたがアプリケーション開発者であれば、全ての [QMK](https://qmk.fm) キーボードのファームウェアをコンパイルするために、この API を使うことができます。
|
||||
|
||||
## 概要
|
||||
|
||||
このサービスは、カスタムキーマップをコンパイルするための非同期 API です。API に 何らかの JSON を POST し、定期的に状態をチェックし、ファームウェアのコンパイルが完了していれば、結果のファームウェアと(もし希望すれば)そのファームウェアのソースコードをダウンロードすることができます。
|
||||
|
||||
#### JSON ペイロードの例:
|
||||
|
||||
```json
|
||||
{
|
||||
"keyboard": "clueboard/66/rev2",
|
||||
"keymap": "my_awesome_keymap",
|
||||
"layout": "LAYOUT_all",
|
||||
"layers": [
|
||||
["KC_GRV","KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","KC_0","KC_MINS","KC_EQL","KC_GRV","KC_BSPC","KC_PGUP","KC_TAB","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_LBRC","KC_RBRC","KC_BSLS","KC_PGDN","KC_CAPS","KC_A","KC_S","KC_D","KC_F","KC_G","KC_H","KC_J","KC_K","KC_L","KC_SCLN","KC_QUOT","KC_NUHS","KC_ENT","KC_LSFT","KC_NUBS","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_RO","KC_RSFT","KC_UP","KC_LCTL","KC_LGUI","KC_LALT","KC_MHEN","KC_SPC","KC_SPC","KC_HENK","KC_RALT","KC_RCTL","MO(1)","KC_LEFT","KC_DOWN","KC_RIGHT"],
|
||||
["KC_ESC","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_F11","KC_F12","KC_TRNS","KC_DEL","BL_STEP","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","_______","KC_TRNS","KC_PSCR","KC_SLCK","KC_PAUS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(2)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_PGUP","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(1)","KC_LEFT","KC_PGDN","KC_RGHT"],
|
||||
["KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","RESET","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(2)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(1)","KC_TRNS","KC_TRNS","KC_TRNS"]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
ご覧のとおり、ペイロードにはファームウェアを作成および生成するために必要なキーボードの全ての側面を記述します。各レイヤーは QMK キーコードの1つのリストで、キーボードの `LAYOUT` マクロと同じ長さです。もしキーボードが複数の `LAYOUT` マクロをサポートする場合、どのマクロを使うかを指定することができます。
|
||||
|
||||
## コンパイルジョブのサブミット
|
||||
|
||||
キーマップをファームウェアにコンパイルするには、単純に JSON を `/v1/compile` エンドポイントに POST します。以下の例では、JSON ペイロードを `json_data` という名前のファイルに配置しています。
|
||||
|
||||
```
|
||||
$ curl -H "Content-Type: application/json" -X POST -d "$(< json_data)" http://api.qmk.fm/v1/compile
|
||||
{
|
||||
"enqueued": true,
|
||||
"job_id": "ea1514b3-bdfc-4a7b-9b5c-08752684f7f6"
|
||||
}
|
||||
```
|
||||
|
||||
## 状態のチェック
|
||||
|
||||
キーマップをサブミットした後で、簡単な HTTP GET 呼び出しを使って状態をチェックすることができます:
|
||||
|
||||
```
|
||||
$ curl http://api.qmk.fm/v1/compile/ea1514b3-bdfc-4a7b-9b5c-08752684f7f6
|
||||
{
|
||||
"created_at": "Sat, 19 Aug 2017 21:39:12 GMT",
|
||||
"enqueued_at": "Sat, 19 Aug 2017 21:39:12 GMT",
|
||||
"id": "f5f9b992-73b4-479b-8236-df1deb37c163",
|
||||
"status": "running",
|
||||
"result": null
|
||||
}
|
||||
```
|
||||
|
||||
これは、ジョブをキューに入れることに成功し、現在実行中であることを示しています。5つの状態がありえます:
|
||||
|
||||
* **failed**: なんらかの理由でコンパイルサービスが失敗しました。
|
||||
* **finished**: コンパイルが完了し、結果を見るには `result` をチェックする必要があります。
|
||||
* **queued**: キーマップはコンパイルサーバが利用可能になるのを待っています。
|
||||
* **running**: コンパイルが進行中で、まもなく完了するはずです。
|
||||
* **unknown**: 深刻なエラーが発生し、[バグを報告](https://github.com/qmk/qmk_compiler/issues)する必要があります。
|
||||
|
||||
## 完了した結果を検証
|
||||
|
||||
コンパイルジョブが完了したら、`result` キーをチェックします。このキーの値は幾つかの情報を含むハッシュです:
|
||||
|
||||
* `firmware_binary_url`: 書き込み可能なファームウェアの URL のリスト
|
||||
* `firmware_keymap_url`: `keymap.c` の URL のリスト
|
||||
* `firmware_source_url`: ファームウェアの完全なソースコードの URL のリスト
|
||||
* `output`: このコンパイルジョブの stdout と stderr。エラーはここで見つけることができます。
|
20
docs/ja/api_overview.md
Normal file
20
docs/ja/api_overview.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# QMK API
|
||||
|
||||
<!---
|
||||
original document: 0.9.50:docs/api_overview.md
|
||||
git diff 0.9.50 HEAD -- docs/api_overview.md | cat
|
||||
-->
|
||||
|
||||
QMK API は、Web と GUI ツールが [QMK](http://qmk.fm/) によってサポートされるキーボード用の任意のキーマップをコンパイルするために使うことができる、非同期 API を提供します。標準のキーマップテンプレートは、C コードのサポートを必要としない全ての QMK キーコードをサポートします。キーボードのメンテナは独自のカスタムテンプレートを提供して、より多くの機能を実現することができます。
|
||||
|
||||
## アプリケーション開発者
|
||||
|
||||
もしあなたがアプリケーションでこの API を使うことに興味があるアプリケーション開発者であれば、[API の使用](ja/api_docs.md) に行くべきです。
|
||||
|
||||
## キーボードのメンテナ
|
||||
|
||||
もし QMK Compiler API でのあなたのキーボードのサポートを強化したい場合は、[キーボードサポート](ja/reference_configurator_support.md) の節に行くべきです。
|
||||
|
||||
## バックエンド開発者
|
||||
|
||||
もし API 自体に取り組むことに興味がある場合は、[開発環境](ja/api_development_environment.md)のセットアップから始め、それから [API のハッキング](ja/api_development_overview.md) を調べるべきです。
|
@@ -2,8 +2,8 @@
|
||||
|
||||
<!---
|
||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||
original document: 0.9.0:docs/breaking_changes.md
|
||||
git diff 0.9.0 HEAD -- docs/breaking_changes.md | cat
|
||||
original document: 0.10.33:docs/breaking_changes.md
|
||||
git diff 0.10.33 HEAD -- docs/breaking_changes.md | cat
|
||||
-->
|
||||
|
||||
このドキュメントは QMK の互換性を破る変更(Breaking change) のプロセスについて説明します。
|
||||
@@ -15,22 +15,23 @@ Breaking change ピリオドとは、危険な変更、または予想外の変
|
||||
|
||||
## 過去の Breaking change には何が含まれますか?
|
||||
|
||||
* [2020年8月29日](ja/ChangeLog/20200829.md)
|
||||
* [2020年5月30日](ja/ChangeLog/20200530.md)
|
||||
* [2020年2月29日](ja/ChangeLog/20200229.md)
|
||||
* [2019年8月30日](ja/ChangeLog/20190830.md)
|
||||
|
||||
## 次の Breaking change はいつですか?
|
||||
|
||||
次の Breaking change は2020年8月29日に予定されています。
|
||||
次の Breaking change は2020年11月28日に予定されています。
|
||||
|
||||
### 重要な日付
|
||||
|
||||
* [x] 2020年 5月30日 - `develop` が作成されました。毎週リベースされます。
|
||||
* [ ] 2020年 8月 1日 - `develop` は新しいPRを取り込みません。
|
||||
* [ ] 2020年 8月 1日 - テスターの募集。
|
||||
* [ ] 2020年 8月27日 - `master`がロックされ、PR はマージされません。
|
||||
* [ ] 2020年 8月29日 - `develop` を `master` にマージします。
|
||||
* [ ] 2020年 8月29日 - `master` のロックが解除されます。PR を再びマージすることができます。
|
||||
* [x] 2020年 8月29日 - `develop` が作成されました。毎週リベースされます。
|
||||
* [ ] 2020年10月31日 - `develop` は新しいPRを取り込みません。
|
||||
* [ ] 2020年10月31日 - テスターの募集。
|
||||
* [ ] 2020年11月26日 - `master`がロックされ、PR はマージされません。
|
||||
* [ ] 2020年11月28日 - `develop` を `master` にマージします。
|
||||
* [ ] 2020年11月28日 - `master` のロックが解除されます。PR を再びマージすることができます。
|
||||
|
||||
## どのような変更が含まれますか?
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# QMK の設定
|
||||
|
||||
<!---
|
||||
original document: 0.9.43:docs/config_options.md
|
||||
git diff 0.9.43 HEAD -- docs/config_options.md | cat
|
||||
original document: 0.10.33:docs/config_options.md
|
||||
git diff 0.10.33 HEAD -- docs/config_options.md | cat
|
||||
-->
|
||||
|
||||
QMK はほぼ無制限に設定可能です。可能なところはいかなるところでも、やりすぎな程、ユーザーがコードサイズを犠牲にしてでも彼らのキーボードをカスタマイズをすることを許しています。ただし、このレベルの柔軟性により設定が困難になります。
|
||||
|
@@ -31,7 +31,7 @@ keyboards/<keyboard>/matrix.c
|
||||
SRC += matrix.c
|
||||
```
|
||||
|
||||
## マトリックスコードの部分置き換え
|
||||
## マトリックスコードの部分置き換え :id=lite
|
||||
|
||||
カスタムマトリックスを実装する際、定型コードを書かなくてすむように、さまざまなスキャン関数のデフォルト実装を提供しています。
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# キーボードの挙動をカスタマイズする方法
|
||||
|
||||
<!---
|
||||
original document: 0.9.43:docs/custom_quantum_functions.md
|
||||
git diff 0.9.43 HEAD -- docs/custom_quantum_functions.md | cat
|
||||
original document: 0.10.33:docs/custom_quantum_functions.md
|
||||
git diff 0.10.33 HEAD -- docs/custom_quantum_functions.md | cat
|
||||
-->
|
||||
|
||||
多くの人にとって、カスタムキーボードはボタンの押下をコンピュータに送信するだけではありません。単純なボタンの押下やマクロよりも複雑なことを実行できるようにしたいでしょう。QMK にはコードを挿入したり、機能を上書きしたり、様々な状況でキーボードの挙動をカスタマイズできるフックがあります。
|
||||
@@ -232,7 +232,7 @@ void keyboard_pre_init_user(void) {
|
||||
}
|
||||
```
|
||||
|
||||
### `keyboard_pre_init_*` 関数のドキュメント
|
||||
### `keyboard_pre_init_*` 関数のドキュメント :id=keyboard_pre_init_-function-documentation
|
||||
|
||||
* キーボード/リビジョン: `void keyboard_pre_init_kb(void)`
|
||||
* キーマップ: `void keyboard_pre_init_user(void)`
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# ドキュメントベストプラクティス
|
||||
|
||||
<!---
|
||||
original document: 0.9.19:docs/documentation_best_practices.md
|
||||
git diff 0.9.19 HEAD -- docs/documentation_best_practices.md | cat
|
||||
original document: 0.10.33:docs/documentation_best_practices.md
|
||||
git diff 0.10.33 HEAD -- docs/documentation_best_practices.md | cat
|
||||
-->
|
||||
|
||||
このページは QMK のためのドキュメントを作成する時のベストプラクティスを文章化するためのものです。これらのガイドラインに従うことで、一貫したトーンとスタイルを維持することでき、他の人が QMK をより理解しやすくすることができます。
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# よくあるビルドの質問
|
||||
|
||||
<!---
|
||||
original document: 0.9.43:docs/faq_build.md
|
||||
git diff 0.9.43 HEAD -- docs/faq_build.md | cat
|
||||
original document: 0.10.33:docs/faq_build.md
|
||||
git diff 0.10.33 HEAD -- docs/faq_build.md | cat
|
||||
-->
|
||||
|
||||
このページは QMK のビルドに関する質問を説明します。まだビルドをしていない場合は、[ビルド環境のセットアップ](ja/getting_started_build_tools.md) および [Make 手順](ja/getting_started_make_guide.md)ガイドを読むべきです。
|
||||
@@ -18,64 +18,93 @@
|
||||
|
||||
あるいは、単純に:
|
||||
|
||||
$ sudo make <keyboard>:<keymap>:dfu
|
||||
$ sudo make <keyboard>:<keymap>:flash
|
||||
|
||||
`make` を `sudo` で実行することは一般的には良い考えでは***なく***、可能であれば前者の方法のいずれかを使うべきです。
|
||||
|
||||
### Linux の `udev` ルール
|
||||
Linux では、MCU にアクセスするには適切な権限が必要です。ファームウェアを書き込む時に `sudo` を使うか、`/etc/udev/rules.d/` にこれらのファイルを配置することで、アクセスすることができます。権限の追加が完了したら、以下を実行します:
|
||||
```console
|
||||
|
||||
Linux では、ブートローダデバイスと通信するには適切な権限が必要です。ファームウェアを書き込む時に `sudo` を使うか、`/etc/udev/rules.d/` にこのファイルを配置することで、通信することができます。
|
||||
|
||||
**/etc/udev/rules.d/50-qmk.rules:**
|
||||
```
|
||||
# Atmel DFU
|
||||
### ATmega16U2
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FEF", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
### ATmega32U2
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF0", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
### ATmega16U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF3", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
### ATmega32U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF4", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
### AT90USB64
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF9", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
### AT90USB128
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FFB", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
|
||||
# Input Club
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1C11", ATTRS{idProduct}=="B007", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
|
||||
# STM32duino
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1EAF", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
# STM32 DFU
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="DF11", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
|
||||
# BootloadHID
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DF", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
|
||||
# USBAspLoader
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DC", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
|
||||
# ModemManager should ignore the following devices
|
||||
# Atmel SAM-BA (Massdrop)
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="6124", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
|
||||
# Caterina (Pro Micro)
|
||||
## Spark Fun Electronics
|
||||
### Pro Micro 3V3/8MHz
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### Pro Micro 5V/16MHz
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### LilyPad 3V3/8MHz (and some Pro Micro clones)
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9207", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
## Pololu Electronics
|
||||
### A-Star 32U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1FFB", ATTRS{idProduct}=="0101", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
## Arduino SA
|
||||
### Leonardo
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### Micro
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
## Adafruit Industries LLC
|
||||
### Feather 32U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000C", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### ItsyBitsy 32U4 3V3/8MHz
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000D", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### ItsyBitsy 32U4 5V/16MHz
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000E", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
## dog hunter AG
|
||||
### Leonardo
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### Micro
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
```
|
||||
|
||||
追加が完了したら、以下を実行します:
|
||||
|
||||
```
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/50-atmel-dfu.rules:**
|
||||
```
|
||||
# Atmel ATMega32U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
# Atmel USBKEY AT90USB1287
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
# Atmel ATMega32U2
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/54-input-club-keyboard.rules:**
|
||||
|
||||
```
|
||||
# Input Club keyboard bootloader
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/55-caterina.rules:**
|
||||
```
|
||||
# ModemManager should ignore the following devices
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
```
|
||||
|
||||
**注意:** 古い(1.12以前の) ModemManager では、フィルタリングは厳密なモードではない場合にのみ動作し、以下のコマンドはその設定を更新することができます。
|
||||
```console
|
||||
|
||||
```
|
||||
printf '[Service]\nExecStart=\nExecStart=/usr/sbin/ModemManager --filter-policy=default' | sudo tee /etc/systemd/system/ModemManager.service.d/policy.conf
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart ModemManager
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/56-dfu-util.rules:**
|
||||
```
|
||||
# stm32duino
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
# Generic stm32
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/57-bootloadhid.rules:**
|
||||
```
|
||||
# bootloadHID
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
```
|
||||
|
||||
### Linux のブートローダモードで Serial デバイスが検知されない
|
||||
カーネルがデバイスを適切にサポートしていることを確認してください。デバイスが、Pro Micro (Atmega32u4) のように USB ACM を使う場合、`CONFIG_USB_ACM=y` を含めるようにしてください。他のデバイスは `USB_SERIAL` およびそのサブオプションを必要とするかもしれません。
|
||||
|
||||
@@ -99,50 +128,10 @@ https://github.com/tmk/tmk_keyboard/issues/150
|
||||
- http://www.obdev.at/products/vusb/license.html
|
||||
- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
|
||||
|
||||
## AVR のための BOOTLOADER_SIZE
|
||||
Teensy2.0++ ブートローダのサイズは 2048 バイトであることに注意してください。一部の Makefile には間違ったコメントがあります。
|
||||
|
||||
```
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 2048
|
||||
# Atmel DFU loader 4096 (TMK Alt Controller)
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=2048
|
||||
```
|
||||
|
||||
## MacOS での `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)`
|
||||
|
||||
これは brew での更新に関する問題で、avr-gcc が依存するシンボリックリンクを壊します。
|
||||
|
||||
解決法は全ての影響を受けたモジュールを削除し再インストールすることです。
|
||||
|
||||
```
|
||||
brew rm avr-gcc avr-gcc@8 dfu-programmer dfu-util gcc-arm-none-eabi arm-gcc-bin@8 avrdude qmk
|
||||
brew install qmk/qmk/qmk
|
||||
brew link --force avr-gcc@8
|
||||
brew link --force arm-gcc-bin@8
|
||||
```
|
||||
|
||||
### `avr-gcc` と LUFA
|
||||
|
||||
`avr-gcc` を更新し、LUFA に関連するエラーが表示された場合、例えば:
|
||||
|
||||
`lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'`
|
||||
|
||||
今のところ、Homebrew で `avr-gcc` を 8 にロールバックする必要があります。
|
||||
|
||||
```
|
||||
brew uninstall --force avr-gcc
|
||||
brew install avr-gcc@8
|
||||
brew link --force avr-gcc@8
|
||||
```
|
||||
|
||||
### キーボードに書き込んだが何も起こらない、あるいはキーの押下が登録されない - ARM (rev6 planck、clueboard 60、hs60v2 など) でも同じ (Feb 2019)
|
||||
ARM ベースのチップ上での EEPROM の動作によって、保存された設定が無効になる場合があります。これはデフォルトレイヤに影響し、まだ調査中の特定の環境下でキーボードが使えなくなる*しれません*。EEPROM のリセットでこれが修正されます。
|
||||
|
||||
[Planck rev6 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) を使って eeprom のリセットを強制することができます。このイメージを書き込んだ後で、通常のファームウェアを書き込むと、キーボードが_通常_ の動作順序に復元されます。
|
||||
[Preonic rev3 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/537849497313738762/preonic_rev3_default.bin)
|
||||
|
||||
いずれかの形式でブートマジックが有効になっている場合は、これも実行できるはずです (実行方法の詳細については、[ブートマジックドキュメント](feature_bootmagic.md)とキーボード情報を見てください)。
|
||||
いずれかの形式でブートマジックが有効になっている場合は、これも実行できるはずです (実行方法の詳細については、[ブートマジックドキュメント](ja/feature_bootmagic.md)とキーボード情報を見てください)。
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# デバッグの FAQ
|
||||
|
||||
<!---
|
||||
original document: 0.9.10:docs/faq_debug.md
|
||||
git diff 0.9.10 HEAD -- docs/faq_debug.md | cat
|
||||
original document: 0.10.33:docs/faq_debug.md
|
||||
git diff 0.10.33 HEAD -- docs/faq_debug.md | cat
|
||||
-->
|
||||
|
||||
このページは、キーボードのトラブルシューティングについての様々な一般的な質問を説明します。
|
||||
@@ -36,20 +36,6 @@ Linux のような OS でデバイスにアクセスするには、権限が必
|
||||
- デバッグ print の代わりに 'print' 関数を使ってみてください。**common/print.h** を見てください。
|
||||
- コンソール機能を持つ他のデバイスを切断します。[Issue #97](https://github.com/tmk/tmk_keyboard/issues/97) を見てください。
|
||||
|
||||
## Linux あるいは UNIX のようなシステムはスーパーユーザ権限を必要とします
|
||||
権限付きで *hid_listen* を実行するために 'sudo' を使ってください。
|
||||
```
|
||||
$ sudo hid_listen
|
||||
```
|
||||
|
||||
または rules ディレクトリにファイルを置いて、TMK デバイスのための *udev rule* を追加します。ディレクトリは各システムで異なるかもしれません。
|
||||
|
||||
File: /etc/udev/rules.d/52-tmk-keyboard.rules (Ubuntu の場合)
|
||||
```
|
||||
# tmk keyboard products https://github.com/tmk/tmk_keyboard
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
# 雑多なこと
|
||||
|
@@ -51,7 +51,7 @@ OK、問題ありません。[GitHub で issue を開く](https://github.com/qmk
|
||||
|
||||
TMK は [Jun Wako](https://github.com/tmk) によって設計され実装されました。QMK は [Jack Humbert](https://github.com/jackhumbert) の Planck 用 TMK のフォークとして始まりました。しばらくして、Jack のフォークは TMK からかなり分岐し、2015年に Jack はフォークを QMK に名前を変えることにしました。
|
||||
|
||||
技術的な観点から、QMK は幾つかの新しい機能を追加した TMK に基づいています。最も注目すべきことは、QMK は利用可能なキーコードの数を増やし、`S()`、`LCTL()` および `MO()` などの高度な機能を実装するためにこれらを使っています。[キーコード](keycodes.md)でこれらのキーコードの完全なリストを見ることができます。
|
||||
技術的な観点から、QMK は幾つかの新しい機能を追加した TMK に基づいています。最も注目すべきことは、QMK は利用可能なキーコードの数を増やし、`S()`、`LCTL()` および `MO()` などの高度な機能を実装するためにこれらを使っています。[キーコード](ja/keycodes.md)でこれらのキーコードの完全なリストを見ることができます。
|
||||
|
||||
プロジェクトとコミュニティの管理の観点から、TMK は公式にサポートされている全てのキーボードを自分で管理しており、コミュニティのサポートも少し受けています。他のキーボード用に別個のコミュニティが維持するフォークが存在するか、作成できます。デフォルトでは少数のキーマップのみが提供されるため、ユーザは一般的にお互いにキーマップを共有しません。QMK は集中管理されたリポジトリを介して、キーボードとキーマップの両方を共有することを奨励しており、品質基準に準拠する全てのプルリクエストを受け付けます。これらはほとんどコミュニティで管理されますが、必要な場合は QMK チームも支援します。
|
||||
|
||||
|
@@ -128,7 +128,7 @@ https://github.com/tekezo/Karabiner/issues/403
|
||||
|
||||
## 単一のキーでの Esc と<code>`</code>
|
||||
|
||||
[Grave Escape](feature_grave_esc.md) 機能を見てください。
|
||||
[Grave Escape](ja/feature_grave_esc.md) 機能を見てください。
|
||||
|
||||
## Mac OSX での Eject
|
||||
`KC_EJCT` キーコードは OSX で動作します。https://github.com/tmk/tmk_keyboard/issues/250
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# 自動シフト: なぜシフトキーが必要ですか?
|
||||
|
||||
<!---
|
||||
original document: 0.9.0:docs/feature_auto_shift.md
|
||||
git diff 0.9.0 HEAD -- docs/feature_auto_shift.md | cat
|
||||
original document: 0.10.33:docs/feature_auto_shift.md
|
||||
git diff 0.10.33 HEAD -- docs/feature_auto_shift.md | cat
|
||||
-->
|
||||
|
||||
キーをタップすると、その文字を取得します。キーをタップするが、*わずかに*長く押し続けると、シフト状態になります。ほら!シフトキーは必要ありません!
|
||||
@@ -109,7 +109,7 @@ AからZを含むアルファベット文字を自動シフトしません。
|
||||
5. タイムアウトを増やすことに決めた場合は、`KC_ASUP` にマップしたキーを押し、ステップ1に戻ります。
|
||||
6. 結果に満足したら、`KC_ASRP` にマップしたキーを押します。キーボードは `AUTO_SHIFT_TIMEOUT` の値を自動的に入力します。
|
||||
7. 報告された値で `config.h` の `AUTO_SHIFT_TIMEOUT` を更新します。
|
||||
8. `config.h` から `AUTO_SHIFT_SETUP` を削除します。
|
||||
8. `config.h` に `AUTO_SHIFT_NO_SETUP` を追加します。
|
||||
9. `KC_ASDN`、`KC_ASUP` および `KC_ASRP` のキーバインディングを削除します。
|
||||
10. 新しいファームウェアをコンパイルしてアップロードします。
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# バックライト :id=backlighting
|
||||
|
||||
<!---
|
||||
original document: 0.9.44:docs/feature_backlight.md
|
||||
git diff 0.9.44 HEAD -- docs/feature_backlight.md | cat
|
||||
original document: 0.10.33:docs/feature_backlight.md
|
||||
git diff 0.10.33 HEAD -- docs/feature_backlight.md | cat
|
||||
-->
|
||||
|
||||
多くのキーボードは、キースイッチを貫通して配置されたり、キースイッチの下に配置された個々の LED によって、バックライトキーをサポートします。この機能は通常スイッチごとに単一の色しか使用できないため、[RGB アンダーグロー](ja/feature_rgblight.md)および [RGB マトリックス](ja/feature_rgb_matrix.md)機能のどちらとも異なりますが、キーボードに複数の異なる単一色の LED を取り付けることは当然可能です。
|
||||
@@ -165,8 +165,6 @@ BACKLIGHT_DRIVER = pwm
|
||||
|
||||
現在のところ、ハードウェア PWM のみがサポートされ、タイマー支援はなく、自動設定は提供されません。
|
||||
|
||||
?> STM32F072 のバックライトサポートのテストは制限されています。人によって違うかもしれません。不明な場合は、`rules.mk` で `BACKLIGHT_ENABLE = no` を設定します。
|
||||
|
||||
### ソフトウェア PWM ドライバ :id=software-pwm-driver
|
||||
|
||||
このモードでは、他のキーボードのタスクを実行中に PWM は「エミュレート」されます。追加のプラットフォーム設定なしで最大のハードウェア互換性を提供します。トレードオフは、キーボードが忙しい時にバックライトが揺れる可能性があることです。有効にするには、`rules.mk` に以下を追加します:
|
||||
|
@@ -1,18 +1,18 @@
|
||||
# Bluetooth
|
||||
|
||||
<!---
|
||||
original document: 0.9.0:docs/feature_bluetooth.md
|
||||
git diff 0.9.0 HEAD -- docs/feature_bluetooth.md | cat
|
||||
original document: 0.10.33:docs/feature_bluetooth.md
|
||||
git diff 0.10.33 HEAD -- docs/feature_bluetooth.md | cat
|
||||
-->
|
||||
|
||||
## Bluetooth の既知のサポートハードウェア
|
||||
|
||||
現在のところ Bluetooth のサポートは AVR ベースのチップに限られます。Bluetooth 2.1 については、QMK は RN-42 モジュールをサポートします。より最近の BLE プロトコルについては、現在のところ Adafruit Bluefruit SPI Friend のみが直接サポートされています。iOS デバイスに接続するには、BLE が必要です。iOS はマウス入力をサポートしないことに注意してください。
|
||||
|
||||
| ボード | Bluetooth プロトコル | 接続タイプ | rules.mk | Bluetooth チップ |
|
||||
|----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------|
|
||||
| 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 |
|
||||
| ボード | Bluetooth プロトコル | 接続タイプ | rules.mk | Bluetooth チップ |
|
||||
| ---------------------------------------------------------------- | -------------------- | ---------- | ------------------------- | ---------------- |
|
||||
| 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)
|
||||
@@ -30,7 +30,10 @@ Bluefruit UART friend は SPI friend に変換することができますが、
|
||||
|
||||
<!-- FIXME: Document bluetooth support more completely. -->
|
||||
## Bluetooth の Rules.mk オプション
|
||||
これらのうちの1つだけを使ってください
|
||||
|
||||
現在サポートされている Bluetooth チップセットは [N-キーロールオーバー (NKRO)](ja/reference_glossary.md#n-key-rollover-nkro) をサポートしていません。そのため、`rules.mk` に `NKRO_ENABLE = no` を含めなければなりません。
|
||||
|
||||
Bluetooth を有効にするには、以下のうちの1つだけを使ってください:
|
||||
* BLUETOOTH_ENABLE = yes (レガシーオプション)
|
||||
* BLUETOOTH = RN42
|
||||
* BLUETOOTH = AdafruitBLE
|
||||
@@ -39,8 +42,8 @@ Bluefruit UART friend は SPI friend に変換することができますが、
|
||||
|
||||
これは複数のキーボードの出力が選択できる場合に使われます。現在のところ、これは USB と Bluetooth の両方をサポートするキーボードで、それらの間の切り替えのみが可能です。
|
||||
|
||||
| 名前 | 説明 |
|
||||
|----------|----------------------------------------------|
|
||||
| 名前 | 説明 |
|
||||
| ---------- | ------------------------------------- |
|
||||
| `OUT_AUTO` | USB と Bluetooth を自動的に切り替える |
|
||||
| `OUT_USB` | USB のみ |
|
||||
| `OUT_BT` | Bluetooth のみ |
|
||||
| `OUT_USB` | USB のみ |
|
||||
| `OUT_BT` | Bluetooth のみ |
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# コンボ
|
||||
|
||||
<!---
|
||||
original document: 0.8.94:docs/feature_combo.md
|
||||
git diff 0.8.94 HEAD -- docs/feature_combo.md | cat
|
||||
original document: 0.10.36:docs/feature_combo.md
|
||||
git diff 0.10.36 HEAD -- docs/feature_combo.md | cat
|
||||
-->
|
||||
|
||||
コンボ機能は、同時押し方式でのカスタムアクション追加機能です。同時に複数のキーを押して、異なる効果を生み出すことができます。例えば、タッピング時間内で `A` と `S` を押すと、代わりに `ESC` が押されます。もっと複雑なタスクを実行させることもできます。
|
||||
@@ -60,7 +60,7 @@ combo_t key_combos[COMBO_COUNT] = {
|
||||
[XV_PASTE] = COMBO_ACTION(paste_combo),
|
||||
};
|
||||
|
||||
void process_combo_event(uint8_t combo_index, bool pressed) {
|
||||
void process_combo_event(uint16_t combo_index, bool pressed) {
|
||||
switch(combo_index) {
|
||||
case ZC_COPY:
|
||||
if (pressed) {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# 動的マクロ: ランタイムでのマクロの記録および再生
|
||||
|
||||
<!---
|
||||
original document: 0.9.43:docs/feature_dynamic_macros.md
|
||||
git diff 0.9.43 HEAD -- docs/feature_dynamic_macros.md | cat
|
||||
original document: 0.10.33:docs/feature_dynamic_macros.md
|
||||
git diff 0.10.33 HEAD -- docs/feature_dynamic_macros.md | cat
|
||||
-->
|
||||
|
||||
QMK はその場で作られた一時的なマクロをサポートします。これらを動的マクロと呼びます。それらはユーザがキーボードから定義し、キーボードのプラグを抜くか再起動すると失われます。
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# リーダーキー: 新しい種類のモディファイア
|
||||
|
||||
<!---
|
||||
original document: 0.8.134:docs/feature_leader_key.md
|
||||
git diff 0.8.134 HEAD -- docs/feature_leader_key.md | cat
|
||||
original document: 0.10.33:docs/feature_leader_key.md
|
||||
git diff 0.10.33 HEAD -- docs/feature_leader_key.md | cat
|
||||
-->
|
||||
|
||||
もしあなたが Vim を使ったことがある場合、リーダーキーは何であるかを知っています。そうでなければ、素晴らしい概念を発見しようとしています。:) 例えば、Alt+Shift+W を押す(3つのキーを同時に押す)代わりに、キーの_シーケンス_を押すことができたらどうでしょう?つまり、特別なモディファイア (リーダーキー)を押して、続けて W と C を押すと (単純にキーを高速に繋げます)、何かが起こります。
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# 分割キーボード
|
||||
|
||||
<!---
|
||||
original document:0.9.43:docs/feature_split_keyboard.md
|
||||
git diff 0.9.43 HEAD -- docs/feature_split_keyboard.md | cat
|
||||
original document:0.10.8:docs/feature_split_keyboard.md
|
||||
git diff 0.10.8 HEAD -- docs/feature_split_keyboard.md | cat
|
||||
-->
|
||||
|
||||
QMK ファームウェアリポジトリの多くのキーボードは、"分割"キーボードです。それらは2つのコントローラを使います — 1つは USB に接続し、もう1つは TRRS または同様のケーブルを介してシリアルまたは I<sup>2</sup>C 接続で接続します。
|
||||
@@ -20,12 +20,12 @@ QMK ファームウェアには、任意のキーボードで使用可能な一
|
||||
|
||||
| Transport | AVR | ARM |
|
||||
|------------------------------|--------------------|--------------------|
|
||||
| ['serial'](serial_driver.md) | :heavy_check_mark: | :white_check_mark: <sup>1</sup> |
|
||||
| ['serial'](ja/serial_driver.md) | :heavy_check_mark: | :white_check_mark: <sup>1</sup> |
|
||||
| I2C | :heavy_check_mark: | |
|
||||
|
||||
注意:
|
||||
|
||||
1. ハードウェアとソフトウェアの両方の制限は、[ドライバーのドキュメント](serial_driver.md)の中で説明されます。
|
||||
1. ハードウェアとソフトウェアの両方の制限は、[ドライバーのドキュメント](ja/serial_driver.md)の中で説明されます。
|
||||
|
||||
## ハードウェア設定
|
||||
|
||||
@@ -53,11 +53,12 @@ QMK ファームウェアには、任意のキーボードで使用可能な一
|
||||
|
||||
### シリアル配線
|
||||
|
||||
2つの Pro Micro 間で GND、Vcc、D0 (別名 PDO あるいは pin 3) を TRS/TRRS ケーブルの3本のワイヤで接続します。
|
||||
2つの Pro Micro 間で GND、Vcc、D0/D1/D2/D3 (別名 PD0/PD1/PD2/PD3) を TRS/TRRS ケーブルの3本のワイヤで接続します。
|
||||
|
||||
?> ここで使われるピンは実際には以下の `SOFT_SERIAL_PIN` によって設定されることに注意してください。
|
||||
|
||||

|
||||
<img alt="sk-pd0-connection-mono" src="https://user-images.githubusercontent.com/2170248/92296488-28e9ad80-ef70-11ea-98be-c40cb48a0319.JPG" width="48%"/>
|
||||
<img alt="sk-pd2-connection-mono" src="https://user-images.githubusercontent.com/2170248/92296490-2d15cb00-ef70-11ea-801f-5ace313013e6.JPG" width="48%"/>
|
||||
|
||||
### I<sup>2</sup>C 配線
|
||||
|
||||
@@ -65,7 +66,7 @@ QMK ファームウェアには、任意のキーボードで使用可能な一
|
||||
|
||||
プルアップ抵抗はキーボードの左右どちら側にも配置することができます。もし各側を単独で使いたい場合は、4つの抵抗を使い、両側にプルアップ抵抗を配置することもできます。
|
||||
|
||||

|
||||
<img alt="sk-i2c-connection-mono" src="https://user-images.githubusercontent.com/2170248/92297182-92b98580-ef77-11ea-9d7d-d6033914af43.JPG" width="50%"/>
|
||||
|
||||
## ファームウェア設定
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# QMK での速記 :id=stenography-in-qmk
|
||||
|
||||
<!---
|
||||
original document: 0.9.19:docs/feature_stenography.md
|
||||
git diff 0.9.19 HEAD -- docs/feature_stenography.md | cat
|
||||
original document: 0.10.33:docs/feature_stenography.md
|
||||
git diff 0.10.33 HEAD -- docs/feature_stenography.md | cat
|
||||
-->
|
||||
|
||||
[速記](https://en.wikipedia.org/wiki/Stenotype)は裁判所のレポート、字幕および耳が不自由な人のためのリアルタイムの文字起こしで最もよく使われる記述方法です。速記では単語はスペル、音声およびショートカット(短い)ストロークが混在する音節ごとに音節化されます。プロの速記者は、標準的なタイピングで通常見られる負担を掛けずに、はるかに少ないエラー(99.9%より高い精度)で、200-300 WPM に到達できます。
|
||||
|
@@ -1,9 +1,9 @@
|
||||
# タップダンス: 1つのキーが3つ、5つまたは100の異なる動作をします
|
||||
|
||||
<!---
|
||||
original document: 0.9.44:docs/feature_tap_dance.md
|
||||
git diff 0.9.44 HEAD -- docs/feature_tap_dance.md | cat
|
||||
-->
|
||||
original document: 0.10.33:docs/feature_tap_dance.md
|
||||
git diff 0.10.33 HEAD -- docs/feature_tap_dance.md | cat
|
||||
-->
|
||||
|
||||
## イントロダクション :id=introduction
|
||||
|
||||
@@ -32,7 +32,9 @@
|
||||
* `ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer)`: 1回タップすると `kc` キーコードが送信され、2回タップすると `layer` の状態をトグルします(これは `TG` レイヤーキーコードのように機能します)。
|
||||
* `ACTION_TAP_DANCE_FN(fn)`: ユーザーキーマップに定義した指定の関数が呼び出されます。タップダンス実行の回数分タップすると、最後の時点で呼び出されます。
|
||||
* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: タップする度にユーザーキーマップに定義した最初の関数が呼び出されます。タップダンスの実行が終わった時点で2番目の関数が呼び出され、タップダンスの実行をリセットするときに最後の関数が呼び出されます。
|
||||
* `ACTION_TAP_DANCE_FN_ADVANCED_TIME(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn, tap_specific_tapping_term)`: これは `ACTION_TAP_DANCE_FN_ADVANCED` と同じように機能します。しかし、`TAPPING_TERM` で事前に定義した時間に代えて、カスタマイズしたタップ時間を使えます。
|
||||
* ~~`ACTION_TAP_DANCE_FN_ADVANCED_TIME(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn, tap_specific_tapping_term)`~~: これは `ACTION_TAP_DANCE_FN_ADVANCED` 関数と同じように機能します。しかし、`TAPPING_TERM` で事前に定義した時間の代わりに、カスタマイズしたタップ時間を使います。
|
||||
* [ここ](ja/custom_quantum_functions.md#Custom_Tapping_Term)で概説するように、これはキーごとのタッピング時間機能を優先して非推奨になりました。この特定のタップダンス機能を使う代わりに、使いたい特定の `TD()` マクロ(`TD(TD_ESC_CAPS)` のような)を確認する必要があります。
|
||||
|
||||
|
||||
最初のオプションで、1つのキーに2つの役割を持たせる大抵のケースには十分です。例えば、`ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` は、1回タップすると `Space` を送信し、2回タップすると `Enter` を送信します。
|
||||
|
||||
@@ -55,7 +57,7 @@
|
||||
異なる場合、まず、古いタップダンスを処理し、続いて新しいタップダンスを登録します。
|
||||
同じ場合、カウンタの値を増やし、タイマーをリセットします。
|
||||
|
||||
このことは、あなたは再びキーをタップするまでの時間として `TAPPING_TERM` の時間を持っていることを意味します。そのため、あなたは1つの `TAPPING_TERM` の時間内に全てのタップを行う必要はありません。これにより、キーの反応への影響を最小限に抑えながら、より長いタップ回数を可能にします。
|
||||
このことは、あなたは再びキーをタップするまでの時間として `TAPPING_TERM` の時間を持っていることを意味します。そのため、あなたは1つの `TAPPING_TERM` の時間内に全てのタップを行う必要はありません。これにより、キーの反応への影響を最小限に抑えながら、より長いタップ回数を可能にします。
|
||||
|
||||
次は `matrix_scan_tap_dance()` です。この関数はタップダンスキーのタイムアウトを制御します。
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# 書き込みの手順とブートローダ情報
|
||||
|
||||
<!---
|
||||
original document: 0.9.10:docs/flashing.md
|
||||
git diff 0.9.10 HEAD -- docs/flashing.md | cat
|
||||
original document: 0.10.33:docs/flashing.md
|
||||
git diff 0.10.33 HEAD -- docs/flashing.md | cat
|
||||
-->
|
||||
|
||||
キーボードが使用するブートローダにはかなり多くの種類があり、ほぼ全てが異なる書き込みの方法を使います。幸いなことに、[QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) のようなプロジェクトは、あまり深く考える必要無しに様々なタイプと互換性を持つことを目指していますが、この文章では様々なタイプのブートローダとそれらを書き込むために利用可能な方法について説明します。
|
||||
@@ -244,3 +244,4 @@ BOOTLOADER = bootloadHID
|
||||
* `:dfu-util-split-left` - デフォルトのオプション (`:dfu-util`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」 EEPROM の設定も行われます。
|
||||
* `:dfu-util-split-right` - デフォルトのオプション (`:dfu-util`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」 EEPROM の設定も行われます。
|
||||
* `:st-link-cli` - dfu-util ではなく、ST-LINK の CLI ユーティリティを介してファームウェアを書き込めます。
|
||||
* `:st-flash` - dfu-util ではなく、[STLink Tools](https://github.com/stlink-org/stlink) の `st-flash` ユーティリティを介してファームウェアを書き込めます。
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# より詳細な `make` 手順
|
||||
|
||||
<!---
|
||||
original document: 0.9.0:docs/getting_started_make_guide.md
|
||||
git diff 0.9.0 HEAD -- docs/getting_started_make_guide.md | cat
|
||||
original document: 0.10.33:docs/getting_started_make_guide.md
|
||||
git diff 0.10.33 HEAD -- docs/getting_started_make_guide.md | cat
|
||||
-->
|
||||
|
||||
`make` コマンドの完全な構文は `<keyboard_folder>:<keymap>:<target>` です:
|
||||
|
@@ -2,8 +2,8 @@
|
||||
|
||||
<!---
|
||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||
original document: 0.9.0:docs/hardware_avr.md
|
||||
git diff 0.9.0 HEAD -- docs/hardware_avr.md | cat
|
||||
original document: 0.10.33:docs/hardware_avr.md
|
||||
git diff 0.10.33 HEAD -- docs/hardware_avr.md | cat
|
||||
-->
|
||||
|
||||
このページでは QMK における AVR マイコンのサポートについて説明します。AVR マイコンには、Atmel 社製の atmega32u4、atmega32u2、at90usb1286 やその他のマイコンを含みます。AVR マイコンは、簡単に動かせるよう設計された8ビットの MCU です。キーボードでよく使用される AVR マイコンには USB 機能や大きなキーボードマトリックスのためのたくさんの GPIO を搭載しています。これらは、現在、キーボードで使われる最も一般的な MCU です。
|
||||
|
@@ -2,8 +2,8 @@
|
||||
|
||||
<!---
|
||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||
original document: 0.9.0:docs/hardware_keyboard_guidelines.md
|
||||
git diff 0.9.0 HEAD -- docs/hardware_keyboard_guidelines.md | cat
|
||||
original document: 0.10.33:docs/hardware_keyboard_guidelines.md
|
||||
git diff 0.10.33 HEAD -- docs/hardware_keyboard_guidelines.md | cat
|
||||
-->
|
||||
|
||||
QMK は開始以来、コミュニティにおけるキーボードの作成や保守に貢献しているあなたのような人たちのおかげで飛躍的に成長しました。私たちが成長するにつれて、うまくやるためのいくつかのパターンを発見しました。他の人たちがあなたの苦労の恩恵を受けやすくするため、それにあわせてもらえるようお願いします。
|
||||
|
@@ -101,4 +101,4 @@
|
||||
- [Deskthority の記事](https://deskthority.net/wiki/Keyboard_matrix)
|
||||
- [Dave Dribin による Keyboard Matrix Help (2000)](https://www.dribin.org/dave/keyboard/one_html/)
|
||||
- [PCBheaven による How Key Matrices Works](http://pcbheaven.com/wikipages/How_Key_Matrices_Works/) (アニメーションの例)
|
||||
- [キーボードの仕組み - QMK ドキュメント](how_keyboards_work.md)
|
||||
- [キーボードの仕組み - QMK ドキュメント](ja/how_keyboards_work.md)
|
||||
|
@@ -2,8 +2,8 @@
|
||||
|
||||
<!---
|
||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||
original document: 0.8.62:docs/i2c_driver.md
|
||||
git diff 0.8.62 HEAD -- docs/i2c_driver.md | cat
|
||||
original document: 0.10.33:docs/i2c_driver.md
|
||||
git diff 0.10.33 HEAD -- docs/i2c_driver.md | cat
|
||||
-->
|
||||
|
||||
QMK で使われる I2C マスタドライバには、MCU 間のポータビリティを提供するための一連の関数が用意されています。
|
||||
@@ -83,8 +83,8 @@ STM32 MCU では、使用するハードウェアドライバにより、さま
|
||||
|-----------------------|--------------------------------------------------------------------------------------------------|---------|
|
||||
| `I2C1_SCL_BANK` | SCL に使うピンのバンク (`GPIOA`, `GPIOB`, `GPIOC`) | `GPIOB` |
|
||||
| `I2C1_SDA_BANK` | SDA に使うピンのバンク (`GPIOA`, `GPIOB`, `GPIOC`) | `GPIOB` |
|
||||
| `I2C1_SCL` | SCL のピン番号 (0-9) | `6` |
|
||||
| `I2C1_SDA` | SDA のピン番号 (0-9) | `7` |
|
||||
| `I2C1_SCL` | SCL のピン番号 (0-15) | `6` |
|
||||
| `I2C1_SDA` | SDA のピン番号 (0-15) | `7` |
|
||||
| `I2C1_BANK`(非推奨) | 使用するピンのバンク (`GPIOA`, `GPIOB`, `GPIOC`)。後継は `I2C1_SCL_BANK`, `I2C1_SDA_BANK` です。 | `GPIOB` |
|
||||
|
||||
ChibiOS I2C ドライバの設定項目は STM32 MCU の種類に依存します。
|
||||
|
284
docs/ja/isp_flashing_guide.md
Normal file
284
docs/ja/isp_flashing_guide.md
Normal file
@@ -0,0 +1,284 @@
|
||||
# ISP 書き込みガイド
|
||||
|
||||
<!---
|
||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||
original document: 0.9.46:docs/isp_flashing_guide.md
|
||||
git diff 0.9.46 HEAD -- docs/isp_flashing_guide.md | cat
|
||||
-->
|
||||
|
||||
ISP 書き込み(ICSP 書き込みと呼ぶ場合もあります)とは、マイクロコントローラーを直接プログラミングするプロセスです。
|
||||
これにより、ブートローダを交換したり、コントローラの「ヒューズ」を変更することができ、コントローラの速度や起動方法、その他のオプションなど、多くのハードウェアおよびソフトウェア関連の機能を制御します。
|
||||
|
||||
QMK の ISP 書き込みの主な用途は、AVRベースのコントローラ(Pro Micro、または V-USB チップ)のブートローダの書き込みまたは交換です。
|
||||
|
||||
?> これは Pro Micro や他の ATmega コントローラなどの AVR ベースのボードをプログラミングするためだけのものです。 Proton C などの Arm コントローラには使用できません。
|
||||
|
||||
## 破損したブートローダーの取り扱い
|
||||
|
||||
ボードの書き込み/消去で問題が発生し、DFU ベースのコントローラで次のような不可解なエラーメッセージが表示される場合:
|
||||
|
||||
libusb: warning [darwin_transfer_status] transfer error: timed out
|
||||
dfu.c:844: -ETIMEDOUT: Transfer timed out, NAK 0xffffffc4 (-60)
|
||||
atmel.c:1627: atmel_flash: flash data dfu_download failed.
|
||||
atmel.c:1629: Expected message length of 1072, got -60.
|
||||
atmel.c:1434: Error flashing the block: err -2.
|
||||
ERROR
|
||||
Memory write error, use debug for more info.
|
||||
commands.c:360: Error writing memory data. (err -4)
|
||||
|
||||
dfu.c:844: -EPIPE: a) Babble detect or b) Endpoint stalled 0xffffffe0 (-32)
|
||||
Device is write protected.
|
||||
dfu.c:252: dfu_clear_status( 0x7fff4fc2ea80 )
|
||||
atmel.c:1434: Error flashing the block: err -2.
|
||||
ERROR
|
||||
Memory write error, use debug for more info.
|
||||
commands.c:360: Error writing memory data. (err -4)
|
||||
|
||||
または、Pro Micro ベースのコントローラに対して次のようなメッセージが表示された場合:
|
||||
|
||||
avrdude: butterfly_recv(): programmer is not responding
|
||||
avrdude: butterfly_recv(): programmer is not responding
|
||||
avrdude: verification error, first mismatch at byte 0x002a
|
||||
0x2b != 0x75
|
||||
avrdude: verification error; content mismatch
|
||||
avrdude: verification error; content mismatch
|
||||
|
||||
|
||||
あなたのボード/デバイスを再び動作させるには、ISP 書き込みが必要になるかもしれません。
|
||||
|
||||
## 必要なハードウェア
|
||||
|
||||
実際に ISP の書き込みを行うには、以下のいずれか(その後に使用するプロトコルが続きます)が必要になります。
|
||||
|
||||
* [SparkFun PocketAVR](https://www.sparkfun.com/products/9825) - (USB Tiny)
|
||||
* [USBtinyISP AVR Programmer Kit](https://www.adafruit.com/product/46) - (USB Tiny)
|
||||
* [Teensy 2.0](https://www.pjrc.com/store/teensy.html) - (avrisp)
|
||||
* [Pro Micro](https://www.sparkfun.com/products/12640) - (avrisp)
|
||||
* [Bus Pirate](https://www.adafruit.com/product/237) - (buspirate)
|
||||
|
||||
ISP 書き込みに使用できるデバイスは他にもありますが、これらが主なものです。
|
||||
また、すべての製品リンクは公式バージョンへのものです。他の場所で入手することもできます。
|
||||
|
||||
また、「ISP プログラマ」をプログラミングするデバイスに配線するためのものも必要になります。
|
||||
PCB の中には直接使用できる ISP ヘッダがあるものもありますが、そうではない場合が多いので、コントローラ自体にハンダ付けするか、別のスイッチや他のコンポーネントにハンダ付けする必要があるでしょう。
|
||||
|
||||
### ISP ファームウェア
|
||||
|
||||
Teensy と Pro Micro のコントローラを ISP プログラマとして使用するには、コントローラに ISP ファームウェアを書き込む必要があります。
|
||||
それ以外のハードウェアは、あらかじめプログラムされているはずです。
|
||||
そのため、これらのコントローラの場合は、正しい hex ファイルをダウンロードしてから書き込んでください。
|
||||
|
||||
* Teensy 2.0: [`util/teensy_2.0_ISP_B0.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/teensy_2.0_ISP_B0.hex) (`B0`)
|
||||
* Pro Micro: [`util/pro_micro_ISP_B6_10.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/pro_micro_ISP_B6_10.hex) (`10/B6`)
|
||||
|
||||
コントローラに書き込んだら、この hex ファイルはもう必要ありません。
|
||||
|
||||
## 必要なソフトウェア
|
||||
|
||||
QMK ツールボックスは、このほとんど(すべて)に使用することができます。
|
||||
|
||||
ただし、Teensy 2.0 ボードを使っている場合は、[Teensy Loader](https:/www.pjrc.comteensyloader.html) を使えば、Teensy 2.0 ボードに書き込むことができます。
|
||||
あるいは、`avrdude` (`qmk_install.sh` の一部としてインストールされています) や、[AVRDUDESS](https:/blog.zakkemble.netavrdudess-a-gui-for-avrdude)(Windows 用) を使って、Pro Micro に書き込んだり、ISP を書き込んだりすることができます。
|
||||
|
||||
## 配線
|
||||
|
||||
これは非常に簡単です。次のようにして、相互に対応するものを接続します。
|
||||
|
||||
### SparkFun Pocket AVR
|
||||
|
||||
PocketAVR RST <-> Keyboard RESET
|
||||
PocketAVR SCLK <-> Keyboard B1 (SCLK)
|
||||
PocketAVR MOSI <-> Keyboard B2 (MOSI)
|
||||
PocketAVR MISO <-> Keyboard B3 (MISO)
|
||||
PocketAVR VCC <-> Keyboard VCC
|
||||
PocketAVR GND <-> Keyboard GND
|
||||
|
||||
### Teensy 2.0
|
||||
|
||||
Teensy B0 <-> Keyboard RESET
|
||||
Teensy B1 <-> Keyboard B1 (SCLK)
|
||||
Teensy B2 <-> Keyboard B2 (MOSI)
|
||||
Teensy B3 <-> Keyboard B3 (MISO)
|
||||
Teensy VCC <-> Keyboard VCC
|
||||
Teensy GND <-> Keyboard GND
|
||||
|
||||
!> Teensy の B0 ピンはキーボードのコントローラの RESET/RST ピンと配線されています。 Teensy の RESET ピンをキーボードの RESET に配線しないでください。
|
||||
|
||||
### Pro Micro
|
||||
|
||||
Pro Micro 10 (B6) <-> Keyboard RESET
|
||||
Pro Micro 15 (B1) <-> Keyboard B1 (SCLK)
|
||||
Pro Micro 16 (B2) <-> Keyboard B2 (MOSI)
|
||||
Pro Micro 14 (B3) <-> Keyboard B3 (MISO)
|
||||
Pro Micro VCC <-> Keyboard VCC
|
||||
Pro Micro GND <-> Keyboard GND
|
||||
|
||||
!> Pro Micro の 10/B6 ピンはキーボードのコントローラの RESET/RST ピンに配線されています。 Pro Micro の RESET ピンをキーボードの RESET に配線 ***しないでください***。
|
||||
|
||||
## キーボードへの書き込み
|
||||
|
||||
ISP プログラマをセットアップして、キーボードに接続したら、キーボードに書き込みをします。
|
||||
|
||||
### ブートローダファイル
|
||||
|
||||
普通の状態に戻す一番簡単で手っ取り早い方法は、キーボードにブートローダだけ書き込むことです。
|
||||
これが終れば、普通にキーボードを接続して、普通にキーボードに書き込みできるようになります。
|
||||
|
||||
標準のブートローダは[`util/` フォルダー](https://github.com/qmk/qmk_firmware/tree/master/util) にあります。
|
||||
チップの正しいブートローダを書き込んでください:
|
||||
|
||||
* **Atmel DFU**
|
||||
* [ATmega16U4](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega16u4_1.0.1.hex)
|
||||
* [ATmega32U4](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1.0.0.hex)
|
||||
* [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)
|
||||
|
||||
お使いのボードが何を使っているかわからない場合は、QMK のキーボード用の `rules.mk` ファイルを見てください。
|
||||
`MCU` と `BOOTLOADER` の行には必要な値が書かれています。これはボードのバージョンによって異なるかもしれません。
|
||||
|
||||
### 製造手法
|
||||
|
||||
ブートローダと通常のファームウェアを同時に書き込みたい場合、2つの方法があります。
|
||||
手動で行うか、コンパイル時に `:production` ターゲットを使って行うかです。
|
||||
|
||||
手動で行うには:
|
||||
|
||||
1. オリジナルのファームウェアの .hex ファイルをテキストエディタで開きます
|
||||
2. 最後の行を削除してください。(`:00000001FF`になっているはずです - これは EOF メッセージです)
|
||||
3. ブートローダの内容全体を新しい行にコピーして(行間に空行を入れないように)、元のファイルの最後に貼り付けてください。
|
||||
4. これを新しいファイルとして `<keyboard>_<keymap>_production.hex` という名前で保存します。
|
||||
|
||||
?> ここでは他のブートローダも同じように使うことができますが、__ブートローダが必要で__、そうしないとまた ISP を使ってキーボードに新しいファームウェアを書き込まなければならなくなります。
|
||||
|
||||
#### QMK DFU ブートローダとプロダクションイメージの作成
|
||||
|
||||
コンパイル時に `:production` ターゲットを使用して、ボード用のファームウェア、QMK DFU ブートローダ、プロダクションファームウェアイメージを作成することができます。
|
||||
これが完了すると、3つのファイルが表示されます:
|
||||
|
||||
* `<keyboard>_<keymap>.hex`
|
||||
* `<keyboard>_<keymap>_bootloader.hex`
|
||||
* `<keyboard>_<keymap>_production.hex`
|
||||
|
||||
QMK DFU ブートローダは `atmega32u4` コントローラ (AVR ベースの Planck ボードや Pro Micro など) でしかテストされておらず、他のコントローラではテストされていません。
|
||||
しかし、`atmega32a` や `atmega328p` のような V-USB コントローラでは間違いなく動作しません。
|
||||
|
||||
ブートローダかプロダクションファームウェアファイルのどちらかを書き込むことができます。
|
||||
プロダクションファームウェアファイルの方が、より多くのデータを書き込むので、書き込みに時間がかかります。
|
||||
|
||||
?> 注意:同じブートローダを使用しつづけるべきです。すでに DFU を使用している場合は、QMK DFU に切り替えても問題ありません。しかし、例えば Pro Micro に QMK DFU を書き込むには、追加の手順が必要になります。
|
||||
|
||||
## ブートローダ/プロダクションファイルの書き込み
|
||||
|
||||
キーボードがどのデバイスにも接続されていないことを確認し、ISP プログラマを接続してください。
|
||||
|
||||
ブートローダの種類を変更したい場合は、コマンドラインを使用する必要があります。
|
||||
|
||||
### QMK Toolbox
|
||||
|
||||
1. 'AVRISP device connected' または `USB Tiny device connected` が黄色で表示されます。
|
||||
2. `Open` ダイアログで正しいブートローダー/プロダクションの .hex ファイルを選択します(パスにスペースを含めることはできません)
|
||||
3. 書きこもうとしているキーボード(ISP プログラマではなく)のための正しい `Microcontroller` オプションが選択されていることを確認してください。
|
||||
4. `Flash` を押します
|
||||
5. 特にプロダクションファイルの場合、しばらくは何も出力されませんが、待ちましょう。
|
||||
|
||||
検証とヒューズのチェックに問題がなければ、完了です。
|
||||
ボードが自動的に再起動する場合があります。
|
||||
それ以外の場合は、Teensy のプラグを抜いて、キーボードを接続します。
|
||||
テスト中は、Teensy をキーボードに接続したままにすることができますが、すべてが正常に機能することを確認したら、はんだを外すか、配線を外すことをお勧めします。
|
||||
|
||||
### コマンドライン
|
||||
|
||||
ターミナル(Windows の場合は `cmd`)を開いて、修正した .hex ファイルがある場所に移動します。
|
||||
ここでは、このファイルを `main.hex` と呼び、Teensy 2.0 が `COM3` ポートに接続されていると仮定します。
|
||||
よくわからない場合は、デバイスマネージャを開いて、`Ports > USB Serial Device` を探してください。ここにある COM ポートを使ってください。
|
||||
あなたはそれが正しいポートであることを確認することができます:
|
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4
|
||||
|
||||
次のような出力が得られるはずです:
|
||||
|
||||
avrdude: AVR device initialized and ready to accept instructions
|
||||
|
||||
Reading | ################################################## | 100% 0.02s
|
||||
|
||||
avrdude: Device signature = 0x1e9587
|
||||
|
||||
avrdude: safemode: Fuses OK
|
||||
|
||||
avrdude done. Thank you.
|
||||
|
||||
私たちのキーボードは `atmega32u4`(共通)を使用しているので、これが指定するチップです。
|
||||
以下が完全なコマンドです:
|
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i
|
||||
|
||||
ボードが `atmega32a`(jj40 など)を使用している場合、コマンドは次のとおりです(最後の追加コードによりヒューズが正しく設定されます)。
|
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32 -U flash:w:main.hex:i -U hfuse:w:0xD0:m -U lfuse:w:0x0F:m
|
||||
|
||||
プログレスバーが表示されてから、以下が表示されるはずです。
|
||||
|
||||
avrdude: verifying ...
|
||||
avrdude: 32768 bytes of flash verified
|
||||
|
||||
avrdude: safemode: Fuses OK
|
||||
|
||||
avrdude done. Thank you.
|
||||
|
||||
これは全てうまく動作したことを示しています。
|
||||
ボードが自動的に再起動する場合もありますが、そうでない場合は、Teensy のプラグを抜いてキーボードを接続してください。
|
||||
テスト中は、Teensy をキーボードに接続したままにすることができますが、すべてが正常に機能することを確認したら、はんだを外すか、配線を外すことをお勧めします。
|
||||
|
||||
SparkFun PocketAVR Programmer や、他の USB Tiny ベースの ISP プログラマを使用している場合は、次のようなものを使用すると良いでしょう。
|
||||
|
||||
avrdude -c usbtiny -P usb -p atmega32u4
|
||||
|
||||
#### 上級者向け: ヒューズの変更
|
||||
|
||||
Pro Micro に QMK DFU を書き込むなど、ブートローダを切り替える場合は、ブートローダの hex ファイルの書き込みに加えて、ヒューズを変更する必要があります。
|
||||
これは、`caterina` (Pro Micro ブートローダ) と `dfu` では起動ルーチンの扱いが異なり、その動作はヒューズによって制御されるからです。
|
||||
|
||||
!> これは、ヒューズを変更することは、永久にあなたのコントローラをレンガ化(訳注:日本では文鎮化と呼ぶことが多い、コントローラがまったく無反応になる状態)することができる方法の1つであるため、それは非常に注意が必要な1つの領域です。
|
||||
|
||||
以下は、`atmega32u4`の 5V 16MHz 版(5V Pro Micro など)を想定しています。
|
||||
|
||||
`atmega32u4`の DFU の場合、必要なヒューズ設定は次のとおりです:
|
||||
|
||||
| ヒューズ | 設定 |
|
||||
|----------|------------------|
|
||||
| Low | `0x5E` |
|
||||
| High | `0xD9` or `0x99` |
|
||||
| Extended | `0xC3` |
|
||||
|
||||
High ヒューズは 0xD9 か 0x99 のどちらかになります。
|
||||
違いは、0xD9 は QMK Firmware がソフトウェアでも無効化している JTAG を無効化しているのに対し、0x99 は JTAG を無効化していないことです。
|
||||
|
||||
これを設定するには、`-U lfuse:w:0x5E:m -U hfuse:w:0xD9:m -U efuse:w:0xC3:m` をコマンドに追加します。
|
||||
そうすると、最終的なコマンドは次のようになります。
|
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i -U lfuse:w:0x5E:m -U hfuse:w:0xD9:m -U efuse:w:0xC3:m
|
||||
|
||||
`atmega32u4`の Caterina では、以下があなたに必要なヒューズの設定です。
|
||||
|
||||
| ヒューズ | 設定 |
|
||||
|----------|--------|
|
||||
| Low | `0xFF` |
|
||||
| High | `0xD8` |
|
||||
| Extended | `0xCB` |
|
||||
|
||||
これを設定するには、コマンドに `-U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xCB:m` を追加します。
|
||||
これで、最終的なコマンドは次のようになるはずです。
|
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xCB:m
|
||||
|
||||
|
||||
別のコントローラーを使用している場合や、別の設定を希望する場合は、この[AVR ヒューズ計算機](http:/www.engbedded.comfusecalc)を使用して、より適切な値を見つけることができます。
|
||||
|
||||
## ヘルプ
|
||||
|
||||
ご質問・ご不明な点がありましたら、お気軽に[issue を開いてください](https://github.com/qmk/qmk_firmware/issues/new)!
|
@@ -1,8 +1,8 @@
|
||||
# QMK 開発用の Visual Studio Code のセットアップ
|
||||
|
||||
<!---
|
||||
original document: 0.9.34:docs/other_vscode.md
|
||||
git diff 0.9.34 HEAD -- docs/other_vscode.md | cat
|
||||
original document: 0.10.33:docs/other_vscode.md
|
||||
git diff 0.10.33 HEAD -- docs/other_vscode.md | cat
|
||||
-->
|
||||
|
||||
[Visual Studio Code](https://code.visualstudio.com/) (VS Code) は多くの異なるプログラミング言語をサポートするオープンソースのコードエディタです。
|
||||
@@ -53,7 +53,7 @@ VS Code のようなフル機能のエディタの使用は、プレーンテキ
|
||||
|
||||
### VS Code の設定
|
||||
|
||||
最初に、IntelliSense をセットアップする必要があります。これは厳密には必要ではありませんが、あなたの人生をずっと楽にします。これを行うには、QMK ファームウェアフォルダに `.vscode/c_cpp_properies.json` ファイルを作成する必要があります。これは全て手動で行うことができますが、ほとんどの作業は既に完了しています。
|
||||
最初に、IntelliSense をセットアップする必要があります。これは厳密には必要ではありませんが、あなたの人生をずっと楽にします。これを行うには、QMK ファームウェアフォルダに `.vscode/c_cpp_properties.json` ファイルを作成する必要があります。これは全て手動で行うことができますが、ほとんどの作業は既に完了しています。
|
||||
|
||||
[このファイル](https://gist.github.com/drashna/48e2c49ce877be592a1650f91f8473e8) を取得して保存します。MSYS2 をデフォルトの場所にインストールしなかった、または WSL か LxSS を使っている場合、このファイルを編集する必要があります。
|
||||
|
||||
@@ -64,7 +64,7 @@ VS Code のようなフル機能のエディタの使用は、プレーンテキ
|
||||
|
||||
次に、VSCode に統合ターミナルとして表示されるように、MSYS2 ウィンドウを設定します。これには多くの利点があります。ほとんどの場合で、エラー上で Ctrl + クリックするとこれらのファイルにジャンプできます。これによりデバッグがはるかに簡単になります。また、他のウィンドウへジャンプする必要が無いという点でも優れています。
|
||||
|
||||
1. <kbd><kbd>File</kbd> > <kbd>Preferences ></kbd> > <kbd>Settings</kbd> </kbd> をクリックします。
|
||||
1. <kbd><kbd>ファイル</kbd> > <kbd>ユーザー設定 ></kbd> > <kbd>設定</kbd> </kbd> をクリックします。
|
||||
2. 右上の <kbd>{}</kbd> ボタンをクリックし、`settings.json` ファイルを開きます。
|
||||
3. ファイルの内容を以下のように設定します:
|
||||
|
||||
@@ -82,11 +82,11 @@ VS Code のようなフル機能のエディタの使用は、プレーンテキ
|
||||
}
|
||||
```
|
||||
|
||||
ここに既に設定がある場合は、最初と最後の波括弧の間に全てを追加します。
|
||||
ここに既に設定がある場合は、最初と最後の波括弧の間に全てを追加し、既存の設定を新しく追加された設定とカンマで区切ります。
|
||||
|
||||
?> MSYS2 を別のフォルダにインストールした場合は、`terminal.integrated.shell.windows` のパスをシステムの正しいパスに変更する必要があります。
|
||||
|
||||
4. Ctrl-` (grave) を押して、ターミナルを起動します。
|
||||
4. Ctrl-<code>`</code> (Grave) を押して、ターミナルを起動するか、<kbd><kbd>表示</kbd> > <kbd>ターミナル</kbd></kbd> (コマンド `workbench.action.terminal.toggleTerminal`)に進みます。まだターミナルが開いていない場合は、新しいターミナルが開きます。
|
||||
|
||||
これにより、ワークスペースフォルダ(つまり `qmk_firmware` フォルダ)でターミナルが起動し、キーボードをコンパイルすることができます。
|
||||
|
||||
@@ -115,8 +115,8 @@ VS Code のようなフル機能のエディタの使用は、プレーンテキ
|
||||
いずれかの拡張機能をインストールしたら、再起動します。
|
||||
|
||||
# QMK 用の VS Code の設定
|
||||
1. <kbd><kbd>File</kbd> > <kbd>Open Folder</kbd></kbd> をクリックします
|
||||
1. <kbd><kbd>ファイル</kbd> > <kbd>フォルダーを開く</kbd></kbd> をクリックします
|
||||
2. GitHub からクローンした QMK ファームウェアフォルダを開きます。
|
||||
3. <kbd><kbd>File</kbd> > <kbd>Save Workspace As...</kbd></kbd> をクリックします
|
||||
3. <kbd><kbd>ファイル</kbd> > <kbd>名前を付けてワークスペースを保存...</kbd></kbd> をクリックします
|
||||
|
||||
これで、VS Code で QMK ファームウェアをコーディングする準備ができました。
|
||||
|
134
docs/ja/pr_checklist.md
Normal file
134
docs/ja/pr_checklist.md
Normal file
@@ -0,0 +1,134 @@
|
||||
# PR チェックリスト
|
||||
|
||||
<!---
|
||||
original document: 0.10.7:docs/pr_checklist.md
|
||||
git diff 0.10.7 HEAD -- docs/pr_checklist.md | cat
|
||||
-->
|
||||
|
||||
これは、提出された PR を QMK の協力者がレビューする際に何をチェックするのかの非網羅的なチェックリストです。
|
||||
|
||||
これらの推奨事項に矛盾がある場合は、このドキュメントに対して [issue を開く](https://github.com/qmk/qmk_firmware/issues/new)か、[Discord](https://discord.gg/Uq7gcHh) の QMK コラボレータに連絡することをお勧めします。
|
||||
|
||||
## 一般的な PR
|
||||
|
||||
- PRは、ソースリポジトリ上の `master` ではないブランチを使って提出する必要があります
|
||||
- これは、あなたの PR にとって別のブランチをターゲットにするという意味ではなく、むしろ自分の master ブランチで作業をしていないという意味です
|
||||
- もし PR の提出者が自分の `master` ブランチを使っている場合は、マージ後に ["git の使い方"](https://docs.qmk.fm/#/ja/newbs_git_using_your_master_branch) ページへのリンクが表示されます - (このドキュメントの最後にはメッセージの内容が含まれます)
|
||||
- 新しく追加されたディレクトリとファイル名は小文字でなければなりません
|
||||
- 上流のソースが元々大文字を使っていた場合 (ChibiOS や他のリポジトリからインポートしたファイルなど)、このルールは緩和されるかもしれません
|
||||
- 十分な正当性がある場合 (既存のコアファイルとの整合性など) は、このルールを緩和することができます。
|
||||
- ボードデザイナーがキーボードの名前を大文字にした場合は、十分な正当性とはみとめられません
|
||||
- すべての `*.c` および `*.h` ソースファイルの有効なライセンスヘッダ
|
||||
- 一貫性のために GPL2/GPL3 が推奨されています
|
||||
- 他のライセンスも許可されていますが、GPL と互換性があり、再配布が許可されていなければなりません。異なるライセンスを使うと、PR がマージされるのをほぼ確実に遅らせることになります
|
||||
- QMK コードベースの「ベストプラクティス」に従う
|
||||
- これは網羅的なリストではありませんし、時間が経つにつれて修正される可能性が高いです
|
||||
- ヘッダファイルでは、`#ifndef` インクルードガードの代わりに `#pragma once` を使います
|
||||
- 「旧式の」 GPIO/I2C/SPI 関数を使用しない - 正当な理由がない限り、QMK の抽象化を使用しなければなりません (怠惰は正当な理由にはなりません)
|
||||
- タイミングの抽象化にも従う必要があります:
|
||||
- `_delay_ms()` のかわりに `wait_ms()` を。(`#include <util/delay.h>` も消します)
|
||||
- `timer_read()` と `timer_read32()` など。 -- タイミング API は [timer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/timer.h) を参照してください
|
||||
- 新しい抽象化が有用だと思う場合は、次のことをお勧めします:
|
||||
- 機能が完成するまで自分のキーボードでプロトタイプを作成する
|
||||
- Discord の QMK コラボレータと話し合う
|
||||
- 個別のコア変更としてそれをリファクタリングする
|
||||
- あなたのキーボードからそのコピーを削除する
|
||||
- PR を開く前にリベースしてマージの競合をすべて修正します (ヘルプやアドバイスが必要な場合は、Discord で QMK コラボレータに連絡してください)。
|
||||
|
||||
## キーマップの PR
|
||||
|
||||
- 特定のボードファイルをインクルードするよりも `#include QMK_KEYBOARD_H` を推奨します
|
||||
- レイヤーは `#define` よりも `enum` が好まれます
|
||||
- カスタムキーコードは `#define` ではなく `enum` が必要です。最初のエントリには `= SAFE_RANGE` が必要です
|
||||
- LAYOUT マクロ呼び出しのパラメータの途中の改行ではバックスラッシュ(`\`)は不要です
|
||||
- スペーシング(コンマまたはキーコードの最初の文字の配置など)に注意を払うと、見栄えの良いキーマップになります
|
||||
|
||||
## キーボードの PR
|
||||
|
||||
終了した PR(インスピレーションを得るために、以前のレビューコメントセットは、自分のレビューのピンポンをなくすのに役立ちます):
|
||||
https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
|
||||
|
||||
- `info.json`
|
||||
- 有効な URL
|
||||
- 有効なメンテナ
|
||||
- Configurator で正しく表示されること(Ctrl + Shift + I を押してローカルファイルをプレビューし、高速入力をオンにして順序を確認する)
|
||||
- `readme.md`
|
||||
- 標準テンプレートがあること
|
||||
- 書き込みコマンドが `:flash` で終わっていること
|
||||
- 有効なハードウェアの入手方法へのリンク (手配線の場合を除く) -- プライベートな共同購入は問題ありませんが、一回限りのプロトタイプは疑問視されます。オープンソースの場合は、ファイルへのリンクを提供してください
|
||||
- ボードをブートローダーモードにリセットする方法を明確に説明してください
|
||||
- キーボードの写真、できれば PCB の写真も添付してください
|
||||
- `rules.mk`
|
||||
- `MIDI_ENABLE`、`FAUXCLICKY_ENABLE`、`HD44780_ENABLE` は削除されました
|
||||
- `# Enable Bluetooth with the Adafruit EZ-Key HID` は `# Enable Bluetooth` に変更されました
|
||||
- 機能の有効化に関する `(-/+サイズ)` コメントはなくなりました
|
||||
- ブートローダが指定されている場合は、代替ブートローダのリストを削除します
|
||||
- [mcu_selection.mk](https://github.com/qmk/qmk_firmware/blob/master/quantum/mcu_selection.mk)の同等の MCU と比較した場合、同じ値の場合、デフォルトの MCU パラメータの再定義がないこと
|
||||
- キーボードの `config.h`
|
||||
- `PRODUCT` 値に `MANUFACTURER` を繰り返さないでください
|
||||
- `#define DESCRIPTION` は要りません
|
||||
- マジックキーオプション、 MIDI オプション、HD44780 コンフィギュレーションは要りません
|
||||
- ユーザー設定の設定可能な `#define` はキーマップ `config.h` に移動する必要があります
|
||||
- "`DEBOUNCING_DELAY`" の代りに "`DEBOUNCE`" を使います
|
||||
- キーボードが QMK で起動するために最低限必要なコードが存在する必要があります
|
||||
- マトリックスと重要なデバイスの初期化コード
|
||||
- (カスタムキーコードや特別なアニメーションなど)商用キーボードの既存の機能をミラーリングする場合は、`default` ではないキーマップを使って処理する必要があります
|
||||
- `keyboard.c`
|
||||
- 空の `xxxx_xxxx_kb()` または他の weak-define のデフォルト実装関数が削除されていること
|
||||
- コメントアウトされた関数も削除されていること
|
||||
- `matrix_init_board()` などが `keyboard_pre_init_kb()` に移行されました。[keyboard_pre_init*](https://docs.qmk.fm/#/ja/custom_quantum_functions?id=keyboard_pre_init_-function-documentation) を参照してください
|
||||
- カスタムマトリックスを使用する場合は、`CUSTOM_MATRIX = lite` を選択し、標準のデバウンスを許可します。[マトリックスコードの部分置き換え](https://docs.qmk.fm/#/ja/custom_matrix?id=lite) を参照してください
|
||||
- `keyboard.h`
|
||||
- 先頭に `#include "quantum.h"` を置きます
|
||||
- `LAYOUT` マクロは、該当する場合は標準の定義を使用してください
|
||||
- 該当する場合はコミュニティレイアウトマクロ名を使用します (`LAYOUT`/`LAYOUT_all`よりも優先されます)
|
||||
- キーマップの `config.h`
|
||||
- キーボードから `rules.mk` や `config.h` が重複していないこと
|
||||
- `keymaps/default/keymap.c`
|
||||
- `QMKBEST`/`QMKURL` が削除されていること
|
||||
- `MO(_LOWER)`および `MO(_RAISE)`キーコードまたは同等のものを使用していて、キーマップに両方のキーを押したときに adjust レイヤーがある場合 - キーマップに直接 adjust レイヤーに入るキーコードがない場合(`MO(_ADJUST)`のように)次のように記述します...
|
||||
```
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
```
|
||||
...キーマップの `process_record_user()` 内で `layer_on()`、 `update_tri_layer()` を手動で処理する代わりに。
|
||||
- default (および via) のキーマップは「素朴」でなければなりません。
|
||||
- 他のユーザーが独自のユーザー固有のキーマップを開発するための「クリーンな状態」として使用するための最低限のもの。
|
||||
- これらのキーマップで推奨される標準レイアウト(可能な場合)
|
||||
- PR の提出者は、同じ PR に機能を紹介する個人的な(または豪華な)キーマップを持たせることができますが、「デフォルト」のキーマップに埋め込むべきではありません
|
||||
- PR の提出者はまた、既存の商用キーボードへ QMK を移植する場合、その商用製品の既存の機能を反映する「製造業者に一致する」キーマップを持つことができます
|
||||
|
||||
さらに、ChibiOS に固有で:
|
||||
- 既存の ChibiOS ボード定義を使用することを**強く**推奨します。
|
||||
- 多くの場合、同等の Nucleo ボードは、同じファミリの異なるフラッシュサイズまたはわずかに異なるモデルで使用できます。
|
||||
- 例:STM32L082KZ の場合、STM32L073RZ に類似しているため、rules.mkで `BOARD = ST_NUCLEO64_L073RZ` を使用できます。
|
||||
- QMK は ChibiOS のアップグレード時のメンテナンス負担が継続的に発生するため、可能な限りカスタムボード定義を持たないように移行しています。
|
||||
- ボードの定義が避けられない場合、`board.c` には標準の `__early_init()` (通常の ChibiOS ボードの定義と同じ) と空の `boardInit()` を実装しなければなりません。
|
||||
- Arm/ChibiOS [早期初期化](https:/docs.qmk.fm/#/ja/platformdev_chibios_earlyinit?id=board-init)を参照してください
|
||||
- `__early_init()`は、`early_hardware_init_pre()` または `early_hardware_init_post()` で適切に置き換える必要があります
|
||||
- `boardInit()` は `board_init()` に移行する必要があります
|
||||
|
||||
## コアの PR
|
||||
|
||||
- `develop` ブランチをターゲットにする必要があります。これは、その後、breaking change のタイムラインで `master` にマージされます。
|
||||
- その他の注意事項 TBD
|
||||
- 投稿された変更の幅を考えると、コアはもっと主観的です
|
||||
|
||||
---
|
||||
|
||||
## 注意事項
|
||||
|
||||
人々が自分の `master` ブランチを使用する場合、マージ後に以下を投稿します:
|
||||
|
||||
```
|
||||
For future reference, we recommend against committing to your `master` branch as you've done here, because pull requests from modified `master` branches can make it more difficult to keep your QMK fork updated. It is highly recommended for QMK development – regardless of what is being done or where – to keep your master updated, but **NEVER** commit to it. Instead, do all your changes in a branch (branches are basically free in Git) and issue PRs from your branches when you're developing.
|
||||
|
||||
There are instructions on how to keep your fork updated here:
|
||||
|
||||
[**Best Practices: Your Fork's Master: Update Often, Commit Never**](https://docs.qmk.fm/#/newbs_git_using_your_master_branch)
|
||||
|
||||
[Fixing Your Branch](https://docs.qmk.fm/#/newbs_git_resynchronize_a_branch) will walk you through fixing up your `master` branch moving forward. If you need any help with this just ask.
|
||||
|
||||
Thanks for contributing!
|
||||
```
|
20
docs/ja/quantum_keycodes.md
Normal file
20
docs/ja/quantum_keycodes.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Quantum キーコード
|
||||
|
||||
<!---
|
||||
original document: 0.9.55:docs/quantum_keycodes.md
|
||||
git diff 0.9.55 HEAD -- docs/quantum_keycodes.md | cat
|
||||
-->
|
||||
|
||||
Quantum キーコードにより、カスタムアクションを定義することなく、基本的なものが提供するものより簡単にキーマップをカスタマイズすることができます。
|
||||
|
||||
quantum 内の全てのキーコードは `0x0000` と `0xFFFF` の間の数値です。`keymap.c` の中では、関数やその他の特別な場合があるように見えますが、最終的には C プリプロセッサによってそれらは単一の4バイト整数に変換されます。QMK は標準的なキーコードのために `0x0000` から `0x00FF` を予約しています。これらは、`KC_A`、`KC_1` および `KC_LCTL` のようなキーコードで、USB HID 仕様で定義された基本的なキーです。
|
||||
|
||||
このページでは、高度な quantum 機能を実装するために使われる `0x00FF` と `0xFFFF` の間のキーコードを説明します。独自のカスタムキーコードを定義する場合は、それらもこの範囲に配置されます。
|
||||
|
||||
## QMK キーコード :id=qmk-keycodes
|
||||
|
||||
| キー | エイリアス | 説明 |
|
||||
|----------------|------------|--------------------------------------------------------|
|
||||
| `RESET` | | 書き込みのために、キーボードを bootloader モードにする |
|
||||
| `DEBUG` | | デバッグモードの切り替え |
|
||||
| `EEPROM_RESET` | `EEP_RST` | キーボードの EEPROM (永続化メモリ) を再初期化する |
|
124
docs/ja/ref_functions.md
Normal file
124
docs/ja/ref_functions.md
Normal file
@@ -0,0 +1,124 @@
|
||||
# キーボードをより良くするための便利なコア関数のリスト
|
||||
|
||||
<!---
|
||||
original document: 0.10.33:docs/ref_functions.md
|
||||
git diff 0.10.33 HEAD -- docs/ref_functions.md | cat
|
||||
-->
|
||||
|
||||
QMK には、信じられないほど便利な、またはあなたが望んでいた機能を少し追加する、隠された関数がたくさんあります。特定の機能に固有の関数はそれぞれの機能のページにあるため、ここには含まれていません。
|
||||
|
||||
## (OLKB) トライレイヤー :id=olkb-tri-layers
|
||||
|
||||
目的に応じて、実際に使うことができる別個の関数があります。
|
||||
|
||||
### `update_tri_layer(x, y, z)`
|
||||
|
||||
最初は `update_tri_layer(x, y, z)` 関数です。この関数はレイヤー `x` と `y` の両方がオンになっているかどうかを調べます。両方ともオンの場合は、レイヤー `z` がオンになります。それ以外の場合、`x` と `y` の両方がオンではない(一方のみがオン、またはどちらもオンでない)場合は、レイヤー `z` をオフにします。
|
||||
|
||||
この関数は、この機能を持つ特定のキーを作成したいが、他のレイヤーのキーコードではそうしたくない場合に便利です。
|
||||
|
||||
#### 例
|
||||
|
||||
```c
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
```
|
||||
|
||||
### `update_tri_layer_state(state, x, y, z)`
|
||||
もう1つの関数は `update_tri_layer_state(state, x, y, z)` です。この関数は [`layer_state_set_*` 関数](ja/custom_quantum_functions.md#layer-change-code)から呼び出されることを意図しています。これは、キーコードを使ってレイヤーを変更するたびに、これがチェックされることを意味します。したがって、`LT(layer, kc)` を使ってレイヤーを変更すると、同じレイヤーチェックが引き起こされます。
|
||||
|
||||
このメソッドの注意点は2つあります:
|
||||
1. `x` および `y` レイヤーをオンにしないと、`z` レイヤーにアクセスできません。これは、レイヤー `z` のみをアクティブにしようとすると、このコードが実行され、使用前にレイヤー `z` がオフになるからです。
|
||||
2. レイヤーは最上位の番号から処理されるので、`z` は `x` や `y` よりも上位のレイヤーでなければなりません。そうでなければアクセスできない場合があります。
|
||||
|
||||
#### 例
|
||||
|
||||
```c
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
```
|
||||
|
||||
あるいは、すぐに値を「返す」必要はありません。複数のトライレイヤーを追加、あるいは追加の効果を追加する場合に便利です。
|
||||
|
||||
```c
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
state = update_tri_layer_state(state, _RAISE, _SYMB, _SPECIAL);
|
||||
return state;
|
||||
}
|
||||
```
|
||||
|
||||
## 永続的なデフォルトレイヤーの設定
|
||||
|
||||
デフォルトレイヤーを設定して、キーボードを取り外しても保持されるようにしたいですか?そうであれば、これがそのための関数です。
|
||||
|
||||
これを使うには、`set_single_persistent_default_layer(layer)` を使います。レイヤーに名前が定義されている場合は、代わりにそれを使うことができます (_QWERTY、_DVORAK、_COLEMAK など)。
|
||||
|
||||
これは、デフォルトレイヤーを設定し、永続設定が更新され、もし [オーディオ](ja/feature_audio.md) がキーボードで有効でデフォルトレイヤーの音が設定されている場合は、曲を再生します。
|
||||
|
||||
デフォルトレイヤーの音を設定するには、以下のように `config.h` ファイルに定義する必要があります。
|
||||
|
||||
```c
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
?> [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) に使用できる多くの定義済みの曲があります。
|
||||
|
||||
## キーボードのリセット
|
||||
|
||||
使用できる `RESET` quantum キーコードがあります。ただし、キーを個別に押すのではなくマクロの一部としてリセットしたい場合は、そうすることができます。
|
||||
|
||||
そのためには、`reset_keyboard()` を関数またはマクロに追加すると、ブートローダがリセットされます。
|
||||
|
||||
## EEPROM (永続ストレージ)の消去
|
||||
|
||||
オーディオ、RGB アンダーグロー、バックライト、キーの動作に問題がある場合は、EEPROM (永続的な設定のストレージ)をリセットすることができます。ブートマジックはこれを行う方法の1つですが、有効になっていない場合はカスタムマクロを使って行うことができます。
|
||||
|
||||
EEPROM を消去するには、関数またはマクロから `eeconfig_init()` を実行し、ほとんどの設定をデフォルトにリセットします。
|
||||
|
||||
## タップランダムキー
|
||||
|
||||
ランダムな文字をホストコンピュータに送信する場合は、`tap_random_base64()` 関数を使うことができます。これは[疑似乱数的に](https://en.wikipedia.org/wiki/Pseudorandom_number_generator)0から63の数字を選択し、その選択に基づいてキー押下を送信します。(0–25 は `A`–`Z`、26–51 は `a`–`z`、52–61 は `0`–`9`、62 は `+`、63 は `/`)。
|
||||
|
||||
?> 言うまでもないですが、これはランダムに Base64 キーあるいはパスワードを生成する暗号的に安全な方法では _ありません_。
|
||||
|
||||
## ソフトウェアタイマー
|
||||
|
||||
タイマーを開始し、時間固有のイベントの値を読み取ることができます。以下は例です:
|
||||
|
||||
```c
|
||||
static uint16_t key_timer;
|
||||
key_timer = timer_read();
|
||||
|
||||
if (timer_elapsed(key_timer) < 100) {
|
||||
// 経過時間が 100ms 未満の場合に何かを行う
|
||||
} else {
|
||||
// 経過時間が 100ms 以上の場合に何かを行う
|
||||
}
|
||||
```
|
202
docs/ja/reference_configurator_support.md
Normal file
202
docs/ja/reference_configurator_support.md
Normal file
@@ -0,0 +1,202 @@
|
||||
# QMK Configurator でのキーボードのサポート
|
||||
|
||||
<!---
|
||||
original document: 0.9.46:docs/reference_configurator_support.md
|
||||
git diff 0.9.46 HEAD -- docs/reference_configurator_support.md | cat
|
||||
-->
|
||||
|
||||
このページは [QMK Configurator](https://config.qmk.fm/) でキーボードを適切にサポートする方法について説明します。
|
||||
|
||||
|
||||
## Configurator がキーボードを理解する方法
|
||||
|
||||
Configurator がキーボードをどのように理解するかを理解するには、最初にレイアウトマクロを理解する必要があります。この演習では、17キーのテンキー PCB を想定します。これを `numpad` と呼びます。
|
||||
|
||||
```
|
||||
|---------------|
|
||||
|NLk| / | * | - |
|
||||
|---+---+---+---|
|
||||
|7 |8 |9 | + |
|
||||
|---+---+---| |
|
||||
|4 |5 |6 | |
|
||||
|---+---+---+---|
|
||||
|1 |2 |3 |Ent|
|
||||
|-------+---| |
|
||||
|0 | . | |
|
||||
|---------------|
|
||||
```
|
||||
|
||||
?> レイアウトマクロの詳細については、[QMK の理解: マトリックススキャン](ja/understanding_qmk.md?id=matrix-scanning) と [QMK の理解: マトリックスから物理レイアウトへのマップ](ja/understanding_qmk.md?id=matrix-to-physical-layout-map) を見てください。
|
||||
|
||||
Configurator の API はキーボードの `.h` ファイルを `qmk_firmware/keyboards/<keyboard>/<keyboard>.h` から読み取ります。numpad の場合、このファイルは `qmk_firmware/keyboards/numpad/numpad.h` です:
|
||||
|
||||
```c
|
||||
#pragma once
|
||||
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, k03, \
|
||||
k10, k11, k12, k13, \
|
||||
k20, k21, k22, \
|
||||
k30, k31, k32, k33, \
|
||||
k40, k42 \
|
||||
) { \
|
||||
{ k00, k01, k02, k03 }, \
|
||||
{ k10, k11, k12, k13 }, \
|
||||
{ k20, k21, k22, KC_NO }, \
|
||||
{ k30, k31, k32, k33 }, \
|
||||
{ k40, KC_NO, k42, KC_NO } \
|
||||
}
|
||||
```
|
||||
|
||||
QMK は `KC_NO` を使って、スイッチマトリックス内のスイッチがない場所を指定します。デバッグが必要な場合に、このセクションを読みやすくするために、`XXX`、`___`、`____` を略記として使うこともあります。通常は `.h` ファイルの先頭近くで定義されます:
|
||||
|
||||
```c
|
||||
#pragma once
|
||||
|
||||
#define XXX KC_NO
|
||||
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, k03, \
|
||||
k10, k11, k12, k13, \
|
||||
k20, k21, k22, \
|
||||
k30, k31, k32, k33, \
|
||||
k40, k42 \
|
||||
) { \
|
||||
{ k00, k01, k02, k03 }, \
|
||||
{ k10, k11, k12, k13 }, \
|
||||
{ k20, k21, k22, XXX }, \
|
||||
{ k30, k31, k32, k33 }, \
|
||||
{ k40, XXX, k42, XXX } \
|
||||
}
|
||||
```
|
||||
|
||||
!> この使用方法はキーマップマクロと異なります。キーマップマクロはほとんど常に`KC_NO`については`XXXXXXX` (7つの大文字の X) を、`KC_TRNS` については `_______` (7つのアンダースコア)を使います。
|
||||
|
||||
!> ユーザの混乱を防ぐために、`KC_NO` を使うことをお勧めします。
|
||||
|
||||
レイアウトマクロは、キーボードに17個のキーがあり、4列それぞれが5行に配置されていることを Configurator に伝えます。スイッチの位置は、0から始まる `k<row><column>` という名前が付けられています。キーマップからキーコードを受け取る上部セクションと、マトリックス内の各キーの位置を指定する下部セクションとが一致する限り、名前自体は実際には問題ではありません。
|
||||
|
||||
物理的なキーボードに似た形でキーボードを表示するには、それぞれのキーの物理的な位置とサイズをスイッチマトリックスに結びつけることを Configurator に伝える JSON ファイルを作成する必要があります。
|
||||
|
||||
## JSON ファイルのビルド
|
||||
|
||||
JSON ファイルをビルドする最も簡単な方法は、[Keyboard Layout Editor](http://www.keyboard-layout-editor.com/) ("KLE") でレイアウトを作成することです。この Raw Data を QMK tool に入れて、Configurator が読み出して使用する JSON ファイルに変換します。KLE は numpad レイアウトをデフォルトで開くため、Getting Started の説明を削除し、残りを使います。
|
||||
|
||||
レイアウトが望み通りのものになったら、KLE の Raw Data タブに移動し、内容をコピーします:
|
||||
|
||||
```
|
||||
["Num Lock","/","*","-"],
|
||||
["7\nHome","8\n↑","9\nPgUp",{h:2},"+"],
|
||||
["4\n←","5","6\n→"],
|
||||
["1\nEnd","2\n↓","3\nPgDn",{h:2},"Enter"],
|
||||
[{w:2},"0\nIns",".\nDel"]
|
||||
```
|
||||
|
||||
このデータを JSON に変換するには、[QMK KLE-JSON Converter](https://qmk.fm/converter/) に移動し、Raw Data を Input フィールド に貼り付け、Convert ボタンをクリックします。しばらくすると、JSON データが Output フィールドに表示されます。内容を新しいテキストドキュメントにコピーし、ドキュメントに `info.json` という名前を付け、`numpad.h` を含む同じフォルダに保存します。
|
||||
|
||||
`keyboard_name` オブジェクトを使ってキーボードの名前を設定します。説明のために、各キーのオブジェクトを各行に配置します。これはファイルを人間が読みやすいものにするためのもので、Configurator の機能には影響しません。
|
||||
|
||||
```json
|
||||
{
|
||||
"keyboard_name": "Numpad",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"tags": {
|
||||
"form_factor": "numpad"
|
||||
},
|
||||
"width": 4,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"Num Lock", "x":0, "y":0},
|
||||
{"label":"/", "x":1, "y":0},
|
||||
{"label":"*", "x":2, "y":0},
|
||||
{"label":"-", "x":3, "y":0},
|
||||
{"label":"7", "x":0, "y":1},
|
||||
{"label":"8", "x":1, "y":1},
|
||||
{"label":"9", "x":2, "y":1},
|
||||
{"label":"+", "x":3, "y":1, "h":2},
|
||||
{"label":"4", "x":0, "y":2},
|
||||
{"label":"5", "x":1, "y":2},
|
||||
{"label":"6", "x":2, "y":2},
|
||||
{"label":"1", "x":0, "y":3},
|
||||
{"label":"2", "x":1, "y":3},
|
||||
{"label":"3", "x":2, "y":3},
|
||||
{"label":"Enter", "x":3, "y":3, "h":2},
|
||||
{"label":"0", "x":0, "y":4, "w":2},
|
||||
{"label":".", "x":2, "y":4}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`layouts` オブジェクトにはキーボードの物理レイアウトを表すデータが含まれます。このオブジェクトには `LAYOUT` という名前のオブジェクトがあり、このオブジェクト名は `numpad.h` のレイアウトマクロの名前と一致する必要があります。`LAYOUT` オブジェクト自体には `layout` という名前のオブジェクトがあります。このオブジェクトにはキーボードの物理キーごとに 1つの JSON オブジェクトが以下の形式で含まれています:
|
||||
|
||||
```
|
||||
キーの名前。Configurator では表示されません。
|
||||
|
|
||||
| キーボードの左端からのキー単位での
|
||||
| | キーの X 軸の位置。
|
||||
| |
|
||||
| | キーボードの上端(奥側)からのキー単位での
|
||||
| | | キーの Y 軸位置。
|
||||
↓ ↓ ↓
|
||||
{"label":"Num Lock", "x":0, "y":0},
|
||||
```
|
||||
|
||||
一部のオブジェクトには、それぞれキーの幅と高さを表す `"w"` 属性キーと `"h"` 属性キーがあります。
|
||||
|
||||
?> `info.json` ファイルの詳細については、[`info.json` 形式](ja/reference_info_json.md) を参照してください。
|
||||
|
||||
|
||||
## Configurator がキーをプログラムする方法
|
||||
|
||||
Configurator の API は、指定されたレイアウトマクロと JSON ファイルを使って、特定のキーに関連付けられた各ビジュアルオブジェクトを順番に持つキーボードのビジュアル表現を作成します:
|
||||
|
||||
| レイアウトマクロのキー | 使用される JSON オブジェクト |
|
||||
:---: | :----
|
||||
| k00 | {"label":"Num Lock", "x":0, "y":0} |
|
||||
| k01 | {"label":"/", "x":1, "y":0} |
|
||||
| k02 | {"label":"*", "x":2, "y":0} |
|
||||
| k03 | {"label":"-", "x":3, "y":0} |
|
||||
| k10 | {"label":"7", "x":0, "y":1} |
|
||||
| k11 | {"label":"8", "x":1, "y":1} |
|
||||
| k12 | {"label":"9", "x":2, "y":1} |
|
||||
| k13 | {"label":"+", "x":3, "y":1, "h":2} |
|
||||
| k20 | {"label":"4", "x":0, "y":2} |
|
||||
| k21 | {"label":"5", "x":1, "y":2} |
|
||||
| k22 | {"label":"6", "x":2, "y":2} |
|
||||
| k30 | {"label":"1", "x":0, "y":3} |
|
||||
| k31 | {"label":"2", "x":1, "y":3} |
|
||||
| k32 | {"label":"3", "x":2, "y":3} |
|
||||
| k33 | {"label":"Enter", "x":3, "y":3, "h":2} |
|
||||
| k40 | {"label":"0", "x":0, "y":4, "w":2} |
|
||||
| k42 | {"label":".", "x":2, "y":4} |
|
||||
|
||||
ユーザが Configurator で左上のキーを選択し、Num Lock を割り当てると、Configurator は最初のキーとして `KC_NLCK` を持つキーマップを作成し、同様にキーマップが作成されます。`label` キーは使われません; それらは `info.json` ファイルをデバッグする時に特定のキーを識別するためのユーザの参照のためだけのものです。
|
||||
|
||||
|
||||
## 問題と危険
|
||||
|
||||
現在のところ、Configurator はキーの回転または ISO Enter などの長方形ではないキーをサポートしません。さらに、"行"から垂直方向にずれているキー、— 顕著な例として [TKC1800](https://github.com/qmk/qmk_firmware/tree/4ac48a61a66206beaf2fdd5f2939d8bbedd0004c/keyboards/tkc1800/) のような1800レイアウト上の矢印キー — は、 `info.json` ファイルの提供者によって調整されていない場合は、KLE-to-JSON コンバータを混乱させます。
|
||||
|
||||
### 回避策
|
||||
|
||||
#### 長方形ではないキー
|
||||
|
||||
ISO Enter キーについては、QMK custom は幅 1.25u、高さ 2u の長方形のキーとして表示し、右端が英数字キーブロックの右端に揃うように配置されます。
|
||||
|
||||

|
||||
*QMK Configurator によって描画される標準 ISO レイアウトの60%キーボード。*
|
||||
|
||||
#### 垂直方向にずれたキー
|
||||
|
||||
垂直方向にずれたキーについては、ずれていないかのように KLE で配置し、変換された JSON ファイルで必要に応じて Y 値を編集します。
|
||||
|
||||

|
||||
*矢印キーに適用される垂直方向のずれのない、Keyboard Layout Editor で描画された1800レイアウトのキーボード。*
|
||||
|
||||

|
||||
*キーボードの JSON ファイルで矢印キーを垂直方向にずらすために必要な変更を示す、Unix の diff ファイル。*
|
173
docs/ja/reference_glossary.md
Normal file
173
docs/ja/reference_glossary.md
Normal file
@@ -0,0 +1,173 @@
|
||||
# QMK 用語集
|
||||
|
||||
<!---
|
||||
original document: 0.9.46:docs/reference_glossary.md
|
||||
git diff 0.9.46 HEAD -- docs/reference_glossary.md | cat
|
||||
-->
|
||||
|
||||
## ARM
|
||||
Atmel、Cypress、Kinetis、NXP、ST、TI など多くの企業が生産する 32 ビット MCU のライン。
|
||||
|
||||
## AVR
|
||||
[Atmel](http://www.microchip.com/) が生産する 8 ビット MCU のライン。AVR は TMK がサポートしていた元のプラットフォームでした。
|
||||
|
||||
## AZERTY
|
||||
標準的な Français (フランス) キーボードレイアウト。キーボードの最初の6つのキーから命名されました。
|
||||
|
||||
## バックライト
|
||||
キーボードのライトの総称。バックライトが一般的ですが、それだけではなく、キーキャップあるいはスイッチを通して光る LED の配列。
|
||||
|
||||
## Bluetooth
|
||||
短距離のピアツーピア無線プロトコル。キーボード用のもっとも一般的なワイヤレスプロトコル。
|
||||
|
||||
## ブートローダ
|
||||
MCU の保護領域に書き込まれる特別なプログラムで、MCU が独自のファームウェアを通常は USB 経由でアップグレードできるようにします。
|
||||
|
||||
## ブートマジック
|
||||
よくあるキーの交換あるいは無効化など、様々なキーボードの挙動の変更をその場で実行できる機能。
|
||||
|
||||
## C
|
||||
システムコードに適した低レベルプログラミング言語。QMK のほとんどのコードは C で書かれています。
|
||||
|
||||
## Colemak
|
||||
人気が出始めている代替キーボードレイアウト。
|
||||
|
||||
## コンパイル
|
||||
人間が読めるコードを MCU が実行できるマシンコードに変換するプロセス。
|
||||
|
||||
## Dvorak
|
||||
1930年代に Dr. August Dvorak によって開発された代替キーボードレイアウト。Dvorak Simplified Keyboard の短縮形。
|
||||
|
||||
## 動的マクロ
|
||||
キーボードに記録されたマクロで、キーボードのプラグを抜くか、コンピュータを再起動すると失われます。
|
||||
|
||||
* [動的マクロドキュメント](ja/feature_dynamic_macros.md)
|
||||
|
||||
## Eclipse
|
||||
多くの C 開発者に人気のある IDE。
|
||||
|
||||
* [Eclipse セットアップ手順](ja/other_eclipse.md)
|
||||
|
||||
## ファームウェア
|
||||
MCU を制御するソフトウェア
|
||||
|
||||
## git
|
||||
コマンドラインで使用されるバージョン管理ソフトウェア
|
||||
|
||||
## GitHub
|
||||
QMK プロジェクトのほとんどをホストする Web サイト。git、課題管理、および QMK の実行に役立つその他の機能を統合して提供します。
|
||||
|
||||
## ISP
|
||||
インシステムプログラミング。外部ハードウェアと JTAG ピンを使って AVR チップをプログラミングする方法。
|
||||
|
||||
## hid_listen
|
||||
キーボードからデバッグメッセージを受信するためのインタフェース。[QMK Flasher](https://github.com/qmk/qmk_flasher) あるいは [PJRC の hid_listen](https://www.pjrc.com/teensy/hid_listen.html) を使ってこれらのメッセージを見ることができます。
|
||||
|
||||
## キーコード
|
||||
特定のキーを表す2バイトの数値。`0x00`-`0xFF` は[基本キーコード](ja/keycodes_basic.md)に使われ、`0x100`-`0xFFFF` は [Quantum キーコード](ja/quantum_keycodes.md) に使われます。
|
||||
|
||||
## キーダウン
|
||||
キーが押された時に発生し、キーが放される前に完了するイベント。
|
||||
|
||||
## キーアップ
|
||||
キーが放された時に発生するイベント。
|
||||
|
||||
## キーマップ
|
||||
物理的なキーボードレイアウトにマップされたキーコードの配列。キーの押下およびリリース時に処理されます。
|
||||
|
||||
## レイヤー
|
||||
1つのキーが複数の目的を果たすために使われる抽象化。最上位のアクティブなレイヤーが優先されます。
|
||||
|
||||
## リーダーキー
|
||||
リーダーキーに続けて1, 2 あるいは3つのキーをタップすることで、キーの押下あるいは他の quantum 機能をアクティブにする機能。
|
||||
|
||||
* [リーダーキードキュメント](ja/feature_leader_key.md)
|
||||
|
||||
## LED
|
||||
発光ダイオード。キーボードの表示に使われる最も一般的なデバイス。
|
||||
|
||||
## Make
|
||||
全てのソースファイルをコンパイルするために使われるソフトウェアパッケージ。キーボードファームウェアをコンパイルするために、様々なオプションを指定して `make` を実行します。
|
||||
|
||||
## マトリックス
|
||||
MCU がより少ないピン数でキー押下を検出できるようにする列と行の配線パターン。マトリックスには多くの場合、NKRO を可能にするためのダイオードが組み込まれています。
|
||||
|
||||
## マクロ
|
||||
単一のキーのみを押した後で、複数のキー押下イベント (HID レポート) を送信できる機能。
|
||||
|
||||
* [マクロドキュメント](ja/feature_macros.md)
|
||||
|
||||
## MCU
|
||||
マイクロコントロールユニット。キーボードを動かすプロセッサ。
|
||||
|
||||
## モディファイア
|
||||
別のキーを入力する間押したままにして、そのキーのアクションを変更するキー。例として、Ctrl、Alt および Shift があります。
|
||||
(訳注:モディファイヤ、モディファイヤキー、修飾キーなど、訳語が統一されていませんが同じものです)
|
||||
|
||||
## マウスキー
|
||||
キーボードからマウスカーソルを制御し、クリックできる機能。
|
||||
|
||||
* [マウスキードキュメント](ja/feature_mouse_keys.md)
|
||||
|
||||
## N キーロールオーバー (NKRO)
|
||||
一度に任意の数のキーの押下を送信できるキーボードに当てはまる用語。
|
||||
|
||||
## ワンショットモディファイア
|
||||
別のキーが放されるまで押されているかのように機能するモディファイア。キーを押している間に mod を押し続けるのではなく、mod を押してからキーを押すことができます。スティッキーキーまたはデッドキーとも呼びます。
|
||||
|
||||
## ProMicro
|
||||
低コストの AVR 開発ボード。このデバイスのクローンは ebay で非常に安価(5ドル未満)に見つかることがありますが、多くの場合 pro micro の書き込みに苦労します。
|
||||
|
||||
## プルリクエスト
|
||||
QMK にコードを送信するリクエスト。全てのユーザが個人のキーマップのプルリクエストを送信することを推奨します。
|
||||
|
||||
## QWERTY
|
||||
標準の英語キーボードレイアウト。多くの場合、他の言語の標準レイアウトへのショートカット。キーボードの最初の6文字から命名されました。
|
||||
|
||||
## QWERTZ
|
||||
標準的な Deutsche (ドイツ語) キーボードレイアウト。キーボードの最初の6文字から命名されました。
|
||||
|
||||
## ロールオーバー
|
||||
キーが既に押されている間にキーを押すことを指す用語。似たものに 2KRO、6KRO、NKRO が含まれます。
|
||||
|
||||
## スキャンコード
|
||||
単一のキーを表す USB 経由の HID レポートの一部として送信される1バイトの数値。これらの値は、[USB-IF](http://www.usb.org/) が発行する [HID Usage Tables](https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf) に記載されています。
|
||||
|
||||
## スペースカデットシフト
|
||||
左または右 shift を1回以上タップすることで、様々なタイプの括弧を入力できる特別な shift キーのセット。
|
||||
|
||||
* [スペースカデットシフトドキュメント](ja/feature_space_cadet_shift.md)
|
||||
|
||||
## タップ
|
||||
キーを押して放す。状況によってはキーダウンイベントとキーアップイベントを区別する必要がありますが、タップは常に両方を一度に指します。
|
||||
|
||||
## タップダンス
|
||||
押す回数に基づいて、同じキーに複数のキーコードを割り当てることができる機能。
|
||||
|
||||
* [タップダンスドキュメント](ja/feature_tap_dance.md)
|
||||
|
||||
## Teensy
|
||||
手配線での組み立てによく用いられる低コストの AVR 開発ボード。halfkay ブートローダによって書き込みが非常に簡単になるために、数ドル高いにもかかわらず teensy がしばしば選択されます。
|
||||
|
||||
## アンダーライト
|
||||
キーボードの下側を照らす LED の総称。これらの LED は通常 PCB の底面からキーボードが置かれている表面に向けて照らします。
|
||||
|
||||
## ユニコード
|
||||
大規模なコンピュータの世界では、ユニコードは任意の言語で文字を表現するためのエンコード方式のセットです。QMK に関しては、様々な OS スキームを使ってスキャンコードの代わりにユニコードコードポイントを送信することを意味します。
|
||||
|
||||
* [ユニコードドキュメント](ja/feature_unicode.md)
|
||||
|
||||
## 単体テスト
|
||||
QMK に対して自動テストを実行するためのフレームワーク。単体テストは、変更が何も壊さないことを確信するのに役立ちます。
|
||||
|
||||
* [単体テストドキュメント](ja/unit_testing.md)
|
||||
|
||||
## USB
|
||||
ユニバーサルシリアルバス。キーボード用の最も一般的な有線インタフェース。
|
||||
|
||||
## USB ホスト (あるいは単にホスト)
|
||||
USB ホストは、あなたのコンピュータ、またはキーボードが差し込まれているデバイスのことです。
|
||||
|
||||
# 探している用語が見つかりませんでしたか?
|
||||
|
||||
質問についての [issue を開いて](https://github.com/qmk/qmk_firmware/issues) 、質問した用語についてここに追加することができます。さらに良いのは、定義についてのプルリクエストを開くことです。:)
|
78
docs/ja/reference_info_json.md
Normal file
78
docs/ja/reference_info_json.md
Normal file
@@ -0,0 +1,78 @@
|
||||
# `info.json`
|
||||
|
||||
<!---
|
||||
original document: 0.10.33:docs/reference_info_json.md
|
||||
git diff 0.10.33 HEAD -- docs/reference_info_json.md | cat
|
||||
-->
|
||||
|
||||
このファイルは [QMK API](https://github.com/qmk/qmk_api) によって使われます。このファイルは [QMK Configurator](https://config.qmk.fm/) がキーボードの画像を表示するために必要な情報を含んでいます。ここにメタデータを設定することもできます。
|
||||
|
||||
このメタデータを指定するために、`qmk_firmware/keyboards/<name>` の下の全てのレベルで `info.json` を作成することができます。これらのファイルは結合され、より具体的なファイルがそうではないファイルのキーを上書きします。つまり、メタデータ情報を複製する必要はありません。例えば、`qmk_firmware/keyboards/clueboard/info.json` は `manufacturer` および `maintainer` を指定し、`qmk_firmware/keyboards/clueboard/66/info.json` は Clueboard 66% についてのより具体的な情報を指定します。
|
||||
|
||||
## `info.json` の形式
|
||||
|
||||
`info.json` ファイルは設定可能な以下のキーを持つ JSON 形式の辞書です。全てを設定する必要はなく、キーボードに適用するキーだけを設定します。
|
||||
|
||||
* `keyboard_name`
|
||||
* キーボードを説明する自由形式のテキスト文字列。
|
||||
* 例: `Clueboard 66%`
|
||||
* `url`
|
||||
* キーボードの製品ページ、[QMK.fm/keyboards](https://qmk.fm/keyboards) のページ、あるいはキーボードに関する情報を説明する他のページの URL。
|
||||
* `maintainer`
|
||||
* メンテナの GitHub のユーザ名、あるいはコミュニティが管理するキーボードの場合は `qmk`
|
||||
* `width`
|
||||
* キー単位でのキーボードの幅
|
||||
* `height`
|
||||
* キー単位でのキーボードの高さ
|
||||
* `layouts`
|
||||
* 物理的なレイアウト表現。詳細は以下のセクションを見てください。
|
||||
|
||||
### レイアウトの形式
|
||||
|
||||
`info.json` ファイル内の辞書の `layouts` 部分は、幾つかの入れ子になった辞書を含みます。外側のレイヤーは QMK レイアウトマクロで構成されます。例えば、`LAYOUT_ansi` あるいは `LAYOUT_iso`。各レイアウトマクロ内には、`width`、 `height`、`key_count` のキーがあります。これらは自明でなければなりません。
|
||||
|
||||
* `width`
|
||||
* オプション: キー単位でのレイアウトの幅
|
||||
* `height`
|
||||
* オプション: キー単位でのレイアウトの高さ
|
||||
* `key_count`
|
||||
* オプション: このレイアウトのキーの数
|
||||
* `layout`
|
||||
* 物理レイアウトを説明するキー辞書のリスト。詳細は次のセクションを見てください。
|
||||
|
||||
### キー辞書形式
|
||||
|
||||
レイアウトの各キー辞書は、キーの物理プロパティを記述します。<http://keyboard-layout-editor.com> の Raw Code に精通している場合、多くの概念が同じであることが分かります。可能な限り同じキー名とレイアウトの選択を再利用しますが、keyboard-layout-editor とは異なって各キーはステートレスで、前のキーからプロパティを継承しません。
|
||||
|
||||
全てのキーの位置と回転は、キーボードの左上と、各キーの左上を基準にして指定されます。
|
||||
|
||||
* `x`
|
||||
* **必須**: 水平軸でのキーの絶対位置(キー単位)。
|
||||
* `y`
|
||||
* **必須**: 垂直軸でのキーの絶対位置(キー単位)。
|
||||
* `w`
|
||||
* キー単位でのキーの幅。`ks` が指定された場合は無視されます。デフォルト: `1`
|
||||
* `h`
|
||||
* キー単位でのキーの高さ。`ks` が指定された場合は無視されます。デフォルト: `1`
|
||||
* `r`
|
||||
* キーを回転させる時計回りの角度。
|
||||
* `rx`
|
||||
* キーを回転させる点の水平軸における絶対位置。デフォルト: `x`
|
||||
* `ry`
|
||||
* キーを回転させる点の垂直軸における絶対位置。デフォルト: `y`
|
||||
* `ks`
|
||||
* キー形状: キー単位で頂点を列挙することでポリゴンを定義します。
|
||||
* **重要**: これらはキーの左上からの相対位置で、絶対位置ではありません。
|
||||
* ISO Enter の例: `[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]`
|
||||
* `label`
|
||||
* マトリックス内のこの位置につける名前。
|
||||
* これは通常 PCB 上でこの位置にシルクスクリーン印刷されるものと同じ名前でなければなりません。
|
||||
|
||||
## メタデータはどのように公開されますか?
|
||||
|
||||
このメタデータは主に2つの方法で使われます:
|
||||
|
||||
* Web ベースの configurator が動的に UI を生成できるようにする。
|
||||
* 新しい `make keyboard:keymap:qmk` ターゲットをサポートする。これは、このメタデータをファームウェアにバンドルして QMK Toolbox をよりスマートにします。
|
||||
|
||||
Configurator の作成者は、JSON API の使用に関する詳細について、[QMK Compiler](https://docs.api.qmk.fm/using-the-api) ドキュメントを参照することができます。
|
88
docs/ja/reference_keymap_extras.md
Normal file
88
docs/ja/reference_keymap_extras.md
Normal file
@@ -0,0 +1,88 @@
|
||||
# 言語固有のキーコード
|
||||
|
||||
<!---
|
||||
original document: 0.9.55:docs/reference_keymap_extras.md
|
||||
git diff 0.9.55 HEAD -- docs/reference_keymap_extras.md | cat
|
||||
-->
|
||||
|
||||
キーボードは多くの言語をサポートすることができます。ただし、それらはキーを押したことで生成される実際の文字を送信しません - 代わりに数字のコードを送信します。USB HID の仕様ではそれらは "usages" と呼ばれますが、キーボードの文脈では「スキャンコード」あるいは「キーコード」と呼ばれることが多いです。
|
||||
HID Keyboard/Keypad usage ページでは 256 未満の usage が定義されており、それらの一部は現在のオペレーティングシステムでは機能しません。では、この言語のサポートはどのようにして実現されるのでしょうか?
|
||||
|
||||
簡単に言うと、オペレーティングシステムはユーザが設定したキーボードレイアウトに基づいて受け取った usage を適切な文字にマップします。例えば、スウェーデン人がキーボードの `å` という文字が刻印されたキーを押すと、キーボードは *実際には* `[` のキーコードを送信します。
|
||||
|
||||
明らかにこれは混乱する可能性があるため、QMK は多くのキーボードレイアウトのために言語固有のキーコードのエイリアスを提供します。これらはそれだけでは何もしません - さらに OS の設定で対応するキーボードレイアウトを設定する必要があります。それらをキーマップのキーキャップラベルと考えてください。
|
||||
|
||||
これらを使うには、`keymap.c` で対応する [ヘッダファイル](https://github.com/qmk/qmk_firmware/tree/master/quantum/keymap_extras) を `#include` し、それらで定義されているキーコードを `KC_` プリフィクスの代わりに追加します:
|
||||
|
||||
| レイアウト | ヘッダファイル |
|
||||
|-----------------------------|----------------------------------|
|
||||
| Canadian Multilingual (CSA) | `keymap_canadian_multilingual.h` |
|
||||
| Croatian | `keymap_croatian.h` |
|
||||
| Czech | `keymap_czech.h` |
|
||||
| Danish | `keymap_danish.h` |
|
||||
| Dutch (Belgium) | `keymap_belgian.h` |
|
||||
| English (Ireland) | `keymap_irish.h` |
|
||||
| English (UK) | `keymap_uk.h` |
|
||||
| English (US International) | `keymap_us_international.h` |
|
||||
| Estonian | `keymap_estonian.h` |
|
||||
| Finnish | `keymap_finnish.h` |
|
||||
| French | `keymap_french.h` |
|
||||
| French (AFNOR) | `keymap_french_afnor.h` |
|
||||
| French (BÉPO) | `keymap_bepo.h` |
|
||||
| French (Belgium) | `keymap_belgian.h` |
|
||||
| French (Switzerland) | `keymap_fr_ch.h` |
|
||||
| French (macOS, ISO) | `keymap_french_osx.h` |
|
||||
| German | `keymap_german.h` |
|
||||
| German (Switzerland) | `keymap_german_ch.h` |
|
||||
| German (macOS) | `keymap_german_osx.h` |
|
||||
| German (Neo2)* | `keymap_neo2.h` |
|
||||
| Greek* | `keymap_greek.h` |
|
||||
| Hebrew* | `keymap_hebrew.h` |
|
||||
| Hungarian | `keymap_hungarian.h` |
|
||||
| Icelandic | `keymap_icelandic.h` |
|
||||
| Italian | `keymap_italian.h` |
|
||||
| Italian (macOS, ANSI) | `keymap_italian_osx_ansi.h` |
|
||||
| Italian (macOS, ISO) | `keymap_italian_osx_iso.h` |
|
||||
| Japanese | `keymap_jp.h` |
|
||||
| Korean | `keymap_korean.h` |
|
||||
| Latvian | `keymap_latvian.h` |
|
||||
| Lithuanian (ĄŽERTY) | `keymap_lithuanian_azerty.h` |
|
||||
| Lithuanian (QWERTY) | `keymap_lithuanian_qwerty.h` |
|
||||
| Norwegian | `keymap_norwegian.h` |
|
||||
| Polish | `keymap_polish.h` |
|
||||
| Portuguese | `keymap_portuguese.h` |
|
||||
| Portuguese (Brazil) | `keymap_br_abnt2.h` |
|
||||
| Romanian | `keymap_romanian.h` |
|
||||
| Russian* | `keymap_russian.h` |
|
||||
| Serbian* | `keymap_serbian.h` |
|
||||
| Serbian (Latin) | `keymap_serbian_latin.h` |
|
||||
| Slovak | `keymap_slovak.h` |
|
||||
| Slovenian | `keymap_slovenian.h` |
|
||||
| Spanish | `keymap_spanish.h` |
|
||||
| Spanish (Dvorak) | `keymap_spanish_dvorak.h` |
|
||||
| Swedish | `keymap_swedish.h` |
|
||||
| Turkish (F) | `keymap_turkish_f.h` |
|
||||
| Turkish (Q) | `keymap_turkish_q.h` |
|
||||
|
||||
言語固有でないものもありますが、QWERTY レイアウトを使っていない場合に役立ちます:
|
||||
|
||||
| レイアウト | ヘッダファイル |
|
||||
|---------------------|--------------------------|
|
||||
| Colemak | `keymap_colemak.h` |
|
||||
| Dvorak | `keymap_dvorak.h` |
|
||||
| Dvorak (French) | `keymap_dvorak_fr.h` |
|
||||
| Dvorak (Programmer) | `keymap_dvp.h` |
|
||||
| Norman | `keymap_norman.h` |
|
||||
| Plover* | `keymap_plover.h` |
|
||||
| Plover (Dvorak)* | `keymap_plover_dvorak.h` |
|
||||
| Steno* | `keymap_steno.h` |
|
||||
| Workman | `keymap_workman.h` |
|
||||
| Workman (ZXCVM) | `keymap_workman_zxcvm.h` |
|
||||
|
||||
## Sendstring サポート
|
||||
|
||||
デフォルトでは、`SEND_STRING()` は US ANSI キーボードレイアウトが設定されたと見なします。別のレイアウトを使っている場合は、キーマップで(上記のように)`#include "sendstring_*.h"` して、ASCII 文字をキーコードにマッピングするために使われるルックアップテーブルを上書きすることができます。
|
||||
|
||||
ここで注意すべき重要な点は、`SEND_STRING()` は [ASCII 文字](https://en.wikipedia.org/wiki/ASCII#Character_set) でのみ機能するということです。これは、ユニコード文字を含む文字列を渡すことができないことを意味します - 残念ながら、これには希望のレイアウトに存在する可能性のあるアクセント付き文字が含まれています。
|
||||
多くのレイアウトでは、Grave または Tilde などの特定の文字を[デッドキー](https://en.wikipedia.org/wiki/Dead_key)としてのみ使えるようにしています。そのため、デッドキーが次の文字と潜在的に結合されることを防ぐためには、送信したい文字列の中のデッドキーのすぐ後にスペースを追加する必要があります。
|
||||
ラテン語由来のアルファベットを使わない(例えば、ギリシャ語やロシア語のような)他のレイアウトには、Sendstring ヘッダーがありません。従って ASCII 文字セットのほとんどを入力する方法がありません。これらは上記で `*` でマークされています。
|
75
docs/ja/serial_driver.md
Normal file
75
docs/ja/serial_driver.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# 'シリアル' ドライバ
|
||||
|
||||
<!---
|
||||
original document: 0.9.51:docs/serial_drive.md
|
||||
git diff 0.9.51 HEAD -- docs/serial_drive.md | cat
|
||||
-->
|
||||
|
||||
このドライバは[分割キーボード](ja/feature_split_keyboard.md) 機能に使います。
|
||||
|
||||
?> この文章でのシリアルは、UART/USART/RS485/RS232 規格の実装ではなく、**一度に1ビットの情報を送信するもの**として読まれるべきです。
|
||||
|
||||
このカテゴリの全てのドライバには以下の特徴があります:
|
||||
* 1本の線上でデータと信号を提供
|
||||
* シングルマスタ、シングルスレーブに限定
|
||||
|
||||
## サポートされるドライバの種類
|
||||
|
||||
| | AVR | ARM |
|
||||
|-------------------|--------------------|--------------------|
|
||||
| bit bang | :heavy_check_mark: | :heavy_check_mark: |
|
||||
| USART Half-duplex | | :heavy_check_mark: |
|
||||
|
||||
## ドライバ設定
|
||||
|
||||
### Bitbang
|
||||
デフォルトのドライバ。設定がない場合はこのドライバが想定されます。設定するには、以下を rules.mk に追加します:
|
||||
|
||||
```make
|
||||
SERIAL_DRIVER = bitbang
|
||||
```
|
||||
|
||||
config.h を介してドライバを設定します:
|
||||
```c
|
||||
#define SOFT_SERIAL_PIN D0 // または D1, D2, D3, E6
|
||||
#define SELECT_SOFT_SERIAL_SPEED 1 // または 0, 2, 3, 4, 5
|
||||
// 0: 約 189kbps (実験目的のみ)
|
||||
// 1: 約 137kbps (デフォルト)
|
||||
// 2: 約 75kbps
|
||||
// 3: 約 39kbps
|
||||
// 4: 約 26kbps
|
||||
// 5: 約 20kbps
|
||||
```
|
||||
|
||||
#### ARM
|
||||
|
||||
!> bitbang ドライバは bitbang WS2812 ドライバと接続の問題があります
|
||||
|
||||
上記の一般的なオプションに加えて、halconf.h で `PAL_USE_CALLBACKS` 機能もオンにする必要があります。
|
||||
|
||||
### USART Half-duplex
|
||||
通信が USART ハードウェアデバイスに送信される STM32 ボードが対象です。これにより高速で正確なタイミングを提供できることが利点です。このドライバの `SOFT_SERIAL_PIN` は、設定された USART TX ピンです。**TX ピンに適切なプルアップ抵抗が必要です**。設定するには、以下を rules.mk に追加します:
|
||||
|
||||
```make
|
||||
SERIAL_DRIVER = usart
|
||||
```
|
||||
|
||||
config.h を介してハードウェアを設定します:
|
||||
```c
|
||||
#define SOFT_SERIAL_PIN B6 // USART TX ピン
|
||||
#define SELECT_SOFT_SERIAL_SPEED 1 // または 0, 2, 3, 4, 5
|
||||
// 0: 約 460800 ボー
|
||||
// 1: 約 230400 ボー (デフォルト)
|
||||
// 2: 約 115200 ボー
|
||||
// 3: 約 57600 ボー
|
||||
// 4: 約 38400 ボー
|
||||
// 5: 約 19200 ボー
|
||||
#define SERIAL_USART_DRIVER SD1 // TX ピンの USART ドライバ。デフォルトは SD1
|
||||
#define SERIAL_USART_TX_PAL_MODE 7 // 「代替機能」 ピン。MCU の適切な値については、それぞれのデータシートを見てください。デフォルトは 7
|
||||
```
|
||||
|
||||
また、ChibiOS `SERIAL` 機能を有効にする必要があります:
|
||||
* キーボードの halconf.h: `#define HAL_USE_SERIAL TRUE`
|
||||
* キーボードの mcuconf.h: `#define STM32_SERIAL_USE_USARTn TRUE` (ここで、'n' は MCU で選択した USART のペリフェラル番号と一致)
|
||||
|
||||
必要な構成は、`UART` 周辺機器ではなく、`SERIAL` 周辺機器であることに注意してください。
|
22
docs/ja/support.md
Normal file
22
docs/ja/support.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# 助けを得る
|
||||
|
||||
<!---
|
||||
original document: 0.9.51:docs/support.md
|
||||
git diff 0.9.51 HEAD -- docs/support.md | cat
|
||||
-->
|
||||
|
||||
QMK に関して助けを得るための多くのリソースがあります。
|
||||
|
||||
コミュニティスペースに参加する前に[行動規範](https://qmk.fm/coc/)を読んでください。
|
||||
|
||||
## リアルタイムチャット
|
||||
|
||||
何かについて助けが必要な場合は、迅速なサポートを受けるための最良の場所は、[Discord Server](https://discord.gg/Uq7gcHh) です。通常は誰かがオンラインで、非常に助けになる多くの人がいます。
|
||||
|
||||
## OLKB Subreddit
|
||||
|
||||
公式の QMK フォーラムは [reddit.com](https://reddit.com) の [/r/olkb](https://reddit.com/r/olkb) です。
|
||||
|
||||
## GitHub Issues
|
||||
|
||||
[GitHub で issue](https://github.com/qmk/qmk_firmware/issues) を開くことができます。issue は長期的な議論あるいはデバッグを必要とする場合は、特に便利です。
|
75
docs/ja/syllabus.md
Normal file
75
docs/ja/syllabus.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# QMK シラバス
|
||||
|
||||
<!---
|
||||
original document: 0.9.51:docs/syllabus.md
|
||||
git diff 0.9.51 HEAD -- docs/syllabus.md | cat
|
||||
-->
|
||||
|
||||
このページは最初に基本を紹介し、そして、QMK に習熟するために必要な全ての概念を理解するように導くことで、QMK の知識を構築するのに役立ちます。
|
||||
|
||||
# 初級トピック
|
||||
|
||||
他に何も読んでいない場合は、このセクションのドキュメントを読んでください。[QMK 初心者ガイド](ja/newbs.md)を読み終わると、基本的なキーマップを作成し、それをコンパイルし、キーボードに書き込みできるようになっているはずです。残りのドキュメントはこれらの基本的な知識を具体的に肉付けします。
|
||||
|
||||
* **QMK Tools の使い方を学ぶ**
|
||||
* [QMK 初心者ガイド](ja/newbs.md)
|
||||
* [CLI](ja/cli.md)
|
||||
* [Git](ja/newbs_git_best_practices.md)
|
||||
* **キーマップについて学ぶ**
|
||||
* [レイヤー](ja/feature_layers.md)
|
||||
* [キーコード](ja/keycodes.md)
|
||||
* 使用できるキーコードの完全なリスト。中級または上級トピックにある知識が必要な場合もあることに注意してください。
|
||||
* **IDE の設定** - オプション
|
||||
* [Eclipse](ja/other_eclipse.md)
|
||||
* [VS Code](ja/other_vscode.md)
|
||||
|
||||
# 中級トピック
|
||||
|
||||
これらのトピックでは、QMK がサポートする幾つかの機能について掘り下げます。これらのドキュメントを全て読む必要はありませんが、これらの一部をスキップすると、上級トピックのセクションの一部のドキュメントが意味をなさなくなるかもしれません。
|
||||
|
||||
* **機能の設定方法を学ぶ**
|
||||
<!-- * Configuration Overview FIXME(skullydazed/anyone): write this document -->
|
||||
* [オーディオ](ja/feature_audio.md)
|
||||
* 電飾
|
||||
* [バックライト](ja/feature_backlight.md)
|
||||
* [LED マトリックス](ja/feature_led_matrix.md)
|
||||
* [RGB ライト](ja/feature_rgblight.md)
|
||||
* [RGB マトリックス](ja/feature_rgb_matrix.md)
|
||||
* [タップホールド設定](ja/tap_hold.md)
|
||||
* **キーマップについてさらに学ぶ**
|
||||
* [キーマップ](ja/keymap.md)
|
||||
* [カスタム関数とキーコード](ja/custom_quantum_functions.md)
|
||||
* マクロ
|
||||
* [動的マクロ](ja/feature_dynamic_macros.md)
|
||||
* [コンパイル済みのマクロ](ja/feature_macros.md)
|
||||
* [タップダンス](ja/feature_tap_dance.md)
|
||||
* [コンボ](ja/feature_combo.md)
|
||||
* [ユーザスペース](ja/feature_userspace.md)
|
||||
|
||||
# 上級トピック
|
||||
|
||||
以下の全ては多くの基礎知識を必要とします。高度な機能を使ってキーマップを作成できることに加えて、`config.h` と `rules.mk` の両方を使ってキーボードのオプションを設定することに慣れている必要があります。
|
||||
|
||||
* **QMK 内のキーボードの保守**
|
||||
* [キーボードの手配線](ja/hand_wire.md)
|
||||
* [キーボードガイドライン](ja/hardware_keyboard_guidelines.md)
|
||||
* [info.json リファレンス](ja/reference_info_json.md)
|
||||
* [デバウンス API](ja/feature_debounce_type.md)
|
||||
* **高度な機能**
|
||||
* [ユニコード](ja/feature_unicode.md)
|
||||
* [API](ja/api_overview.md)
|
||||
* [ブートマジック](ja/feature_bootmagic.md)
|
||||
* **ハードウェア**
|
||||
* [キーボードがどのように動作するか](ja/how_keyboards_work.md)
|
||||
* [キーボードマトリックスの仕組み](ja/how_a_matrix_works.md)
|
||||
* [分割キーボード](ja/feature_split_keyboard.md)
|
||||
* [速記](ja/feature_stenography.md)
|
||||
* [ポインティングデバイス](ja/feature_pointing_device.md)
|
||||
* **コア開発**
|
||||
* [コーディング規約](ja/coding_conventions_c.md)
|
||||
* [互換性のあるマイクロコントローラ](ja/compatible_microcontrollers.md)
|
||||
* [カスタムマトリックス](ja/custom_matrix.md)
|
||||
* [QMK を理解する](ja/understanding_qmk.md)
|
||||
* **CLI 開発**
|
||||
* [コーディング規約](ja/coding_conventions_python.md)
|
||||
* [CLI 開発の概要](ja/cli_development.md)
|
196
docs/ja/tap_hold.md
Normal file
196
docs/ja/tap_hold.md
Normal file
@@ -0,0 +1,196 @@
|
||||
# タップホールド設定オプション
|
||||
|
||||
<!---
|
||||
original document: 0.10.33:docs/tap_hold.md
|
||||
git diff 0.10.33 HEAD -- docs/tap_hold.md | cat
|
||||
-->
|
||||
|
||||
タップホールドオプションは素晴らしいものですが、問題が無いわけではありません。デフォルト設定を適切なものにしようとしましたが、一部の人にとってまだ問題を引き起こすかもしれません。
|
||||
|
||||
次のオプションによりタップホールドキーの挙動を変更することができます。
|
||||
|
||||
## タッピング時間
|
||||
|
||||
以下の機能の全ての核心は、タッピング時間の設定です。これにより、何をタップとし、何をホールドとするかが決まります。これが自然に感じられるぴったりのタイミングは、キーボードごと、スイッチごと、あるいはキーごとに異ることもありえます。
|
||||
|
||||
`config.h` に以下の設定を追加することで、この時間を全体的に設定することができます:
|
||||
|
||||
```c
|
||||
#define TAPPING_TERM 200
|
||||
```
|
||||
|
||||
この設定はミリ秒で定義され、デフォルトは 200ms です。これは大多数の人にとっての適切な平均値です。
|
||||
|
||||
この機能をより細かく制御するために、以下を `config.h` に追加することができます:
|
||||
```c
|
||||
#define TAPPING_TERM_PER_KEY
|
||||
```
|
||||
|
||||
そして、以下の関数をキーマップに追加します:
|
||||
|
||||
```c
|
||||
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case SFT_T(KC_SPC):
|
||||
return TAPPING_TERM + 1250;
|
||||
case LT(1, KC_GRV):
|
||||
return 130;
|
||||
default:
|
||||
return TAPPING_TERM;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## 許容ホールド
|
||||
|
||||
[PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/) 以降、新しい `config.h` オプションがあります:
|
||||
|
||||
```c
|
||||
#define PERMISSIVE_HOLD
|
||||
```
|
||||
|
||||
これは高速なタイピストや高い `TAPPING_TERM` 設定に対して、タップとホールドキー(モッドタップのような)の動作を向上させます。
|
||||
|
||||
モッドタップキーを押し、他のキーをタップ(押して放す)して、モッドタップキーを放すという動作の全てをタッピング時間内に行うと、両方のキーのタッピング機能が出力されます。
|
||||
|
||||
例えば:
|
||||
|
||||
- `SFT_T(KC_A)` を押す
|
||||
- `KC_X` を押す
|
||||
- `KC_X` を放す
|
||||
- `SFT_T(KC_A)` を放す
|
||||
|
||||
通常、これら全てを `TAPPING_TERM` (デフォルト: 200ms) 内で行うと、ファームウェアとホストシステムによって `ax` として登録されます。許容ホールドを有効にすると、別のキーがタップされた場合にモッドタップキーを修飾キーと見なすように処理を変更し、 `X` (`SHIFT`+`x`) と登録されます。
|
||||
|
||||
?> `モッドタップ割り込みの無視`を有効にしている場合、これにより両方の動きが変更されます。通常のキーには、最初のキーが最初に放された場合、あるいは両方のキーが `TAPPING_TERM` より長くホールドされた場合に、修飾キーが追加されます。
|
||||
|
||||
この機能をより細かく制御するために、以下を `config.h` に追加することができます:
|
||||
|
||||
```c
|
||||
#define PERMISSIVE_HOLD_PER_KEY
|
||||
```
|
||||
|
||||
そして、以下の関数をキーマップに追加します:
|
||||
|
||||
```c
|
||||
bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case LT(1, KC_BSPC):
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## モッドタップ割り込みの無視
|
||||
|
||||
この設定を有効にするには、これを `config.h` に追加してください:
|
||||
|
||||
```c
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
```
|
||||
|
||||
許容ホールドと同様に、これは高速なタイピストのためのファームウェアの処理方法を変更します。モッドタップキーを押し、他のキーを押し、モッドタップキーを放し、通常のキーを放すと、通常は両方のキーのタッピング機能が出力されます。これはローリングコンボキーには望ましくないかもしれません。
|
||||
|
||||
`モッドタップ割り込みの無視`を設定するには、両方のキーを `TAPPING_TERM` の間ホールドすると、(その修飾キーの)ホールド機能を実行する必要があります。
|
||||
|
||||
例えば:
|
||||
|
||||
- `SFT_T(KC_A)` を押す
|
||||
- `KC_X` を押す
|
||||
- `SFT_T(KC_A)` を放す
|
||||
- `KC_X` を放す
|
||||
|
||||
通常、これは `X` (`SHIFT`+`x`) を送信します。`モッドタップ割り込みの無視` を有効にすると、ホールドアクションを登録するには、両方のキーを `TAPPING_TERM` の間ホールドする必要があります。この場合、素早いタップは `ax` を送信しますが、両方をホールドすると、`X` (`SHIFT`+`x`) を出力します。
|
||||
|
||||
|
||||
?> __注意__: これはモディファイアにのみ関係し、レイヤー切り替えキーには関係しません。
|
||||
|
||||
?> `許容ホールド`を有効にすると、これは両方がどのように動作するかを変更します。通常のキーには、最初のキーが最初に放された場合、あるいは両方のキーが `TAPPING_TERM` より長くホールドされた場合に、修飾キーが追加されます。
|
||||
|
||||
この機能をより細かく制御するために、以下を `config.h` に追加することができます:
|
||||
|
||||
```c
|
||||
#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
|
||||
```
|
||||
|
||||
そして、以下の関数をキーマップに追加します:
|
||||
|
||||
```c
|
||||
bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case SFT_T(KC_SPC):
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## タッピング強制ホールド
|
||||
|
||||
`タッピング強制ホールド` を有効にするには、以下を `config.h` に追加します:
|
||||
|
||||
```c
|
||||
#define TAPPING_FORCE_HOLD
|
||||
```
|
||||
|
||||
タップの後でユーザがキーをホールドすると、ホールド機能がアクティブになるのではなく、デフォルトでタッピング機能が繰り返されます。これにより、デュアルロールキーのタッピング機能を自動繰り返しする機能を維持することができます。
|
||||
`TAPPING_FORCE_HOLD` は、デュアルロールキーをタップした後ホールドした場合、ユーザがホールド機能をアクティブにする機能を削除します。
|
||||
|
||||
例:
|
||||
|
||||
- `SFT_T(KC_A)` を押す
|
||||
- `SFT_T(KC_A)` を放す
|
||||
- `SFT_T(KC_A)` を押す
|
||||
- タッピング時間が終了するまで待ちます...
|
||||
- `SFT_T(KC_A)` を放す
|
||||
|
||||
デフォルトの設定では、最初に放したときに `a` が送信され、2回目の押下で `a` が送信され、コンピュータに自動リピート機能を作動させることができます。
|
||||
|
||||
`TAPPING_FORCE_HOLD` を使うと、2回目の押下は Shift として解釈され、それをタップして使った後ですぐに修飾キーとして使うことができます。
|
||||
|
||||
!> `TAPPING_FORCE_HOLD` はタッピングトグル(`TT` レイヤーキーコード、ワンショットタップトグルなど)を使うものをすべて破壊します。
|
||||
|
||||
この機能をより細かく制御するために、以下を `config.h` に追加することができます:
|
||||
|
||||
```c
|
||||
#define TAPPING_FORCE_HOLD_PER_KEY
|
||||
```
|
||||
|
||||
そして、以下の関数をキーマップに追加します:
|
||||
|
||||
```c
|
||||
bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case LT(1, KC_BSPC):
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## レトロタッピング
|
||||
|
||||
`レトロタッピング`を有効にするには、以下を `config.h` に追加してください:
|
||||
|
||||
```c
|
||||
#define RETRO_TAPPING
|
||||
```
|
||||
|
||||
他のキーを押さずにデュアルファンクションキーを押して放しても何も起こりません。レトロタッピングを有効にすると、他のキーを押さずにキーを放すと、元のキーコードがタッピング時間外であっても送信されます。
|
||||
|
||||
例えば、他のキーを押すことなく `LT(2, KC_SPACE)` を押したり放したりしても何も起こりません。これを有効にすると、代わりに `KC_SPACE` を送信します。
|
||||
|
||||
## キー別の関数にキーレコードを含めるのはなぜですか?
|
||||
|
||||
「キー別」の関数全てにキーレコードを含んでいることに気付いたかもしれません。そしてなぜそうしたのか不思議に思っているかもしれません。
|
||||
|
||||
まぁ、それは単純に本当にカスタマイズのためです。ただし、具体的には、それはキーボードの配線方法によって異なります。例えば、各行が実際にキーボードのマトリックスの1行を使っている場合、キーコード全体をチェックする代わりに、`if (record->event.row == 3)` を使うほうが簡単かもしれません。これは、ホームキー行でタップホールドタイプのキーを使っている人にとって特に便利です。そのため、通常のタイピングを妨げないように微調整することができるのではないでしょうか。
|
||||
|
||||
## `*_kb` や `*_user` 関数が無いのはなぜですか?
|
||||
|
||||
QMK にある他の多くの関数とは異なり、quantum あるいはキーボードレベルの関数を持つ必要はありません (または理由さえありません)。ここではユーザレベルの関数だけが有用なため、そのようにマークする必要はありません。
|
60
docs/ja/translating.md
Normal file
60
docs/ja/translating.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# QMK ドキュメントを翻訳する
|
||||
|
||||
<!---
|
||||
original document: 0.9.51:docs/translating.md
|
||||
git diff 0.9.51 HEAD -- docs/translating.md | cat
|
||||
-->
|
||||
|
||||
ルートフォルダ (`docs/`) にある全てのファイルは英語でなければなりません - 他の全ての言語は、ISO 639-1 言語コードと、それに続く`-`と関連する国コードのサブフォルダにある必要があります。[一般的なもののリストはここで見つかります](https://www.andiamo.co.uk/resources/iso-language-codes/)。このフォルダが存在しない場合、作成することができます。翻訳された各ファイルは英語バージョンと同じ名前でなければなりません。そうすることで、正常にフォールバックできます。
|
||||
|
||||
`_summary.md` ファイルはこのフォルダの中に存在し、各ファイルへのリンクのリスト、翻訳された名前、言語フォルダに続くリンクが含まれている必要があります。
|
||||
|
||||
```markdown
|
||||
* [QMK简介](zh-cn/getting_started_introduction.md)
|
||||
```
|
||||
|
||||
他の docs ページへの全てのリンクにも、言語のフォルダが前に付いている必要があります。もしリンクがページの特定の部分(例えば、特定の見出し)への場合、以下のように見出しに英語の ID を使う必要があります:
|
||||
|
||||
```markdown
|
||||
[建立你的环境](zh-cn/newbs-getting-started.md#set-up-your-environment)
|
||||
|
||||
## 建立你的环境 :id=set-up-your-environment
|
||||
```
|
||||
|
||||
新しい言語の翻訳が完了したら、以下のファイルも修正する必要があります:
|
||||
|
||||
* [`docs/_langs.md`](https://github.com/qmk/qmk_firmware/blob/master/docs/_langs.md)
|
||||
各行は、[GitHub emoji shortcode](https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md#country-flag) の形式で国フラグと、それに続く言語で表される名前を含む必要があります。
|
||||
|
||||
```markdown
|
||||
- [:cn: 中文](/zh-cn/)
|
||||
```
|
||||
|
||||
* [`docs/index.html`](https://github.com/qmk/qmk_firmware/blob/master/docs/index.html)
|
||||
`placeholder` と `noData` の両方のオブジェクトは、文字列で言語フォルダの辞書エントリが必要です:
|
||||
|
||||
```js
|
||||
'/zh-cn/': '没有结果!',
|
||||
```
|
||||
|
||||
サイドバーの「QMK ファームウェア」の見出しリンクを設定するために、`nameLink` オブジェクトも以下のように追加される必要があります:
|
||||
|
||||
```js
|
||||
'/zh-cn/': '/#/zh-cn/',
|
||||
```
|
||||
|
||||
また、`fallbackLanguages` リストに言語フォルダを追加して、404 ではなく英語に適切にフォールバックするようにしてください:
|
||||
|
||||
```js
|
||||
fallbackLanguages: [
|
||||
// ...
|
||||
'zh-cn',
|
||||
// ...
|
||||
],
|
||||
```
|
||||
|
||||
## 翻訳のプレビュー
|
||||
|
||||
ドキュメントのローカルインスタンスをセットアップする方法については、[ドキュメントのプレビュー](ja/contributing.md#previewing-the-documentation)を見てください - 右上の "Translations" メニューから新しい言語を選択することができるはずです。
|
||||
|
||||
作業に満足したら、遠慮なくプルリクエストを開いてください!
|
195
docs/ja/understanding_qmk.md
Normal file
195
docs/ja/understanding_qmk.md
Normal file
@@ -0,0 +1,195 @@
|
||||
# QMK のコードの理解
|
||||
|
||||
<!---
|
||||
original document: 0.9.55:docs/understanding_qmk.md
|
||||
git diff 0.9.55 HEAD -- docs/understanding_qmk.md | cat
|
||||
-->
|
||||
|
||||
このドキュメントでは、QMK ファームウェアがどのように機能するかを非常に高いレベルから説明しようとしています。基本的なプログラミングの概念を理解していることを前提としていますが、(実例を示す必要がある場合を除き) C に精通していることを前提にはしていません。以下のドキュメントの基本的な知識があることを前提としています。
|
||||
|
||||
* [入門](ja/getting_started_introduction.md)
|
||||
* [キーボードがどのように動作するか](ja/how_keyboards_work.md)
|
||||
* [FAQ](ja/faq.md)
|
||||
|
||||
## スタートアップ
|
||||
|
||||
QMK は他のコンピュータプログラムと何ら変わりないと考えることができます。開始され、タスクを実行し、そして終了します。プログラムのエントリーポイントは、他の C プログラムと同様に、`main()` 関数です。ただし、QMK を初めて触る人は、`main()` 関数が複数の場所に現れるため、混乱するかもしれません。また、どれを見ればよいか分かりにくいかもしれません。
|
||||
|
||||
複数ある理由は、QMK は様々なプラットフォームをサポートするからです。最も一般的なプラットフォームは `lufa` です。これは atmega32u4 のような AVR プロセッサ上で実行されます。また、`chibios` および `vusb` もサポートします。
|
||||
|
||||
ここでは AVR プロセッサに焦点を当てます。これは `lufa` プラットフォームを使います。`main()` 関数は [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1028) にあります。関数にざっと目を通すと、(ホストへの USB も含めて)設定された全てのハードウェアが初期化され、プログラムのコア部分が [`while(1)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1069) で開始されることが分かります。これが[メインループ](#the-main-loop)です。
|
||||
|
||||
## メインループ
|
||||
|
||||
コードのこの部分は、同じ命令セットを永久にループ処理するため、「メインループ」と呼ばれます。ここはキーボードに必要なことを実行させる関数を QMK が呼び出す場所です。一見、多くの機能を持つように見えるかもしれませんが、大抵の場合、コードは `#define` によって無効にされます。
|
||||
|
||||
```
|
||||
keyboard_task();
|
||||
```
|
||||
|
||||
ここで、全てのキーボードの固有の機能が実行されます。`keyboard_task()` のソースコードは [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/keyboard.c#L216) にあり、マトリックスの変化を検知し、LED の状態をオンオフする責任があります。
|
||||
|
||||
`keyboard_task()` に以下を処理するコードがあります:
|
||||
|
||||
* [マトリックスのスキャン](#matrix-scanning)
|
||||
* マウスの処理
|
||||
* シリアルリンク
|
||||
* ビジュアライザ
|
||||
* キーボードの状態の LED (Caps Lock, Num Lock, Scroll Lock)
|
||||
|
||||
#### マトリックスのスキャン
|
||||
|
||||
マトリックスのスキャンはキーボードファームウェアのコアの機能です。これは今どのキーが押されているかを検知するプロセスであり、キーボードはこの機能を1秒間に何度も何度も実行します。ファームウェアの CPU 時間の 99% はマトリックスのスキャンに費やされていると言っても過言ではありません。
|
||||
|
||||
実際のマトリックスの検知には様々な方法がありますが、それはこのドキュメントの対象外です。マトリックスのスキャンをブラックボックスとして扱っても問題ありません。マトリックスの現在の状態を求めると、以下のようなデータ構造を取得します:
|
||||
|
||||
|
||||
```
|
||||
{
|
||||
{0,0,0,0},
|
||||
{0,0,0,0},
|
||||
{0,0,0,0},
|
||||
{0,0,0,0},
|
||||
{0,0,0,0}
|
||||
}
|
||||
```
|
||||
|
||||
これは 4行x5列のテンキー(訳注: 5行x4列の間違いと思われます)のマトリックスを表す直接的な表現のデータ構造です。キーが押されると、マトリックス内のそのキーの位置が、 `0` ではなく `1` として返されます。
|
||||
|
||||
マトリックスのスキャンは1秒間に何度も実行されます。正確なレートは様々ですが、知覚できるような遅延を避けるために、秒間に少なくとも10回実行します。
|
||||
|
||||
##### マトリックスから物理的なレイアウトへのマップ
|
||||
|
||||
キーボード上の各スイッチの状態が分かると、それをキーコードへマップする必要があります。QMK ではキーコードへのマップは C マクロを使うことで行われ、C マクロにより物理的なレイアウトの定義はキーコードの定義から分離されています。(訳注:「キーコードの定義」は「キーコードのマトリクス配列による定義」と思われる)
|
||||
|
||||
キーボードレベルで、キーボードのマトリックスを物理キーにマップする C マクロ (一般的には、`LAYOUT()` という名前)を定義します。マトリックスにスイッチがない場所がある場合、このマクロを使って KC_NO を事前に埋め込むことができ、キーマップの定義を扱いやすくすることができます。以下は、テンキー用の `LAYOUT()` マクロです:
|
||||
|
||||
```c
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, k03, \
|
||||
k10, k11, k12, k13, \
|
||||
k20, k21, k22, \
|
||||
k30, k31, k32, k33, \
|
||||
k40, k42 \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, }, \
|
||||
{ k10, k11, k12, k13, }, \
|
||||
{ k20, k21, k22, KC_NO, }, \
|
||||
{ k30, k31, k32, k33, }, \
|
||||
{ k40, KC_NO, k42, KC_NO } \
|
||||
}
|
||||
```
|
||||
|
||||
`LAYOUT()` マクロの2つ目のブロックが、上記のマトリックススキャン配列とどのように一致しているかに注目してください。このマクロはマトリックスのスキャン配列をキーコードにマップするものです。ただし、17キーのテンキーを見ると、マトリックスにはスイッチが置けるが、キーが大きいために実際にはスイッチが無い箇所が3つあることが分かります。これらのスペースに `KC_NO` を設定したので、キーマップ定義には必要ありません。
|
||||
|
||||
このマクロを使って、少し変わったマトリックスのレイアウト、例えば [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/66/rev2/rev2.h) を扱うこともできます。その説明はこのドキュメントの範囲外です。
|
||||
|
||||
##### キーコードの割り当て
|
||||
|
||||
キーマップレべルでは、上記の `LAYOUT()` マクロを使って、物理的な場所からマトリックスの場所にマッピングします。以下のようになります:
|
||||
|
||||
```
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||
KC_P7, KC_P8, KC_P9, KC_PPLS, \
|
||||
KC_P4, KC_P5, KC_P6, \
|
||||
KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||
KC_P0, KC_PDOT)
|
||||
}
|
||||
```
|
||||
|
||||
これら全ての引数が、前のセクションの `LAYOUT()` マクロの前半とどのように一致しているかについて注目してください。このようにして、キーコードを取得して、それを前述のマトリックススキャンにマップします。
|
||||
|
||||
##### 状態変更の検知
|
||||
|
||||
上記のマトリックススキャンはある時点のマトリックスの状態を伝えますが、コンピュータは変更のみを知りたいだけで、現在の状態を気にしません。QMK は最後のマトリックススキャンの結果を格納し、このマトリックスから結果を比較して、いつキーが押されたか放されたかを決定します。
|
||||
|
||||
例を見てみましょう。キーボードスキャンループの途中に移動して、前のスキャンが以下のようになっていることがわかったとします:
|
||||
|
||||
```
|
||||
{
|
||||
{0,0,0,0},
|
||||
{0,0,0,0},
|
||||
{0,0,0,0},
|
||||
{0,0,0,0},
|
||||
{0,0,0,0}
|
||||
}
|
||||
```
|
||||
|
||||
現在のスキャンが完了すると、以下のように見えるとします:
|
||||
|
||||
```
|
||||
{
|
||||
{1,0,0,0},
|
||||
{0,0,0,0},
|
||||
{0,0,0,0},
|
||||
{0,0,0,0},
|
||||
{0,0,0,0}
|
||||
}
|
||||
```
|
||||
|
||||
キーマップと比較すると、押されたキーが KC_NLCK であることが分かります。ここから、`process_record` 関数群を呼び出します。
|
||||
|
||||
<!-- FIXME: Magic happens between here and process_record -->
|
||||
|
||||
##### Process Record
|
||||
|
||||
`process_record()` 関数自体は一見簡単に見えますが、その内部は QMK の様々なレベルで機能を上書きするためのゲートウェイが隠されています。キーボード/キーマップレベルの機能について調べる必要があるときは、以下に列挙した一連のイベントを手引帳として使います。`rules.mk` またはほかの場所で設定されたオプションに応じて、最終的なファームウェアに以下の関数のサブセットのみが含まれます。
|
||||
|
||||
* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/action.c#L172)
|
||||
* [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L206)
|
||||
* [このレコードをキーコードにマップする](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L226)
|
||||
* [`void velocikey_accelerate(void)`](https://github.com/qmk/qmk_firmware/blob/c1c5922aae7b60b7c7d13d3769350eed9dda17ab/quantum/velocikey.c#L27)
|
||||
* [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L119)
|
||||
* [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_key_lock.c#L62)
|
||||
* [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_clicky.c#L79)
|
||||
* [`bool process_haptic(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/2cee371bf125a6ec541dd7c5a809573facc7c456/drivers/haptic/haptic.c#L216)
|
||||
* [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/card.c#L20)
|
||||
* [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/keymaps/default/keymap.c#L58)
|
||||
* [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/rgb_matrix.c#L139)
|
||||
* [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_midi.c#L81)
|
||||
* [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_audio.c#L19)
|
||||
* [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_steno.c#L160)
|
||||
* [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_music.c#L114)
|
||||
* [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L141)
|
||||
* [`bool process_unicode_common(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode_common.c#L169) は、以下のいずれかを呼び出します:
|
||||
* [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode.c#L20)
|
||||
* [`bool process_unicodemap(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicodemap.c#L46)
|
||||
* [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_ucis.c#L95)
|
||||
* [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_leader.c#L51)
|
||||
* [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_combo.c#L115)
|
||||
* [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_printer.c#L77)
|
||||
* [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_auto_shift.c#L94)
|
||||
* [`bool process_terminal(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_terminal.c#L264)
|
||||
* [Quantum 固有のキーコードを識別して処理する](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L291)
|
||||
|
||||
この一連のイベントの中の任意のステップで (`process_record_kb()` のような)関数は `false` を返して、以降の処理を停止することができます。
|
||||
|
||||
この呼び出しの後で、`post_process_record()` が呼ばれます。これはキーコードが通常処理された後に実行する必要がある追加のクリーンアップを処理するために使うことができます。
|
||||
|
||||
* [`void post_process_record(keyrecord_t *record)`]()
|
||||
* [`void post_process_record_quantum(keyrecord_t *record)`]()
|
||||
* [このレコードをキーコードにマップする]()
|
||||
* [`void post_process_clicky(uint16_t keycode, keyrecord_t *record)`]()
|
||||
* [`void post_process_record_kb(uint16_t keycode, keyrecord_t *record)`]()
|
||||
* [`void post_process_record_user(uint16_t keycode, keyrecord_t *record)`]()
|
||||
|
||||
<!--
|
||||
#### Mouse Handling
|
||||
|
||||
FIXME: This needs to be written
|
||||
|
||||
#### Serial Link(s)
|
||||
|
||||
FIXME: This needs to be written
|
||||
|
||||
#### Visualizer
|
||||
|
||||
FIXME: This needs to be written
|
||||
|
||||
#### Keyboard state LEDs (Caps Lock, Num Lock, Scroll Lock)
|
||||
|
||||
FIXME: This needs to be written
|
||||
|
||||
-->
|
33
docs/ko-kr/README.md
Normal file
33
docs/ko-kr/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Quantum Mechanical Keyboard Firmware
|
||||
|
||||
[](https://github.com/qmk/qmk_firmware/tags)
|
||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
||||
[](https://discord.gg/Uq7gcHh)
|
||||
[](https://docs.qmk.fm)
|
||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||
[](https://github.com/qmk/qmk_firmware/)
|
||||
|
||||
## QMK Firmware 란?
|
||||
|
||||
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/) 이용할때 매우 편리합니다. 또한 QMK는 ChibiOS를 사용하여 ARM기반의 컨트롤러로도 사용할수 있습니다. 마지막으로 QMK는 커스텀회로와 핸드와이어드 키보드을 작동시키는데에도 사용가능합니다.
|
||||
|
||||
|
||||
## 설치하기
|
||||
|
||||
만약 당신이 QMK에 키보드, 키맵, 또는 새로운 기능을 추가하고싶다면, 가장쉬운 방법은 Github를 통해 [저장소(REPO)를 추가하고]((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`)을 통해 클론을 만들수 있습니다.
|
||||
|
||||
## 컴파일
|
||||
|
||||
먼저 컴파일을 하기전 AVR 이나 ARM [개발환경](getting_started_build_tools.md)을 구축해야 합니다. 모든준비가 끝났다면 `make`를 다음과 같이 키보드와 키맵을 선택하여 컴파일 할 수 있습니다.
|
||||
|
||||
make planck/rev4:default
|
||||
|
||||
이 커맨드는 `rev4`버전의 `planck`를 `default`키맵으로 컴파일 할것입니다. 다만 모든 키보드는 파일, 수정본 또는 세부프로젝트를 가지고있지 않음으로 수정본 부분을 생략될수 있습니다.
|
||||
|
||||
make preonic:default
|
||||
|
||||
## 커스터마이징
|
||||
|
||||
QMK는 사용할 수 있는 매우 다양한 [기능](features.md)과 체계화된 [참고자료](http://docs.qmk.fm)들이 있습니다. 그중 대부분은 [키맵](keymap.md)을 수정하거나 [키코드](keycodes.md)를 변경하는데에 특화되어 있습니다.
|
156
docs/ko-kr/getting_started_build_tools.md
Normal file
156
docs/ko-kr/getting_started_build_tools.md
Normal file
@@ -0,0 +1,156 @@
|
||||
# 컴파일 도구 설치
|
||||
|
||||
이 페이지는 QMK 컴파일 환경을 설치하는 방법을 설명합니다. 이 페이지는 AVR 프로세서들(예를 들면 atmega32u4와 비슷한)을 위한 가이드를 제공합니다
|
||||
|
||||
<!-- FIXME: We should have ARM instructions somewhere. -->
|
||||
|
||||
|
||||
**노트:** 만약 당신이 처음 시작한다면 [입문자를 위한 가이드](newbs.md)페이지를 확인하세요.
|
||||
|
||||
계속하기전에 당신의 서브모듈(외부라이브러리)이 최신인지 `make git-submodule`을 사용하여 확인하세요.
|
||||
|
||||
## 리눅스
|
||||
|
||||
당신이 항상 최신 파일을 가지고 있는지는 `sudo util/qmk_install.sh`을 이용하여 간단히 확인할 수 있습니다. 이 명령어는 당신이 필요한 모든 속성물(dependencies)를 설치할 것입니다. **이 명령어는 `apt-get upgrade`를 사용합니다**
|
||||
|
||||
또한 당신의 직접 필요한 것들을 설치할 수도 있습니다. 하지만 이 자료는 항상 최신의 자료을 가지고 있지 않습니다.
|
||||
|
||||
현재로써 필요한 것은 다음과 같습니다. 하지만 당신이 하는 작업에 따라 당신은 다음 패키지를 다 쓰지 않을 수도 있습니다. 또한 환경에 따라 모든 다음 패키지는 다른이름으로 존재하거나, 없을 수도 있습니다.
|
||||
|
||||
```
|
||||
build-essential
|
||||
gcc
|
||||
unzip
|
||||
wget
|
||||
zip
|
||||
gcc-avr
|
||||
binutils-avr
|
||||
avr-libc
|
||||
dfu-programmer
|
||||
dfu-util
|
||||
gcc-arm-none-eabi
|
||||
binutils-arm-none-eabi
|
||||
libnewlib-arm-none-eabi
|
||||
git
|
||||
```
|
||||
|
||||
당신이 사용하는 패키지 매니져에서 이러한 방법으로 설치하십시요.
|
||||
|
||||
데비안 / 우분투 예시:
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
|
||||
|
||||
페도라 / 레드햇 예시:
|
||||
|
||||
sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc avr-libc binutils-avr32-linux-gnu arm-none-eabi-gcc-cs arm-none-eabi-binutils-cs arm-none-eabi-newlib
|
||||
|
||||
아치 / 맨자로(Manjaro) 예시:
|
||||
|
||||
pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git dfu-programmer dfu-util
|
||||
|
||||
## 닉스 (NIX)
|
||||
|
||||
만약 당신이 [NixOS](https://nixos.org/)를 사용중이거나 NIX를 리눅스 또는 맥에서 사용중이라면 `nix-shell`를 root 디렉토리에서 사용하여 컴파일 환경의 구축할 수 있습니다.
|
||||
|
||||
기본적으로 다음 커맨드는 AVR과 ARM 컴파일러를 설치할것입니다. 만약 필요 없다면 `avr` 또는 `arm`을 인수에서 해제할 수 있습니다.
|
||||
|
||||
nix-shell --arg arm false
|
||||
|
||||
## 맥
|
||||
당신이 홈브루([homebrew](http://brew.sh/))를 사용한다면, 다음을 입력하세요.
|
||||
|
||||
brew tap osx-cross/avr
|
||||
brew tap PX4/homebrew-px4
|
||||
brew update
|
||||
brew install avr-gcc@7
|
||||
brew link --force avr-gcc@7
|
||||
brew install dfu-programmer
|
||||
brew install dfu-util
|
||||
brew install gcc-arm-none-eabi
|
||||
brew install avrdude
|
||||
|
||||
이 방법을 가장 추천합니다. 만약 홈브루가 없다면 커맨드라인 환경에서 매우 편한 [Homebrew](http://brew.sh/)를 다운받는 것을 추천합니다. 참고로 `avr-gcc@7`를 설치하는 중 `make`과 `make install`는 대개 20분 넘게 걸리고 CPU 사용량이 높아집니다.
|
||||
|
||||
## msys2를 사용하는 윈도우 (추천)
|
||||
윈도우 비스타 부터 최신버젼까지 가장추천되는 환경은 [msys2](http://www.msys2.org)를 이용하는 것입니다. (윈도우 7과 윈도우 10에서 모두 테스트되었음)
|
||||
|
||||
* 이 사이트에 있는 설명을 이용해 msys2를 설치하세요: http://www.msys2.org
|
||||
* ``MSYS2 MingGW 64-bit`` 를 여세요
|
||||
* QMK폴더로 이동하세요. c드라이브 루트에 있는경우:
|
||||
* `$ cd /c/qmk_firmware`
|
||||
* `util/qmk_install.sh`을 실행시키고 나오는데요 따라하세요
|
||||
|
||||
### 크리에이터 업데이트
|
||||
만약 당신의 윈도우 10이 크리에이터 업데이트 버전 또는 더 높은 버전이라면 바로 컴파일과 프로그램 업로드(flashing)를 할 수 있습니다. 크리에이터 업데이트 전 버전이라면 컴파일만 가능합니다. 만약 당신이 잘 모르겠거나 업데이트된 버전이 아니라면 [이 링크](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update)를 확인해 보십시오.
|
||||
|
||||
### 리눅스용 윈도우 하위 시스템 사용 (Windows10 Subsystem for Linux)
|
||||
크리에이터 업데이트에 추가로 만약 당신이 리눅스용 윈도우 하위 시스템이 필요하다면 이 링크에서 다운받으십시오: [설명](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/)
|
||||
|
||||
만약 당신이 이미 리눅스용 윈도우 하위 시스템을 Anniversary업데이트를 통해 받았다면 이 링크에서 16.04LTS로 업데이트 하는것을 추천합니다. 왜냐하면 업데이트 없이는 일부키보드가 14.04LTS에 포함되있는 도구들로 컴파일되지 않을수 있기때문입니다 : [WSL 업데이트](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/)
|
||||
|
||||
|
||||
### Git
|
||||
만약 당신이 이미 파일을 로컬로 복제하였다면 이 섹션을 무시하십시요.
|
||||
|
||||
당신은 파일을 기본적인 git을 사용하여 로컬로 복제해야 합니다. **주의, WSL Git을 사용하면 안됩니다** [Git](https://git-scm.com/download/win) 이 링크에서 git을 다운받고 설치하십시오.
|
||||
그리고 [기본설정](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), 유저네임과 이메일을 설정하는 것은 만약 당신이 온라인에 기여할 계획이라면 매우 중요합니다.
|
||||
|
||||
Git의 설치가 완료되었다면 Git Bash커맨드을 열고 당신의 복제 QMK파일이 있는 위치로 이동하고 `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`를 실행 시키십니오. 이 커맨드는 새로운 `qmk_firmware`폴더를 이미 존재하는 것의 하위 폴더설정으로 생성할 것입니다.
|
||||
|
||||
### 도구(Toolchain) 설정
|
||||
기본적으로 도구설정은 리눅스용 윈도우 하위 시스템이 설치될때 자동으로 설정됩니다. 하지만 수동적으로 하고 싶다면 여기 설명이 있습니다. (If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information. )
|
||||
|
||||
1. "Bash On Ubuntu On Windows" 을 실행시키십시오.
|
||||
2. 당신이 `qmk_firmware`를 복제한 위치로 가십시오. WSL(리눅스용 윈도우 하위 시스템 사용)에서 `/mnt/`로 시작되는 패스를 찾으십시오. 즉 당신은 다음과 같은 형식으로 입력해야 합니다. `cd /mnt/c/path/to/qmk_firmware` (Note that the paths start with `/mnt/`in the WSL, so you have to write for example `cd /mnt/c/path/to/qmk_firmware`.)
|
||||
3. `util/wsl_install.sh`를 실행시키고 화면에 나오는 지시를 따르십니오.
|
||||
4. Bash command window를 재실행 시키십시오.
|
||||
5. 이로써 당신은 컴파일과 프로그램 업로드(flashing)을 위한 준비가 모두 끝났습니다.
|
||||
|
||||
### 중요한 참고사항
|
||||
*`util/wsl_install.sh` 명령어를 다시 실행시켜 최신 업데이트를 다운받을 수 있습니다.
|
||||
* QMK 폴더의 위치는 윈도우 파일시스템을 기반으로 해야 됩니다. WSL는 외부실행파일를 작동 시킬수 없기 때문이죠.
|
||||
* WSL의 Git은 윈도우용 Git과 **호환되지 않습니다**
|
||||
* 파일을 수정하는 것은 WSL안과 밖에서 모두 가능합니다 하지만 만약 .makefile 혹은 .sh를 수정한다면 유닉스 라인엔딩(Unix line endings)을 지원하는 에디터를 사용하는지 확인하십이오. 그렇지 않다면 컴파일이 되지않을 수도 있습니다.
|
||||
|
||||
## 윈두우 (비스타 혹은 더 최신) (비추천)
|
||||
|
||||
이 섹션은 윈도우 비스타 혹은 더 최신버젼을 위한 오래된 설명입니다. [MSYS2](#windows-with-msys2-recommended)를 사용하는 것을 더 추천합니다.
|
||||
|
||||
1. WinAVR을 설치하였다면 먼저 삭제하십시오.
|
||||
2. [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe)을 설치하십시오. (Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**)
|
||||
3. 만약 당신이 Infinity을 기반으로 하는 키보드에 프로그램 업로드를(flashing) 할거라면 dfu-util을 설치해야 합니다, [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware) 를 참고 하십시오.
|
||||
4. [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download)를 설치하십시오. 설치중 윈도우화면에서 GUI 추가 설치 옵션을 해재하십니오. **기본 설치 위치를 바꾸지 마십시오.** 이 명령어는 기본위치를 기반으로 하고 있습니다.
|
||||
5. 레파지토리를 복제하십시오. [이 링크로 압축파일을 받고 앞축해제 하십시오.](https://github.com/qmk/qmk_firmware/archive/master.zip) 윈도우 탐색기에서 다운받은 파일을 여십시오.
|
||||
6. `\util` 폴더를 여십시오.
|
||||
7. `1-setup-path-win` .bat파일을 더블클릭해서 실행시키시오. 유저 계정 설정 변경을 허용해야될 수도 있습니다. 스페이스바를 눌러 설치가 성공적으로 완료되었다는 메세지를 닫을 수 있습니다.
|
||||
8. `2-setup-environment-win` .bat파일에 우클릭해서 '관리자 권한으로 실행'으로 실행시키십시오. 이 작업을 꽤 오래 걸릴 수도 있습니다. 또한 드라이버 설정을 승인해야 될 수도 있습니다. 하지만 이 모든것이 끝나면 당신의 시스템의 설정이 모두 끝났습니다.
|
||||
|
||||
만약 이 작업을 하는데에 문제가 있어 도움받고 싶다면 *Win_Check_Output.txt*을 생성하는 것이 도움이 될것입니다. 이 파일은 `Win_Check.bat`을 `\util`폴더에서 실행시켜 생성할 수 있습니다.
|
||||
|
||||
## 도커(Docker)
|
||||
만약 위작업들이 당신에게 좀 어렵게 느껴졌다면 도커(Docker)가 당신을 위한 최선일 수도 있습니다(의역). [Docker CE](https://docs.docker.com/install/#supported-platforms)를 설치한뒤 아래 커맨드를 `qmk_firmware` 디랙토리에서 실행시켜 키보드 또는 키맵을 생성시킵니다.
|
||||
```bash
|
||||
util/docker_build.sh keyboard:keymap
|
||||
# 예: util/docker_build.sh ergodox_ez:steno
|
||||
```
|
||||
이 커맨드는 원하는 키보드 또는 키맵을 컴파일하고 `.hex`또는 `.bin`파일을 프로그램 업로드를(flashing) 위해 QMK디랙토리에 생성할것입니다. 만약 `:keymap`이 생략된다면 `default`이 기본을로 사용됩니다. 참고로 여기서 사용되는 인수는 `make` 커맨드를 사용하여 컴파일할때와 동일합니다.
|
||||
|
||||
|
||||
또한 스크립트를 그냥 아무 인수 없이도 사용가능합니다. 그렇게 된다면 프로그램은 하나씩 자동으로 인수입력을 요구 할것입니다. 어쩌면 이방법이 더 쉬울 수도 있습니다.
|
||||
```bash
|
||||
util/docker_build.sh
|
||||
# 인수을 입력받습니다.(아무것도 쓰지 않고 놔두는면 기본값으로 설정됩니다)
|
||||
```
|
||||
|
||||
다음과 같이 `target`를 사용하여 컴파일과 프로그램 업로드(flashing)을 동시에 할수도 있습니다.
|
||||
```bash
|
||||
util/docker_build.sh keyboard:keymap:target
|
||||
# 예: util/docker_build.sh planck/rev6:default:dfu-util
|
||||
```
|
||||
만약 당시이 리눅스를 사용한다면 이 커맨드들은 추가 설정 없이 바로 작동할 것입니다. 하지만 위도우 또는 맥 환경에서는 [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/)를 사용하여야 이 커맨드들을 사용가능합니다. Docker Machine설정은 꽤 지루하고 짜증남으로 추천하지 않고 [QMK Toolbox](https://github.com/qmk/qmk_toolbox)를 사용하는 것을 추천합니다.
|
||||
|
||||
!> 윈도우에서 독커는 [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v)을 활성화 설정하여야 사용가능합니다. 즉, 도커는 Hyper-V를 지원하지 않는 윈도우 7, 윈도우 8, 그리고 **윈도우 10 홈**과 같은 윈도우 버전에서 사용할수 없다는 것을 의미합니다.
|
||||
|
||||
## Vagrant
|
||||
만약 컴웨어를 사용하는데 문제가 있다면 Vagrant라는 이름의 툴을 사용해 볼 수 있습니다. 이 툴은 가상환경을 세팅해줌과 동시에 컴웨어를 사용하는데에 필요한 모든 설정을 해줄 것입니다. OLKB는 가상환경에 파일을 호스팅하지 않습니다. [Vagrant 가이드](getting_started_vagrant.md)에서 더 많은 정보를 확인할 수 있습니다.
|
17
docs/ko-kr/getting_started_getting_help.md
Normal file
17
docs/ko-kr/getting_started_getting_help.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# 도움 받기
|
||||
|
||||
QMK에서 도움을 받는 방법은 다양합니다.
|
||||
|
||||
**주의, 아래 링크들은 영어로 이루어져 있으며 영어 사용이 가능해야 편리하게 이용할 수 있습니다.**
|
||||
|
||||
## 디스코드 실시간 채팅
|
||||
|
||||
[QMK 디스코드 서버](https://discord.gg/Uq7gcHh)에서 QMK 개발자들과 실시간으로 대화를 나눌수있습니다. 이 디스코드에는 펌웨어, 툴박스, 하드웨어, 그리고 컨피겨레이터(configurator)에 관한 특별화된 채널이 운영되고 있습니다.
|
||||
|
||||
## OLKB 서브레딧
|
||||
|
||||
공식 QMK 포럼은 [reddit.com](https://reddit.com) 에 [/r/olkb](https://reddit.com/r/olkb)입니다.
|
||||
|
||||
## Github 이슈
|
||||
|
||||
[issue on GitHub](https://github.com/qmk/qmk_firmware/issues)에서 문제를 보고 할 수 있습니다. 이 링크는 문제가 오랜 시간을 필요로하거나 디버깅를 요구 할때 매우 유용합니다.
|
67
docs/ko-kr/getting_started_github.md
Normal file
67
docs/ko-kr/getting_started_github.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# QMK와 함께 Github를 사용하는 방법
|
||||
|
||||
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는 자주 사용하는 사람이 아니면 좀 여려울수도 있습니다. 이 문서는 Github를 사용하는데 필요한 forking, cloning 그리고 submitting a pull request with QMK를 설명할 것입니다.
|
||||
|
||||
?> 이 가이드는 당신이 git커맨드를 사용하는데 익숙하고 git환경을 당신의 시스템이 설치하였다는 전제하에 작성되었습니다.
|
||||
|
||||
아래와 같이 [QMK Github 페이지](https://github.com/qmk/qmk_firmware)에서 당신은 "Fork"라고 쓰여있는 버튼을 볼 수 있습니다
|
||||
|
||||

|
||||
|
||||
만약 당신이 어느기관 소속이고, 무슨 계정을 사용할것인지 골라야 한다면 개인 계정을 사용하는 것을 추천합니다.
|
||||
"Fork"가 성공적으로 끝났다면 아래 보이는 "Clone or Download"를 눌러야 합니다.
|
||||
|
||||

|
||||
|
||||
"HTTPS"채크 했는지 확인하고 나와 있는 링크를 복사하세요.
|
||||
|
||||

|
||||
|
||||
여기거 부터 커맨드라인을 사용합니다. 커맨드 라인에서 `git clone `을 치고 복사한 링크를 붙여넣은후 실행시키세요.
|
||||
|
||||
```
|
||||
user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git
|
||||
Cloning into 'qmk_firmware'...
|
||||
remote: Counting objects: 46625, done.
|
||||
remote: Compressing objects: 100% (2/2), done.
|
||||
remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623
|
||||
Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done.
|
||||
Resolving deltas: 100% (29362/29362), done.
|
||||
Checking out files: 100% (2799/2799), done.
|
||||
```
|
||||
|
||||
당신은 이제 모든파일이 로컬시스템이 추가 되었습니다 그리고 이제 키맵을 추가하거나 컴파일, 프로그램 업로드(flashing)를 할 수 있습니다.
|
||||
모든 추가 변경을 만든 뒤에는 add, commit, and push를 사용하여 당신의 Folk에 추가 할 수 있습니다.
|
||||
|
||||
```
|
||||
user@computer:~$ git add .
|
||||
user@computer:~$ git commit -m "adding my keymap"
|
||||
[master cccb1608] adding my keymap
|
||||
1 file changed, 1 insertion(+)
|
||||
create mode 100644 keyboards/planck/keymaps/mine/keymap.c
|
||||
user@computer:~$ git push
|
||||
Counting objects: 1, done.
|
||||
Delta compression using up to 4 threads.
|
||||
Compressing objects: 100% (1/1), done.
|
||||
Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done.
|
||||
Total 1 (delta 1), reused 0 (delta 0)
|
||||
remote: Resolving deltas: 100% (1/1), completed with 1 local objects.
|
||||
To https://github.com/whoeveryouare/qmk_firmware.git
|
||||
+ 20043e64...7da94ac5 master -> master
|
||||
```
|
||||
|
||||
이로써 당신이 만든 모든 변경들이 당신의 Github의 Folk에 추가 되었습니다. (`https://github.com/<whoeveryouare>/qmk_firmware`)에서 확인하고 "New Pull Request"를 눌러 변경사항을 QMK에 업로드할수 있습니다.
|
||||
|
||||

|
||||
|
||||
이 버튼을 누르면 당신이 만든 모든 변경사항들이 보여질 것입니다. 만약 모든 변경사항이 맘에 든다면 "Create Pull Request"를 눌러 요청을 확정할수 있습니다.
|
||||
|
||||
**요청사항이 확정된다고 변경사항이 바로 적용되는 것은 아닙니다.**
|
||||
|
||||

|
||||
|
||||
요청을 한뒤 QMK개발자들은 댓글로 무엇이 변경되었는지 등을 물어 볼수있지만 끝에는 매인 디랙토리로 업로드 될것입니다.
|
||||
|
||||
**"Thanks for contributing to QMK :)"**
|
@@ -27,22 +27,25 @@ This key would activate Left Control and Left Shift when held, and send Escape w
|
||||
|
||||
For convenience, QMK includes some Mod-Tap shortcuts to make common combinations more compact in your keymap:
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------|-----------------------------------------------------------------|-------------------------------------------------------|
|
||||
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||
|`LALT_T(kc)`|`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||
|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||
|`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||
|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
||||
|Key |Aliases |Description |
|
||||
|------------|-----------------------------------------------------------------|--------------------------------------------------------------|
|
||||
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||
|`LALT_T(kc)`|`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||
|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||
|`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||
|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||
|`LSA_T(kc)` | |Left Shift and Alt when held, `kc` when tapped |
|
||||
|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped |
|
||||
|`RCS_T(kc)` | |Right Control and Right Shift when held, `kc` when tapped |
|
||||
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped |
|
||||
|`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
||||
|
||||
## Caveats
|
||||
@@ -52,3 +55,7 @@ Unfortunately, these keycodes cannot be used in Mod-Taps or Layer-Taps, since an
|
||||
Additionally, you may run into issues when using Remote Desktop Connection on Windows. Because these codes send shift very fast, Remote Desktop may miss the codes.
|
||||
|
||||
To fix this, open Remote Desktop Connection, click on "Show Options", open the the "Local Resources" tab. In the keyboard section, change the drop down to "On this Computer". This will fix the issue, and allow the characters to work correctly.
|
||||
|
||||
## Other Resources
|
||||
|
||||
See the [Tap-Hold Configuration Options](tap_hold.md) for additional flags that tweak Mod-Tap behavior.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# The Complete Newbs Guide To QMK
|
||||
# The QMK Tutorial
|
||||
|
||||
Your computer keyboard has a processor inside of it, similar to the one inside your computer. This processor runs software that is responsible for detecting button presses and informing the computer when keys are pressed. QMK Firmware fills the role of that software, detecting button presses and passing that information on to the host computer. When you build your custom keymap, you are creating an executable program for your keyboard.
|
||||
|
||||
|
@@ -48,7 +48,7 @@ This part is super simple. However, there is some configuration that we need to
|
||||
|
||||
### Configuring VS Code
|
||||
|
||||
First, we need to set up IntelliSense. This isn't strictly required, but it will make your life a LOT easier. To do this, we need to create the `.vscode/c_cpp_properies.json` file in the QMK Firmware folder, You can do this all manually, but I've done most of the work already.
|
||||
First, we need to set up IntelliSense. This isn't strictly required, but it will make your life a LOT easier. To do this, we need to create the `.vscode/c_cpp_properties.json` file in the QMK Firmware folder, You can do this all manually, but I've done most of the work already.
|
||||
|
||||
Grab [this file](https://gist.github.com/drashna/48e2c49ce877be592a1650f91f8473e8) and save it. You may need to edit this file, if you didn't install MSYS2 to the default location, or are using WSL/LxSS.
|
||||
|
||||
@@ -81,7 +81,7 @@ Now, we will set up the MSYS2 window to show up in VSCode as the integrated term
|
||||
|
||||
?> If you installed MSYS2 to a different folder, then you'll need to change the path for `terminal.integrated.shell.windows` to the correct path for your system.
|
||||
|
||||
4. Hit Ctrl-`\`` (Grave) to bring up the terminal or go to <kbd><kbd>View</kbd> > <kbd>Terminal</kbd></kbd> (command `workbench.action.terminal.toggleTerminal`). A new terminal will be opened if there isn‘t one already.
|
||||
4. Hit Ctrl-<code>`</code> (Grave) to bring up the terminal or go to <kbd><kbd>View</kbd> > <kbd>Terminal</kbd></kbd> (command `workbench.action.terminal.toggleTerminal`). A new terminal will be opened if there isn‘t one already.
|
||||
|
||||
This should start the terminal in the workspace's folder (so the `qmk_firmware` folder), and then you can compile your keyboard.
|
||||
|
||||
|
@@ -1,39 +1,42 @@
|
||||
# PR checklists
|
||||
|
||||
This is a non-exhaustive checklist of what the QMK collaborators will be checking when reviewing submitted PRs.
|
||||
This is a non-exhaustive checklist of what the QMK Collaborators will be checking when reviewing submitted PRs.
|
||||
|
||||
If there are any inconsistencies with these recommendations, you're best off [creating an issue](https://github.com/qmk/qmk_firmware/issues/new) against this document, or getting in touch with a QMK Collaborator on Discord.
|
||||
If there are any inconsistencies with these recommendations, you're best off [creating an issue](https://github.com/qmk/qmk_firmware/issues/new) against this document, or getting in touch with a QMK Collaborator on [Discord](https://discord.gg/Uq7gcHh).
|
||||
|
||||
## General PRs
|
||||
|
||||
- PR should be submitted using a non-`master` branch on the source repository
|
||||
- This does not mean you target a different branch for your PR, rather that you're not working out of your own master branch
|
||||
- If submitter _does_ use their own `master` branch, they'll be given a link to the ["how to git"](https://docs.qmk.fm/#/newbs_git_using_your_master_branch) page after merging -- (end of this document will contain the contents of the message)
|
||||
- Newly-added directories and filenames must be lowercase
|
||||
- This rule may be relaxed if upstream sources originally had uppercase characters (e.g. ChibiOS, or imported files from other repositories etc.)
|
||||
- If there is enough justification (i.e. consistency with existing core files etc.) this can be relaxed
|
||||
- this does not mean you target a different branch for your PR, rather that you're not working out of your own master branch
|
||||
- if submitter _does_ use their own `master` branch, they'll be given a link to the ["how to git"](https://docs.qmk.fm/#/newbs_git_using_your_master_branch) page after merging -- (end of this document will contain the contents of the message)
|
||||
- newly-added directories and filenames must be lowercase
|
||||
- this rule may be relaxed if upstream sources originally had uppercase characters (e.g. ChibiOS, or imported files from other repositories etc.)
|
||||
- if there is enough justification (i.e. consistency with existing core files etc.) this can be relaxed
|
||||
- a board designer naming their keyboard with uppercase letters is not enough justification
|
||||
- Valid license headers on all `*.c` and `*.h` source files
|
||||
- valid license headers on all `*.c` and `*.h` source files
|
||||
- GPL2/GPL3 recommended for consistency
|
||||
- Other licenses are permitted, however they must be GPL-compatible and must allow for redistribution. Using a different license will almost certainly delay a PR getting merged.
|
||||
- QMK codebase "best practices" followed
|
||||
- This is not an exhaustive list, and will likely get amended as time goes by
|
||||
- other licenses are permitted, however they must be GPL-compatible and must allow for redistribution. Using a different license will almost certainly delay a PR getting merged.
|
||||
- QMK Codebase "best practices" followed
|
||||
- this is not an exhaustive list, and will likely get amended as time goes by
|
||||
- `#pragma once` instead of `#ifndef` include guards in header files
|
||||
- No "old-school" GPIO/I2C/SPI functions used -- must use QMK abstractions unless justifiable (and laziness is not valid justification)
|
||||
- Timing abstractions should be followed too:
|
||||
- no "old-school" GPIO/I2C/SPI functions used -- must use QMK abstractions unless justifiable (and laziness is not valid justification)
|
||||
- timing abstractions should be followed too:
|
||||
- `wait_ms()` instead of `_delay_ms()` (remove `#include <util/delay.h>` too)
|
||||
- `timer_read()` and `timer_read32()` etc. -- see [timer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/timer.h) for the timing APIs
|
||||
- If you think a new abstraction is useful, you're encouraged to:
|
||||
- if you think a new abstraction is useful, you're encouraged to:
|
||||
- prototype it in your own keyboard until it's feature-complete
|
||||
- discuss it with QMK Collaborators on Discord
|
||||
- refactor it as a separate core change
|
||||
- remove your specific copy in your board
|
||||
- rebase and fix all merge conflicts before opening the PR (in case you need help or advice, reach out to QMK Collaborators on Discord)
|
||||
|
||||
## Core PRs
|
||||
## Keymap PRs
|
||||
|
||||
- Must now target `develop` branch, which will subsequently be merged back to `master` on the breaking changes timeline
|
||||
- Other notes TBD
|
||||
- Core is a lot more subjective given the breadth of posted changes
|
||||
- `#include QMK_KEYBOARD_H` preferred to including specific board files
|
||||
- prefer layer `enum`s to `#define`s
|
||||
- require custom keycode `enum`s to `#define`s, first entry must have ` = SAFE_RANGE`
|
||||
- terminating backslash (`\`) in lines of LAYOUT macro parameters is superfluous
|
||||
- some care with spacing (e.g., alignment on commas or first char of keycodes) makes for a much nicer-looking keymap
|
||||
|
||||
## Keyboard PRs
|
||||
|
||||
@@ -48,12 +51,14 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
|
||||
- standard template should be present
|
||||
- flash command has `:flash` at end
|
||||
- valid hardware availability link (unless handwired) -- private groupbuys are okay, but one-off prototypes will be questioned. If open-source, a link to files should be provided.
|
||||
- clear instructions on how to reset the board into bootloader mode
|
||||
- a picture about the keyboard and preferably about the PCB, too
|
||||
- `rules.mk`
|
||||
- removed `MIDI_ENABLE`, `FAUXCLICKY_ENABLE` and `HD44780_ENABLE`
|
||||
- modified `# Enable Bluetooth with the Adafruit EZ-Key HID` -> `# Enable Bluetooth`
|
||||
- No `(-/+size)` comments related to enabling features
|
||||
- Remove the list of alternate bootloaders if one has been specified
|
||||
- No re-definitions of the default MCU parameters if same value, when compared to the equivalent MCU in [mcu_selection.mk](https://github.com/qmk/qmk_firmware/blob/master/quantum/mcu_selection.mk)
|
||||
- no `(-/+size)` comments related to enabling features
|
||||
- remove the list of alternate bootloaders if one has been specified
|
||||
- no re-definitions of the default MCU parameters if same value, when compared to the equivalent MCU in [mcu_selection.mk](https://github.com/qmk/qmk_firmware/blob/master/quantum/mcu_selection.mk)
|
||||
- keyboard `config.h`
|
||||
- don't repeat `MANUFACTURER` in the `PRODUCT` value
|
||||
- no `#define DESCRIPTION`
|
||||
@@ -68,15 +73,16 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
|
||||
- commented-out functions removed too
|
||||
- `matrix_init_board()` etc. migrated to `keyboard_pre_init_kb()`, see: [keyboard_pre_init*](https://docs.qmk.fm/#/custom_quantum_functions?id=keyboard_pre_init_-function-documentation)
|
||||
- prefer `CUSTOM_MATRIX = lite` if custom matrix used, allows for standard debounce, see [custom matrix 'lite'](https://docs.qmk.fm/#/custom_matrix?id=lite)
|
||||
- prefer LED indicator [Configuration Options](https://docs.qmk.fm/#/feature_led_indicators?id=configuration-options) to custom `led_update_*()` implementations where possible
|
||||
- `keyboard.h`
|
||||
- `#include "quantum.h"` appears at the top
|
||||
- `LAYOUT` macros should use standard definitions if applicable
|
||||
- Use the Community Layout macro names where they apply (preferred above `LAYOUT`/`LAYOUT_all`)
|
||||
- use the Community Layout macro names where they apply (preferred above `LAYOUT`/`LAYOUT_all`)
|
||||
- keymap `config.h`
|
||||
- no duplication of `rules.mk` or `config.h` from keyboard
|
||||
- `keymaps/default/keymap.c`
|
||||
- `QMKBEST`/`QMKURL` removed (sheesh)
|
||||
- If using `MO(_LOWER)` and `MO(_RAISE)` keycodes or equivalent, and the keymap has an adjust layer when holding both keys -- if the keymap has no "direct-to-adjust" keycode (such as `MO(_ADJUST)`) then you should prefer to write...
|
||||
- if using `MO(_LOWER)` and `MO(_RAISE)` keycodes or equivalent, and the keymap has an adjust layer when holding both keys -- if the keymap has no "direct-to-adjust" keycode (such as `MO(_ADJUST)`) then you should prefer to write...
|
||||
```
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
@@ -90,22 +96,20 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
|
||||
- submitters can also have a "manufacturer-matching" keymap that mirrors existing functionality of the commercial product, if porting an existing board
|
||||
|
||||
Also, specific to ChibiOS:
|
||||
- **Strong** preference to using existing ChibiOS board definitions.
|
||||
- A lot of the time, an equivalent Nucleo board can be used with a different flash size or slightly different model in the same family
|
||||
- Example: For an STM32L082KZ, given the similarity to an STM32L073RZ, you can use `BOARD = ST_NUCLEO64_L073RZ` in rules.mk
|
||||
- **strong** preference to using existing ChibiOS board definitions.
|
||||
- a lot of the time, an equivalent Nucleo board can be used with a different flash size or slightly different model in the same family
|
||||
- example: For an STM32L082KZ, given the similarity to an STM32L073RZ, you can use `BOARD = ST_NUCLEO64_L073RZ` in rules.mk
|
||||
- QMK is migrating to not having custom board definitions if at all possible, due to the ongoing maintenance burden when upgrading ChibiOS
|
||||
- If a board definition is unavoidable, `board.c` must have a standard `__early_init()` (as per normal ChibiOS board defs) and an empty `boardInit()`:
|
||||
- if a board definition is unavoidable, `board.c` must have a standard `__early_init()` (as per normal ChibiOS board defs) and an empty `boardInit()`:
|
||||
- see Arm/ChibiOS [early initialization](https://docs.qmk.fm/#/platformdev_chibios_earlyinit?id=board-init)
|
||||
- `__early_init()` should be replaced by either `early_hardware_init_pre()` or `early_hardware_init_post()` as appropriate
|
||||
- `boardInit()` should be migrated to `board_init()`
|
||||
|
||||
## Keymap PRs
|
||||
## Core PRs
|
||||
|
||||
- `#include QMK_KEYBOARD_H` preferred to including specific board files
|
||||
- Prefer layer `enum`s to `#define`s
|
||||
- Require custom keycode `enum`s to `#define`s, first entry must have ` = SAFE_RANGE`
|
||||
- Terminating backslash (`\`) in lines of LAYOUT macro parameters is superfluous
|
||||
- Some care with spacing (e.g., alignment on commas or first char of keycodes) makes for a much nicer-looking keymap
|
||||
- must now target `develop` branch, which will subsequently be merged back to `master` on the breaking changes timeline
|
||||
- other notes TBD
|
||||
- core is a lot more subjective given the breadth of posted changes
|
||||
|
||||
---
|
||||
|
||||
|
@@ -43,7 +43,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
### `update_tri_layer_state(state, x, y, z)`
|
||||
The other function is `update_tri_layer_state(state, x, y, z)`. This function is meant to be called from the [`layer_state_set_*` functions](custom_quantum_functions.md#layer-change-code). This means that any time that you use a keycode to change the layer, this will be checked. So you could use `LT(layer, kc)` to change the layer and it will trigger the same layer check.
|
||||
|
||||
The caveat to this method is that you cannot access the `z` layer without having `x` and `y` layers on, since if you try to activate just layer `z`, it will run this code and turn off layer `z` before you could use it.
|
||||
There are a couple of caveats to this method:
|
||||
1. You cannot access the `z` layer without having `x` and `y` layers on, since if you try to activate just layer `z`, it will run this code and turn off layer `z` before you could use it.
|
||||
2. Because layers are processed from the highest number `z` should be a higher layer than `x` and `y` or you may not be able to access it.
|
||||
|
||||
#### Example
|
||||
|
||||
@@ -97,7 +99,7 @@ To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset m
|
||||
|
||||
## Tap random key
|
||||
|
||||
If you want to send a random character to the host computer, you can use the `tap_random_base64()` function. This [pseudorandomly](https://en.wikipedia.org/wiki/Pseudorandom_number_generator) selects a number between 0 and 63, and then sends a key press based on that selection. (0–25 is `A`–`Z`, 26–51 is `a`–`z`, 52–61 is `0`–`9`, 62 is `+` and 63 is `/`).
|
||||
If you want to send a random character to the host computer, you can use the `tap_random_base64()` function. This [pseudorandomly](https://en.wikipedia.org/wiki/Pseudorandom_number_generator) selects a number between 0 and 63, and then sends a key press based on that selection. (0–25 is `A`–`Z`, 26–51 is `a`–`z`, 52–61 is `0`–`9`, 62 is `+` and 63 is `/`).
|
||||
|
||||
?> Needless to say, but this is _not_ a cryptographically secure method of generating random Base64 keys or passwords.
|
||||
|
||||
|
@@ -31,7 +31,7 @@ Within our `info.json` file the `layouts` portion of the dictionary contains sev
|
||||
* `height`
|
||||
* Optional: The height of the layout in Key Units
|
||||
* `key_count`
|
||||
* **Required**: The number of keys in this layout
|
||||
* Optional: The number of keys in this layout
|
||||
* `layout`
|
||||
* A list of Key Dictionaries describing the physical layout. See the next section for more details.
|
||||
|
||||
|
@@ -1,22 +1,22 @@
|
||||
# Tap-Hold Configuration Options
|
||||
|
||||
While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonable defaults, but that may still cause issues for some people.
|
||||
While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonable defaults, but that may still cause issues for some people.
|
||||
|
||||
These options let you modify the behavior of the Tap-Hold keys.
|
||||
|
||||
## Tapping Term
|
||||
|
||||
The crux of all of the following features is the tapping term setting. This determines what is a tap and what is a hold. And the exact timing for this to feel natural can vary from keyboard to keyboard, from switch to switch, and from key to key.
|
||||
The crux of all of the following features is the tapping term setting. This determines what is a tap and what is a hold. And the exact timing for this to feel natural can vary from keyboard to keyboard, from switch to switch, and from key to key.
|
||||
|
||||
You can set the global time for this by adding the following setting to your `config.h`:
|
||||
You can set the global time for this by adding the following setting to your `config.h`:
|
||||
|
||||
```c
|
||||
#define TAPPING_TERM 200
|
||||
```
|
||||
|
||||
This setting is defined in milliseconds, and does default to 200ms. This is a good average for a majority of people.
|
||||
This setting is defined in milliseconds, and does default to 200ms. This is a good average for a majority of people.
|
||||
|
||||
For more granular control of this feature, you can add the following to your `config.h`:
|
||||
For more granular control of this feature, you can add the following to your `config.h`:
|
||||
```c
|
||||
#define TAPPING_TERM_PER_KEY
|
||||
```
|
||||
@@ -45,9 +45,9 @@ As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new
|
||||
#define PERMISSIVE_HOLD
|
||||
```
|
||||
|
||||
This makes tap and hold keys (like Mod Tap) work better for fast typists, or for high `TAPPING_TERM` settings.
|
||||
This makes tap and hold keys (like Mod Tap) work better for fast typists, or for high `TAPPING_TERM` settings.
|
||||
|
||||
If you press a Mod Tap key, tap another key (press and release) and then release the Mod Tap key, all within the tapping term, it will output the "tapping" function for both keys.
|
||||
If you press a Mod Tap key, tap another key (press and release) and then release the Mod Tap key, all within the tapping term, it will output the tapping function for both keys.
|
||||
|
||||
For Instance:
|
||||
|
||||
@@ -56,7 +56,7 @@ For Instance:
|
||||
- `KC_X` Up
|
||||
- `SFT_T(KC_A)` Up
|
||||
|
||||
Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this will be registered as `ax` by the firmware and host system. With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would registered as `X` (`SHIFT`+`x`).
|
||||
Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this will be registered as `ax` by the firmware and host system. With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would registered as `X` (`SHIFT`+`x`).
|
||||
|
||||
?> If you have `Ignore Mod Tap Interrupt` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`.
|
||||
|
||||
@@ -87,7 +87,7 @@ To enable this setting, add this to your `config.h`:
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
```
|
||||
|
||||
Similar to Permissive Hold, this alters how the firmware processes inputs for fast typists. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the "tapping" function for both keys. This may not be desirable for rolling combo keys.
|
||||
Similar to Permissive Hold, this alters how the firmware processes inputs for fast typists. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the tapping function for both keys. This may not be desirable for rolling combo keys.
|
||||
|
||||
Setting `Ignore Mod Tap Interrupt` requires holding both keys for the `TAPPING_TERM` to trigger the hold function (the mod).
|
||||
|
||||
@@ -126,27 +126,27 @@ bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
## Tapping Force Hold
|
||||
|
||||
To enable `tapping force hold`, add the following to your `config.h`:
|
||||
To enable `tapping force hold`, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define TAPPING_FORCE_HOLD
|
||||
```
|
||||
|
||||
When the user holds a key after tap, this repeats the tapped key rather to hold a modifier key. This allows to use auto repeat for the tapped key.
|
||||
When the user holds a key after tapping it, the tapping function is repeated by default, rather than activating the hold function. This allows keeping the ability to auto-repeat the tapping function of a dual-role key. `TAPPING_FORCE_HOLD` removes that ability to let the user activate the hold function instead, in the case of holding the dual-role key after having tapped it.
|
||||
|
||||
Example:
|
||||
|
||||
- SFT_T(KC_A) Down
|
||||
- SFT_T(KC_A) Up
|
||||
- SFT_T(KC_A) Down
|
||||
- wait more than tapping term...
|
||||
- SFT_T(KC_A) Up
|
||||
- `SFT_T(KC_A)` Down
|
||||
- `SFT_T(KC_A)` Up
|
||||
- `SFT_T(KC_A)` Down
|
||||
- wait until the tapping term expires...
|
||||
- `SFT_T(KC_A)` Up
|
||||
|
||||
With default settings, `a` will be sent on the first release, then `a` will be sent on the second press allowing the computer to trigger its auto repeat function.
|
||||
|
||||
With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allowing to use it as a modifier shortly after having used it as a tap.
|
||||
|
||||
!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle).
|
||||
!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tap Toggle).
|
||||
|
||||
For more granular control of this feature, you can add the following to your `config.h`:
|
||||
|
||||
@@ -169,7 +169,7 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
## Retro Tapping
|
||||
|
||||
To enable `retro tapping`, add the following to your `config.h`:
|
||||
To enable `retro tapping`, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define RETRO_TAPPING
|
||||
@@ -179,11 +179,11 @@ Holding and releasing a dual function key without pressing another key will resu
|
||||
|
||||
For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPACE` instead.
|
||||
|
||||
## Why do we include the key record for the per key functions?
|
||||
## Why do we include the key record for the per key functions?
|
||||
|
||||
One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that.
|
||||
One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that.
|
||||
|
||||
Well, it's simply really: customization. But specifically, it depends on how your keyboard is wired up. For instance, if each row is actually using a row in the keyboard's matrix, then it may be simpler to use `if (record->event.row == 3)` instead of checking a whole bunch of keycodes. Which is especially good for those people using the Tap Hold type keys on the home row. So you could fine tune those to not interfere with your normal typing.
|
||||
Well, it's simple really: customization. But specifically, it depends on how your keyboard is wired up. For instance, if each row is actually using a row in the keyboard's matrix, then it may be simpler to use `if (record->event.row == 3)` instead of checking a whole bunch of keycodes. Which is especially good for those people using the Tap Hold type keys on the home row. So you could fine tune those to not interfere with your normal typing.
|
||||
|
||||
## Why is there no `*_kb` or `*_user` functions?!
|
||||
|
||||
|
@@ -11,6 +11,8 @@
|
||||
# include "sendchar.h"
|
||||
# include "timer.h"
|
||||
|
||||
struct CharacterMatrix display;
|
||||
|
||||
// Set this to 1 to help diagnose early startup problems
|
||||
// when testing power-on with ble. Turn it off otherwise,
|
||||
// as the latency of printing most of the debug info messes
|
||||
|
@@ -66,7 +66,7 @@ struct CharacterMatrix {
|
||||
bool dirty;
|
||||
};
|
||||
|
||||
struct CharacterMatrix display;
|
||||
extern struct CharacterMatrix display;
|
||||
|
||||
bool iota_gfx_init(void);
|
||||
void iota_gfx_task(void);
|
||||
|
@@ -233,4 +233,5 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index) {
|
||||
IS31FL3731_write_register(addr, i, g_led_control_registers[index][i]);
|
||||
}
|
||||
}
|
||||
g_led_control_registers_update_required[index] = false;
|
||||
}
|
||||
|
@@ -264,5 +264,6 @@ void IS31FL3736_update_led_control_registers(uint8_t addr1, uint8_t addr2) {
|
||||
IS31FL3736_write_register(addr1, i, g_led_control_registers[0][i]);
|
||||
// IS31FL3736_write_register(addr2, i, g_led_control_registers[1][i]);
|
||||
}
|
||||
g_led_control_registers_update_required = false;
|
||||
}
|
||||
}
|
||||
|
@@ -218,5 +218,6 @@ void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2) {
|
||||
IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i]);
|
||||
// IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i]);
|
||||
}
|
||||
g_led_control_registers_update_required = false;
|
||||
}
|
||||
}
|
||||
|
@@ -78,23 +78,6 @@ bool g_scaling_registers_update_required[DRIVER_COUNT] = {false};
|
||||
|
||||
uint8_t g_scaling_registers[DRIVER_COUNT][ISSI_MAX_LEDS];
|
||||
|
||||
uint32_t IS31FL3741_get_cw_sw_position(uint8_t cs, uint8_t sw) {
|
||||
uint32_t pos = 0;
|
||||
|
||||
if (cs < 31) {
|
||||
if (sw < 7) {
|
||||
pos = (sw - 1) * 30 + (cs - 1);
|
||||
|
||||
} else {
|
||||
pos = 0xB4 + (sw - 7) * 30 + (cs - 1);
|
||||
}
|
||||
} else {
|
||||
pos = 0xB4 + 0x5A + (sw - 1) * 9 + (cs - 31);
|
||||
}
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
||||
void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
|
||||
g_twi_transfer_buffer[0] = reg;
|
||||
g_twi_transfer_buffer[1] = data;
|
||||
@@ -114,14 +97,13 @@ bool IS31FL3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
|
||||
IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM0);
|
||||
|
||||
for (int i = 0; i < 342; i += 18) {
|
||||
g_twi_transfer_buffer[0] = i % 180;
|
||||
|
||||
if (i == 180) {
|
||||
// unlock the command register and select PG2
|
||||
IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||
IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM1);
|
||||
}
|
||||
|
||||
g_twi_transfer_buffer[0] = i % 180;
|
||||
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 18);
|
||||
|
||||
#if ISSI_PERSISTENCE > 0
|
||||
@@ -186,16 +168,11 @@ void IS31FL3741_init(uint8_t addr) {
|
||||
void IS31FL3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||
if (index >= 0 && index < DRIVER_LED_TOTAL) {
|
||||
is31_led led = g_is31_leds[index];
|
||||
uint32_t rp = 0, gp = 0, bp = 0;
|
||||
|
||||
rp = IS31FL3741_get_cw_sw_position(led.rcs, led.rsw);
|
||||
gp = IS31FL3741_get_cw_sw_position(led.gcs, led.gsw);
|
||||
bp = IS31FL3741_get_cw_sw_position(led.bcs, led.bsw);
|
||||
|
||||
g_pwm_buffer[led.driver][rp] = red;
|
||||
g_pwm_buffer[led.driver][gp] = green;
|
||||
g_pwm_buffer[led.driver][bp] = blue;
|
||||
g_pwm_buffer_update_required = true;
|
||||
g_pwm_buffer[led.driver][led.r] = red;
|
||||
g_pwm_buffer[led.driver][led.g] = green;
|
||||
g_pwm_buffer[led.driver][led.b] = blue;
|
||||
g_pwm_buffer_update_required = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,26 +185,22 @@ void IS31FL3741_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
|
||||
void IS31FL3741_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
|
||||
is31_led led = g_is31_leds[index];
|
||||
|
||||
uint32_t scaling_register_r = IS31FL3741_get_cw_sw_position(led.rcs, led.rsw);
|
||||
uint32_t scaling_register_g = IS31FL3741_get_cw_sw_position(led.gcs, led.gsw);
|
||||
uint32_t scaling_register_b = IS31FL3741_get_cw_sw_position(led.bcs, led.bsw);
|
||||
|
||||
if (red) {
|
||||
g_scaling_registers[led.driver][scaling_register_r] = 0xFF;
|
||||
g_scaling_registers[led.driver][led.r] = 0xFF;
|
||||
} else {
|
||||
g_scaling_registers[led.driver][scaling_register_r] = 0x00;
|
||||
g_scaling_registers[led.driver][led.r] = 0x00;
|
||||
}
|
||||
|
||||
if (green) {
|
||||
g_scaling_registers[led.driver][scaling_register_g] = 0xFF;
|
||||
g_scaling_registers[led.driver][led.g] = 0xFF;
|
||||
} else {
|
||||
g_scaling_registers[led.driver][scaling_register_g] = 0x00;
|
||||
g_scaling_registers[led.driver][led.g] = 0x00;
|
||||
}
|
||||
|
||||
if (blue) {
|
||||
g_scaling_registers[led.driver][scaling_register_b] = 0xFF;
|
||||
g_scaling_registers[led.driver][led.b] = 0xFF;
|
||||
} else {
|
||||
g_scaling_registers[led.driver][scaling_register_b] = 0x00;
|
||||
g_scaling_registers[led.driver][led.b] = 0x00;
|
||||
}
|
||||
|
||||
g_scaling_registers_update_required[led.driver] = true;
|
||||
@@ -242,15 +215,9 @@ void IS31FL3741_update_pwm_buffers(uint8_t addr1, uint8_t addr2) {
|
||||
}
|
||||
|
||||
void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue) {
|
||||
uint32_t rp = 0, gp = 0, bp = 0;
|
||||
|
||||
rp = IS31FL3741_get_cw_sw_position(pled->rcs, pled->rsw);
|
||||
gp = IS31FL3741_get_cw_sw_position(pled->gcs, pled->gsw);
|
||||
bp = IS31FL3741_get_cw_sw_position(pled->bcs, pled->bsw);
|
||||
|
||||
g_pwm_buffer[pled->driver][rp] = red;
|
||||
g_pwm_buffer[pled->driver][gp] = green;
|
||||
g_pwm_buffer[pled->driver][bp] = blue;
|
||||
g_pwm_buffer[pled->driver][pled->r] = red;
|
||||
g_pwm_buffer[pled->driver][pled->g] = green;
|
||||
g_pwm_buffer[pled->driver][pled->b] = blue;
|
||||
|
||||
g_pwm_buffer_update_required = true;
|
||||
}
|
||||
@@ -261,7 +228,8 @@ void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) {
|
||||
IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||
IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_0);
|
||||
|
||||
for (int i = 0; i < 180; ++i) {
|
||||
// CS1_SW1 to CS30_SW6 are on PG2
|
||||
for (int i = CS1_SW1; i <= CS30_SW6; ++i) {
|
||||
IS31FL3741_write_register(addr, i, g_scaling_registers[0][i]);
|
||||
}
|
||||
|
||||
@@ -269,8 +237,9 @@ void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) {
|
||||
IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||
IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_1);
|
||||
|
||||
for (int i = 0; i < 171; ++i) {
|
||||
IS31FL3741_write_register(addr, i, g_scaling_registers[0][180 + i]);
|
||||
// CS1_SW7 to CS39_SW9 are on PG3
|
||||
for (int i = CS1_SW7; i <= CS39_SW9; ++i) {
|
||||
IS31FL3741_write_register(addr, i - CS1_SW7, g_scaling_registers[0][i]);
|
||||
}
|
||||
|
||||
g_scaling_registers_update_required[index] = false;
|
||||
@@ -278,13 +247,9 @@ void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) {
|
||||
}
|
||||
|
||||
void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue) {
|
||||
uint32_t rp = 0, gp = 0, bp = 0;
|
||||
g_scaling_registers[pled->driver][pled->r] = red;
|
||||
g_scaling_registers[pled->driver][pled->g] = green;
|
||||
g_scaling_registers[pled->driver][pled->b] = blue;
|
||||
|
||||
rp = IS31FL3741_get_cw_sw_position(pled->rcs, pled->rsw);
|
||||
gp = IS31FL3741_get_cw_sw_position(pled->gcs, pled->gsw);
|
||||
bp = IS31FL3741_get_cw_sw_position(pled->bcs, pled->bsw);
|
||||
|
||||
g_scaling_registers[pled->driver][rp] = red;
|
||||
g_scaling_registers[pled->driver][gp] = green;
|
||||
g_scaling_registers[pled->driver][bp] = blue;
|
||||
g_scaling_registers_update_required[pled->driver] = true;
|
||||
}
|
||||
|
@@ -23,17 +23,13 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct is31_led {
|
||||
uint8_t driver : 2;
|
||||
uint8_t rcs;
|
||||
uint8_t rsw;
|
||||
uint8_t gcs;
|
||||
uint8_t gsw;
|
||||
uint8_t bcs;
|
||||
uint8_t bsw;
|
||||
uint32_t driver : 2;
|
||||
uint32_t r : 10;
|
||||
uint32_t g : 10;
|
||||
uint32_t b : 10;
|
||||
} __attribute__((packed)) is31_led;
|
||||
|
||||
extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
|
||||
extern const is31_led g_is31_indicator_leds[DRIVER_INDICATOR_LED_TOTAL];
|
||||
|
||||
void IS31FL3741_init(uint8_t addr);
|
||||
void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data);
|
||||
@@ -53,3 +49,372 @@ void IS31FL3741_update_led_control_registers(uint8_t addr1, uint8_t addr2);
|
||||
void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue);
|
||||
|
||||
void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue);
|
||||
|
||||
#define CS1_SW1 0x00
|
||||
#define CS2_SW1 0x01
|
||||
#define CS3_SW1 0x02
|
||||
#define CS4_SW1 0x03
|
||||
#define CS5_SW1 0x04
|
||||
#define CS6_SW1 0x05
|
||||
#define CS7_SW1 0x06
|
||||
#define CS8_SW1 0x07
|
||||
#define CS9_SW1 0x08
|
||||
#define CS10_SW1 0x09
|
||||
#define CS11_SW1 0x0A
|
||||
#define CS12_SW1 0x0B
|
||||
#define CS13_SW1 0x0C
|
||||
#define CS14_SW1 0x0D
|
||||
#define CS15_SW1 0x0E
|
||||
#define CS16_SW1 0x0F
|
||||
#define CS17_SW1 0x10
|
||||
#define CS18_SW1 0x11
|
||||
#define CS19_SW1 0x12
|
||||
#define CS20_SW1 0x13
|
||||
#define CS21_SW1 0x14
|
||||
#define CS22_SW1 0x15
|
||||
#define CS23_SW1 0x16
|
||||
#define CS24_SW1 0x17
|
||||
#define CS25_SW1 0x18
|
||||
#define CS26_SW1 0x19
|
||||
#define CS27_SW1 0x1A
|
||||
#define CS28_SW1 0x1B
|
||||
#define CS29_SW1 0x1C
|
||||
#define CS30_SW1 0x1D
|
||||
|
||||
#define CS1_SW2 0x1E
|
||||
#define CS2_SW2 0x1F
|
||||
#define CS3_SW2 0x20
|
||||
#define CS4_SW2 0x21
|
||||
#define CS5_SW2 0x22
|
||||
#define CS6_SW2 0x23
|
||||
#define CS7_SW2 0x24
|
||||
#define CS8_SW2 0x25
|
||||
#define CS9_SW2 0x26
|
||||
#define CS10_SW2 0x27
|
||||
#define CS11_SW2 0x28
|
||||
#define CS12_SW2 0x29
|
||||
#define CS13_SW2 0x2A
|
||||
#define CS14_SW2 0x2B
|
||||
#define CS15_SW2 0x2C
|
||||
#define CS16_SW2 0x2D
|
||||
#define CS17_SW2 0x2E
|
||||
#define CS18_SW2 0x2F
|
||||
#define CS19_SW2 0x30
|
||||
#define CS20_SW2 0x31
|
||||
#define CS21_SW2 0x32
|
||||
#define CS22_SW2 0x33
|
||||
#define CS23_SW2 0x34
|
||||
#define CS24_SW2 0x35
|
||||
#define CS25_SW2 0x36
|
||||
#define CS26_SW2 0x37
|
||||
#define CS27_SW2 0x38
|
||||
#define CS28_SW2 0x39
|
||||
#define CS29_SW2 0x3A
|
||||
#define CS30_SW2 0x3B
|
||||
|
||||
#define CS1_SW3 0x3C
|
||||
#define CS2_SW3 0x3D
|
||||
#define CS3_SW3 0x3E
|
||||
#define CS4_SW3 0x3F
|
||||
#define CS5_SW3 0x40
|
||||
#define CS6_SW3 0x41
|
||||
#define CS7_SW3 0x42
|
||||
#define CS8_SW3 0x43
|
||||
#define CS9_SW3 0x44
|
||||
#define CS10_SW3 0x45
|
||||
#define CS11_SW3 0x46
|
||||
#define CS12_SW3 0x47
|
||||
#define CS13_SW3 0x48
|
||||
#define CS14_SW3 0x49
|
||||
#define CS15_SW3 0x4A
|
||||
#define CS16_SW3 0x4B
|
||||
#define CS17_SW3 0x4C
|
||||
#define CS18_SW3 0x4D
|
||||
#define CS19_SW3 0x4E
|
||||
#define CS20_SW3 0x4F
|
||||
#define CS21_SW3 0x50
|
||||
#define CS22_SW3 0x51
|
||||
#define CS23_SW3 0x52
|
||||
#define CS24_SW3 0x53
|
||||
#define CS25_SW3 0x54
|
||||
#define CS26_SW3 0x55
|
||||
#define CS27_SW3 0x56
|
||||
#define CS28_SW3 0x57
|
||||
#define CS29_SW3 0x58
|
||||
#define CS30_SW3 0x59
|
||||
|
||||
#define CS1_SW4 0x5A
|
||||
#define CS2_SW4 0x5B
|
||||
#define CS3_SW4 0x5C
|
||||
#define CS4_SW4 0x5D
|
||||
#define CS5_SW4 0x5E
|
||||
#define CS6_SW4 0x5F
|
||||
#define CS7_SW4 0x60
|
||||
#define CS8_SW4 0x61
|
||||
#define CS9_SW4 0x62
|
||||
#define CS10_SW4 0x63
|
||||
#define CS11_SW4 0x64
|
||||
#define CS12_SW4 0x65
|
||||
#define CS13_SW4 0x66
|
||||
#define CS14_SW4 0x67
|
||||
#define CS15_SW4 0x68
|
||||
#define CS16_SW4 0x69
|
||||
#define CS17_SW4 0x6A
|
||||
#define CS18_SW4 0x6B
|
||||
#define CS19_SW4 0x6C
|
||||
#define CS20_SW4 0x6D
|
||||
#define CS21_SW4 0x6E
|
||||
#define CS22_SW4 0x6F
|
||||
#define CS23_SW4 0x70
|
||||
#define CS24_SW4 0x71
|
||||
#define CS25_SW4 0x72
|
||||
#define CS26_SW4 0x73
|
||||
#define CS27_SW4 0x74
|
||||
#define CS28_SW4 0x75
|
||||
#define CS29_SW4 0x76
|
||||
#define CS30_SW4 0x77
|
||||
|
||||
#define CS1_SW5 0x78
|
||||
#define CS2_SW5 0x79
|
||||
#define CS3_SW5 0x7A
|
||||
#define CS4_SW5 0x7B
|
||||
#define CS5_SW5 0x7C
|
||||
#define CS6_SW5 0x7D
|
||||
#define CS7_SW5 0x7E
|
||||
#define CS8_SW5 0x7F
|
||||
#define CS9_SW5 0x80
|
||||
#define CS10_SW5 0x81
|
||||
#define CS11_SW5 0x82
|
||||
#define CS12_SW5 0x83
|
||||
#define CS13_SW5 0x84
|
||||
#define CS14_SW5 0x85
|
||||
#define CS15_SW5 0x86
|
||||
#define CS16_SW5 0x87
|
||||
#define CS17_SW5 0x88
|
||||
#define CS18_SW5 0x89
|
||||
#define CS19_SW5 0x8A
|
||||
#define CS20_SW5 0x8B
|
||||
#define CS21_SW5 0x8C
|
||||
#define CS22_SW5 0x8D
|
||||
#define CS23_SW5 0x8E
|
||||
#define CS24_SW5 0x8F
|
||||
#define CS25_SW5 0x90
|
||||
#define CS26_SW5 0x91
|
||||
#define CS27_SW5 0x92
|
||||
#define CS28_SW5 0x93
|
||||
#define CS29_SW5 0x94
|
||||
#define CS30_SW5 0x95
|
||||
|
||||
#define CS1_SW6 0x96
|
||||
#define CS2_SW6 0x97
|
||||
#define CS3_SW6 0x98
|
||||
#define CS4_SW6 0x99
|
||||
#define CS5_SW6 0x9A
|
||||
#define CS6_SW6 0x9B
|
||||
#define CS7_SW6 0x9C
|
||||
#define CS8_SW6 0x9D
|
||||
#define CS9_SW6 0x9E
|
||||
#define CS10_SW6 0x9F
|
||||
#define CS11_SW6 0xA0
|
||||
#define CS12_SW6 0xA1
|
||||
#define CS13_SW6 0xA2
|
||||
#define CS14_SW6 0xA3
|
||||
#define CS15_SW6 0xA4
|
||||
#define CS16_SW6 0xA5
|
||||
#define CS17_SW6 0xA6
|
||||
#define CS18_SW6 0xA7
|
||||
#define CS19_SW6 0xA8
|
||||
#define CS20_SW6 0xA9
|
||||
#define CS21_SW6 0xAA
|
||||
#define CS22_SW6 0xAB
|
||||
#define CS23_SW6 0xAC
|
||||
#define CS24_SW6 0xAD
|
||||
#define CS25_SW6 0xAE
|
||||
#define CS26_SW6 0xAF
|
||||
#define CS27_SW6 0xB0
|
||||
#define CS28_SW6 0xB1
|
||||
#define CS29_SW6 0xB2
|
||||
#define CS30_SW6 0xB3
|
||||
|
||||
#define CS1_SW7 0xB4
|
||||
#define CS2_SW7 0xB5
|
||||
#define CS3_SW7 0xB6
|
||||
#define CS4_SW7 0xB7
|
||||
#define CS5_SW7 0xB8
|
||||
#define CS6_SW7 0xB9
|
||||
#define CS7_SW7 0xBA
|
||||
#define CS8_SW7 0xBB
|
||||
#define CS9_SW7 0xBC
|
||||
#define CS10_SW7 0xBD
|
||||
#define CS11_SW7 0xBE
|
||||
#define CS12_SW7 0xBF
|
||||
#define CS13_SW7 0xC0
|
||||
#define CS14_SW7 0xC1
|
||||
#define CS15_SW7 0xC2
|
||||
#define CS16_SW7 0xC3
|
||||
#define CS17_SW7 0xC4
|
||||
#define CS18_SW7 0xC5
|
||||
#define CS19_SW7 0xC6
|
||||
#define CS20_SW7 0xC7
|
||||
#define CS21_SW7 0xC8
|
||||
#define CS22_SW7 0xC9
|
||||
#define CS23_SW7 0xCA
|
||||
#define CS24_SW7 0xCB
|
||||
#define CS25_SW7 0xCC
|
||||
#define CS26_SW7 0xCD
|
||||
#define CS27_SW7 0xCE
|
||||
#define CS28_SW7 0xCF
|
||||
#define CS29_SW7 0xD0
|
||||
#define CS30_SW7 0xD1
|
||||
|
||||
#define CS1_SW8 0xD2
|
||||
#define CS2_SW8 0xD3
|
||||
#define CS3_SW8 0xD4
|
||||
#define CS4_SW8 0xD5
|
||||
#define CS5_SW8 0xD6
|
||||
#define CS6_SW8 0xD7
|
||||
#define CS7_SW8 0xD8
|
||||
#define CS8_SW8 0xD9
|
||||
#define CS9_SW8 0xDA
|
||||
#define CS10_SW8 0xDB
|
||||
#define CS11_SW8 0xDC
|
||||
#define CS12_SW8 0xDD
|
||||
#define CS13_SW8 0xDE
|
||||
#define CS14_SW8 0xDF
|
||||
#define CS15_SW8 0xE0
|
||||
#define CS16_SW8 0xE1
|
||||
#define CS17_SW8 0xE2
|
||||
#define CS18_SW8 0xE3
|
||||
#define CS19_SW8 0xE4
|
||||
#define CS20_SW8 0xE5
|
||||
#define CS21_SW8 0xE6
|
||||
#define CS22_SW8 0xE7
|
||||
#define CS23_SW8 0xE8
|
||||
#define CS24_SW8 0xE9
|
||||
#define CS25_SW8 0xEA
|
||||
#define CS26_SW8 0xEB
|
||||
#define CS27_SW8 0xEC
|
||||
#define CS28_SW8 0xED
|
||||
#define CS29_SW8 0xEE
|
||||
#define CS30_SW8 0xEF
|
||||
|
||||
#define CS1_SW9 0xF0
|
||||
#define CS2_SW9 0xF1
|
||||
#define CS3_SW9 0xF2
|
||||
#define CS4_SW9 0xF3
|
||||
#define CS5_SW9 0xF4
|
||||
#define CS6_SW9 0xF5
|
||||
#define CS7_SW9 0xF6
|
||||
#define CS8_SW9 0xF7
|
||||
#define CS9_SW9 0xF8
|
||||
#define CS10_SW9 0xF9
|
||||
#define CS11_SW9 0xFA
|
||||
#define CS12_SW9 0xFB
|
||||
#define CS13_SW9 0xFC
|
||||
#define CS14_SW9 0xFD
|
||||
#define CS15_SW9 0xFE
|
||||
#define CS16_SW9 0xFF
|
||||
#define CS17_SW9 0x100
|
||||
#define CS18_SW9 0x101
|
||||
#define CS19_SW9 0x102
|
||||
#define CS20_SW9 0x103
|
||||
#define CS21_SW9 0x104
|
||||
#define CS22_SW9 0x105
|
||||
#define CS23_SW9 0x106
|
||||
#define CS24_SW9 0x107
|
||||
#define CS25_SW9 0x108
|
||||
#define CS26_SW9 0x109
|
||||
#define CS27_SW9 0x10A
|
||||
#define CS28_SW9 0x10B
|
||||
#define CS29_SW9 0x10C
|
||||
#define CS30_SW9 0x10D
|
||||
|
||||
#define CS31_SW1 0x10E
|
||||
#define CS32_SW1 0x10F
|
||||
#define CS33_SW1 0x110
|
||||
#define CS34_SW1 0x111
|
||||
#define CS35_SW1 0x112
|
||||
#define CS36_SW1 0x113
|
||||
#define CS37_SW1 0x114
|
||||
#define CS38_SW1 0x115
|
||||
#define CS39_SW1 0x116
|
||||
|
||||
#define CS31_SW2 0x117
|
||||
#define CS32_SW2 0x118
|
||||
#define CS33_SW2 0x119
|
||||
#define CS34_SW2 0x11A
|
||||
#define CS35_SW2 0x11B
|
||||
#define CS36_SW2 0x11C
|
||||
#define CS37_SW2 0x11D
|
||||
#define CS38_SW2 0x11E
|
||||
#define CS39_SW2 0x11F
|
||||
|
||||
#define CS31_SW3 0x120
|
||||
#define CS32_SW3 0x121
|
||||
#define CS33_SW3 0x122
|
||||
#define CS34_SW3 0x123
|
||||
#define CS35_SW3 0x124
|
||||
#define CS36_SW3 0x125
|
||||
#define CS37_SW3 0x126
|
||||
#define CS38_SW3 0x127
|
||||
#define CS39_SW3 0x128
|
||||
|
||||
#define CS31_SW4 0x129
|
||||
#define CS32_SW4 0x12A
|
||||
#define CS33_SW4 0x12B
|
||||
#define CS34_SW4 0x12C
|
||||
#define CS35_SW4 0x12D
|
||||
#define CS36_SW4 0x12E
|
||||
#define CS37_SW4 0x12F
|
||||
#define CS38_SW4 0x130
|
||||
#define CS39_SW4 0x131
|
||||
|
||||
#define CS31_SW5 0x132
|
||||
#define CS32_SW5 0x133
|
||||
#define CS33_SW5 0x134
|
||||
#define CS34_SW5 0x135
|
||||
#define CS35_SW5 0x136
|
||||
#define CS36_SW5 0x137
|
||||
#define CS37_SW5 0x138
|
||||
#define CS38_SW5 0x139
|
||||
#define CS39_SW5 0x13A
|
||||
|
||||
#define CS31_SW6 0x13B
|
||||
#define CS32_SW6 0x13C
|
||||
#define CS33_SW6 0x13D
|
||||
#define CS34_SW6 0x13E
|
||||
#define CS35_SW6 0x13F
|
||||
#define CS36_SW6 0x140
|
||||
#define CS37_SW6 0x141
|
||||
#define CS38_SW6 0x142
|
||||
#define CS39_SW6 0x143
|
||||
|
||||
#define CS31_SW7 0x144
|
||||
#define CS32_SW7 0x145
|
||||
#define CS33_SW7 0x146
|
||||
#define CS34_SW7 0x147
|
||||
#define CS35_SW7 0x148
|
||||
#define CS36_SW7 0x149
|
||||
#define CS37_SW7 0x14A
|
||||
#define CS38_SW7 0x14B
|
||||
#define CS39_SW7 0x14C
|
||||
|
||||
#define CS31_SW8 0x14D
|
||||
#define CS32_SW8 0x14E
|
||||
#define CS33_SW8 0x14F
|
||||
#define CS34_SW8 0x150
|
||||
#define CS35_SW8 0x151
|
||||
#define CS36_SW8 0x152
|
||||
#define CS37_SW8 0x153
|
||||
#define CS38_SW8 0x154
|
||||
#define CS39_SW8 0x155
|
||||
|
||||
#define CS31_SW9 0x156
|
||||
#define CS32_SW9 0x157
|
||||
#define CS33_SW9 0x158
|
||||
#define CS34_SW9 0x159
|
||||
#define CS35_SW9 0x15A
|
||||
#define CS36_SW9 0x15B
|
||||
#define CS37_SW9 0x15C
|
||||
#define CS38_SW9 0x15D
|
||||
#define CS39_SW9 0x15E
|
||||
|
@@ -75,8 +75,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define CHARGE_PUMP 0x8D
|
||||
|
||||
// Misc defines
|
||||
#define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8)
|
||||
#define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)
|
||||
#ifndef OLED_BLOCK_COUNT
|
||||
# define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8)
|
||||
#endif
|
||||
#ifndef OLED_BLOCK_SIZE
|
||||
# define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)
|
||||
#endif
|
||||
|
||||
#define OLED_ALL_BLOCKS_MASK (((((OLED_BLOCK_TYPE)1 << (OLED_BLOCK_COUNT - 1)) - 1) << 1) | 1)
|
||||
|
||||
// i2c defines
|
||||
#define I2C_CMD 0x00
|
||||
@@ -101,6 +107,7 @@ OLED_BLOCK_TYPE oled_dirty = 0;
|
||||
bool oled_initialized = false;
|
||||
bool oled_active = false;
|
||||
bool oled_scrolling = false;
|
||||
uint8_t oled_brightness = OLED_BRIGHTNESS;
|
||||
uint8_t oled_rotation = 0;
|
||||
uint8_t oled_rotation_width = 0;
|
||||
uint8_t oled_scroll_speed = 0; // this holds the speed after being remapped to ssd1306 internal values
|
||||
@@ -187,7 +194,7 @@ bool oled_init(uint8_t rotation) {
|
||||
}
|
||||
}
|
||||
|
||||
static const uint8_t PROGMEM display_setup2[] = {I2C_CMD, COM_PINS, OLED_COM_PINS, CONTRAST, 0x8F, PRE_CHARGE_PERIOD, 0xF1, VCOM_DETECT, 0x40, DISPLAY_ALL_ON_RESUME, NORMAL_DISPLAY, DEACTIVATE_SCROLL, DISPLAY_ON};
|
||||
static const uint8_t PROGMEM display_setup2[] = {I2C_CMD, COM_PINS, OLED_COM_PINS, CONTRAST, OLED_BRIGHTNESS, PRE_CHARGE_PERIOD, 0xF1, VCOM_DETECT, 0x20, DISPLAY_ALL_ON_RESUME, NORMAL_DISPLAY, DEACTIVATE_SCROLL, DISPLAY_ON};
|
||||
if (I2C_TRANSMIT_P(display_setup2) != I2C_STATUS_SUCCESS) {
|
||||
print("display_setup2 failed\n");
|
||||
return false;
|
||||
@@ -212,7 +219,7 @@ __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
void oled_clear(void) {
|
||||
memset(oled_buffer, 0, sizeof(oled_buffer));
|
||||
oled_cursor = &oled_buffer[0];
|
||||
oled_dirty = -1; // -1 will be max value as long as display_dirty is unsigned type
|
||||
oled_dirty = OLED_ALL_BLOCKS_MASK;
|
||||
}
|
||||
|
||||
static void calc_bounds(uint8_t update_start, uint8_t *cmd_array) {
|
||||
@@ -262,13 +269,14 @@ static void rotate_90(const uint8_t *src, uint8_t *dest) {
|
||||
|
||||
void oled_render(void) {
|
||||
// Do we have work to do?
|
||||
oled_dirty &= OLED_ALL_BLOCKS_MASK;
|
||||
if (!oled_dirty || oled_scrolling) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Find first dirty block
|
||||
uint8_t update_start = 0;
|
||||
while (!(oled_dirty & (1 << update_start))) {
|
||||
while (!(oled_dirty & ((OLED_BLOCK_TYPE)1 << update_start))) {
|
||||
++update_start;
|
||||
}
|
||||
|
||||
@@ -314,7 +322,7 @@ void oled_render(void) {
|
||||
oled_on();
|
||||
|
||||
// Clear dirty flag
|
||||
oled_dirty &= ~(1 << update_start);
|
||||
oled_dirty &= ~((OLED_BLOCK_TYPE)1 << update_start);
|
||||
}
|
||||
|
||||
void oled_set_cursor(uint8_t col, uint8_t line) {
|
||||
@@ -404,9 +412,9 @@ void oled_write_char(const char data, bool invert) {
|
||||
// Dirty check
|
||||
if (memcmp(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH)) {
|
||||
uint16_t index = oled_cursor - &oled_buffer[0];
|
||||
oled_dirty |= (1 << (index / OLED_BLOCK_SIZE));
|
||||
oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE));
|
||||
// Edgecase check if the written data spans the 2 chunks
|
||||
oled_dirty |= (1 << ((index + OLED_FONT_WIDTH) / OLED_BLOCK_SIZE));
|
||||
oled_dirty |= ((OLED_BLOCK_TYPE)1 << ((index + OLED_FONT_WIDTH - 1) / OLED_BLOCK_SIZE));
|
||||
}
|
||||
|
||||
// Finally move to the next char
|
||||
@@ -441,7 +449,7 @@ void oled_pan(bool left) {
|
||||
}
|
||||
}
|
||||
}
|
||||
oled_dirty = ~((OLED_BLOCK_TYPE)0);
|
||||
oled_dirty = OLED_ALL_BLOCKS_MASK;
|
||||
}
|
||||
|
||||
oled_buffer_reader_t oled_read_raw(uint16_t start_index) {
|
||||
@@ -456,7 +464,7 @@ void oled_write_raw_byte(const char data, uint16_t index) {
|
||||
if (index > OLED_MATRIX_SIZE) index = OLED_MATRIX_SIZE;
|
||||
if (oled_buffer[index] == data) return;
|
||||
oled_buffer[index] = data;
|
||||
oled_dirty |= (1 << (index / OLED_BLOCK_SIZE));
|
||||
oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE));
|
||||
}
|
||||
|
||||
void oled_write_raw(const char *data, uint16_t size) {
|
||||
@@ -464,21 +472,28 @@ void oled_write_raw(const char *data, uint16_t size) {
|
||||
for (uint16_t i = 0; i < size; i++) {
|
||||
if (oled_buffer[i] == data[i]) continue;
|
||||
oled_buffer[i] = data[i];
|
||||
oled_dirty |= (1 << (i / OLED_BLOCK_SIZE));
|
||||
oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE));
|
||||
}
|
||||
}
|
||||
|
||||
void oled_write_pixel(uint8_t x, uint8_t y, bool on) {
|
||||
if (x >= OLED_DISPLAY_WIDTH || y >= OLED_DISPLAY_HEIGHT) {
|
||||
if (x >= oled_rotation_width) {
|
||||
return;
|
||||
}
|
||||
uint16_t index = x + (y / 8) * OLED_DISPLAY_WIDTH;
|
||||
if (on) {
|
||||
oled_buffer[index] |= (1 << (y % 8));
|
||||
} else {
|
||||
oled_buffer[index] &= ~(1 << (y % 8));
|
||||
uint16_t index = x + (y / 8) * oled_rotation_width;
|
||||
if (index >= OLED_MATRIX_SIZE) {
|
||||
return;
|
||||
}
|
||||
uint8_t data = oled_buffer[index];
|
||||
if (on) {
|
||||
data |= (1 << (y % 8));
|
||||
} else {
|
||||
data &= ~(1 << (y % 8));
|
||||
}
|
||||
if (oled_buffer[index] != data) {
|
||||
oled_buffer[index] = data;
|
||||
oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE));
|
||||
}
|
||||
oled_dirty |= (1 << (index / OLED_BLOCK_SIZE));
|
||||
}
|
||||
|
||||
#if defined(__AVR__)
|
||||
@@ -501,7 +516,7 @@ void oled_write_raw_P(const char *data, uint16_t size) {
|
||||
uint8_t c = pgm_read_byte(data++);
|
||||
if (oled_buffer[i] == c) continue;
|
||||
oled_buffer[i] = c;
|
||||
oled_dirty |= (1 << (i / OLED_BLOCK_SIZE));
|
||||
oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE));
|
||||
}
|
||||
}
|
||||
#endif // defined(__AVR__)
|
||||
@@ -534,6 +549,22 @@ bool oled_off(void) {
|
||||
return !oled_active;
|
||||
}
|
||||
|
||||
bool is_oled_on(void) { return oled_active; }
|
||||
|
||||
uint8_t oled_set_brightness(uint8_t level) {
|
||||
uint8_t set_contrast[] = {I2C_CMD, CONTRAST, level};
|
||||
if (oled_brightness != level) {
|
||||
if (I2C_TRANSMIT(set_contrast) != I2C_STATUS_SUCCESS) {
|
||||
print("set_brightness cmd failed\n");
|
||||
return oled_brightness;
|
||||
}
|
||||
oled_brightness = level;
|
||||
}
|
||||
return oled_brightness;
|
||||
}
|
||||
|
||||
uint8_t oled_get_brightness(void) { return oled_brightness; }
|
||||
|
||||
// Set the specific 8 lines rows of the screen to scroll.
|
||||
// 0 is the default for start, and 7 for end, which is the entire
|
||||
// height of the screen. For 128x32 screens, rows 4-7 are not used.
|
||||
@@ -595,7 +626,7 @@ bool oled_scroll_off(void) {
|
||||
return oled_scrolling;
|
||||
}
|
||||
oled_scrolling = false;
|
||||
oled_dirty = -1;
|
||||
oled_dirty = OLED_ALL_BLOCKS_MASK;
|
||||
}
|
||||
return !oled_scrolling;
|
||||
}
|
||||
|
@@ -141,6 +141,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#if !defined(OLED_FONT_HEIGHT)
|
||||
# define OLED_FONT_HEIGHT 8
|
||||
#endif
|
||||
// Default brightness level
|
||||
#if !defined(OLED_BRIGHTNESS)
|
||||
# define OLED_BRIGHTNESS 255
|
||||
#endif
|
||||
|
||||
#if !defined(OLED_TIMEOUT)
|
||||
# if defined(OLED_DISABLE_TIMEOUT)
|
||||
@@ -257,6 +261,16 @@ bool oled_on(void);
|
||||
// Returns true if the screen was off or turns off
|
||||
bool oled_off(void);
|
||||
|
||||
// Returns true if the oled is currently on, false if it is
|
||||
// not
|
||||
bool is_oled_on(void);
|
||||
|
||||
// Sets the brightness of the display
|
||||
uint8_t oled_set_brightness(uint8_t level);
|
||||
|
||||
// Gets the current brightness of the display
|
||||
uint8_t oled_get_brightness(void);
|
||||
|
||||
// Basically it's oled_render, but with timeout management and oled_task_user calling!
|
||||
void oled_task(void);
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
VIA_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no
|
||||
|
||||
CONSOLE_ENABLE = no
|
||||
|
59
keyboards/1upkeyboards/1up60hte/keymaps/badger/keymap.c
Normal file
59
keyboards/1upkeyboards/1up60hte/keymaps/badger/keymap.c
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
Copyright 2020 Dan White <opensource@bluetufa.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "badger.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY_MAC] = LAYOUT_tsangan(\
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
MOVE_MAC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, CFG_MAC, \
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, ADJUST, KC_RALT, KC_RGUI),
|
||||
|
||||
[_MOVE_MAC] = LAYOUT_tsangan(\
|
||||
MAC_FRC, MM_LEFT, MM_RGHT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_0, IJ_TOP, IJ_BOTT, _______, _______, \
|
||||
KC_BACK, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, _______, WD_BACK, KC_HOME, KC_END, WD_FRWD, IJ_BACK, IJ_FWD, KC_NEXT, \
|
||||
_______, MM_LH, MM_MAX, MM_RH, IJ_FIND, IJ_IMPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, _______, \
|
||||
_______, MM_UH, MM_BH, MAC_CPY, MAC_PST, IJ_IMPH, _______, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
[_QWERTY_LINUX] = LAYOUT_tsangan(\
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
MOVE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, CFG_LNX, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, ADJUST, KC_RALT, KC_RGUI),
|
||||
|
||||
[_MOVE_LINUX] = LAYOUT_tsangan(\
|
||||
KC_GRV, VD_1, VD_2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \
|
||||
KC_BACK, WM_VD1, WM_UH, WM_VD2, RESET, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, _______, _______, KC_NEXT, \
|
||||
_______, WM_LH, WM_MAX, WM_RH, WD_FRWD, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, _______, \
|
||||
_______, WM_VD3, WM_BH, OS_COPY, OS_PAST, WD_BACK, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
[_ADJUST] = LAYOUT_tsangan(\
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \
|
||||
_______, _______, _______, _______, KC_WREF, KC_MSTP, KC_MPLY, KC_PGUP, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_INS, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, KC_CAPS, _______, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, KC_WSCH, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
[_CONFIG] = LAYOUT_tsangan(\
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \
|
||||
_______, NK_ON, NK_OFF, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \
|
||||
_______, GE_SWAP, GE_NORM, DEBUG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_M_B, _______, _______, RGB_TOG, _______, \
|
||||
_______, DF_1, DF_2, _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_SPD, RGB_M_K, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______)
|
||||
};
|
@@ -1,2 +1 @@
|
||||
VIA_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no
|
@@ -28,11 +28,26 @@
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX }, \
|
||||
{ k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \
|
||||
{ k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \
|
||||
{ k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \
|
||||
{ k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, XXX }, \
|
||||
{ k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \
|
||||
}
|
||||
|
||||
/* ANSI-Tsangan variant, with split right shift key */
|
||||
#define LAYOUT_60_ansi_tsangan_split_rshift( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \
|
||||
k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \
|
||||
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, \
|
||||
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \
|
||||
k40, k41, k43, k46, k4B, k4D, k4E \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0D }, \
|
||||
{ k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \
|
||||
{ k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \
|
||||
{ k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \
|
||||
{ k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4B, XXX, k4D, k4E } \
|
||||
}
|
||||
|
||||
/* ISO variant. Remove useless ANSI keys */
|
||||
#define LAYOUT_60_iso( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \
|
||||
@@ -42,8 +57,8 @@
|
||||
k40, k41, k43, k46, k4A, k4B, k4D, k4E \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX }, \
|
||||
{ k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \
|
||||
{ k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \
|
||||
{ k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k2D }, \
|
||||
{ k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \
|
||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, XXX }, \
|
||||
{ k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \
|
||||
}
|
||||
@@ -58,7 +73,22 @@
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
|
||||
{ k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \
|
||||
{ k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \
|
||||
{ k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \
|
||||
{ k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \
|
||||
{ k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \
|
||||
}
|
||||
|
||||
/* ANSI Variant */
|
||||
#define LAYOUT_60_ansi_split_rshift( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \
|
||||
k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \
|
||||
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, \
|
||||
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \
|
||||
k40, k41, k43, k46, k4A, k4B, k4D, k4E \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0D }, \
|
||||
{ k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \
|
||||
{ k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \
|
||||
{ k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \
|
||||
{ k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \
|
||||
}
|
||||
@@ -73,7 +103,7 @@
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
|
||||
{ k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \
|
||||
{ k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \
|
||||
{ k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \
|
||||
{ k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \
|
||||
{ XXX, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4B, XXX, k4D, XXX } \
|
||||
}
|
||||
|
@@ -6,22 +6,68 @@
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
|
||||
"layout": [
|
||||
{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0},
|
||||
{"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5},
|
||||
{"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25},
|
||||
{"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3},
|
||||
{"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
|
||||
},
|
||||
|
||||
"LAYOUT_60_ansi": {
|
||||
"layout": [{"x":0, "y":0, "label":"~"}, {"x":1, "y":0, "label":"!"}, {"x":2, "y":0, "label":"@"}, {"x":3, "y":0, "label":"#"}, {"x":4, "y":0, "label":"$"}, {"x":5, "y":0, "label":"%"}, {"x":6, "y":0, "label":"^"}, {"x":7, "y":0, "label":"&"}, {"x":8, "y":0, "label":"*"}, {"x":9, "y":0, "label":"("}, {"x":10, "y":0, "label":")"}, {"x":11, "y":0, "label":"_"}, {"x":12, "y":0, "label":"+"}, {"x":13, "y":0, "label":"Backspace", "w":2}, {"x":0, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":13.5, "y":1, "label":"|", "w":1.5}, {"x":0, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":12.75, "y":2, "label":"Enter", "w":2.25}, {"x":0, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":12.25, "y":3, "label":"Shift", "w":2.75}, {"x":0, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.25, "y":4, "label":"Win", "w":1.25}, {"x":2.5, "y":4, "label":"Alt", "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "label":"Alt", "w":1.25}, {"x":11.25, "y":4, "label":"Win", "w":1.25}, {"x":12.5, "y":4, "label":"Menu", "w":1.25}, {"x":13.75, "y":4, "label":"Ctrl", "w":1.25}]
|
||||
"layout": [
|
||||
{"x":0, "y":0, "label":"~"}, {"x":1, "y":0, "label":"!"}, {"x":2, "y":0, "label":"@"}, {"x":3, "y":0, "label":"#"}, {"x":4, "y":0, "label":"$"}, {"x":5, "y":0, "label":"%"}, {"x":6, "y":0, "label":"^"}, {"x":7, "y":0, "label":"&"}, {"x":8, "y":0, "label":"*"}, {"x":9, "y":0, "label":"("}, {"x":10, "y":0, "label":")"}, {"x":11, "y":0, "label":"_"}, {"x":12, "y":0, "label":"+"}, {"x":13, "y":0, "label":"Backspace", "w":2},
|
||||
{"x":0, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":13.5, "y":1, "label":"|", "w":1.5},
|
||||
{"x":0, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":12.75, "y":2, "label":"Enter", "w":2.25},
|
||||
{"x":0, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":12.25, "y":3, "label":"Shift", "w":2.75},
|
||||
{"x":0, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.25, "y":4, "label":"Win", "w":1.25}, {"x":2.5, "y":4, "label":"Alt", "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "label":"Alt", "w":1.25}, {"x":11.25, "y":4, "label":"Win", "w":1.25}, {"x":12.5, "y":4, "label":"Menu", "w":1.25}, {"x":13.75, "y":4, "label":"Ctrl", "w":1.25}]
|
||||
},
|
||||
|
||||
"LAYOUT_60_iso": {
|
||||
"layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
|
||||
"layout": [
|
||||
{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2},
|
||||
{"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1},
|
||||
{"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2},
|
||||
{"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75},
|
||||
{"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
|
||||
},
|
||||
|
||||
"LAYOUT_60_ansi_split_bs_rshift": {
|
||||
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
|
||||
"layout": [
|
||||
{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0},
|
||||
{"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5},
|
||||
{"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25},
|
||||
{"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3},
|
||||
{"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
|
||||
},
|
||||
|
||||
"LAYOUT_60_ansi_split_rshift": {
|
||||
"layout": [
|
||||
{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0, "w":2},
|
||||
{"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5},
|
||||
{"label":"Esc", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25},
|
||||
{"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3},
|
||||
{"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Alt", "x":1.25, "y":4, "w": 1.25}, {"label":"Gui", "x":2.5, "y":4, "w":1.25}, {"label": "Space", "x":3.75, "y":4, "w":6.25}, {"label":"Fn", "x":10, "y":4, "w":1.25}, {"label":"Gui", "x":11.25, "y":4, "w": 1.25}, {"label":"Alt", "x":12.5, "y":4, "w": 1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}
|
||||
]
|
||||
},
|
||||
|
||||
"LAYOUT_60_ansi_tsangan_split_rshift": {
|
||||
"layout": [
|
||||
{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label": "Bksp", "x":13, "y":0, "w":2},
|
||||
{"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5},
|
||||
{"label":"Esc", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25},
|
||||
{"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label": "Alt Gr", "x":14, "y":3},
|
||||
{"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4}, {"label":"GUI", "x":2.5, "y":4, "w":1.5}, {"label":"space", "x":4, "y":4, "w":7}, {"label":"Fn", "x":11, "y":4, "w":1.5}, {"label":"Alt", "x":12.5, "y":4}, {"label":"GUI", "x":13.5, "y":4, "w": 1.5}
|
||||
]
|
||||
},
|
||||
|
||||
"LAYOUT_60_hhkb": {
|
||||
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}]
|
||||
"layout": [
|
||||
{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0},
|
||||
{"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":13.5, "y":1, "w":1.5},
|
||||
{"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25},
|
||||
{"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3},
|
||||
{"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
59
keyboards/1upkeyboards/1up60rgb/keymaps/badger/keymap.c
Normal file
59
keyboards/1upkeyboards/1up60rgb/keymaps/badger/keymap.c
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
Copyright 2020 Dan White <opensource@bluetufa.com>
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "badger.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY_MAC] = LAYOUT_60_ansi_tsangan_split_rshift(\
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
MOVE_MAC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, CFG_MAC, \
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, ADJUST, KC_RALT, KC_RGUI),
|
||||
|
||||
[_MOVE_MAC] = LAYOUT_60_ansi_tsangan_split_rshift(\
|
||||
MAC_FRC, MM_LEFT, MM_RGHT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_0, IJ_TOP, IJ_BOTT, KC_DEL, \
|
||||
KC_BACK, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, _______, WD_BACK, KC_HOME, KC_END, WD_FRWD, IJ_BACK, IJ_FWD, KC_NEXT, \
|
||||
_______, MM_LH, MM_MAX, MM_RH, IJ_FIND, IJ_IMPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, _______, \
|
||||
_______, MM_UH, MM_BH, MAC_CPY, MAC_PST, IJ_IMPH, _______, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
[_QWERTY_LINUX] = LAYOUT_60_ansi_tsangan_split_rshift(\
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
MOVE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, CFG_LNX, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, ADJUST, KC_LALT, KC_RGUI),
|
||||
|
||||
[_MOVE_LINUX] = LAYOUT_60_ansi_tsangan_split_rshift(\
|
||||
KC_GRV, VD_1, VD_2, VD_3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
|
||||
KC_BACK, WM_VD1, WM_UH, WM_VD2, RESET, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, _______, _______, KC_NEXT, \
|
||||
_______, WM_LH, WM_MAX, WM_RH, WD_FRWD, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, _______, \
|
||||
_______, WM_VD3, WM_BH, OS_COPY, OS_PAST, WD_BACK, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
[_ADJUST] = LAYOUT_60_ansi_tsangan_split_rshift(\
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
|
||||
_______, _______, _______, _______, KC_WREF, KC_MSTP, KC_MPLY, KC_PGUP, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_INS, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, DF_1, DF_2, KC_CAPS, _______, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, KC_WSCH, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
[_CONFIG] = LAYOUT_60_ansi_tsangan_split_rshift(\
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
|
||||
_______, NK_ON, NK_OFF, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \
|
||||
_______, GE_SWAP, GE_NORM, DEBUG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_M_B, _______, _______, RGB_TOG, _______, \
|
||||
_______, LAG_SWP, LAG_NRM, _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_SPD, RGB_M_K, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______)
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user