diff options
Diffstat (limited to 'docs/posts/programming_on_34_keys/index.html')
-rw-r--r-- | docs/posts/programming_on_34_keys/index.html | 157 |
1 files changed, 121 insertions, 36 deletions
diff --git a/docs/posts/programming_on_34_keys/index.html b/docs/posts/programming_on_34_keys/index.html index 8667701..37ccfe6 100644 --- a/docs/posts/programming_on_34_keys/index.html +++ b/docs/posts/programming_on_34_keys/index.html | |||
@@ -28,7 +28,7 @@ | |||
28 | 28/08 — 2022 | 28 | 28/08 — 2022 |
29 | <div class="stats"> | 29 | <div class="stats"> |
30 | <span class="stats-number"> | 30 | <span class="stats-number"> |
31 | 63.53 | 31 | 63.54 |
32 | </span> | 32 | </span> |
33 | <span class="stats-unit">cm</span> | 33 | <span class="stats-unit">cm</span> |
34 |   | 34 |   |
@@ -42,79 +42,164 @@ | |||
42 | Programming On 34 Keys | 42 | Programming On 34 Keys |
43 | </h1> | 43 | </h1> |
44 | <div class="post-text"> | 44 | <div class="post-text"> |
45 | <p>Minimizing your keyboard layout is a slippery slope. A few months ago, I built the <a href="https://github.com/icyphox/ferricy">Ferricy</a>, a 34-key-split-ortho-ergo keyboard. The Ferricy is a fork of the <a href="https://github.com/davidphilipbarr/Sweep/tree/main/Sweep%20Bling%20MX">Ferris Sweep MX Bling</a>.</p> | 45 | <p>Minimizing your keyboard layout is a slippery slope. A few months |
46 | ago, I built the <a | ||
47 | href="https://github.com/icyphox/ferricy">Ferricy</a>, a | ||
48 | 34-key-split-ortho-ergo keyboard. The Ferricy is a fork of the <a | ||
49 | href="https://github.com/davidphilipbarr/Sweep/tree/main/Sweep%20Bling%20MX">Ferris | ||
50 | Sweep MX Bling</a>.</p> | ||
46 | <figure> | 51 | <figure> |
47 | <img src="https://u.peppe.rs/otz.jpg" alt="The Ferricy, designed by icyphox" /><figcaption aria-hidden="true">The Ferricy, designed by <a href="https://icyphox.sh">icyphox</a></figcaption> | 52 | <img src="https://u.peppe.rs/otz.jpg" |
53 | alt="The Ferricy, designed by icyphox" /> | ||
54 | <figcaption aria-hidden="true">The Ferricy, designed by <a | ||
55 | href="https://icyphox.sh">icyphox</a></figcaption> | ||
48 | </figure> | 56 | </figure> |
49 | <p>My daily use consists of a bit of prose and a lot of program, my layout has evolved accordingly.</p> | 57 | <p>My daily use consists of a bit of prose and a lot of program, my |
58 | layout has evolved accordingly.</p> | ||
50 | <h1 id="base-layer">Base Layer</h1> | 59 | <h1 id="base-layer">Base Layer</h1> |
51 | <figure> | 60 | <figure> |
52 | <img src="https://u.peppe.rs/base.png" alt="Colemak with no mods" /><figcaption aria-hidden="true">Colemak with no mods</figcaption> | 61 | <img src="https://u.peppe.rs/base.png" alt="Colemak with no mods" /> |
62 | <figcaption aria-hidden="true">Colemak with no mods</figcaption> | ||
53 | </figure> | 63 | </figure> |
54 | <p>The base layer contains alphabets, four symbols and four whitespace keys:</p> | 64 | <p>The base layer contains alphabets, four symbols and four whitespace |
65 | keys:</p> | ||
55 | <ul> | 66 | <ul> |
56 | <li>Alphas: Stock Colemak, with no modifications whatsoever</li> | 67 | <li>Alphas: Stock Colemak, with no modifications whatsoever</li> |
57 | <li>Symbols: <code>. , / ;</code></li> | 68 | <li>Symbols: <code>. , / ;</code></li> |
58 | <li>Whitespace: tab, space, enter, backspace (from left to right)</li> | 69 | <li>Whitespace: tab, space, enter, backspace (from left to right)</li> |
59 | </ul> | 70 | </ul> |
60 | <h1 id="layers">Layers</h1> | 71 | <h1 id="layers">Layers</h1> |
61 | <p>Keyboard input is complex and it is impossible to skirt around it. You can either use a keyboard with enough keys to supply all possible inputs (a mechanical burden), or you can use firmware to supply all possible inputs (a cognitive burden). Layers are a cognitive burden.</p> | 72 | <p>Keyboard input is complex and it is impossible to skirt around it. |
62 | <p>I use 3 layers, heavily inspired by <a href="https://github.com/manna-harbour/miryoku">Miryoku</a>, but tuned for programming. Excluding the base Colemak layer:</p> | 73 | You can either use a keyboard with enough keys to supply all possible |
74 | inputs (a mechanical burden), or you can use firmware to supply all | ||
75 | possible inputs (a cognitive burden). Layers are a cognitive burden.</p> | ||
76 | <p>I use 3 layers, heavily inspired by <a | ||
77 | href="https://github.com/manna-harbour/miryoku">Miryoku</a>, but tuned | ||
78 | for programming. Excluding the base Colemak layer:</p> | ||
63 | <ul> | 79 | <ul> |
64 | <li><code>NAV</code>: activated on holding <code>space</code> (left thumb)</li> | 80 | <li><code>NAV</code>: activated on holding <code>space</code> (left |
65 | <li><code>NUM</code>: activated on holding <code>tab</code> (left thumb)</li> | 81 | thumb)</li> |
66 | <li><code>SYM</code>: activated on holding <code>enter</code> (right thumb)</li> | 82 | <li><code>NUM</code>: activated on holding <code>tab</code> (left |
83 | thumb)</li> | ||
84 | <li><code>SYM</code>: activated on holding <code>enter</code> (right | ||
85 | thumb)</li> | ||
67 | </ul> | 86 | </ul> |
68 | <h2 id="the-nav-layer">The <code>NAV</code> Layer</h2> | 87 | <h2 id="the-nav-layer">The <code>NAV</code> Layer</h2> |
69 | <p>As the name suggests, this layer is focused on navigation. Arrow keys and the likes.</p> | 88 | <p>As the name suggests, this layer is focused on navigation. Arrow keys |
89 | and the likes.</p> | ||
70 | <figure> | 90 | <figure> |
71 | <img src="https://u.peppe.rs/nav.png" alt="NAV, on holding space" /><figcaption aria-hidden="true"><code>NAV</code>, on holding <code>space</code></figcaption> | 91 | <img src="https://u.peppe.rs/nav.png" alt="NAV, on holding space" /> |
92 | <figcaption aria-hidden="true"><code>NAV</code>, on holding | ||
93 | <code>space</code></figcaption> | ||
72 | </figure> | 94 | </figure> |
73 | <p>Using Vim and Colemak means you lose out on HJKL navigation. However, on activating the <code>NAV</code> layer, the right home-row is converted into arrow keys. In essence, by holding space, I can navigate Vim with the home-row, or Firefox, or my PDF reader. I no longer need to look for software that allows Vim navigation keys, because it is baked into the firmware!</p> | 95 | <p>Using Vim and Colemak means you lose out on HJKL navigation. However, |
74 | <p>My Vim motions are not limited to HJKL. In fact, my Vim motions are rarely HJKL. I tend to use <code>}</code> (next paragraph) and <code>)</code> (next sentence) more often. As a result, these have found their way into my <code>NAV</code> layer, over the likes of <code>PgDown</code> and <code>End</code>. Having brackets at my index and middle fingers is nice for programming too.</p> | 96 | on activating the <code>NAV</code> layer, the right home-row is |
97 | converted into arrow keys. In essence, by holding space, I can navigate | ||
98 | Vim with the home-row, or Firefox, or my PDF reader. I no longer need to | ||
99 | look for software that allows Vim navigation keys, because it is baked | ||
100 | into the firmware!</p> | ||
101 | <p>My Vim motions are not limited to HJKL. In fact, my Vim motions are | ||
102 | rarely HJKL. I tend to use <code>}</code> (next paragraph) and | ||
103 | <code>)</code> (next sentence) more often. As a result, these have found | ||
104 | their way into my <code>NAV</code> layer, over the likes of | ||
105 | <code>PgDown</code> and <code>End</code>. Having brackets at my index | ||
106 | and middle fingers is nice for programming too.</p> | ||
75 | <h2 id="the-sym-layer">The <code>SYM</code> Layer</h2> | 107 | <h2 id="the-sym-layer">The <code>SYM</code> Layer</h2> |
76 | <figure> | 108 | <figure> |
77 | <img src="https://u.peppe.rs/sym.png" alt="SYM, on holding enter" /><figcaption aria-hidden="true"><code>SYM</code>, on holding <code>enter</code></figcaption> | 109 | <img src="https://u.peppe.rs/sym.png" alt="SYM, on holding enter" /> |
110 | <figcaption aria-hidden="true"><code>SYM</code>, on holding | ||
111 | <code>enter</code></figcaption> | ||
78 | </figure> | 112 | </figure> |
79 | <p>This layer contains all the symbols that you would find by hitting <code>Shift</code> and a key on the number row. Probably noteworthy to Vim users: the symbols are arranged in the form of a mirrored numpad for exactly one reason: to move <code>$</code> to the left of <code>^</code>. It has always annoyed me that <code>$</code> moves the cursor to the end of the line and <code>^</code> moves it to the beginning, but their position on a typical number row are reversed, 4 comes before 6.</p> | 113 | <p>This layer contains all the symbols that you would find by hitting |
114 | <code>Shift</code> and a key on the number row. Probably noteworthy to | ||
115 | Vim users: the symbols are arranged in the form of a mirrored numpad for | ||
116 | exactly one reason: to move <code>$</code> to the left of | ||
117 | <code>^</code>. It has always annoyed me that <code>$</code> moves the | ||
118 | cursor to the end of the line and <code>^</code> moves it to the | ||
119 | beginning, but their position on a typical number row are reversed, 4 | ||
120 | comes before 6.</p> | ||
80 | <h2 id="the-num-layer">The <code>NUM</code> layer</h2> | 121 | <h2 id="the-num-layer">The <code>NUM</code> layer</h2> |
81 | <figure> | 122 | <figure> |
82 | <img src="https://u.peppe.rs/num.png" alt="NUM, on holding tab" /><figcaption aria-hidden="true"><code>NUM</code>, on holding <code>tab</code></figcaption> | 123 | <img src="https://u.peppe.rs/num.png" alt="NUM, on holding tab" /> |
124 | <figcaption aria-hidden="true"><code>NUM</code>, on holding | ||
125 | <code>tab</code></figcaption> | ||
83 | </figure> | 126 | </figure> |
84 | <p>Another deviation from Miryoku, the numpad just feels <em>right</em> on my <em>right</em> hand.</p> | 127 | <p>Another deviation from Miryoku, the numpad just feels <em>right</em> |
128 | on my <em>right</em> hand.</p> | ||
85 | <h1 id="zmk-combos">ZMK Combos</h1> | 129 | <h1 id="zmk-combos">ZMK Combos</h1> |
86 | <p>If you have been paying close attention, you might have noticed that <code>escape</code> didn’t make it to any layer. <code>escape</code> is too crucial to put on a non-base layer, but at the same time, not as important to deserve a place on the base layer. That is where ZMK’s combos come in. Combos let you tap any number of keys, and combine them to form a single key. I have combos set up for underscore, minus, escape and caps-word (more on caps-word later):</p> | 130 | <p>If you have been paying close attention, you might have noticed that |
131 | <code>escape</code> didn’t make it to any layer. <code>escape</code> is | ||
132 | too crucial to put on a non-base layer, but at the same time, not as | ||
133 | important to deserve a place on the base layer. That is where ZMK’s | ||
134 | combos come in. Combos let you tap any number of keys, and combine them | ||
135 | to form a single key. I have combos set up for underscore, minus, escape | ||
136 | and caps-word (more on caps-word later):</p> | ||
87 | <figure> | 137 | <figure> |
88 | <img src="https://u.peppe.rs/combos.png" alt="Combos are almost piano-like" /><figcaption aria-hidden="true">Combos are almost piano-like</figcaption> | 138 | <img src="https://u.peppe.rs/combos.png" |
139 | alt="Combos are almost piano-like" /> | ||
140 | <figcaption aria-hidden="true">Combos are almost piano-like</figcaption> | ||
89 | </figure> | 141 | </figure> |
90 | <h1 id="home-row-mods">Home-row Mods</h1> | 142 | <h1 id="home-row-mods">Home-row Mods</h1> |
91 | <p>Inherited from Miryoku, I have home-row mods for activating <code>Super</code>, <code>Alt</code>, <code>Shift</code>, <code>Ctrl</code> and <code>Hyper</code> (<code>Ctrl + Shift + Alt + Super</code>). The idea is to send <code>T</code> on tap and <code>Ctrl</code> on hold. Home-row mods are fairly popular, so I’ll not go into the details.</p> | 143 | <p>Inherited from Miryoku, I have home-row mods for activating |
144 | <code>Super</code>, <code>Alt</code>, <code>Shift</code>, | ||
145 | <code>Ctrl</code> and <code>Hyper</code> | ||
146 | (<code>Ctrl + Shift + Alt + Super</code>). The idea is to send | ||
147 | <code>T</code> on tap and <code>Ctrl</code> on hold. Home-row mods are | ||
148 | fairly popular, so I’ll not go into the details.</p> | ||
92 | <figure> | 149 | <figure> |
93 | <img src="https://u.peppe.rs/homerow.png" alt="Super, Alt, Shift, Ctrl, Hyper; on the left half, and mirrored on the right half" /><figcaption aria-hidden="true">Super, Alt, Shift, Ctrl, Hyper; on the left half, and mirrored on the right half</figcaption> | 150 | <img src="https://u.peppe.rs/homerow.png" |
151 | alt="Super, Alt, Shift, Ctrl, Hyper; on the left half, and mirrored on the right half" /> | ||
152 | <figcaption aria-hidden="true">Super, Alt, Shift, Ctrl, Hyper; on the | ||
153 | left half, and mirrored on the right half</figcaption> | ||
94 | </figure> | 154 | </figure> |
95 | <p><code>Hyper</code> bridges the gap between firmware and software. You can never configure key combination that, opens Firefox, for example, through firmware alone. However, with the <code>Hyper</code> key, and some <code>sxhkd</code> magic, you can emulate that. Pressing <code>Hyper + F</code> on a keyboard is just two keys, but the key codes sent are <code>Ctrl + Shift + Alt + Super + F</code>. That key combination is not intercepted by any application as a shortcut, except for the following <code>sxhkd</code> stanza:</p> | 155 | <p><code>Hyper</code> bridges the gap between firmware and software. You |
96 | <div class="sourceCode" id="cb1"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">super</span> + alt + shift + ctrl + f</span> | 156 | can never configure key combination that, opens Firefox, for example, |
157 | through firmware alone. However, with the <code>Hyper</code> key, and | ||
158 | some <code>sxhkd</code> magic, you can emulate that. Pressing | ||
159 | <code>Hyper + F</code> on a keyboard is just two keys, but the key codes | ||
160 | sent are <code>Ctrl + Shift + Alt + Super + F</code>. That key | ||
161 | combination is not intercepted by any application as a shortcut, except | ||
162 | for the following <code>sxhkd</code> stanza:</p> | ||
163 | <div class="sourceCode" id="cb1"><pre | ||
164 | class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">super</span> + alt + shift + ctrl + f</span> | ||
97 | <span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">xdotool</span> search <span class="st">"Mozilla Firefox"</span> windowactivate</span></code></pre></div> | 165 | <span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">xdotool</span> search <span class="st">"Mozilla Firefox"</span> windowactivate</span></code></pre></div> |
98 | <p>Alternatively, you can intercept unused <code>F</code> keys: <code>F13</code> through <code>F24</code>.</p> | 166 | <p>Alternatively, you can intercept unused <code>F</code> keys: |
99 | <p>Home-row mods are mirrored on each half because it would be impossible to hit <code>Ctrl + T</code> if not; they lie on the same key.</p> | 167 | <code>F13</code> through <code>F24</code>.</p> |
168 | <p>Home-row mods are mirrored on each half because it would be | ||
169 | impossible to hit <code>Ctrl + T</code> if not; they lie on the same | ||
170 | key.</p> | ||
100 | <h1 id="caps-word">Caps-word</h1> | 171 | <h1 id="caps-word">Caps-word</h1> |
101 | <p>Caps-word is a clever caps-lock, built into ZMK. Typing out constants such as <code>PORT</code> with home-row mods would look like this:</p> | 172 | <p>Caps-word is a clever caps-lock, built into ZMK. Typing out constants |
173 | such as <code>PORT</code> with home-row mods would look like this:</p> | ||
102 | <ul> | 174 | <ul> |
103 | <li>hold <code>e</code> (shift) on left hand, and tap <code>p</code> on right hand</li> | 175 | <li>hold <code>e</code> (shift) on left hand, and tap <code>p</code> on |
104 | <li>hold <code>e</code> (shift) on left hand, and tap <code>o</code> on right hand</li> | 176 | right hand</li> |
105 | <li>hold <code>s</code> (shift) on right hand, and tap <code>r</code> on left hand</li> | 177 | <li>hold <code>e</code> (shift) on left hand, and tap <code>o</code> on |
106 | <li>hold <code>s</code> (shift) on right hand, and tap <code>t</code> on left hand</li> | 178 | right hand</li> |
179 | <li>hold <code>s</code> (shift) on right hand, and tap <code>r</code> on | ||
180 | left hand</li> | ||
181 | <li>hold <code>s</code> (shift) on right hand, and tap <code>t</code> on | ||
182 | left hand</li> | ||
107 | </ul> | 183 | </ul> |
108 | <p>This hold-alternate-hold dance gets tiring quickly. With caps-word, however:</p> | 184 | <p>This hold-alternate-hold dance gets tiring quickly. With caps-word, |
185 | however:</p> | ||
109 | <ul> | 186 | <ul> |
110 | <li>toggle <code>caps_word</code></li> | 187 | <li>toggle <code>caps_word</code></li> |
111 | <li>type out <code>p</code>, <code>o</code>, <code>r</code>, <code>t</code></li> | 188 | <li>type out <code>p</code>, <code>o</code>, <code>r</code>, |
189 | <code>t</code></li> | ||
112 | <li>hit a <em>break</em> character (space, enter will do)</li> | 190 | <li>hit a <em>break</em> character (space, enter will do)</li> |
113 | <li>continue</li> | 191 | <li>continue</li> |
114 | </ul> | 192 | </ul> |
115 | <p>Caps-word automatically disables capitalization upon encountering a breaking character, (which are space, enter or any modifier, by default) right in the firmware!</p> | 193 | <p>Caps-word automatically disables capitalization upon encountering a |
194 | breaking character, (which are space, enter or any modifier, by default) | ||
195 | right in the firmware!</p> | ||
116 | <h1 id="findings">Findings</h1> | 196 | <h1 id="findings">Findings</h1> |
117 | <p>34-keys has been reasonably comfortable to use, for both prose and program. My palms do not move across the desk at all, as I reach for keys. I mostly write Rust and Bash, and my layout has evolved to accomodate special characters from their grammars (angled brackets and hyphens, specifically). If you are on a similar journey, I would suggest focusing on accuracy and comfort over speed. Speed comes with time.</p> | 197 | <p>34-keys has been reasonably comfortable to use, for both prose and |
198 | program. My palms do not move across the desk at all, as I reach for | ||
199 | keys. I mostly write Rust and Bash, and my layout has evolved to | ||
200 | accomodate special characters from their grammars (angled brackets and | ||
201 | hyphens, specifically). If you are on a similar journey, I would suggest | ||
202 | focusing on accuracy and comfort over speed. Speed comes with time.</p> | ||
118 | 203 | ||
119 | </div> | 204 | </div> |
120 | 205 | ||