diff options
Diffstat (limited to 'docs/index.xml')
-rw-r--r-- | docs/index.xml | 79 |
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><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> | ||
17 | <figure> | ||
18 | <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> | ||
19 | </figure> | ||
20 | <p>My daily use consists of a bit of prose and a lot of program, my layout has evolved accordingly.</p> | ||
21 | <h1 id="base-layer">Base Layer</h1> | ||
22 | <figure> | ||
23 | <img src="https://u.peppe.rs/base.png" alt="Colemak with no mods" /><figcaption aria-hidden="true">Colemak with no mods</figcaption> | ||
24 | </figure> | ||
25 | <p>The base layer contains alphabets, four symbols and four whitespace keys:</p> | ||
26 | <ul> | ||
27 | <li>Alphas: Stock Colemak, with no modifications whatsoever</li> | ||
28 | <li>Symbols: <code>. , / ;</code></li> | ||
29 | <li>Whitespace: tab, space, enter, backspace (from left to right)</li> | ||
30 | </ul> | ||
31 | <h1 id="layers">Layers</h1> | ||
32 | <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> | ||
33 | <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> | ||
34 | <ul> | ||
35 | <li><code>NAV</code>: activated on holding <code>space</code> (left thumb)</li> | ||
36 | <li><code>NUM</code>: activated on holding <code>tab</code> (left thumb)</li> | ||
37 | <li><code>SYM</code>: activated on holding <code>enter</code> (right thumb)</li> | ||
38 | </ul> | ||
39 | <h2 id="the-nav-layer">The <code>NAV</code> Layer</h2> | ||
40 | <p>As the name suggests, this layer is focused on navigation. Arrow keys and the likes.</p> | ||
41 | <figure> | ||
42 | <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> | ||
43 | </figure> | ||
44 | <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> | ||
45 | <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> | ||
46 | <h2 id="the-sym-layer">The <code>SYM</code> Layer</h2> | ||
47 | <figure> | ||
48 | <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> | ||
49 | </figure> | ||
50 | <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> | ||
51 | <h2 id="the-num-layer">The <code>NUM</code> layer</h2> | ||
52 | <figure> | ||
53 | <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> | ||
54 | </figure> | ||
55 | <p>Another deviation from Miryoku, the numpad just feels <em>right</em> on my <em>right</em> hand.</p> | ||
56 | <h1 id="zmk-combos">ZMK Combos</h1> | ||
57 | <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> | ||
58 | <figure> | ||
59 | <img src="https://u.peppe.rs/combos.png" alt="Combos are almost piano-like" /><figcaption aria-hidden="true">Combos are almost piano-like</figcaption> | ||
60 | </figure> | ||
61 | <h1 id="home-row-mods">Home-row Mods</h1> | ||
62 | <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> | ||
63 | <figure> | ||
64 | <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> | ||
65 | </figure> | ||
66 | <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> | ||
67 | <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> | ||
68 | <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> | ||
69 | <p>Alternatively, you can intercept unused <code>F</code> keys: <code>F13</code> through <code>F24</code>.</p> | ||
70 | <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> | ||
71 | <h1 id="caps-word">Caps-word</h1> | ||
72 | <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> | ||
73 | <ul> | ||
74 | <li>hold <code>e</code> (shift) on left hand, and tap <code>p</code> on right hand</li> | ||
75 | <li>hold <code>e</code> (shift) on left hand, and tap <code>o</code> on right hand</li> | ||
76 | <li>hold <code>s</code> (shift) on right hand, and tap <code>r</code> on left hand</li> | ||
77 | <li>hold <code>s</code> (shift) on right hand, and tap <code>t</code> on left hand</li> | ||
78 | </ul> | ||
79 | <p>This hold-alternate-hold dance gets tiring quickly. With caps-word, however:</p> | ||
80 | <ul> | ||
81 | <li>toggle <code>caps_word</code></li> | ||
82 | <li>type out <code>p</code>, <code>o</code>, <code>r</code>, <code>t</code></li> | ||
83 | <li>hit a <em>break</em> character (space, enter will do)</li> | ||
84 | <li>continue</li> | ||
85 | </ul> | ||
86 | <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> | ||
87 | <h1 id="findings">Findings</h1> | ||
88 | <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></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><p>I took interest in the Egyptian rendition of the afterlife recently.</p> | 95 | <description><p>I took interest in the Egyptian rendition of the afterlife recently.</p> |
17 | <h3 id="parts-of-the-soul">Parts of the Soul</h3> | 96 | <h3 id="parts-of-the-soul">Parts of the Soul</h3> |