aboutsummaryrefslogtreecommitdiff
path: root/docs/index.xml
diff options
context:
space:
mode:
Diffstat (limited to 'docs/index.xml')
-rw-r--r--docs/index.xml79
1 files changed, 79 insertions, 0 deletions
diff --git a/docs/index.xml b/docs/index.xml
index 996ef12..62c8871 100644
--- a/docs/index.xml
+++ b/docs/index.xml
@@ -12,6 +12,85 @@
12 <language>en-us</language> 12 <language>en-us</language>
13 <copyright>Creative Commons BY-NC-SA 4.0</copyright> 13 <copyright>Creative Commons BY-NC-SA 4.0</copyright>
14 <item> 14 <item>
15<title>Programming On 34 Keys</title>
16<description>&lt;p&gt;Minimizing your keyboard layout is a slippery slope. A few months ago, I built the &lt;a href="https://github.com/icyphox/ferricy"&gt;Ferricy&lt;/a&gt;, a 34-key-split-ortho-ergo keyboard. The Ferricy is a fork of the &lt;a href="https://github.com/davidphilipbarr/Sweep/tree/main/Sweep%20Bling%20MX"&gt;Ferris Sweep MX Bling&lt;/a&gt;.&lt;/p&gt;
17&lt;figure&gt;
18&lt;img src="https://u.peppe.rs/otz.jpg" alt="The Ferricy, designed by icyphox" /&gt;&lt;figcaption aria-hidden="true"&gt;The Ferricy, designed by &lt;a href="https://icyphox.sh"&gt;icyphox&lt;/a&gt;&lt;/figcaption&gt;
19&lt;/figure&gt;
20&lt;p&gt;My daily use consists of a bit of prose and a lot of program, my layout has evolved accordingly.&lt;/p&gt;
21&lt;h1 id="base-layer"&gt;Base Layer&lt;/h1&gt;
22&lt;figure&gt;
23&lt;img src="https://u.peppe.rs/base.png" alt="Colemak with no mods" /&gt;&lt;figcaption aria-hidden="true"&gt;Colemak with no mods&lt;/figcaption&gt;
24&lt;/figure&gt;
25&lt;p&gt;The base layer contains alphabets, four symbols and four whitespace keys:&lt;/p&gt;
26&lt;ul&gt;
27&lt;li&gt;Alphas: Stock Colemak, with no modifications whatsoever&lt;/li&gt;
28&lt;li&gt;Symbols: &lt;code&gt;. , / ;&lt;/code&gt;&lt;/li&gt;
29&lt;li&gt;Whitespace: tab, space, enter, backspace (from left to right)&lt;/li&gt;
30&lt;/ul&gt;
31&lt;h1 id="layers"&gt;Layers&lt;/h1&gt;
32&lt;p&gt;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.&lt;/p&gt;
33&lt;p&gt;I use 3 layers, heavily inspired by &lt;a href="https://github.com/manna-harbour/miryoku"&gt;Miryoku&lt;/a&gt;, but tuned for programming. Excluding the base Colemak layer:&lt;/p&gt;
34&lt;ul&gt;
35&lt;li&gt;&lt;code&gt;NAV&lt;/code&gt;: activated on holding &lt;code&gt;space&lt;/code&gt; (left thumb)&lt;/li&gt;
36&lt;li&gt;&lt;code&gt;NUM&lt;/code&gt;: activated on holding &lt;code&gt;tab&lt;/code&gt; (left thumb)&lt;/li&gt;
37&lt;li&gt;&lt;code&gt;SYM&lt;/code&gt;: activated on holding &lt;code&gt;enter&lt;/code&gt; (right thumb)&lt;/li&gt;
38&lt;/ul&gt;
39&lt;h2 id="the-nav-layer"&gt;The &lt;code&gt;NAV&lt;/code&gt; Layer&lt;/h2&gt;
40&lt;p&gt;As the name suggests, this layer is focused on navigation. Arrow keys and the likes.&lt;/p&gt;
41&lt;figure&gt;
42&lt;img src="https://u.peppe.rs/nav.png" alt="NAV, on holding space" /&gt;&lt;figcaption aria-hidden="true"&gt;&lt;code&gt;NAV&lt;/code&gt;, on holding &lt;code&gt;space&lt;/code&gt;&lt;/figcaption&gt;
43&lt;/figure&gt;
44&lt;p&gt;Using Vim and Colemak means you lose out on HJKL navigation. However, on activating the &lt;code&gt;NAV&lt;/code&gt; 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!&lt;/p&gt;
45&lt;p&gt;My Vim motions are not limited to HJKL. In fact, my Vim motions are rarely HJKL. I tend to use &lt;code&gt;}&lt;/code&gt; (next paragraph) and &lt;code&gt;)&lt;/code&gt; (next sentence) more often. As a result, these have found their way into my &lt;code&gt;NAV&lt;/code&gt; layer, over the likes of &lt;code&gt;PgDown&lt;/code&gt; and &lt;code&gt;End&lt;/code&gt;. Having brackets at my index and middle fingers is nice for programming too.&lt;/p&gt;
46&lt;h2 id="the-sym-layer"&gt;The &lt;code&gt;SYM&lt;/code&gt; Layer&lt;/h2&gt;
47&lt;figure&gt;
48&lt;img src="https://u.peppe.rs/sym.png" alt="SYM, on holding enter" /&gt;&lt;figcaption aria-hidden="true"&gt;&lt;code&gt;SYM&lt;/code&gt;, on holding &lt;code&gt;enter&lt;/code&gt;&lt;/figcaption&gt;
49&lt;/figure&gt;
50&lt;p&gt;This layer contains all the symbols that you would find by hitting &lt;code&gt;Shift&lt;/code&gt; 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 &lt;code&gt;$&lt;/code&gt; to the left of &lt;code&gt;^&lt;/code&gt;. It has always annoyed me that &lt;code&gt;$&lt;/code&gt; moves the cursor to the end of the line and &lt;code&gt;^&lt;/code&gt; moves it to the beginning, but their position on a typical number row are reversed, 4 comes before 6.&lt;/p&gt;
51&lt;h2 id="the-num-layer"&gt;The &lt;code&gt;NUM&lt;/code&gt; layer&lt;/h2&gt;
52&lt;figure&gt;
53&lt;img src="https://u.peppe.rs/num.png" alt="NUM, on holding tab" /&gt;&lt;figcaption aria-hidden="true"&gt;&lt;code&gt;NUM&lt;/code&gt;, on holding &lt;code&gt;tab&lt;/code&gt;&lt;/figcaption&gt;
54&lt;/figure&gt;
55&lt;p&gt;Another deviation from Miryoku, the numpad just feels &lt;em&gt;right&lt;/em&gt; on my &lt;em&gt;right&lt;/em&gt; hand.&lt;/p&gt;
56&lt;h1 id="zmk-combos"&gt;ZMK Combos&lt;/h1&gt;
57&lt;p&gt;If you have been paying close attention, you might have noticed that &lt;code&gt;escape&lt;/code&gt; didn’t make it to any layer. &lt;code&gt;escape&lt;/code&gt; 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):&lt;/p&gt;
58&lt;figure&gt;
59&lt;img src="https://u.peppe.rs/combos.png" alt="Combos are almost piano-like" /&gt;&lt;figcaption aria-hidden="true"&gt;Combos are almost piano-like&lt;/figcaption&gt;
60&lt;/figure&gt;
61&lt;h1 id="home-row-mods"&gt;Home-row Mods&lt;/h1&gt;
62&lt;p&gt;Inherited from Miryoku, I have home-row mods for activating &lt;code&gt;Super&lt;/code&gt;, &lt;code&gt;Alt&lt;/code&gt;, &lt;code&gt;Shift&lt;/code&gt;, &lt;code&gt;Ctrl&lt;/code&gt; and &lt;code&gt;Hyper&lt;/code&gt; (&lt;code&gt;Ctrl + Shift + Alt + Super&lt;/code&gt;). The idea is to send &lt;code&gt;T&lt;/code&gt; on tap and &lt;code&gt;Ctrl&lt;/code&gt; on hold. Home-row mods are fairly popular, so I’ll not go into the details.&lt;/p&gt;
63&lt;figure&gt;
64&lt;img src="https://u.peppe.rs/homerow.png" alt="Super, Alt, Shift, Ctrl, Hyper; on the left half, and mirrored on the right half" /&gt;&lt;figcaption aria-hidden="true"&gt;Super, Alt, Shift, Ctrl, Hyper; on the left half, and mirrored on the right half&lt;/figcaption&gt;
65&lt;/figure&gt;
66&lt;p&gt;&lt;code&gt;Hyper&lt;/code&gt; bridges the gap between firmware and software. You can never configure key combination that, opens Firefox, for example, through firmware alone. However, with the &lt;code&gt;Hyper&lt;/code&gt; key, and some &lt;code&gt;sxhkd&lt;/code&gt; magic, you can emulate that. Pressing &lt;code&gt;Hyper + F&lt;/code&gt; on a keyboard is just two keys, but the key codes sent are &lt;code&gt;Ctrl + Shift + Alt + Super + F&lt;/code&gt;. That key combination is not intercepted by any application as a shortcut, except for the following &lt;code&gt;sxhkd&lt;/code&gt; stanza:&lt;/p&gt;
67&lt;div class="sourceCode" id="cb1"&gt;&lt;pre class="sourceCode bash"&gt;&lt;code class="sourceCode bash"&gt;&lt;span id="cb1-1"&gt;&lt;a href="#cb1-1" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;super&lt;/span&gt; + alt + shift + ctrl + f&lt;/span&gt;
68&lt;span id="cb1-2"&gt;&lt;a href="#cb1-2" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt; &lt;span class="ex"&gt;xdotool&lt;/span&gt; search &lt;span class="st"&gt;&amp;quot;Mozilla Firefox&amp;quot;&lt;/span&gt; windowactivate&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
69&lt;p&gt;Alternatively, you can intercept unused &lt;code&gt;F&lt;/code&gt; keys: &lt;code&gt;F13&lt;/code&gt; through &lt;code&gt;F24&lt;/code&gt;.&lt;/p&gt;
70&lt;p&gt;Home-row mods are mirrored on each half because it would be impossible to hit &lt;code&gt;Ctrl + T&lt;/code&gt; if not; they lie on the same key.&lt;/p&gt;
71&lt;h1 id="caps-word"&gt;Caps-word&lt;/h1&gt;
72&lt;p&gt;Caps-word is a clever caps-lock, built into ZMK. Typing out constants such as &lt;code&gt;PORT&lt;/code&gt; with home-row mods would look like this:&lt;/p&gt;
73&lt;ul&gt;
74&lt;li&gt;hold &lt;code&gt;e&lt;/code&gt; (shift) on left hand, and tap &lt;code&gt;p&lt;/code&gt; on right hand&lt;/li&gt;
75&lt;li&gt;hold &lt;code&gt;e&lt;/code&gt; (shift) on left hand, and tap &lt;code&gt;o&lt;/code&gt; on right hand&lt;/li&gt;
76&lt;li&gt;hold &lt;code&gt;s&lt;/code&gt; (shift) on right hand, and tap &lt;code&gt;r&lt;/code&gt; on left hand&lt;/li&gt;
77&lt;li&gt;hold &lt;code&gt;s&lt;/code&gt; (shift) on right hand, and tap &lt;code&gt;t&lt;/code&gt; on left hand&lt;/li&gt;
78&lt;/ul&gt;
79&lt;p&gt;This hold-alternate-hold dance gets tiring quickly. With caps-word, however:&lt;/p&gt;
80&lt;ul&gt;
81&lt;li&gt;toggle &lt;code&gt;caps_word&lt;/code&gt;&lt;/li&gt;
82&lt;li&gt;type out &lt;code&gt;p&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;r&lt;/code&gt;, &lt;code&gt;t&lt;/code&gt;&lt;/li&gt;
83&lt;li&gt;hit a &lt;em&gt;break&lt;/em&gt; character (space, enter will do)&lt;/li&gt;
84&lt;li&gt;continue&lt;/li&gt;
85&lt;/ul&gt;
86&lt;p&gt;Caps-word automatically disables capitalization upon encountering a breaking character, (which are space, enter or any modifier, by default) right in the firmware!&lt;/p&gt;
87&lt;h1 id="findings"&gt;Findings&lt;/h1&gt;
88&lt;p&gt;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.&lt;/p&gt;</description>
89<link>https://peppe.rs/posts/programming_on_34_keys/</link>
90<pubDate>Sun, 28 Aug 2022 13:51:00 +0000</pubDate>
91<guid>https://peppe.rs/posts/programming_on_34_keys/</guid>
92</item>
93<item>
15<title>A Reference Counted Afterlife</title> 94<title>A Reference Counted Afterlife</title>
16<description>&lt;p&gt;I took interest in the Egyptian rendition of the afterlife recently.&lt;/p&gt; 95<description>&lt;p&gt;I took interest in the Egyptian rendition of the afterlife recently.&lt;/p&gt;
17&lt;h3 id="parts-of-the-soul"&gt;Parts of the Soul&lt;/h3&gt; 96&lt;h3 id="parts-of-the-soul"&gt;Parts of the Soul&lt;/h3&gt;