JBGVX'WOU,QHNSTM#$AEI-YPFDKZC/;.RL

R and L are pressed with the left thumb. # is the magic key, and $ is the skip magic key. These special keys are used to limit how often the same finger is used multiple times in quick succession, improving typing efficiency and decreasing strain. They will be explained more below.

Same-Finger Usage

The guiding principle of Afterburner is to maximize the proportion of trigrams (three consecutive keystrokes) that use three different fingers. Using the same finger multiple times in quick succession is much slower than rotating through several fingers. For example, on QWERTY, typing sdf is fast because all three fingers can press their respective keys without waiting for the previous finger to finish its motion. By contrast, typing sdw or swd is slower because the the ring finger has to fully lift off the S key before it can press W.

Most existing alternate keyboard layouts place a high importance on minimizing same-finger bigrams (SFBs): how often the same finger presses two consecutive keys, like in “plot” on QWERTY. SFBs are traditionally defined as the same finger pressing a different key. That is, repeat letters (which I will refer to as same-key bigrams, or SKBs) are not included in this count. On this metric, Afterburner outperforms all well-known layouts, including the following selection:

Same-Finger Bigrams, Excluding Same-Key (% of All Bigrams)

The solution space for English keyboard layouts is well-understood thanks to the work of numerous layout creators in the Alt Keyboard Layouts community. Layouts like Night and Gallium are very close to the theoretical minimum bound for SFBs. As you approach the minimum, other undesirable properties tend to crop up. New layouts are still being made, but of those that are competitive with existing modern layouts, innovation is limited to choosing different trade-offs: there are no free optimizations left to find.

Afterburner breaks the minimum SFB barrier with the inclusion of a magic key, a key whose output depends on which key was most recently pressed. One of the magic rules on Afterburner is GS, which means that after pressing G, pressing the magic key will output S. So the word “legs” is typed as leg#s (where #s represents pressing the magic key and outputting s) instead of legs. This eliminates the GS SFB.

Another advantage of the magic key is that it can eliminate most same-key bigrams, which is simply not possible on traditional layouts. Most of the time, the magic key on Afterburner repeats the previous keystroke, so for a word like “all,” instead of typing all, it can be typed as al#l.

Here is the full list of magic rules for Afterburner:

RuleExample WordTyped As
aochaoscha#os
gslegsleg#s
hywhywh#y
uefuelfu#el
xtextraex#tra
yhanyhowany#how
Else repeatallal#l

That is, if no other rule matches, the magic key repeats the previous keystroke.

Afterburner is not the first layout to incorporate a magic key. The two best known layouts that use magic are Nordrassil and Magic Sturdy. Nordrassil prioritizes other design goals such as left hand in-rolls over pure SFB minimization, and the effectiveness of its repeat key is limited because repeat and space are on the same thumb. (For example, to type “all of,” using the repeat key for the second L would result in an L space SFB, so it is better to press L twice.) Magic Sturdy has very low SFBs and SKBs in practice, though it specs into reducing total keystrokes instead of focusing solely on same-finger usage optimization. Afterburner comes out ahead of both:

Same-Finger Bigrams, Including Same-Key (% of All Bigrams)

The new SFB minimum that Afterburner achieves is incremental. Magic Sturdy’s SFBs are higher than Afterburner’s mainly because of E', as in “he’d”; in contexts where contractions are not common, Magic Sturdy actually does slightly better in SFBs. (Afterburner achieves its SFB level with only one magic key, though, whereas Magic Sturdy needs two magic keys.) Afterburner’s real innovation is the new minimum it achieves for same-finger skipgrams (SFSs), which are defined as a trigram (three consecutive keystrokes) in which the same finger makes the first and third keystroke. SFSs is an important metric to minimize for fast typists because at high speeds—say, 150 WPM and above—the time it takes to move the finger from the first key to the third key becomes a bottleneck for typing speed.

Like the definition for SFBs, SFSs traditionally exclude skip repeats, which I call same-key skipgrams (SKSs): trigrams in which the first and third key are the same. The following chart shows both:

Same-Finger Skipgrams (% of All Trigrams)

The magic layouts Nordrassil and Magic Sturdy do not perform any better than non-magic layouts because magic keys can only fix SFBs and SKBs, not SFSs and SKSs. Afterburner introduces the concept of the skip magic key, which is a key whose output depends on the second-to-last keystroke, rather than the last keystroke like a normal magic key, to reduce SFSs and SKSs just like a magic key does for SFBs and SKBs. Afterburner demonstrates that a well-utilized skip magic key can reduce SFSs and SKSs by approximately one half.

Here is the full list of skip magic rules for Afterburner:

RuleExample WordTyped As
a_oanotheran$other
b_nbankba$nk
d_teditedi$t
f_sfastfa$st
g_schangeschange$s
h_yheyhe$y
j_yjoyjo$y
k_tmarketmarke$t
l_rcolorcolo$r
m_kmakema$ke
o_apersonalperson$al
p_nopenope$n
q_erequestrequ$est
r_lrollro$ll
u_efeaturefeatur$e
v_tinviteinvi$te
x_texitexi$t
y_hanythinganyt$hing
,_iso, Iso, $i
._iit. Iit. $i
-_iso - Iso - $i
/_a/tableflip/t$ableflip
;_etoo; evento#o; $even
Else skip-repeatnoneno$ne

Like the magic key, if no particular rule matches the second-to-last keystroke, the skip magic key repeats the second-to-last keystroke.

Putting everything together, we can show that when typing on Afterburner, over 96% of trigrams use three different fingers:

1-Finger and 2-Finger Trigrams (% of All Trigrams)

(SFT stands for same-finger trigram, which is a trigram in which all three keys are pressed using the same finger. The other four categories exclude SFTs to preserve mutual exclusivity. The bigram figures are different from the charts from earlier because when applied over trigrams, they count “trigrams that contain a bigram matching X predicate” rather than just “a bigram matching X predicate.”)

Moving beyond charts for abstract metrics, the impact of same-finger usage minimization can be visualized by mapping out their occurrences in sample passages:

Afterburner

A comput$er is a$machine that us$es electronics to input, proces#s, store, and output da$ta. Da$ta is information such as numbers, words, and list$s. $Input of da$ta means to read information from a$keyboard, a$stor$age device like a$hard drive, or a$sensor. The comput$er proces#ses or change$s the da$ta by fol#lowing the instructions in software programs. A comput$er program is a$list of instructions the comput$er has to perform. Programs usual#ly perform mathematical calculations, modify da$ta, or move it ar$ound. The da$ta is then saved on a$stor$age device, shown on a$display, or sent $to $another comput$er. Comput$ers can be con#nected $together to form a$network such as the internet, al#lowing the comput$ers to com#municate with each other.

A computer is a machine that uses electronics to input, process, store, and output data. Data is information such as numbers, words, and lists. Input of data means to read information from a keyboard, a storage device like a hard drive, or a sensor. The computer processes or changes the data by following the instructions in software programs. A computer program is a list of instructions the computer has to perform. Programs usually perform mathematical calculations, modify data, or move it around. The data is then saved on a storage device, shown on a display, or sent to another computer. Computers can be connected together to form a network such as the internet, allowing the computers to communicate with each other.

Legend:SFB/SKBSFS/SKS

Excerpt from Simple English Wikipedia

From these excerpts, we can see how QWERTY’s unusually high usage of the left middle, left index, and right index fingers create frequent SFBs and SFSs on those fingers. The speed at which these three fingers can handle frequent same-finger usage is a bottleneck for typing speed on QWERTY.

Night (along with other layouts in its class, such as Dusk and Racket) is about as good as you can get without a magic key, with almost all same-finger bigrams being double letters instead of two different letters. The same is true to a slightly lesser degree of well-optimized modern layouts without a letter on the thumb; the difference is small in absolute terms.

Magic Sturdy’s SFBs and SKBs are almost non-existent thanks to its two magic keys, but its SFSs and SKSs are relatively high for a modern layout. Afterburner’s reduction in SFSs and SKSs is especially visible when compared against Magic Sturdy.

It is common to not encounter a single same-finger bigram or skipgram (including same-key) for several words in a row, making typing feel incredibly smooth and flowing. When you have more time between consecutive uses of the same finger, you can pre-move several keystrokes in advance more consistently, letting you type faster without moving your fingers any faster.

Other Properties

Besides achieving new minimums for same-finger usage, Afterburner also performs competitively by other common metrics:

As for downsides:

Since Afterburner is a high-alternation layout (compared to other layouts, trigrams that alternate hands every keystroke are more common than average), long, difficult one-hand sequences are rare. They appear primarily in words that use Y as a vowel like “symphony” and “symbol.” These two words are especially difficult because the one-hand sequences contain multiple redirects, but fortunately, they are not too common. Common words tend to flow easily on Afterburner.

Alt fingering

Alt fingering refers to using a different finger than normal to press a key, typically to avoid an SFB or SFS. Afterburner is designed to focus most SFBs and SFSs onto the index fingers, and in particular onto the inner columns. This creates plenty of alt fingering opportunities. For example:

To aid with alt fingering, the magic key and skip magic key interact with each other in useful ways:

These behaviors come with a learning curve to use effectively, but they help to reduce many of the remaining same-finger usage. With all of the alt fingering possibilities on Afterburner, it is perhaps possible to eliminate around half of the remaining SFBs and SFSs, though due to the complexity and individual variations in alt fingering technique, I have not endeavored to do a rigorous analysis to prove this.

Implementation

Afterburner must be used on a programmable keyboard with extra thumb keys. I use the ErgoDox EZ, which runs QMK.

The magic key can be implemented using QMK’s Alternate Repeat feature. The skip magic key requires some modifications to QMK to extend the Repeat Key module’s key history to two entries instead of only one.

Discussion

Afterburner brings up some important questions about what value it adds and what directions are left to explore for future magic-enabled keyboard layouts.

Do skipgrams really matter?

The average typing speed among the general population is likely in the range of 30 to 50 words per minute, and the main bottleneck among this group is cognitive rather than physical: most people’s fingers are physically capable of moving faster than they can type. Thus, the vast majority of people will not benefit from a layout optimized for low SFSs. Afterburner is meant to be a meaningful improvement for people who are aiming for a speed of 150 WPM or above and are bottlenecked by physical finger speed.

What if you keep adding more magic keys?

More magic and skip magic keys can indeed further reduce SFBs and SFSs, but they are not free. They take up a position on the keyboard that could otherwise be occupied by a letter or punctuation key, meaning that to add more magic keys, some letters and/or punctuation keys will need to be pushed to the edges of the keyboard or onto layers. This limits the practical benefit of adding more magic keys. If you are really pushing it, you could probably add one more magic key, but beyond thay you would really start to sacrifice usability from the added finger movement.

One option to get around the physical space limitation is to add magic keys on combos. Some members of the AKL Discord are actively pursuing this idea. The downside of this is that combos require careful tuning of timing thresholds to avoid misfires, and this tuning is especially impactful at the high typing speeds that Afterburner is designed for.

What about text expansion?

Layouts that incorporate magic keys straddle the line between keyboard layouts and text expansion software. Magic Sturdy demonstrates this with its inclusion of briefs, meaning that pressing the magic key can output several characters in certain contexts. It could even be said that magic keys are a stepping stone to stenotype systems like Plover, which enable much higher typing speeds at the cost of a much steeper learning curve. Matt Skalecki, the creator of Magic Sturdy, is in fact no longer using Magic Sturdy, having created a more comprehensive keyboard firmware-level solution for text expansion called Sequence Transform.

Afterburner intentionally stays within the realm of one character per keystroke—not because I am opposed to text expansion or stenotype, but rather to test how efficient a layout can be under this constraint. A text expansion system like Sequence Transform could be used on top of Afterburner to further increase typing speed. The base layout is agnostic to any such system built on top of it, as it only dictates the arrangement of letters, common punctuation, and magic and skip magic keys.

Conclusion

Afterburner demonstrates the theoretical limits for same-finger usage reduction via magic keys. It is not for everyone, given the steep learning curve of the skip magic key and its requirement to be used with a programmable split keyboard, but for those who love optimization for its own sake, it is an interesting case study that might bring some new ideas into the keyboard layout design space.

It has been about a month since I started learning Afterburner, and I can now type around 80 words per minute on it. It has already replaced my previous layout, RSTHD, on my ErgoDox EZs. It will probably be at least half a year before I get back up to my previous speed of 140 words per minute, but once I get past my cognitive bottleneck, I am hoping to be able to speed up my typing to around 170 words per minute from the reductions in same-finger usage.

Published on