update to qmk repeat key

This commit is contained in:
ioeu 2023-07-17 13:21:21 +02:00
parent e8d12fe605
commit 0dac23507c
11 changed files with 981 additions and 734 deletions

View File

@ -2,10 +2,8 @@ KEYMAP = ioeu
KEYBOARD = splitkb/aurora/sweep
init:
# Init submodule
git submodule update --init --recursive
git submodule update --init --recursive --remote --merge
# Symlink keymap
rm -rf qmk_firmware/keyboards/$(KEYBOARD)/keymaps/$(KEYMAP)
ln -s $(shell pwd)/keymap qmk_firmware/keyboards/$(KEYBOARD)/keymaps/$(KEYMAP)
@ -15,5 +13,10 @@ init:
flash:
cd qmk_firmware; qmk flash -kb $(KEYBOARD) -km $(KEYMAP)
compile:
cd qmk_firmware; qmk compile -kb $(KEYBOARD) -km $(KEYMAP)
draw:
qmk c2json --no-cpp -kb $(KEYBOARD) -km $(KEYMAP) qmk_firmware/keyboards/$(KEYBOARD)/keymaps/$(KEYMAP)/keymap.c | keymap parse -c 10 -q - > keymap.yaml
clean:
rm -rf qmk_firmware/

684
keymap.svg Normal file
View File

@ -0,0 +1,684 @@
<svg width="732.0" height="2744.0" viewBox="0 0 732.0 2744.0" class="keymap" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>/* inherit to force styles through use tags*/
svg path {
fill: inherit;
}
/* font and background color specifications */
svg.keymap {
font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;
font-size: 14px;
font-kerning: normal;
text-rendering: optimizeLegibility;
fill: #24292e;
}
/* default key styling */
rect.key {
fill: #f6f8fa;
stroke: #c9cccf;
stroke-width: 1;
}
/* color accent for combo boxes */
rect.combo {
fill: #cdf;
}
/* color accent for held keys */
rect.held, rect.combo.held {
fill: #fdd;
}
/* color accent for ghost (optional) keys */
rect.ghost, rect.combo.ghost {
fill: #ddd;
}
text {
text-anchor: middle;
dominant-baseline: middle;
}
/* styling for layer labels */
text.label {
font-weight: bold;
text-anchor: start;
stroke: white;
stroke-width: 2;
paint-order: stroke;
}
/* styling for combo tap, and key hold/shifted label text */
text.combo, text.hold, text.shifted {
font-size: 11px;
}
text.hold {
text-anchor: middle;
dominant-baseline: auto;
}
text.shifted {
text-anchor: middle;
dominant-baseline: hanging;
}
/* styling for hold/shifted label text in combo box */
text.combo.hold, text.combo.shifted {
font-size: 8px;
}
/* lighter symbol for transparent keys */
text.trans {
fill: #7b7e81;
}
/* styling for combo dendrons */
path.combo {
stroke-width: 1;
stroke: gray;
fill: none;
}
/* Start Tabler Icons Cleanup */
/* cannot use height/width with glyphs */
.icon-tabler > path {
fill: inherit;
stroke: inherit;
}
/* hide tabler's default box */
.icon-tabler > path[stroke="none"][fill="none"] {
visibility: collapse;
}
/* End Tabler Icons Cleanup */
</style>
<g class="layer-L0">
<text x="30.0" y="28.0" class="label">L0:</text>
<rect rx="6.0" ry="6.0" x="32.0" y="110.08000000000001" width="52.0" height="52.0" class="key"/>
<text x="58.0" y="136.08" class="tap">Q</text>
<rect rx="6.0" ry="6.0" x="88.0" y="75.36" width="52.0" height="52.0" class="key"/>
<text x="114.0" y="101.36" class="tap">W</text>
<rect rx="6.0" ry="6.0" x="144.0" y="58.0" width="52.0" height="52.0" class="key"/>
<text x="170.0" y="84.0" class="tap">F</text>
<rect rx="6.0" ry="6.0" x="200.0" y="73.68" width="52.0" height="52.0" class="key"/>
<text x="226.0" y="99.68" class="tap">P</text>
<rect rx="6.0" ry="6.0" x="256.0" y="81.52" width="52.0" height="52.0" class="key"/>
<text x="282.0" y="107.52" class="tap">B</text>
<rect rx="6.0" ry="6.0" x="424.0" y="81.52" width="52.0" height="52.0" class="key"/>
<text x="450.0" y="107.52" class="tap">J</text>
<rect rx="6.0" ry="6.0" x="480.0" y="73.68" width="52.0" height="52.0" class="key"/>
<text x="506.0" y="99.68" class="tap">L</text>
<rect rx="6.0" ry="6.0" x="536.0" y="58.0" width="52.0" height="52.0" class="key"/>
<text x="562.0" y="84.0" class="tap">U</text>
<rect rx="6.0" ry="6.0" x="592.0" y="75.36" width="52.0" height="52.0" class="key"/>
<text x="618.0" y="101.36" class="tap">Y</text>
<rect rx="6.0" ry="6.0" x="648.0" y="110.08000000000001" width="52.0" height="52.0" class="key"/>
<text x="674.0" y="136.08" class="tap">&#x27;</text>
<rect rx="6.0" ry="6.0" x="32.0" y="166.07999999999998" width="52.0" height="52.0" class="key"/>
<text x="58.0" y="192.07999999999998" class="tap">
<tspan x="58.0" dy="-0.6em">HRM</tspan><tspan x="58.0" dy="1.2em">A</tspan></text>
<rect rx="6.0" ry="6.0" x="88.0" y="131.36" width="52.0" height="52.0" class="key"/>
<text x="114.0" y="157.36" class="tap">
<tspan x="114.0" dy="-0.6em">HRM</tspan><tspan x="114.0" dy="1.2em">R</tspan></text>
<rect rx="6.0" ry="6.0" x="144.0" y="114.0" width="52.0" height="52.0" class="key"/>
<text x="170.0" y="140.0" class="tap">
<tspan x="170.0" dy="-0.6em">HRM</tspan><tspan x="170.0" dy="1.2em">S</tspan></text>
<rect rx="6.0" ry="6.0" x="200.0" y="129.68" width="52.0" height="52.0" class="key"/>
<text x="226.0" y="155.68" class="tap">
<tspan x="226.0" dy="-0.6em">HRM</tspan><tspan x="226.0" dy="1.2em">T</tspan></text>
<rect rx="6.0" ry="6.0" x="256.0" y="137.51999999999998" width="52.0" height="52.0" class="key"/>
<text x="282.0" y="163.51999999999998" class="tap">G</text>
<rect rx="6.0" ry="6.0" x="424.0" y="137.51999999999998" width="52.0" height="52.0" class="key"/>
<text x="450.0" y="163.51999999999998" class="tap">M</text>
<rect rx="6.0" ry="6.0" x="480.0" y="129.68" width="52.0" height="52.0" class="key"/>
<text x="506.0" y="155.68" class="tap">
<tspan x="506.0" dy="-0.6em">HRM</tspan><tspan x="506.0" dy="1.2em">N</tspan></text>
<rect rx="6.0" ry="6.0" x="536.0" y="114.0" width="52.0" height="52.0" class="key"/>
<text x="562.0" y="140.0" class="tap">
<tspan x="562.0" dy="-0.6em">HRM</tspan><tspan x="562.0" dy="1.2em">E</tspan></text>
<rect rx="6.0" ry="6.0" x="592.0" y="131.36" width="52.0" height="52.0" class="key"/>
<text x="618.0" y="157.36" class="tap">
<tspan x="618.0" dy="-0.6em">HRM</tspan><tspan x="618.0" dy="1.2em">I</tspan></text>
<rect rx="6.0" ry="6.0" x="648.0" y="166.07999999999998" width="52.0" height="52.0" class="key"/>
<text x="674.0" y="192.07999999999998" class="tap">
<tspan x="674.0" dy="-0.6em">HRM</tspan><tspan x="674.0" dy="1.2em">O</tspan></text>
<rect rx="6.0" ry="6.0" x="32.0" y="222.08" width="52.0" height="52.0" class="key"/>
<text x="58.0" y="248.08" class="tap">Z</text>
<rect rx="6.0" ry="6.0" x="88.0" y="187.36" width="52.0" height="52.0" class="key"/>
<text x="114.0" y="213.36" class="tap">X</text>
<rect rx="6.0" ry="6.0" x="144.0" y="170.0" width="52.0" height="52.0" class="key"/>
<text x="170.0" y="196.0" class="tap">C</text>
<rect rx="6.0" ry="6.0" x="200.0" y="185.67999999999998" width="52.0" height="52.0" class="key"/>
<text x="226.0" y="211.67999999999998" class="tap">
<tspan x="226.0" dy="-0.6em">MY</tspan><tspan x="226.0" dy="1.2em">D</tspan></text>
<rect rx="6.0" ry="6.0" x="256.0" y="193.51999999999998" width="52.0" height="52.0" class="key"/>
<text x="282.0" y="219.51999999999998" class="tap">V</text>
<rect rx="6.0" ry="6.0" x="424.0" y="193.51999999999998" width="52.0" height="52.0" class="key"/>
<text x="450.0" y="219.51999999999998" class="tap">K</text>
<rect rx="6.0" ry="6.0" x="480.0" y="185.67999999999998" width="52.0" height="52.0" class="key"/>
<text x="506.0" y="211.67999999999998" class="tap">H</text>
<rect rx="6.0" ry="6.0" x="536.0" y="170.0" width="52.0" height="52.0" class="key"/>
<text x="562.0" y="196.0" class="tap">,</text>
<rect rx="6.0" ry="6.0" x="592.0" y="187.36" width="52.0" height="52.0" class="key"/>
<text x="618.0" y="213.36" class="tap">.</text>
<rect rx="6.0" ry="6.0" x="648.0" y="222.08" width="52.0" height="52.0" class="key"/>
<text x="674.0" y="248.08" class="tap">:</text>
<rect rx="6.0" ry="6.0" x="228.0" y="268.0" width="52.0" height="52.0" class="key"/>
<text x="254.0" y="294.0" class="tap">
<tspan x="254.0" dy="-0.6em">TMB</tspan><tspan x="254.0" dy="1.2em">RPT</tspan></text>
<rect rx="6.0" ry="6.0" x="284.0" y="282.0" width="52.0" height="52.0" class="key"/>
<text x="310.0" y="308.0" class="tap">
<tspan x="310.0" dy="-0.6em">TMB</tspan><tspan x="310.0" dy="1.2em">TAB</tspan></text>
<rect rx="6.0" ry="6.0" x="396.0" y="282.0" width="52.0" height="52.0" class="key"/>
<text x="422.0" y="308.0" class="tap">
<tspan x="422.0" dy="-0.6em">TMB</tspan><tspan x="422.0" dy="1.2em">ENT</tspan></text>
<rect rx="6.0" ry="6.0" x="452.0" y="268.0" width="52.0" height="52.0" class="key"/>
<text x="478.0" y="294.0" class="tap">
<tspan x="478.0" dy="-0.6em">TMB</tspan><tspan x="478.0" dy="1.2em">SPC</tspan></text>
</g>
<g class="layer-L1">
<text x="30.0" y="364.0" class="label">L1:</text>
<rect rx="6.0" ry="6.0" x="32.0" y="446.08000000000004" width="52.0" height="52.0" class="key"/>
<text x="58.0" y="472.08000000000004" class="tap">`</text>
<rect rx="6.0" ry="6.0" x="88.0" y="411.36" width="52.0" height="52.0" class="key"/>
<text x="114.0" y="437.36" class="tap">$</text>
<rect rx="6.0" ry="6.0" x="144.0" y="394.0" width="52.0" height="52.0" class="key"/>
<text x="170.0" y="420.0" class="tap">{</text>
<rect rx="6.0" ry="6.0" x="200.0" y="409.68" width="52.0" height="52.0" class="key"/>
<text x="226.0" y="435.68" class="tap">}</text>
<rect rx="6.0" ry="6.0" x="256.0" y="417.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="443.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="417.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="443.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="409.68" width="52.0" height="52.0" class="trans key"/>
<text x="506.0" y="435.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="536.0" y="394.0" width="52.0" height="52.0" class="trans key"/>
<text x="562.0" y="420.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="592.0" y="411.36" width="52.0" height="52.0" class="trans key"/>
<text x="618.0" y="437.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="648.0" y="446.08000000000004" width="52.0" height="52.0" class="trans key"/>
<text x="674.0" y="472.08000000000004" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="32.0" y="502.0799999999999" width="52.0" height="52.0" class="key"/>
<text x="58.0" y="528.0799999999999" class="tap">#</text>
<rect rx="6.0" ry="6.0" x="88.0" y="467.36" width="52.0" height="52.0" class="key"/>
<text x="114.0" y="493.36" class="tap">_</text>
<rect rx="6.0" ry="6.0" x="144.0" y="450.0" width="52.0" height="52.0" class="key"/>
<text x="170.0" y="476.0" class="tap">(</text>
<rect rx="6.0" ry="6.0" x="200.0" y="465.68" width="52.0" height="52.0" class="key"/>
<text x="226.0" y="491.68" class="tap">)</text>
<rect rx="6.0" ry="6.0" x="256.0" y="473.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="499.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="473.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="499.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="465.68" width="52.0" height="52.0" class="trans key"/>
<text x="506.0" y="491.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="536.0" y="450.0" width="52.0" height="52.0" class="trans key"/>
<text x="562.0" y="476.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="592.0" y="467.36" width="52.0" height="52.0" class="trans key"/>
<text x="618.0" y="493.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="648.0" y="502.0799999999999" width="52.0" height="52.0" class="trans key"/>
<text x="674.0" y="528.0799999999999" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="32.0" y="558.08" width="52.0" height="52.0" class="key"/>
<text x="58.0" y="584.08" class="tap">~</text>
<rect rx="6.0" ry="6.0" x="88.0" y="523.36" width="52.0" height="52.0" class="key"/>
<text x="114.0" y="549.36" class="tap">@</text>
<rect rx="6.0" ry="6.0" x="144.0" y="506.0" width="52.0" height="52.0" class="key"/>
<text x="170.0" y="532.0" class="tap">[</text>
<rect rx="6.0" ry="6.0" x="200.0" y="521.68" width="52.0" height="52.0" class="key"/>
<text x="226.0" y="547.68" class="tap">]</text>
<rect rx="6.0" ry="6.0" x="256.0" y="529.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="555.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="529.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="555.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="521.68" width="52.0" height="52.0" class="trans key"/>
<text x="506.0" y="547.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="536.0" y="506.0" width="52.0" height="52.0" class="trans key"/>
<text x="562.0" y="532.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="592.0" y="523.36" width="52.0" height="52.0" class="trans key"/>
<text x="618.0" y="549.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="648.0" y="558.08" width="52.0" height="52.0" class="trans key"/>
<text x="674.0" y="584.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="228.0" y="604.0" width="52.0" height="52.0" class="trans key"/>
<text x="254.0" y="630.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="284.0" y="618.0" width="52.0" height="52.0" class="trans key"/>
<text x="310.0" y="644.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="396.0" y="618.0" width="52.0" height="52.0" class="trans key"/>
<text x="422.0" y="644.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="452.0" y="604.0" width="52.0" height="52.0" class="trans key"/>
<text x="478.0" y="630.0" class="trans tap"></text>
</g>
<g class="layer-L2">
<text x="30.0" y="700.0" class="label">L2:</text>
<rect rx="6.0" ry="6.0" x="32.0" y="782.08" width="52.0" height="52.0" class="key"/>
<text x="58.0" y="808.08" class="tap">%</text>
<rect rx="6.0" ry="6.0" x="88.0" y="747.36" width="52.0" height="52.0" class="key"/>
<text x="114.0" y="773.36" class="tap">&lt;</text>
<rect rx="6.0" ry="6.0" x="144.0" y="730.0" width="52.0" height="52.0" class="key"/>
<text x="170.0" y="756.0" class="tap">&gt;</text>
<rect rx="6.0" ry="6.0" x="200.0" y="745.68" width="52.0" height="52.0" class="key"/>
<text x="226.0" y="771.68" class="tap">NEQ</text>
<rect rx="6.0" ry="6.0" x="256.0" y="753.52" width="52.0" height="52.0" class="key"/>
<text x="282.0" y="779.52" class="tap">^</text>
<rect rx="6.0" ry="6.0" x="424.0" y="753.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="779.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="745.68" width="52.0" height="52.0" class="trans key"/>
<text x="506.0" y="771.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="536.0" y="730.0" width="52.0" height="52.0" class="trans key"/>
<text x="562.0" y="756.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="592.0" y="747.36" width="52.0" height="52.0" class="trans key"/>
<text x="618.0" y="773.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="648.0" y="782.08" width="52.0" height="52.0" class="trans key"/>
<text x="674.0" y="808.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="32.0" y="838.0799999999999" width="52.0" height="52.0" class="key"/>
<text x="58.0" y="864.0799999999999" class="tap">|</text>
<rect rx="6.0" ry="6.0" x="88.0" y="803.36" width="52.0" height="52.0" class="key"/>
<text x="114.0" y="829.36" class="tap">-</text>
<rect rx="6.0" ry="6.0" x="144.0" y="786.0" width="52.0" height="52.0" class="key"/>
<text x="170.0" y="812.0" class="tap">+</text>
<rect rx="6.0" ry="6.0" x="200.0" y="801.6800000000001" width="52.0" height="52.0" class="key"/>
<text x="226.0" y="827.6800000000001" class="tap">=</text>
<rect rx="6.0" ry="6.0" x="256.0" y="809.52" width="52.0" height="52.0" class="key"/>
<text x="282.0" y="835.52" class="tap">COLNEQ</text>
<rect rx="6.0" ry="6.0" x="424.0" y="809.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="835.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="801.6800000000001" width="52.0" height="52.0" class="trans key"/>
<text x="506.0" y="827.6800000000001" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="536.0" y="786.0" width="52.0" height="52.0" class="trans key"/>
<text x="562.0" y="812.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="592.0" y="803.36" width="52.0" height="52.0" class="trans key"/>
<text x="618.0" y="829.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="648.0" y="838.0799999999999" width="52.0" height="52.0" class="trans key"/>
<text x="674.0" y="864.0799999999999" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="32.0" y="894.08" width="52.0" height="52.0" class="key"/>
<text x="58.0" y="920.08" class="tap">&amp;</text>
<rect rx="6.0" ry="6.0" x="88.0" y="859.36" width="52.0" height="52.0" class="key"/>
<text x="114.0" y="885.36" class="tap">/</text>
<rect rx="6.0" ry="6.0" x="144.0" y="842.0" width="52.0" height="52.0" class="key"/>
<text x="170.0" y="868.0" class="tap">*</text>
<rect rx="6.0" ry="6.0" x="200.0" y="857.68" width="52.0" height="52.0" class="key"/>
<text x="226.0" y="883.68" class="tap">\</text>
<rect rx="6.0" ry="6.0" x="256.0" y="865.52" width="52.0" height="52.0" class="key"/>
<text x="282.0" y="891.52" class="tap">DIRUP</text>
<rect rx="6.0" ry="6.0" x="424.0" y="865.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="891.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="857.68" width="52.0" height="52.0" class="trans key"/>
<text x="506.0" y="883.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="536.0" y="842.0" width="52.0" height="52.0" class="trans key"/>
<text x="562.0" y="868.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="592.0" y="859.36" width="52.0" height="52.0" class="trans key"/>
<text x="618.0" y="885.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="648.0" y="894.08" width="52.0" height="52.0" class="trans key"/>
<text x="674.0" y="920.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="228.0" y="940.0" width="52.0" height="52.0" class="trans key"/>
<text x="254.0" y="966.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="284.0" y="954.0" width="52.0" height="52.0" class="trans key"/>
<text x="310.0" y="980.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="396.0" y="954.0" width="52.0" height="52.0" class="trans key"/>
<text x="422.0" y="980.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="452.0" y="940.0" width="52.0" height="52.0" class="trans key"/>
<text x="478.0" y="966.0" class="trans tap"></text>
</g>
<g class="layer-L3">
<text x="30.0" y="1036.0" class="label">L3:</text>
<rect rx="6.0" ry="6.0" x="32.0" y="1118.08" width="52.0" height="52.0" class="trans key"/>
<text x="58.0" y="1144.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="88.0" y="1083.36" width="52.0" height="52.0" class="trans key"/>
<text x="114.0" y="1109.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="144.0" y="1066.0" width="52.0" height="52.0" class="trans key"/>
<text x="170.0" y="1092.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="200.0" y="1081.68" width="52.0" height="52.0" class="trans key"/>
<text x="226.0" y="1107.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="256.0" y="1089.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="1115.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="1089.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="1115.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="1081.68" width="52.0" height="52.0" class="key"/>
<text x="506.0" y="1107.68" class="tap">7</text>
<rect rx="6.0" ry="6.0" x="536.0" y="1066.0" width="52.0" height="52.0" class="key"/>
<text x="562.0" y="1092.0" class="tap">8</text>
<rect rx="6.0" ry="6.0" x="592.0" y="1083.36" width="52.0" height="52.0" class="key"/>
<text x="618.0" y="1109.36" class="tap">9</text>
<rect rx="6.0" ry="6.0" x="648.0" y="1118.08" width="52.0" height="52.0" class="trans key"/>
<text x="674.0" y="1144.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="32.0" y="1174.08" width="52.0" height="52.0" class="trans key"/>
<text x="58.0" y="1200.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="88.0" y="1139.36" width="52.0" height="52.0" class="trans key"/>
<text x="114.0" y="1165.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="144.0" y="1122.0" width="52.0" height="52.0" class="trans key"/>
<text x="170.0" y="1148.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="200.0" y="1137.68" width="52.0" height="52.0" class="trans key"/>
<text x="226.0" y="1163.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="256.0" y="1145.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="1171.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="1145.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="1171.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="1137.68" width="52.0" height="52.0" class="key"/>
<text x="506.0" y="1163.68" class="tap">1</text>
<rect rx="6.0" ry="6.0" x="536.0" y="1122.0" width="52.0" height="52.0" class="key"/>
<text x="562.0" y="1148.0" class="tap">2</text>
<rect rx="6.0" ry="6.0" x="592.0" y="1139.36" width="52.0" height="52.0" class="key"/>
<text x="618.0" y="1165.36" class="tap">3</text>
<rect rx="6.0" ry="6.0" x="648.0" y="1174.08" width="52.0" height="52.0" class="key"/>
<text x="674.0" y="1200.08" class="tap">.</text>
<rect rx="6.0" ry="6.0" x="32.0" y="1230.08" width="52.0" height="52.0" class="trans key"/>
<text x="58.0" y="1256.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="88.0" y="1195.3600000000001" width="52.0" height="52.0" class="trans key"/>
<text x="114.0" y="1221.3600000000001" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="144.0" y="1178.0" width="52.0" height="52.0" class="trans key"/>
<text x="170.0" y="1204.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="200.0" y="1193.68" width="52.0" height="52.0" class="trans key"/>
<text x="226.0" y="1219.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="256.0" y="1201.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="1227.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="1201.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="1227.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="1193.68" width="52.0" height="52.0" class="key"/>
<text x="506.0" y="1219.68" class="tap">4</text>
<rect rx="6.0" ry="6.0" x="536.0" y="1178.0" width="52.0" height="52.0" class="key"/>
<text x="562.0" y="1204.0" class="tap">5</text>
<rect rx="6.0" ry="6.0" x="592.0" y="1195.3600000000001" width="52.0" height="52.0" class="key"/>
<text x="618.0" y="1221.3600000000001" class="tap">6</text>
<rect rx="6.0" ry="6.0" x="648.0" y="1230.08" width="52.0" height="52.0" class="trans key"/>
<text x="674.0" y="1256.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="228.0" y="1276.0" width="52.0" height="52.0" class="trans key"/>
<text x="254.0" y="1302.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="284.0" y="1290.0" width="52.0" height="52.0" class="trans key"/>
<text x="310.0" y="1316.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="396.0" y="1290.0" width="52.0" height="52.0" class="trans key"/>
<text x="422.0" y="1316.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="452.0" y="1276.0" width="52.0" height="52.0" class="key"/>
<text x="478.0" y="1302.0" class="tap">0</text>
</g>
<g class="layer-L4">
<text x="30.0" y="1372.0" class="label">L4:</text>
<rect rx="6.0" ry="6.0" x="32.0" y="1454.08" width="52.0" height="52.0" class="trans key"/>
<text x="58.0" y="1480.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="88.0" y="1419.36" width="52.0" height="52.0" class="trans key"/>
<text x="114.0" y="1445.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="144.0" y="1402.0" width="52.0" height="52.0" class="trans key"/>
<text x="170.0" y="1428.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="200.0" y="1417.68" width="52.0" height="52.0" class="trans key"/>
<text x="226.0" y="1443.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="256.0" y="1425.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="1451.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="1425.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="1451.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="1417.68" width="52.0" height="52.0" class="trans key"/>
<text x="506.0" y="1443.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="536.0" y="1402.0" width="52.0" height="52.0" class="trans key"/>
<text x="562.0" y="1428.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="592.0" y="1419.36" width="52.0" height="52.0" class="trans key"/>
<text x="618.0" y="1445.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="648.0" y="1454.08" width="52.0" height="52.0" class="trans key"/>
<text x="674.0" y="1480.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="32.0" y="1510.08" width="52.0" height="52.0" class="trans key"/>
<text x="58.0" y="1536.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="88.0" y="1475.36" width="52.0" height="52.0" class="trans key"/>
<text x="114.0" y="1501.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="144.0" y="1458.0" width="52.0" height="52.0" class="trans key"/>
<text x="170.0" y="1484.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="200.0" y="1473.68" width="52.0" height="52.0" class="trans key"/>
<text x="226.0" y="1499.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="256.0" y="1481.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="1507.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="1481.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="1507.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="1473.68" width="52.0" height="52.0" class="key"/>
<text x="506.0" y="1499.68" class="tap">LEFT</text>
<rect rx="6.0" ry="6.0" x="536.0" y="1458.0" width="52.0" height="52.0" class="key"/>
<text x="562.0" y="1484.0" class="tap">DOWN</text>
<rect rx="6.0" ry="6.0" x="592.0" y="1475.36" width="52.0" height="52.0" class="key"/>
<text x="618.0" y="1501.36" class="tap">UP</text>
<rect rx="6.0" ry="6.0" x="648.0" y="1510.08" width="52.0" height="52.0" class="key"/>
<text x="674.0" y="1536.08" class="tap">RIGHT</text>
<rect rx="6.0" ry="6.0" x="32.0" y="1566.08" width="52.0" height="52.0" class="trans key"/>
<text x="58.0" y="1592.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="88.0" y="1531.3600000000001" width="52.0" height="52.0" class="trans key"/>
<text x="114.0" y="1557.3600000000001" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="144.0" y="1514.0" width="52.0" height="52.0" class="trans key"/>
<text x="170.0" y="1540.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="200.0" y="1529.68" width="52.0" height="52.0" class="trans key"/>
<text x="226.0" y="1555.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="256.0" y="1537.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="1563.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="1537.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="1563.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="1529.68" width="52.0" height="52.0" class="key"/>
<text x="506.0" y="1555.68" class="tap">
<tspan x="506.0" dy="-0.6em">TAB</tspan><tspan x="506.0" dy="1.2em">PRV</tspan></text>
<rect rx="6.0" ry="6.0" x="536.0" y="1514.0" width="52.0" height="52.0" class="key"/>
<text x="562.0" y="1540.0" class="tap">
<tspan x="562.0" dy="-0.6em">HST</tspan><tspan x="562.0" dy="1.2em">BCK</tspan></text>
<rect rx="6.0" ry="6.0" x="592.0" y="1531.3600000000001" width="52.0" height="52.0" class="key"/>
<text x="618.0" y="1557.3600000000001" class="tap">
<tspan x="618.0" dy="-0.6em">HST</tspan><tspan x="618.0" dy="1.2em">FWD</tspan></text>
<rect rx="6.0" ry="6.0" x="648.0" y="1566.08" width="52.0" height="52.0" class="key"/>
<text x="674.0" y="1592.08" class="tap">
<tspan x="674.0" dy="-0.6em">TAB</tspan><tspan x="674.0" dy="1.2em">NXT</tspan></text>
<rect rx="6.0" ry="6.0" x="228.0" y="1612.0" width="52.0" height="52.0" class="trans key"/>
<text x="254.0" y="1638.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="284.0" y="1626.0" width="52.0" height="52.0" class="trans key"/>
<text x="310.0" y="1652.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="396.0" y="1626.0" width="52.0" height="52.0" class="trans key"/>
<text x="422.0" y="1652.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="452.0" y="1612.0" width="52.0" height="52.0" class="key"/>
<text x="478.0" y="1638.0" class="tap">BSPC</text>
</g>
<g class="layer-L5">
<text x="30.0" y="1708.0" class="label">L5:</text>
<rect rx="6.0" ry="6.0" x="32.0" y="1790.08" width="52.0" height="52.0" class="trans key"/>
<text x="58.0" y="1816.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="88.0" y="1755.36" width="52.0" height="52.0" class="trans key"/>
<text x="114.0" y="1781.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="144.0" y="1738.0" width="52.0" height="52.0" class="trans key"/>
<text x="170.0" y="1764.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="200.0" y="1753.68" width="52.0" height="52.0" class="trans key"/>
<text x="226.0" y="1779.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="256.0" y="1761.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="1787.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="1761.52" width="52.0" height="52.0" class="key"/>
<text x="450.0" y="1787.52" class="tap">
<tspan x="450.0" dy="-0.6em">RGB</tspan><tspan x="450.0" dy="1.2em">TOG</tspan></text>
<rect rx="6.0" ry="6.0" x="480.0" y="1753.68" width="52.0" height="52.0" class="key"/>
<text x="506.0" y="1779.68" class="tap">
<tspan x="506.0" dy="-0.6em">RGB</tspan><tspan x="506.0" dy="1.2em">HUI</tspan></text>
<rect rx="6.0" ry="6.0" x="536.0" y="1738.0" width="52.0" height="52.0" class="key"/>
<text x="562.0" y="1764.0" class="tap">
<tspan x="562.0" dy="-0.6em">RGB</tspan><tspan x="562.0" dy="1.2em">SAI</tspan></text>
<rect rx="6.0" ry="6.0" x="592.0" y="1755.36" width="52.0" height="52.0" class="key"/>
<text x="618.0" y="1781.36" class="tap">
<tspan x="618.0" dy="-0.6em">RGB</tspan><tspan x="618.0" dy="1.2em">VAI</tspan></text>
<rect rx="6.0" ry="6.0" x="648.0" y="1790.08" width="52.0" height="52.0" class="trans key"/>
<text x="674.0" y="1816.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="32.0" y="1846.08" width="52.0" height="52.0" class="trans key"/>
<text x="58.0" y="1872.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="88.0" y="1811.36" width="52.0" height="52.0" class="trans key"/>
<text x="114.0" y="1837.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="144.0" y="1794.0" width="52.0" height="52.0" class="trans key"/>
<text x="170.0" y="1820.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="200.0" y="1809.68" width="52.0" height="52.0" class="trans key"/>
<text x="226.0" y="1835.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="256.0" y="1817.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="1843.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="1817.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="1843.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="1809.68" width="52.0" height="52.0" class="key"/>
<text x="506.0" y="1835.68" class="tap">MRWD</text>
<rect rx="6.0" ry="6.0" x="536.0" y="1794.0" width="52.0" height="52.0" class="key"/>
<text x="562.0" y="1820.0" class="tap">VOLD</text>
<rect rx="6.0" ry="6.0" x="592.0" y="1811.36" width="52.0" height="52.0" class="key"/>
<text x="618.0" y="1837.36" class="tap">VOLU</text>
<rect rx="6.0" ry="6.0" x="648.0" y="1846.08" width="52.0" height="52.0" class="key"/>
<text x="674.0" y="1872.08" class="tap">MFFD</text>
<rect rx="6.0" ry="6.0" x="32.0" y="1902.08" width="52.0" height="52.0" class="trans key"/>
<text x="58.0" y="1928.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="88.0" y="1867.3600000000001" width="52.0" height="52.0" class="trans key"/>
<text x="114.0" y="1893.3600000000001" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="144.0" y="1850.0" width="52.0" height="52.0" class="trans key"/>
<text x="170.0" y="1876.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="200.0" y="1865.68" width="52.0" height="52.0" class="trans key"/>
<text x="226.0" y="1891.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="256.0" y="1873.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="1899.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="1873.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="1899.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="1865.68" width="52.0" height="52.0" class="trans key"/>
<text x="506.0" y="1891.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="536.0" y="1850.0" width="52.0" height="52.0" class="trans key"/>
<text x="562.0" y="1876.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="592.0" y="1867.3600000000001" width="52.0" height="52.0" class="trans key"/>
<text x="618.0" y="1893.3600000000001" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="648.0" y="1902.08" width="52.0" height="52.0" class="trans key"/>
<text x="674.0" y="1928.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="228.0" y="1948.0" width="52.0" height="52.0" class="trans key"/>
<text x="254.0" y="1974.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="284.0" y="1962.0" width="52.0" height="52.0" class="trans key"/>
<text x="310.0" y="1988.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="396.0" y="1962.0" width="52.0" height="52.0" class="trans key"/>
<text x="422.0" y="1988.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="452.0" y="1948.0" width="52.0" height="52.0" class="key"/>
<text x="478.0" y="1974.0" class="tap">MPLY</text>
</g>
<g class="layer-L6">
<text x="30.0" y="2044.0" class="label">L6:</text>
<rect rx="6.0" ry="6.0" x="32.0" y="2126.08" width="52.0" height="52.0" class="key"/>
<text x="58.0" y="2152.08" class="tap">ESC</text>
<rect rx="6.0" ry="6.0" x="88.0" y="2091.36" width="52.0" height="52.0" class="key"/>
<text x="114.0" y="2117.36" class="tap">Q</text>
<rect rx="6.0" ry="6.0" x="144.0" y="2074.0" width="52.0" height="52.0" class="key"/>
<text x="170.0" y="2100.0" class="tap">X</text>
<rect rx="6.0" ry="6.0" x="200.0" y="2089.68" width="52.0" height="52.0" class="key"/>
<text x="226.0" y="2115.68" class="tap">E</text>
<rect rx="6.0" ry="6.0" x="256.0" y="2097.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="2123.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="2097.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="2123.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="2089.68" width="52.0" height="52.0" class="trans key"/>
<text x="506.0" y="2115.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="536.0" y="2074.0" width="52.0" height="52.0" class="trans key"/>
<text x="562.0" y="2100.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="592.0" y="2091.36" width="52.0" height="52.0" class="trans key"/>
<text x="618.0" y="2117.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="648.0" y="2126.08" width="52.0" height="52.0" class="trans key"/>
<text x="674.0" y="2152.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="32.0" y="2182.08" width="52.0" height="52.0" class="key"/>
<text x="58.0" y="2208.08" class="tap">LSFT</text>
<rect rx="6.0" ry="6.0" x="88.0" y="2147.36" width="52.0" height="52.0" class="key"/>
<text x="114.0" y="2173.36" class="tap">A</text>
<rect rx="6.0" ry="6.0" x="144.0" y="2130.0" width="52.0" height="52.0" class="key"/>
<text x="170.0" y="2156.0" class="tap">W</text>
<rect rx="6.0" ry="6.0" x="200.0" y="2145.68" width="52.0" height="52.0" class="key"/>
<text x="226.0" y="2171.68" class="tap">D</text>
<rect rx="6.0" ry="6.0" x="256.0" y="2153.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="2179.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="2153.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="2179.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="2145.68" width="52.0" height="52.0" class="trans key"/>
<text x="506.0" y="2171.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="536.0" y="2130.0" width="52.0" height="52.0" class="trans key"/>
<text x="562.0" y="2156.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="592.0" y="2147.36" width="52.0" height="52.0" class="trans key"/>
<text x="618.0" y="2173.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="648.0" y="2182.08" width="52.0" height="52.0" class="trans key"/>
<text x="674.0" y="2208.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="32.0" y="2238.08" width="52.0" height="52.0" class="key"/>
<text x="58.0" y="2264.08" class="tap">LCTL</text>
<rect rx="6.0" ry="6.0" x="88.0" y="2203.36" width="52.0" height="52.0" class="key"/>
<text x="114.0" y="2229.36" class="tap">Z</text>
<rect rx="6.0" ry="6.0" x="144.0" y="2186.0" width="52.0" height="52.0" class="key"/>
<text x="170.0" y="2212.0" class="tap">S</text>
<rect rx="6.0" ry="6.0" x="200.0" y="2201.68" width="52.0" height="52.0" class="key"/>
<text x="226.0" y="2227.68" class="tap">C</text>
<rect rx="6.0" ry="6.0" x="256.0" y="2209.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="2235.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="2209.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="2235.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="2201.68" width="52.0" height="52.0" class="trans key"/>
<text x="506.0" y="2227.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="536.0" y="2186.0" width="52.0" height="52.0" class="trans key"/>
<text x="562.0" y="2212.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="592.0" y="2203.36" width="52.0" height="52.0" class="trans key"/>
<text x="618.0" y="2229.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="648.0" y="2238.08" width="52.0" height="52.0" class="trans key"/>
<text x="674.0" y="2264.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="228.0" y="2284.0" width="52.0" height="52.0" class="key"/>
<text x="254.0" y="2310.0" class="tap">SPC</text>
<rect rx="6.0" ry="6.0" x="284.0" y="2298.0" width="52.0" height="52.0" class="key"/>
<text x="310.0" y="2324.0" class="tap">TAB</text>
<rect rx="6.0" ry="6.0" x="396.0" y="2298.0" width="52.0" height="52.0" class="trans key"/>
<text x="422.0" y="2324.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="452.0" y="2284.0" width="52.0" height="52.0" class="trans key"/>
<text x="478.0" y="2310.0" class="trans tap"></text>
</g>
<g class="layer-L7">
<text x="30.0" y="2380.0" class="label">L7:</text>
<rect rx="6.0" ry="6.0" x="32.0" y="2462.08" width="52.0" height="52.0" class="trans key"/>
<text x="58.0" y="2488.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="88.0" y="2427.36" width="52.0" height="52.0" class="trans key"/>
<text x="114.0" y="2453.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="144.0" y="2410.0" width="52.0" height="52.0" class="trans key"/>
<text x="170.0" y="2436.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="200.0" y="2425.68" width="52.0" height="52.0" class="trans key"/>
<text x="226.0" y="2451.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="256.0" y="2433.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="2459.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="2433.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="2459.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="2425.68" width="52.0" height="52.0" class="trans key"/>
<text x="506.0" y="2451.68" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="536.0" y="2410.0" width="52.0" height="52.0" class="trans key"/>
<text x="562.0" y="2436.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="592.0" y="2427.36" width="52.0" height="52.0" class="trans key"/>
<text x="618.0" y="2453.36" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="648.0" y="2462.08" width="52.0" height="52.0" class="trans key"/>
<text x="674.0" y="2488.08" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="32.0" y="2518.08" width="52.0" height="52.0" class="key"/>
<text x="58.0" y="2544.08" class="tap">LSFT</text>
<rect rx="6.0" ry="6.0" x="88.0" y="2483.36" width="52.0" height="52.0" class="key"/>
<text x="114.0" y="2509.36" class="tap">I</text>
<rect rx="6.0" ry="6.0" x="144.0" y="2466.0" width="52.0" height="52.0" class="key"/>
<text x="170.0" y="2492.0" class="tap">A</text>
<rect rx="6.0" ry="6.0" x="200.0" y="2481.68" width="52.0" height="52.0" class="key"/>
<text x="226.0" y="2507.68" class="tap">E</text>
<rect rx="6.0" ry="6.0" x="256.0" y="2489.52" width="52.0" height="52.0" class="key"/>
<text x="282.0" y="2515.52" class="tap">BSPC</text>
<rect rx="6.0" ry="6.0" x="424.0" y="2489.52" width="52.0" height="52.0" class="key"/>
<text x="450.0" y="2515.52" class="tap">BSPC</text>
<rect rx="6.0" ry="6.0" x="480.0" y="2481.68" width="52.0" height="52.0" class="key"/>
<text x="506.0" y="2507.68" class="tap">E</text>
<rect rx="6.0" ry="6.0" x="536.0" y="2466.0" width="52.0" height="52.0" class="key"/>
<text x="562.0" y="2492.0" class="tap">A</text>
<rect rx="6.0" ry="6.0" x="592.0" y="2483.36" width="52.0" height="52.0" class="key"/>
<text x="618.0" y="2509.36" class="tap">I</text>
<rect rx="6.0" ry="6.0" x="648.0" y="2518.08" width="52.0" height="52.0" class="key"/>
<text x="674.0" y="2544.08" class="tap">LSFT</text>
<rect rx="6.0" ry="6.0" x="32.0" y="2574.08" width="52.0" height="52.0" class="key"/>
<text x="58.0" y="2600.08" class="tap">.</text>
<rect rx="6.0" ry="6.0" x="88.0" y="2539.36" width="52.0" height="52.0" class="key"/>
<text x="114.0" y="2565.36" class="tap">S</text>
<rect rx="6.0" ry="6.0" x="144.0" y="2522.0" width="52.0" height="52.0" class="key"/>
<text x="170.0" y="2548.0" class="tap">T</text>
<rect rx="6.0" ry="6.0" x="200.0" y="2537.68" width="52.0" height="52.0" class="key"/>
<text x="226.0" y="2563.68" class="tap">N</text>
<rect rx="6.0" ry="6.0" x="256.0" y="2545.52" width="52.0" height="52.0" class="trans key"/>
<text x="282.0" y="2571.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="424.0" y="2545.52" width="52.0" height="52.0" class="trans key"/>
<text x="450.0" y="2571.52" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="480.0" y="2537.68" width="52.0" height="52.0" class="key"/>
<text x="506.0" y="2563.68" class="tap">N</text>
<rect rx="6.0" ry="6.0" x="536.0" y="2522.0" width="52.0" height="52.0" class="key"/>
<text x="562.0" y="2548.0" class="tap">T</text>
<rect rx="6.0" ry="6.0" x="592.0" y="2539.36" width="52.0" height="52.0" class="key"/>
<text x="618.0" y="2565.36" class="tap">S</text>
<rect rx="6.0" ry="6.0" x="648.0" y="2574.08" width="52.0" height="52.0" class="key"/>
<text x="674.0" y="2600.08" class="tap">.</text>
<rect rx="6.0" ry="6.0" x="228.0" y="2620.0" width="52.0" height="52.0" class="key"/>
<text x="254.0" y="2646.0" class="tap">SPC</text>
<rect rx="6.0" ry="6.0" x="284.0" y="2634.0" width="52.0" height="52.0" class="trans key"/>
<text x="310.0" y="2660.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="396.0" y="2634.0" width="52.0" height="52.0" class="trans key"/>
<text x="422.0" y="2660.0" class="trans tap"></text>
<rect rx="6.0" ry="6.0" x="452.0" y="2620.0" width="52.0" height="52.0" class="key"/>
<text x="478.0" y="2646.0" class="tap">SPC</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 42 KiB

243
keymap.yaml Normal file
View File

@ -0,0 +1,243 @@
layout: {qmk_keyboard: splitkb/aurora/sweep/rev1, qmk_layout: LAYOUT_split_3x5_2}
layers:
L0:
- [Q, W, F, P, B, J, L, U, Y, '''']
- [HRM A, HRM R, HRM S, HRM T, G, M, HRM N, HRM E, HRM I, HRM O]
- [Z, X, C, MY D, V, K, H, ',', ., ':']
- [TMB RPT, TMB TAB, TMB ENT, TMB SPC]
L1:
- - '`'
- $
- '{'
- '}'
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- - '#'
- _
- (
- )
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- - '~'
- '@'
- '['
- ']'
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
L2:
- - '%'
- <
- '>'
- NEQ
- ^
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- - '|'
- '-'
- +
- '='
- COLNEQ
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- - '&'
- /
- '*'
- \
- DIRUP
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
L3:
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- '7'
- '8'
- '9'
- {t: ▽, type: trans}
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- '1'
- '2'
- '3'
- .
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- '4'
- '5'
- '6'
- {t: ▽, type: trans}
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- '0'
L4:
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- LEFT
- DOWN
- UP
- RIGHT
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- TAB PRV
- HST BCK
- HST FWD
- TAB NXT
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- BSPC
L5:
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- RGB TOG
- RGB HUI
- RGB SAI
- RGB VAI
- {t: ▽, type: trans}
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- MRWD
- VOLD
- VOLU
- MFFD
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- MPLY
L6:
- - ESC
- Q
- X
- E
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- - LSFT
- A
- W
- D
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- - LCTL
- Z
- S
- C
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- - SPC
- TAB
- {t: ▽, type: trans}
- {t: ▽, type: trans}
L7:
- - {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- [LSFT, I, A, E, BSPC, BSPC, E, A, I, LSFT]
- - .
- S
- T
- N
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- N
- T
- S
- .
- - SPC
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- SPC

View File

@ -1,13 +1,10 @@
COMB(TN_CW, CW_TOGG, HRM_T, HRM_N)
COMB(RE_ESC, KC_ESC, HRM_N, HRM_E)
COMBO_REF_LAYER(STE, DEF)
COMB(YKZQUOT_STENO, TG(STE), KC_Y, KC_K, KC_Z, KC_QUOT)
COMBO_REF_LAYER(GAM, DEF)
COMB(TOGGLE_FPS, TG(GAM), KC_F, KC_P, HRM_R)
COMBO_REF_LAYER(FPS, DEF)
COMB(TOGGLE_FPS, TG(FPS), KC_F, KC_P, HRM_R)
COMB(CB_ALTREP, ALTREP, HRM_T, TMB_RPT)
COMB(CB_AREP, QK_AREP, HRM_T, TMB_RPT)
SUBS(O_OUGH, "ough", TMB_RPT, HRM_O)
SUBS(G_ING, "ing", TMB_RPT, KC_G)

View File

@ -2,7 +2,6 @@
#define TAPPING_TERM 200
#define QUICK_TAP_TERM 0
#define IGNORE_MOD_TAP_INTERRUPT
#define PERMISSIVE_HOLD
#define COMBO_TERM 30
@ -15,4 +14,4 @@
#define MOUSEKEY_WHEEL_INTERVAL 50
// The default is 40
#define MOUSEKEY_WHEEL_TIME_TO_MAX 100
#endif
#endif

View File

@ -76,13 +76,17 @@ bool process_achordion(uint16_t keycode, keyrecord_t* record) {
// Determine whether the current event is for a mod-tap or layer-tap key.
const bool is_mt = IS_QK_MOD_TAP(keycode);
const bool is_tap_hold = is_mt || IS_QK_LAYER_TAP(keycode);
// Check key position to avoid acting on combos.
const bool is_physical_pos = (record->event.key.row < KEYLOC_COMBO &&
record->event.key.col < KEYLOC_COMBO);
// Check that this is a normal key event, don't act on combos.
#ifdef IS_KEYEVENT
const bool is_key_event = IS_KEYEVENT(record->event);
#else
const bool is_key_event = (record->event.key.row < 254 &&
record->event.key.col < 254);
#endif
if (achordion_state == STATE_RELEASED) {
if (is_tap_hold && record->tap.count == 0 && record->event.pressed &&
is_physical_pos) {
is_key_event) {
// A tap-hold key is pressed and considered by QMK as "held".
const uint16_t timeout = achordion_timeout(keycode);
if (timeout > 0) {
@ -141,7 +145,7 @@ bool process_achordion(uint16_t keycode, keyrecord_t* record) {
// events back into the handling pipeline so that QMK features and other
// user code can see them. This is done by calling `process_record()`, which
// in turn calls most handlers including `process_record_user()`.
if (!is_physical_pos || (is_tap_hold && record->tap.count == 0) ||
if (!is_key_event || (is_tap_hold && record->tap.count == 0) ||
achordion_chord(tap_hold_keycode, &tap_hold_record, keycode, record)) {
dprintln("Achordion: Plumbing hold press.");
settle_as_hold();
@ -154,6 +158,7 @@ bool process_achordion(uint16_t keycode, keyrecord_t* record) {
// Plumb tap press event.
recursively_process_record(&tap_hold_record, STATE_TAPPING);
send_keyboard_report();
#if TAP_CODE_DELAY > 0
wait_ms(TAP_CODE_DELAY);
#endif // TAP_CODE_DELAY > 0

View File

@ -1,412 +0,0 @@
// Copyright 2022-2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* @file repeat_key.c
* @brief Repeat Key implementation
*/
#include "repeat_key.h"
// This library makes use of keyrecord_t's `.keycode` field. This field is only
// present when Combos are enabled, which we check here. Enable Combos in your
// rules.mk by setting:
// COMBO_ENABLE = yes
#ifndef COMBO_ENABLE
#error "repeat_key: Please set `COMBO_ENABLE = yes` in rules.mk."
#else
// Variables saving the state of the last key press.
static keyrecord_t last_record = {0};
static uint8_t last_mods = 0;
// Signed count of the number of times the last key has been repeated or alternate
// repeated: it is 0 when a key is pressed normally, positive when repeated,
// and negative when alternate repeated.
static int8_t last_repeat_count = 0;
// The repeat_count, but set to 0 outside of repeat_key_invoke() so that it is
// nonzero only while a repeated key is being processed.
static int8_t processing_repeat_count = 0;
/** @brief Updates `last_repeat_count` in direction `dir`. */
static void update_last_repeat_count(int8_t dir) {
if (dir * last_repeat_count < 0) {
last_repeat_count = dir;
} else if (dir * last_repeat_count < 127) {
last_repeat_count += dir;
}
}
static void set_repeat_key_record(uint16_t keycode, keyrecord_t* record) {
last_record = *record;
last_record.keycode = keycode;
last_repeat_count = 0;
}
static void repeat_key_invoke(const keyevent_t* event) {
// It is possible (e.g. in rolled presses) that the last key changes while the
// Repeat Key is pressed. To prevent stuck keys, it is important to remember
// separately what key record was processed on press so that the the
// corresponding record is generated on release.
static keyrecord_t registered_record = {0};
static int8_t registered_repeat_count = 0;
// Since this function calls process_record(), it may recursively call itself.
// We return early if `processing_repeat_count` is nonzero to prevent infinite
// recursion.
if (processing_repeat_count || !last_record.keycode) {
return;
}
if (event->pressed) {
update_last_repeat_count(1);
// On press, apply the last mods state, stacking on top of current mods.
register_weak_mods(last_mods);
registered_record = last_record;
registered_repeat_count = last_repeat_count;
}
// Generate a keyrecord and plumb it into the event pipeline.
registered_record.event = *event;
processing_repeat_count = registered_repeat_count;
process_record(&registered_record);
processing_repeat_count = 0;
// On release, restore the mods state.
if (!event->pressed) {
unregister_weak_mods(last_mods);
}
}
/**
* @brief Find alternate keycode from a table of opposing keycode pairs.
* @param table Array of pairs of basic keycodes, declared as PROGMEM.
* @param table_size_bytes The size of the table in bytes.
* @param target The basic keycode to find.
* @return The alternate basic keycode, or KC_NO if none was found.
*
* @note The table keycodes and target must be basic keycodes.
*
* This helper is used several times below to define alternate keys. Given a table
* of pairs of basic keycodes, the function finds the pair containing `target`
* and returns the other keycode in the pair.
*/
static uint8_t find_alt_keycode(const uint8_t (*table)[2],
uint8_t table_size_bytes, uint8_t target) {
const uint8_t* keycodes = (const uint8_t*)table;
for (uint8_t i = 0; i < table_size_bytes; ++i) {
if (target == pgm_read_byte(keycodes + i)) {
// Xor (i ^ 1) the index to get the other element in the pair.
return pgm_read_byte(keycodes + (i ^ 1));
}
}
return KC_NO;
}
static void alt_repeat_key_invoke(const keyevent_t* event) {
static keyrecord_t registered_record = {0};
static int8_t registered_repeat_count = 0;
// Since this function calls process_record(), it may recursively call itself.
// We return early if `processing_repeat_count` is nonzero to prevent infinite
// recursion.
if (processing_repeat_count) {
return;
}
if (event->pressed) {
registered_record = (keyrecord_t){
#ifndef NO_ACTION_TAPPING
.tap.interrupted = false,
.tap.count = 0,
#endif
.keycode = get_alt_repeat_key_keycode(),
};
}
// Early return if there is no alternate key defined.
if (!registered_record.keycode) {
return;
}
if (event->pressed) {
update_last_repeat_count(-1);
registered_repeat_count = last_repeat_count;
}
// Generate a keyrecord and plumb it into the event pipeline.
registered_record.event = *event;
processing_repeat_count = registered_repeat_count;
process_record(&registered_record);
processing_repeat_count = 0;
}
bool process_repeat_key(uint16_t keycode, keyrecord_t* record,
uint16_t repeat_keycode) {
if (get_repeat_key_count()) {
return true;
}
if (keycode == repeat_keycode) {
repeat_key_invoke(&record->event);
return false;
} else if (record->event.pressed &&
get_repeat_key_eligible(keycode, record)) {
set_repeat_key_record(keycode, record);
set_repeat_key_mods(get_mods() | get_weak_mods()
#ifndef NO_ACTION_ONESHOT
| get_oneshot_mods()
#endif // NO_ACTION_ONESHOT
);
}
return true;
}
bool process_repeat_key_with_alt(uint16_t keycode, keyrecord_t* record,
uint16_t repeat_keycode,
uint16_t alt_repeat_keycode) {
if (keycode == alt_repeat_keycode) {
alt_repeat_key_invoke(&record->event);
return false;
}
return process_repeat_key(keycode, record, repeat_keycode);
}
int8_t get_repeat_key_count(void) { return processing_repeat_count; }
uint16_t get_repeat_key_keycode(void) { return last_record.keycode; }
uint8_t get_repeat_key_mods(void) { return last_mods; }
void set_repeat_key_keycode(uint16_t keycode) {
set_repeat_key_record(keycode, &(keyrecord_t){
#ifndef NO_ACTION_TAPPING
.tap.interrupted = false,
.tap.count = 1,
#endif
});
}
void set_repeat_key_mods(uint8_t mods) { last_mods = mods; }
uint16_t get_alt_repeat_key_keycode(void) {
uint16_t keycode = last_record.keycode;
uint8_t mods = last_mods;
// Call the user callback first to give it a chance to override the default
// alternate key definitions that follow.
uint16_t alt_keycode = get_alt_repeat_key_keycode_user(keycode, mods);
if (alt_keycode) {
return alt_keycode;
}
// Convert 8-bit mods to the 5-bit format used in keycodes. This is lossy: if
// left and right handed mods were mixed, they all become right handed.
mods = ((mods & 0xf0) ? /* set right hand bit */ 0x10 : 0)
// Combine right and left hand mods.
| (((mods >> 4) | mods) & 0xf);
switch (keycode) {
case QK_MODS ... QK_MODS_MAX: // Unpack modifier + basic key.
mods |= QK_MODS_GET_MODS(keycode);
keycode = QK_MODS_GET_BASIC_KEYCODE(keycode);
break;
#ifndef NO_ACTION_TAPPING
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
keycode = QK_MOD_TAP_GET_TAP_KEYCODE(keycode);
break;
#ifndef NO_ACTION_LAYER
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
keycode = QK_LAYER_TAP_GET_TAP_KEYCODE(keycode);
break;
#endif // NO_ACTION_LAYER
#endif // NO_ACTION_TAPPING
#ifdef SWAP_HANDS_ENABLE
case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX:
if (IS_SWAP_HANDS_KEYCODE(keycode)) {
return KC_NO;
}
keycode = QK_SWAP_HANDS_GET_TAP_KEYCODE(keycode);
break;
#endif // SWAP_HANDS_ENABLE
}
if (IS_QK_BASIC(keycode)) {
if ((mods & (MOD_LCTL | MOD_LALT | MOD_LGUI))) {
// The last key was pressed with a modifier other than Shift. The
// following maps
// mod + F <-> mod + B
// and a few others, supporting several core hotkeys used in Emacs, Vim,
// less, and other programs.
// clang-format off
static const uint8_t pairs[][2] PROGMEM = {
{KC_F , KC_B }, // Forward / Backward.
{KC_D , KC_U }, // Down / Up.
{KC_N , KC_P }, // Next / Previous.
{KC_A , KC_E }, // Home / End.
};
// clang-format on
alt_keycode = find_alt_keycode(pairs, sizeof(pairs), keycode);
} else {
// The last key was pressed with no mods or only Shift. The following map
// a few more Vim hotkeys.
// clang-format off
static const uint8_t pairs[][2] PROGMEM = {
{KC_J , KC_K }, // Down / Up.
{KC_H , KC_L }, // Left / Right.
// These two lines map W and E to B, and B to W.
{KC_W , KC_B }, // Forward / Backward by word.
{KC_E , KC_B }, // Forward / Backward by word.
};
// clang-format on
alt_keycode = find_alt_keycode(pairs, sizeof(pairs), keycode);
}
if (!alt_keycode) {
// The following key pairs are considered with any mods.
// clang-format off
static const uint8_t pairs[][2] PROGMEM = {
{KC_LEFT, KC_RGHT}, // Left / Right Arrow.
{KC_UP , KC_DOWN}, // Up / Down Arrow.
{KC_HOME, KC_END }, // Home / End.
{KC_PGUP, KC_PGDN}, // Page Up / Page Down.
{KC_BSPC, KC_DEL }, // Backspace / Delete.
{KC_LBRC, KC_RBRC}, // Brackets [ ] and { }.
#ifdef EXTRAKEY_ENABLE
{KC_WBAK, KC_WFWD}, // Browser Back / Forward.
{KC_MNXT, KC_MPRV}, // Next / Previous Media Track.
{KC_MFFD, KC_MRWD}, // Fast Forward / Rewind Media.
{KC_VOLU, KC_VOLD}, // Volume Up / Down.
{KC_BRIU, KC_BRID}, // Brightness Up / Down.
#endif // EXTRAKEY_ENABLE
#ifdef MOUSEKEY_ENABLE
{KC_MS_L, KC_MS_R}, // Mouse Cursor Left / Right.
{KC_MS_U, KC_MS_D}, // Mouse Cursor Up / Down.
{KC_WH_L, KC_WH_R}, // Mouse Wheel Left / Right.
{KC_WH_U, KC_WH_D}, // Mouse Wheel Up / Down.
#endif // MOUSEKEY_ENABLE
};
// clang-format on
alt_keycode = find_alt_keycode(pairs, sizeof(pairs), keycode);
}
if (alt_keycode) {
// Combine basic keycode with mods.
return (mods << 8) | alt_keycode;
}
}
return KC_NO; // No alternate key found.
}
void repeat_key_register(void) {
repeat_key_invoke(&MAKE_KEYEVENT(0, 0, true));
}
void repeat_key_unregister(void) {
repeat_key_invoke(&MAKE_KEYEVENT(0, 0, false));
}
void repeat_key_tap(void) {
repeat_key_register();
wait_ms(TAP_CODE_DELAY);
repeat_key_unregister();
}
bool alt_repeat_key_register(void) {
if (get_alt_repeat_key_keycode()) {
alt_repeat_key_invoke(&MAKE_KEYEVENT(0, 0, true));
return true;
}
return false;
}
bool alt_repeat_key_unregister(void) {
if (get_alt_repeat_key_keycode()) {
alt_repeat_key_invoke(&MAKE_KEYEVENT(0, 0, false));
return true;
}
return false;
}
bool alt_repeat_key_tap(void) {
if (get_alt_repeat_key_keycode()) {
alt_repeat_key_register();
wait_ms(TAP_CODE_DELAY);
alt_repeat_key_unregister();
return true;
}
return false;
}
// Default implementation of get_repeat_key_eligible().
__attribute__((weak)) bool get_repeat_key_eligible(uint16_t keycode,
keyrecord_t* record) {
switch (keycode) {
// Ignore MO, TO, TG, and TT layer switch keys.
case QK_MOMENTARY ... QK_MOMENTARY_MAX:
case QK_TO ... QK_TO_MAX:
case QK_TOGGLE_LAYER ... QK_TOGGLE_LAYER_MAX:
case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX:
// Ignore mod keys.
case KC_LCTL ... KC_RGUI:
case KC_HYPR:
case KC_MEH:
// Ignore one-shot keys.
#ifndef NO_ACTION_ONESHOT
case QK_ONE_SHOT_LAYER ... QK_ONE_SHOT_LAYER_MAX:
case QK_ONE_SHOT_MOD ... QK_ONE_SHOT_MOD_MAX:
#endif // NO_ACTION_ONESHOT
return false;
// Ignore hold events on tap-hold keys.
#ifndef NO_ACTION_TAPPING
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
#ifndef NO_ACTION_LAYER
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
#endif // NO_ACTION_LAYER
if (record->tap.count == 0) {
return false;
}
break;
#endif // NO_ACTION_TAPPING
#ifdef SWAP_HANDS_ENABLE
case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX:
if (IS_SWAP_HANDS_KEYCODE(keycode) || record->tap.count == 0) {
return false;
}
break;
#endif // SWAP_HANDS_ENABLE
}
return true;
}
// Default implementation of get_alt_repeat_key_keycode_user().
__attribute__((weak)) uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode,
uint8_t mods) {
return get_rev_repeat_key_keycode_user(keycode, mods);
}
// Default implementation of deprecated callback.
__attribute__((weak)) uint16_t get_rev_repeat_key_keycode_user(uint16_t keycode,
uint8_t mods) {
return KC_NO;
}
#endif

View File

@ -1,261 +0,0 @@
// Copyright 2022-2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* @file repeat_key.h
* @brief Repeat Key - an extensible "repeat last key" implementation.
*
* Repeat Key performs the action of last pressed key. Tapping the Repeat Key
* after tapping the Z key types another "z." Repeat Key remembers the modifiers
* that were active with the last key press. These modifiers are combined with
* any additional active modifiers while pressing the Repeat Key. For instance,
* if the last press key was Ctrl + Z, then Shift + Repeat Key performs Ctrl +
* Shift + Z.
*
* Also included is an Alternate Repeat Key, performing the "alternate" if there
* is one for the last key. By default it is defined for navigation keys to act
* in the reverse direction. If Page Down was the last key, the Alternate Repeat
* performs Page Up.
*
* The implementation is a generic event-plumbing strategy that interoperates
* predictably with most QMK features, including tap-hold keys, Auto Shift,
* Combos, and userspace macros.
*
* For full documentation, see
* <https://getreuer.info/posts/keyboards/repeat-key>
*/
#pragma once
#include "quantum.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* Handler function for Repeat Key. Call either this function or
* `process_repeat_key_with_rev()` (but not both) from `process_record_user()`
* to implement Repeat Key in your keymap.
*
* If your `process_record_user()` has other handlers or macros, Repeat Keys
* handler `process_repeat_key()` should preferably be called before anything
* else. (If you also use Achordion, then call Achordion's handler first, Repeat
* Key's handler second, and then other handlers.)
*/
bool process_repeat_key(uint16_t keycode, keyrecord_t* record,
uint16_t repeat_keycode);
/** Handler function for Repeat Key and Alternate Repeat Key. */
bool process_repeat_key_with_alt(uint16_t keycode, keyrecord_t* record,
uint16_t repeat_keycode,
uint16_t alt_repeat_keycode);
/**
* @brief Signed count of times the key has been repeated or alternate repeated.
*
* @note The count is nonzero only while a repeated or alternate-repeated key is
* being processed.
*
* When a key is pressed normally, the count is 0. When the Repeat Key is used
* to repeat a key, the count is 1 on the first repeat, 2 on the second repeat,
* and continuing up to 127.
*
* Negative counts are used similarly for alternate repeating. When the
* Alternate Repeat Key is used, the count is -1 on the first alternate repeat,
* -2 on the second, continuing down to -127.
*/
int8_t get_repeat_key_count(void);
/** @brief Keycode of the key to be repeated. */
uint16_t get_repeat_key_keycode(void);
/** @brief Mods to be applied when repeating. */
uint8_t get_repeat_key_mods(void);
/** @brief Sets the keycode to repeat. */
void set_repeat_key_keycode(uint16_t keycode);
/** @brief Sets the mods to repeat. */
void set_repeat_key_mods(uint8_t mods);
/**
* @brief Callback defining which keys are eligible for repeating.
*
* The callback is called on every key press. Returning true means the key may
* be repeated, and returning false means the key is ignored.
*
* Here is the default implementation, which ignores modifier and layer switch
* keys so that it is possible to set some mods and change layers between
* pressing a key and repeating it:
*
* bool get_repeat_key_eligible(uint16_t keycode, keyrecord_t* record) {
* switch (keycode) {
* // Ignore MO, TO, TG, and TT layer switch keys.
* case QK_MOMENTARY ... QK_MOMENTARY_MAX:
* case QK_TO ... QK_TO_MAX:
* case QK_TOGGLE_LAYER ... QK_TOGGLE_LAYER_MAX:
* case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX:
* // Ignore mod keys.
* case KC_LCTL ... KC_RGUI:
* case KC_HYPR:
* case KC_MEH:
* // Ignore one-shot keys.
* #ifndef NO_ACTION_ONESHOT
* case QK_ONE_SHOT_LAYER ... QK_ONE_SHOT_LAYER_MAX:
* case QK_ONE_SHOT_MOD ... QK_ONE_SHOT_MOD_MAX:
* #endif // NO_ACTION_ONESHOT
* return false;
*
* // Ignore hold events on tap-hold keys.
* #ifndef NO_ACTION_TAPPING
* case QK_MOD_TAP ... QK_MOD_TAP_MAX:
* #ifndef NO_ACTION_LAYER
* case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
* #endif // NO_ACTION_LAYER
* if (record->tap.count == 0) {
* return false;
* }
* break;
* #endif // NO_ACTION_TAPPING
*
* #ifdef SWAP_HANDS_ENABLE
* case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX:
* if (IS_SWAP_HANDS_KEYCODE(keycode) || record->tap.count == 0) {
* return false;
* }
* break;
* #endif // SWAP_HANDS_ENABLE
* }
*
* return true;
* }
*
* To customize, copy the above function into your keymap and edit.
*/
bool get_repeat_key_eligible(uint16_t keycode, keyrecord_t* record);
/**
* @brief Keycode to be used for alternate repeating.
*
* Alternate Repeat performs this keycode based on the last eligible pressed key
* and mods, get_repeat_key_keycode() and get_repeat_key_mods(). For example,
* when the last key was KC_UP, this function returns KC_DOWN. The function
* returns KC_NO if the last key doesn't have a defined alternate.
*/
uint16_t get_alt_repeat_key_keycode(void);
/**
* @brief Optional user callback to define additional alternate keys.
*
* When `get_alt_repeat_key_keycode()` is called, it first calls this callback.
* It should return a keycode representing the "alternate" of the given keycode
* and mods. Returning KC_NO defers to the default definitions in
* `get_alt_repeat_key_keycode()`.
*
* This callback can be used to define additional pairs of keys that "reverse"
* each other. More generally, Alternate Repeat can be configured to perform an
* action that "complements" the last key---Alternate Repeat not limited to
* reverse repeating, and it need not be symmetric. For instance, you can use it
* to eliminate the worst same-finger bigrams in your layout.
*/
uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods);
/**
* Registers (presses down) the Repeat Key. This is useful for invoking Repeat
* as part of a tap dance or other custom handler. Note that if doing so, you
* likely want to define `repeat_key_press_user()` to ignore the key associated
* with that handler so that the Repeat Key does not attempt to repeat itself.
*/
void repeat_key_register(void);
/** Unregisters (releases) the Repeat Key. */
void repeat_key_unregister(void);
/** Taps the Repeat Key with a delay of `TAP_CODE_DELAY`. */
void repeat_key_tap(void);
/**
* Registers (presses down) the Alternate Repeat Key, performing the alternate,
* if there is one, for the last pressed key. If no alternate is found, the
* function takes no action and returns false.
*
* @return True if an alternate key was found.
*/
bool alt_repeat_key_register(void);
/**
* Unregisters (releases) the Alternate Repeat Key.
*
* @return True if an alternate key was found.
*/
bool alt_repeat_key_unregister(void);
/**
* Taps the Alternate Repeat Key with a delay of TAP_CODE_DELAY.
*
* @return True if an alternate key was found.
*/
bool alt_repeat_key_tap(void);
// Deprecated APIs.
/** @deprecated Use `process_repeat_key_with_alt()` instead. */
static inline bool process_repeat_key_with_rev(
uint16_t keycode, keyrecord_t* record,
uint16_t repeat_keycode,
uint16_t rev_repeat_keycode) {
return process_repeat_key_with_alt(keycode, record,
repeat_keycode, rev_repeat_keycode);
}
/** @deprecated Use `get_repeat_key_count()` instead. */
static inline int8_t repeat_key_count(void) { return get_repeat_key_count(); }
/** @deprecated Use `get_repeat_key_keycode()` instead. */
static inline uint16_t repeat_key_keycode(void) {
return get_repeat_key_keycode();
}
/** @deprecated Use `get_repeat_key_mods()` instead. */
static inline uint8_t repeat_key_mods(void) { return get_repeat_key_mods(); }
/** @deprecated Use `get_alt_repeat_key_keycode()` instead. */
static inline uint16_t rev_repeat_key_keycode(void) {
return get_alt_repeat_key_keycode();
}
/** @deprecated Use `get_alt_repeat_key_keycode()` instead. */
static inline uint16_t get_rev_repeat_key_keycode(void) {
return get_alt_repeat_key_keycode();
}
/** @deprecated Use `get_alt_repeat_key_keycode_user()` instead. */
uint16_t get_rev_repeat_key_keycode_user(uint16_t keycode, uint8_t mods);
/** @deprecated Use `alt_repeat_key_register()` instead. */
static inline bool rev_repeat_key_register(void) {
return alt_repeat_key_register();
}
/** @deprecated Use `alt_repeat_key_unregister()` instead. */
static inline bool rev_repeat_key_unregister(void) {
return alt_repeat_key_unregister();
}
/** @deprecated Use `alt_repeat_key_tap()` instead. */
static inline bool rev_repeat_key_tap(void) {
return alt_repeat_key_tap();
}
#ifdef __cplusplus
}
#endif

View File

@ -1,8 +1,8 @@
#include "keycodes.h"
#include "quantum_keycodes.h"
#include QMK_KEYBOARD_H
#include "features/achordion.h"
#include "features/custom_shift_keys.h"
#include "features/repeat_key.h"
#include "quantum.h"
// #include "keymap_steno.h"
@ -13,14 +13,11 @@ enum layers {
NAV,
OPS,
MED,
FPS,
STE,
GAM,
};
enum custom_keycodes {
REPEAT = SAFE_RANGE,
ALTREP,
DIRUP,
DIRUP = SAFE_RANGE,
NEQ,
COLNEQ,
};
@ -42,7 +39,7 @@ enum custom_keycodes {
#define TMB_TAB LGUI_T(KC_TAB)
#define TMB_ENT RGUI_T(KC_ENT)
#define TMB_SPC LT(SYM, KC_SPC)
#define TMB_RPT LT(NAV, REPEAT)
#define TMB_RPT LT(NAV, QK_REP)
// Nav
#define TAB_NXT LCTL(KC_TAB)
@ -111,27 +108,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, KC_MPLY
),
[FPS] = LAYOUT(
[GAM] = LAYOUT(
KC_ESC, KC_Q, KC_X, KC_E, _______, _______, _______, _______, _______, _______,
KC_LSFT, KC_A, KC_W, KC_D, _______, _______, _______, _______, _______, _______,
KC_LCTL, KC_Z, KC_S, KC_C, _______, _______, _______, _______, _______, _______,
KC_SPC, KC_TAB, _______, _______
),
[STE] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_LSFT, KC_I, KC_A, KC_E, KC_BSPC, KC_BSPC, KC_E, KC_A, KC_I, KC_LSFT,
KC_DOT, KC_S, KC_T, KC_N, _______, _______, KC_N, KC_T, KC_S, KC_DOT,
KC_SPC, _______, _______, KC_SPC
),
// [STE] = LAYOUT(
// STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA,
// STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_DR, STN_TR, STN_LR, STN_PR, STN_FR,
// STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ZR, STN_SR, STN_GR, STN_BR, STN_RR,
// STN_A, STN_O, STN_E, STN_U
// ),
// [] = LAYOUT(
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
@ -141,7 +124,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on
// Custom Shift Keys {{{
const custom_shift_key_t custom_shift_keys[] = {
{KC_DOT, KC_QUES},
{KC_COMM, KC_EXLM},
@ -149,20 +131,14 @@ const custom_shift_key_t custom_shift_keys[] = {
};
uint8_t NUM_CUSTOM_SHIFT_KEYS =
sizeof(custom_shift_keys) / sizeof(custom_shift_key_t);
// }}}
// Combos {{{
#include "g/keymap_combo.h"
bool combo_should_trigger(uint16_t combo_index, combo_t *combo,
uint16_t keycode, keyrecord_t *record) {
if (layer_state_is(STE) && combo_index != YKZQUOT_STENO)
return false;
return true;
}
// }}}
// User functions {{{
void keyboard_pre_init_user(void) {
// Set our LED pin as output
setPinOutput(24);
@ -176,13 +152,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false;
if (!process_custom_shift_keys(keycode, record))
return false;
if (keycode == TMB_RPT && !record->tap.count) {
return true;
}
if (!process_repeat_key_with_alt(keycode, record, TMB_RPT, ALTREP))
return false;
switch (keycode) {
case TMB_RPT:
// Hack to get LT working with repeat key
if (record->event.pressed) {
if (record->tap.count > 0) {
keyrecord_t press;
press.event.pressed = true;
process_repeat_key(QK_REP, &press);
keyrecord_t release;
release.event.pressed = false;
process_repeat_key(QK_REP, &release);
return true;
}
}
break;
case DIRUP:
if (record->event.pressed) {
SEND_STRING("../");
@ -206,9 +192,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
bool remember_last_key_user(uint16_t keycode, keyrecord_t *record,
uint8_t *remembered_mods) {
switch (keycode) {
case TMB_RPT:
return false;
}
return true;
}
void matrix_scan_user(void) { achordion_task(); }
// }}}
// Achordion {{{
bool achordion_chord(uint16_t tap_hold_keycode, keyrecord_t *tap_hold_record,
uint16_t other_keycode, keyrecord_t *other_record) {
switch (tap_hold_keycode) {
@ -236,7 +230,4 @@ bool achordion_eager_mod(uint8_t mod) {
default:
return false;
}
}
// }}}
// vim: set foldmethod=marker :
}

View File

@ -1,11 +1,9 @@
SRC += features/achordion.c \
features/repeat_key.c \
features/custom_shift_keys.c
VPATH += keyboards/gboards
COMBO_ENABLE = yes
CAPS_WORD_ENABLE = yes
STENO_ENABLE = yes
STENO_PROTOCOL = geminipr
REPEAT_KEY_ENABLE = yes
NKRO_ENABLE = yes
RGBLIGHT_ENABLE = yes
CONVERT_TO=promicro_rp2040

@ -1 +1 @@
Subproject commit f8d01e5ecab6488a17299384880506ff969200ba
Subproject commit fa0b4511dddffa56812a86ab93f90d5221f43585