aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2022-08-28 14:52:48 +0100
committerAkshay <[email protected]>2022-08-28 14:52:48 +0100
commitefc4149c10f249bd92b02dfd4041378763baeb66 (patch)
tree4350bb5ebe532eb379e9feedcb440b76be9016e1 /docs
parent9698183d180a470329d77304dc8e87d976fa753d (diff)
new post: programming on 34 keys
Diffstat (limited to 'docs')
-rw-r--r--docs/index.html16
-rw-r--r--docs/index.xml79
-rw-r--r--docs/posts/index.html17
-rw-r--r--docs/posts/programming_on_34_keys/index.html148
4 files changed, 252 insertions, 8 deletions
diff --git a/docs/index.html b/docs/index.html
index f1ead1b..259777e 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -42,15 +42,15 @@
42 <tr> 42 <tr>
43 <td class=table-post> 43 <td class=table-post>
44 <div class="date"> 44 <div class="date">
45 02/08 — 2022 45 28/08 — 2022
46 </div> 46 </div>
47 <a href="/posts/a_reference_counted_afterlife" class="post-link"> 47 <a href="/posts/programming_on_34_keys" class="post-link">
48 <span class="post-link">A Reference Counted Afterlife</span> 48 <span class="post-link">Programming On 34 Keys</span>
49 </a> 49 </a>
50 </td> 50 </td>
51 <td class=table-stats> 51 <td class=table-stats>
52 <span class="stats-number"> 52 <span class="stats-number">
53 1.6 53 6.2
54 </span> 54 </span>
55 <span class=stats-unit>min</span> 55 <span class=stats-unit>min</span>
56 </td> 56 </td>
@@ -59,15 +59,15 @@
59 <tr> 59 <tr>
60 <td class=table-post> 60 <td class=table-post>
61 <div class="date"> 61 <div class="date">
62 13/06 — 2022 62 02/08 — 2022
63 </div> 63 </div>
64 <a href="/posts/lotus58" class="post-link"> 64 <a href="/posts/a_reference_counted_afterlife" class="post-link">
65 <span class="post-link">Lotus58</span> 65 <span class="post-link">A Reference Counted Afterlife</span>
66 </a> 66 </a>
67 </td> 67 </td>
68 <td class=table-stats> 68 <td class=table-stats>
69 <span class="stats-number"> 69 <span class="stats-number">
70 4.7 70 1.6
71 </span> 71 </span>
72 <span class=stats-unit>min</span> 72 <span class=stats-unit>min</span>
73 </td> 73 </td>
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;
diff --git a/docs/posts/index.html b/docs/posts/index.html
index 24d9594..c211d3b 100644
--- a/docs/posts/index.html
+++ b/docs/posts/index.html
@@ -27,6 +27,23 @@
27 <tr> 27 <tr>
28 <td class=table-post> 28 <td class=table-post>
29 <div class="date"> 29 <div class="date">
30 28/08 — 2022
31 </div>
32 <a href="/posts/programming_on_34_keys" class="post-link">
33 <span class="post-link">Programming On 34 Keys</span>
34 </a>
35 </td>
36 <td class=table-stats>
37 <span class="stats-number">
38 6.2
39 </span>
40 <span class=stats-unit>min</span>
41 </td>
42 </tr>
43
44 <tr>
45 <td class=table-post>
46 <div class="date">
30 02/08 — 2022 47 02/08 — 2022
31 </div> 48 </div>
32 <a href="/posts/a_reference_counted_afterlife" class="post-link"> 49 <a href="/posts/a_reference_counted_afterlife" class="post-link">
diff --git a/docs/posts/programming_on_34_keys/index.html b/docs/posts/programming_on_34_keys/index.html
new file mode 100644
index 0000000..8667701
--- /dev/null
+++ b/docs/posts/programming_on_34_keys/index.html
@@ -0,0 +1,148 @@
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <link rel="stylesheet" href="/style.css">
5 <link rel="stylesheet" href="/syntax.css">
6 <meta charset="UTF-8">
7 <meta name="viewport" content="initial-scale=1">
8 <meta content="#ffffff" name="theme-color">
9 <meta name="HandheldFriendly" content="true">
10 <meta property="og:title" content="Programming On 34 Keys">
11 <meta property="og:type" content="website">
12 <meta property="og:description" content="a static site {for, by, about} me ">
13 <meta property="og:url" content="https://peppe.rs">
14 <link rel="icon" type="image/x-icon" href="/favicon.png">
15 <title>Programming On 34 Keys · peppe.rs</title>
16 <body>
17 <div class="posts">
18 <div class="post">
19 <a href="/" class="post-end-link">Home</a>
20 <span>/</span>
21 <a href="/posts" class="post-end-link">Posts</a>
22 <span>/</span>
23 <a class="post-end-link">Programming On 34 Keys</a>
24 <a class="stats post-end-link" href="https://git.peppe.rs/web/site/plain/posts/programming_on_34_keys.md
25">View Raw</a>
26 <div class="separator"></div>
27 <div class="date">
28 28/08 — 2022
29 <div class="stats">
30 <span class="stats-number">
31 63.53
32 </span>
33 <span class="stats-unit">cm</span>
34 &nbsp
35 <span class="stats-number">
36 6.2
37 </span>
38 <span class="stats-unit">min</span>
39 </div>
40 </div>
41 <h1>
42 Programming On 34 Keys
43 </h1>
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>
46<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>
48</figure>
49<p>My daily use consists of a bit of prose and a lot of program, my layout has evolved accordingly.</p>
50<h1 id="base-layer">Base Layer</h1>
51<figure>
52<img src="https://u.peppe.rs/base.png" alt="Colemak with no mods" /><figcaption aria-hidden="true">Colemak with no mods</figcaption>
53</figure>
54<p>The base layer contains alphabets, four symbols and four whitespace keys:</p>
55<ul>
56<li>Alphas: Stock Colemak, with no modifications whatsoever</li>
57<li>Symbols: <code>. , / ;</code></li>
58<li>Whitespace: tab, space, enter, backspace (from left to right)</li>
59</ul>
60<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>
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>
63<ul>
64<li><code>NAV</code>: activated on holding <code>space</code> (left thumb)</li>
65<li><code>NUM</code>: activated on holding <code>tab</code> (left thumb)</li>
66<li><code>SYM</code>: activated on holding <code>enter</code> (right thumb)</li>
67</ul>
68<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>
70<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>
72</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>
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>
75<h2 id="the-sym-layer">The <code>SYM</code> Layer</h2>
76<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>
78</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>
80<h2 id="the-num-layer">The <code>NUM</code> layer</h2>
81<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>
83</figure>
84<p>Another deviation from Miryoku, the numpad just feels <em>right</em> on my <em>right</em> hand.</p>
85<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>
87<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>
89</figure>
90<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>
92<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>
94</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>
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>
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>
98<p>Alternatively, you can intercept unused <code>F</code> keys: <code>F13</code> through <code>F24</code>.</p>
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>
100<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>
102<ul>
103<li>hold <code>e</code> (shift) on left hand, and tap <code>p</code> on right hand</li>
104<li>hold <code>e</code> (shift) on left hand, and tap <code>o</code> on right hand</li>
105<li>hold <code>s</code> (shift) on right hand, and tap <code>r</code> on left hand</li>
106<li>hold <code>s</code> (shift) on right hand, and tap <code>t</code> on left hand</li>
107</ul>
108<p>This hold-alternate-hold dance gets tiring quickly. With caps-word, however:</p>
109<ul>
110<li>toggle <code>caps_word</code></li>
111<li>type out <code>p</code>, <code>o</code>, <code>r</code>, <code>t</code></li>
112<li>hit a <em>break</em> character (space, enter will do)</li>
113<li>continue</li>
114</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>
116<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>
118
119 </div>
120
121 <div class="intro">
122 Hi.
123 <div class="hot-links">
124 <a href="https://peppe.rs/index.xml" class="feed-button">Subscribe</a>
125 <a href="https://liberapay.com/nerdypepper/donate" class="donate-button">Donate</a>
126 </div>
127 <p>I'm Akshay, I go by nerd or nerdypepper on the internet.</p>
128 <p>
129 I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer.
130 I write <a href="https://git.peppe.rs">open-source stuff</a> to pass time.
131 I also design fonts:
132 <a href="https://git.peppe.rs/fonts/scientifica">scientifica</a>,
133 <a href="https://git.peppe.rs/fonts/curie">curie</a>.
134 </p>
135 <p>Send me a mail at [email protected] or a message at [email protected].</p>
136 </div>
137
138 <a href="/" class="post-end-link">Home</a>
139 <span>/</span>
140 <a href="/posts" class="post-end-link">Posts</a>
141 <span>/</span>
142 <a class="post-end-link">Programming On 34 Keys</a>
143 <a class="stats post-end-link" href="https://git.peppe.rs/web/site/plain/posts/programming_on_34_keys.md
144">View Raw</a>
145 </div>
146 </div>
147 </body>
148</html>