aboutsummaryrefslogtreecommitdiff
path: root/docs/posts/programming_on_34_keys/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/posts/programming_on_34_keys/index.html')
-rw-r--r--docs/posts/programming_on_34_keys/index.html157
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 &nbsp 34 &nbsp
@@ -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
46ago, I built the <a
47href="https://github.com/icyphox/ferricy">Ferricy</a>, a
4834-key-split-ortho-ergo keyboard. The Ferricy is a fork of the <a
49href="https://github.com/davidphilipbarr/Sweep/tree/main/Sweep%20Bling%20MX">Ferris
50Sweep 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"
53alt="The Ferricy, designed by icyphox" />
54<figcaption aria-hidden="true">The Ferricy, designed by <a
55href="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
58layout 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
65keys:</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> 73You can either use a keyboard with enough keys to supply all possible
74inputs (a mechanical burden), or you can use firmware to supply all
75possible inputs (a cognitive burden). Layers are a cognitive burden.</p>
76<p>I use 3 layers, heavily inspired by <a
77href="https://github.com/manna-harbour/miryoku">Miryoku</a>, but tuned
78for 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> 81thumb)</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
83thumb)</li>
84<li><code>SYM</code>: activated on holding <code>enter</code> (right
85thumb)</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
89and 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> 96on activating the <code>NAV</code> layer, the right home-row is
97converted into arrow keys. In essence, by holding space, I can navigate
98Vim with the home-row, or Firefox, or my PDF reader. I no longer need to
99look for software that allows Vim navigation keys, because it is baked
100into the firmware!</p>
101<p>My Vim motions are not limited to HJKL. In fact, my Vim motions are
102rarely HJKL. I tend to use <code>}</code> (next paragraph) and
103<code>)</code> (next sentence) more often. As a result, these have found
104their way into my <code>NAV</code> layer, over the likes of
105<code>PgDown</code> and <code>End</code>. Having brackets at my index
106and 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
115Vim users: the symbols are arranged in the form of a mirrored numpad for
116exactly one reason: to move <code>$</code> to the left of
117<code>^</code>. It has always annoyed me that <code>$</code> moves the
118cursor to the end of the line and <code>^</code> moves it to the
119beginning, but their position on a typical number row are reversed, 4
120comes 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>
128on 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
132too crucial to put on a non-base layer, but at the same time, not as
133important to deserve a place on the base layer. That is where ZMK’s
134combos come in. Combos let you tap any number of keys, and combine them
135to form a single key. I have combos set up for underscore, minus, escape
136and 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"
139alt="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
148fairly 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"
151alt="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
153left 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> 156can never configure key combination that, opens Firefox, for example,
157through firmware alone. However, with the <code>Hyper</code> key, and
158some <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
160sent are <code>Ctrl + Shift + Alt + Super + F</code>. That key
161combination is not intercepted by any application as a shortcut, except
162for the following <code>sxhkd</code> stanza:</p>
163<div class="sourceCode" id="cb1"><pre
164class="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">&quot;Mozilla Firefox&quot;</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">&quot;Mozilla Firefox&quot;</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
169impossible to hit <code>Ctrl + T</code> if not; they lie on the same
170key.</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
173such 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> 176right 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> 178right hand</li>
179<li>hold <code>s</code> (shift) on right hand, and tap <code>r</code> on
180left hand</li>
181<li>hold <code>s</code> (shift) on right hand, and tap <code>t</code> on
182left 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,
185however:</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
194breaking character, (which are space, enter or any modifier, by default)
195right 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
198program. My palms do not move across the desk at all, as I reach for
199keys. I mostly write Rust and Bash, and my layout has evolved to
200accomodate special characters from their grammars (angled brackets and
201hyphens, specifically). If you are on a similar journey, I would suggest
202focusing on accuracy and comfort over speed. Speed comes with time.</p>
118 203
119 </div> 204 </div>
120 205