From efc4149c10f249bd92b02dfd4041378763baeb66 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 28 Aug 2022 19:22:48 +0530 Subject: new post: programming on 34 keys --- docs/index.html | 16 +-- docs/index.xml | 79 +++++++++++++ docs/posts/index.html | 17 +++ docs/posts/programming_on_34_keys/index.html | 148 +++++++++++++++++++++++++ posts/programming_on_34_keys.md | 159 +++++++++++++++++++++++++++ 5 files changed, 411 insertions(+), 8 deletions(-) create mode 100644 docs/posts/programming_on_34_keys/index.html create mode 100644 posts/programming_on_34_keys.md 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 @@
- 02/08 — 2022 + 28/08 — 2022
- - A Reference Counted Afterlife + + Programming On 34 Keys - 1.6 + 6.2 min @@ -59,15 +59,15 @@
- 13/06 — 2022 + 02/08 — 2022
- - Lotus58 + + A Reference Counted Afterlife - 4.7 + 1.6 min 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 @@ en-us Creative Commons BY-NC-SA 4.0 +Programming On 34 Keys +<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> +<figure> +<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> +</figure> +<p>My daily use consists of a bit of prose and a lot of program, my layout has evolved accordingly.</p> +<h1 id="base-layer">Base Layer</h1> +<figure> +<img src="https://u.peppe.rs/base.png" alt="Colemak with no mods" /><figcaption aria-hidden="true">Colemak with no mods</figcaption> +</figure> +<p>The base layer contains alphabets, four symbols and four whitespace keys:</p> +<ul> +<li>Alphas: Stock Colemak, with no modifications whatsoever</li> +<li>Symbols: <code>. , / ;</code></li> +<li>Whitespace: tab, space, enter, backspace (from left to right)</li> +</ul> +<h1 id="layers">Layers</h1> +<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> +<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> +<ul> +<li><code>NAV</code>: activated on holding <code>space</code> (left thumb)</li> +<li><code>NUM</code>: activated on holding <code>tab</code> (left thumb)</li> +<li><code>SYM</code>: activated on holding <code>enter</code> (right thumb)</li> +</ul> +<h2 id="the-nav-layer">The <code>NAV</code> Layer</h2> +<p>As the name suggests, this layer is focused on navigation. Arrow keys and the likes.</p> +<figure> +<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> +</figure> +<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> +<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> +<h2 id="the-sym-layer">The <code>SYM</code> Layer</h2> +<figure> +<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> +</figure> +<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> +<h2 id="the-num-layer">The <code>NUM</code> layer</h2> +<figure> +<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> +</figure> +<p>Another deviation from Miryoku, the numpad just feels <em>right</em> on my <em>right</em> hand.</p> +<h1 id="zmk-combos">ZMK Combos</h1> +<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> +<figure> +<img src="https://u.peppe.rs/combos.png" alt="Combos are almost piano-like" /><figcaption aria-hidden="true">Combos are almost piano-like</figcaption> +</figure> +<h1 id="home-row-mods">Home-row Mods</h1> +<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> +<figure> +<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> +</figure> +<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> +<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> +<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> +<p>Alternatively, you can intercept unused <code>F</code> keys: <code>F13</code> through <code>F24</code>.</p> +<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> +<h1 id="caps-word">Caps-word</h1> +<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> +<ul> +<li>hold <code>e</code> (shift) on left hand, and tap <code>p</code> on right hand</li> +<li>hold <code>e</code> (shift) on left hand, and tap <code>o</code> on right hand</li> +<li>hold <code>s</code> (shift) on right hand, and tap <code>r</code> on left hand</li> +<li>hold <code>s</code> (shift) on right hand, and tap <code>t</code> on left hand</li> +</ul> +<p>This hold-alternate-hold dance gets tiring quickly. With caps-word, however:</p> +<ul> +<li>toggle <code>caps_word</code></li> +<li>type out <code>p</code>, <code>o</code>, <code>r</code>, <code>t</code></li> +<li>hit a <em>break</em> character (space, enter will do)</li> +<li>continue</li> +</ul> +<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> +<h1 id="findings">Findings</h1> +<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> +https://peppe.rs/posts/programming_on_34_keys/ +Sun, 28 Aug 2022 13:51:00 +0000 +https://peppe.rs/posts/programming_on_34_keys/ + + A Reference Counted Afterlife <p>I took interest in the Egyptian rendition of the afterlife recently.</p> <h3 id="parts-of-the-soul">Parts of the Soul</h3> 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 @@ -24,6 +24,23 @@
+ + + + +
+
+ 28/08 — 2022 +
+ + Programming On 34 Keys + +
+ + 6.2 + + min +
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 @@ + + + + + + + + + + + + + + + Programming On 34 Keys · peppe.rs + +
+
+ Home + / + Posts + / + Programming On 34 Keys + View Raw +
+
+ 28/08 — 2022 +
+ + 63.53 + + cm +   + + 6.2 + + min +
+
+

+ Programming On 34 Keys +

+
+

Minimizing your keyboard layout is a slippery slope. A few months ago, I built the Ferricy, a 34-key-split-ortho-ergo keyboard. The Ferricy is a fork of the Ferris Sweep MX Bling.

+
+The Ferricy, designed by icyphox +
+

My daily use consists of a bit of prose and a lot of program, my layout has evolved accordingly.

+

Base Layer

+
+Colemak with no mods +
+

The base layer contains alphabets, four symbols and four whitespace keys:

+
    +
  • Alphas: Stock Colemak, with no modifications whatsoever
  • +
  • Symbols: . , / ;
  • +
  • Whitespace: tab, space, enter, backspace (from left to right)
  • +
+

Layers

+

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.

+

I use 3 layers, heavily inspired by Miryoku, but tuned for programming. Excluding the base Colemak layer:

+
    +
  • NAV: activated on holding space (left thumb)
  • +
  • NUM: activated on holding tab (left thumb)
  • +
  • SYM: activated on holding enter (right thumb)
  • +
+

The NAV Layer

+

As the name suggests, this layer is focused on navigation. Arrow keys and the likes.

+
+NAV, on holding space +
+

Using Vim and Colemak means you lose out on HJKL navigation. However, on activating the NAV 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!

+

My Vim motions are not limited to HJKL. In fact, my Vim motions are rarely HJKL. I tend to use } (next paragraph) and ) (next sentence) more often. As a result, these have found their way into my NAV layer, over the likes of PgDown and End. Having brackets at my index and middle fingers is nice for programming too.

+

The SYM Layer

+
+SYM, on holding enter +
+

This layer contains all the symbols that you would find by hitting Shift 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 $ to the left of ^. It has always annoyed me that $ moves the cursor to the end of the line and ^ moves it to the beginning, but their position on a typical number row are reversed, 4 comes before 6.

+

The NUM layer

+
+NUM, on holding tab +
+

Another deviation from Miryoku, the numpad just feels right on my right hand.

+

ZMK Combos

+

If you have been paying close attention, you might have noticed that escape didn’t make it to any layer. escape 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):

+
+Combos are almost piano-like +
+

Home-row Mods

+

Inherited from Miryoku, I have home-row mods for activating Super, Alt, Shift, Ctrl and Hyper (Ctrl + Shift + Alt + Super). The idea is to send T on tap and Ctrl on hold. Home-row mods are fairly popular, so I’ll not go into the details.

+
+Super, Alt, Shift, Ctrl, Hyper; on the left half, and mirrored on the right half +
+

Hyper bridges the gap between firmware and software. You can never configure key combination that, opens Firefox, for example, through firmware alone. However, with the Hyper key, and some sxhkd magic, you can emulate that. Pressing Hyper + F on a keyboard is just two keys, but the key codes sent are Ctrl + Shift + Alt + Super + F. That key combination is not intercepted by any application as a shortcut, except for the following sxhkd stanza:

+
super + alt + shift + ctrl + f
+  xdotool search "Mozilla Firefox" windowactivate
+

Alternatively, you can intercept unused F keys: F13 through F24.

+

Home-row mods are mirrored on each half because it would be impossible to hit Ctrl + T if not; they lie on the same key.

+

Caps-word

+

Caps-word is a clever caps-lock, built into ZMK. Typing out constants such as PORT with home-row mods would look like this:

+
    +
  • hold e (shift) on left hand, and tap p on right hand
  • +
  • hold e (shift) on left hand, and tap o on right hand
  • +
  • hold s (shift) on right hand, and tap r on left hand
  • +
  • hold s (shift) on right hand, and tap t on left hand
  • +
+

This hold-alternate-hold dance gets tiring quickly. With caps-word, however:

+
    +
  • toggle caps_word
  • +
  • type out p, o, r, t
  • +
  • hit a break character (space, enter will do)
  • +
  • continue
  • +
+

Caps-word automatically disables capitalization upon encountering a breaking character, (which are space, enter or any modifier, by default) right in the firmware!

+

Findings

+

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.

+ +
+ +
+ Hi. + +

I'm Akshay, I go by nerd or nerdypepper on the internet.

+

+ I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. + I write open-source stuff to pass time. + I also design fonts: + scientifica, + curie. +

+

Send me a mail at nerdy@peppe.rs or a message at nerdypepper@irc.rizon.net.

+
+ + Home + / + Posts + / + Programming On 34 Keys + View Raw +
+
+ + diff --git a/posts/programming_on_34_keys.md b/posts/programming_on_34_keys.md new file mode 100644 index 0000000..15610d6 --- /dev/null +++ b/posts/programming_on_34_keys.md @@ -0,0 +1,159 @@ +Minimizing your keyboard layout is a slippery slope. A few +months ago, I built the +[Ferricy](https://github.com/icyphox/ferricy), a +34-key-split-ortho-ergo keyboard. The Ferricy is a fork of +the [Ferris Sweep MX +Bling](https://github.com/davidphilipbarr/Sweep/tree/main/Sweep%20Bling%20MX). + +![The Ferricy, designed by [icyphox](https://icyphox.sh)](https://u.peppe.rs/otz.jpg) + + +My daily use consists of a bit of prose and a lot of +program, my layout has evolved accordingly. + +# Base Layer + +![Colemak with no mods](https://u.peppe.rs/base.png) + +The base layer contains alphabets, four symbols and four +whitespace keys: + +- Alphas: Stock Colemak, with no modifications whatsoever +- Symbols: `. , / ;` +- Whitespace: tab, space, enter, backspace (from left to + right) + +# Layers + +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. + +I use 3 layers, heavily inspired by +[Miryoku](https://github.com/manna-harbour/miryoku), but +tuned for programming. Excluding the base Colemak layer: + +- `NAV`: activated on holding `space` (left thumb) +- `NUM`: activated on holding `tab` (left thumb) +- `SYM`: activated on holding `enter` (right thumb) + +## The `NAV` Layer + +As the name suggests, this layer is focused on navigation. +Arrow keys and the likes. + +![`NAV`, on holding `space`](https://u.peppe.rs/nav.png) + +Using Vim and Colemak means you lose out on HJKL navigation. +However, on activating the `NAV` 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! + +My Vim motions are not limited to HJKL. In fact, my Vim +motions are rarely HJKL. I tend to use `}` (next paragraph) +and `)` (next sentence) more often. As a result, these have +found their way into my `NAV` layer, over the likes of +`PgDown` and `End`. Having brackets at my index and middle +fingers is nice for programming too. + +## The `SYM` Layer + +![`SYM`, on holding `enter`](https://u.peppe.rs/sym.png) + +This layer contains all the symbols that you would find by +hitting `Shift` 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 +`$` to the left of `^`. It has always annoyed me that `$` +moves the cursor to the end of the line and `^` moves it to +the beginning, but their position on a typical number row +are reversed, 4 comes before 6. + +## The `NUM` layer + +![`NUM`, on holding `tab`](https://u.peppe.rs/num.png) + +Another deviation from Miryoku, the numpad just feels _right_ +on my _right_ hand. + +# ZMK Combos + +If you have been paying close attention, you might have +noticed that `escape` didn't make it to any layer. `escape` +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): + +![Combos are almost piano-like](https://u.peppe.rs/combos.png) + +# Home-row Mods + +Inherited from Miryoku, I have home-row mods for activating +`Super`, `Alt`, `Shift`, `Ctrl` and `Hyper` (`Ctrl + Shift + +Alt + Super`). The idea is to send `T` on tap and `Ctrl` on +hold. Home-row mods are fairly popular, so I'll not go into +the details. + +![Super, Alt, Shift, Ctrl, Hyper; on the left half, and +mirrored on the right half](https://u.peppe.rs/homerow.png) + +`Hyper` bridges the gap between firmware and software. You +can never configure key combination that, opens Firefox, for +example, through firmware alone. However, with the `Hyper` +key, and some `sxhkd` magic, you can emulate that. Pressing +`Hyper + F` on a keyboard is just two keys, but the key +codes sent are `Ctrl + Shift + Alt + Super + F`. That key +combination is not intercepted by any application as a +shortcut, except for the following `sxhkd` stanza: + +```bash +super + alt + shift + ctrl + f + xdotool search "Mozilla Firefox" windowactivate +``` + +Alternatively, you can intercept unused `F` keys: `F13` +through `F24`. + +Home-row mods are mirrored on each half because it would be +impossible to hit `Ctrl + T` if not; they lie on the same +key. + +# Caps-word + +Caps-word is a clever caps-lock, built into ZMK. Typing out +constants such as `PORT` with home-row mods would look like +this: + +- hold `e` (shift) on left hand, and tap `p` on right hand +- hold `e` (shift) on left hand, and tap `o` on right hand +- hold `s` (shift) on right hand, and tap `r` on left hand +- hold `s` (shift) on right hand, and tap `t` on left hand + +This hold-alternate-hold dance gets tiring quickly. With +caps-word, however: + +- toggle `caps_word` +- type out `p`, `o`, `r`, `t` +- hit a _break_ character (space, enter will do) +- continue + +Caps-word automatically disables capitalization upon +encountering a breaking character, (which are space, enter +or any modifier, by default) right in the firmware! + +# Findings + +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. -- cgit v1.2.3