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:
- QWERTY, the ubiquitous default,
- Colemak, the most popular alternate layout,
- Gallium, the modern recommendation for beginners, and
- Night, the modern recommendation among thumb alpha layouts (that is, layouts that place a letter on the thumb).
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#
(where #
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#
.
Here is the full list of magic rules for Afterburner:
Rule | Example Word | Typed As |
---|---|---|
ao | chaos | cha#s |
gs | legs | leg# |
hy | why | wh# |
ue | fuel | fu#l |
xt | extra | ex#ra |
yh | anyhow | any#ow |
Else repeat | all | al# |
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:
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:
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:
Rule | Example Word | Typed As |
---|---|---|
a_o | another | an$ther |
b_n | bank | ba$k |
d_t | edit | edi$ |
f_s | fast | fa$t |
g_s | changes | change$ |
h_y | hey | he$ |
j_y | joy | jo$ |
k_t | market | marke$ |
l_r | color | colo$ |
m_k | make | ma$e |
o_a | personal | person$l |
p_n | open | ope$ |
q_e | request | requ$st |
r_l | roll | ro$l |
u_e | feature | featur$ |
v_t | invite | invi$e |
x_t | exit | exi$ |
y_h | anything | anyt$ing |
,_i | so, I | so, $ |
._i | it. I | it. $ |
-_i | so - I | so - $ |
/_a | /tableflip | /t$bleflip |
;_e | too; even | to#; $ven |
Else skip-repeat | none | no$e |
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:
(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$r is a$machine that us$s electronics to input, proces#, store, and output da$a. Da$a is information such as numbers, words, and list$. $nput of da$a means to read information from a$keyboard, a$stor$ge device like a$hard drive, or a$sensor. The comput$r proces#es or change$ the da$a by fol#owing the instructions in software programs. A comput$r program is a$list of instructions the comput$r has to perform. Programs usual#y perform mathematical calculations, modify da$a, or move it ar$und. The da$a is then saved on a$stor$ge device, shown on a$display, or sent $o $nother comput$r. Comput$rs can be con#ected $ogether to form a$network such as the internet, al#owing the comput$rs to com#unicate 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.
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:
- Weak redirects are very low, about the same level as Night. A weak redirect is a one-hand trigram that changes direction (e.g.
sad
orsds
on QWERTY) and does not involve either the index or thumb. Weak redirects are generally considered hard to type accurately at high speeds.IOU
is by far the most common weak redirect on Afterburner. It can be fixed by adding a magic rulei -> ou
; this rule is not included on the base version. - Scissors are very low. Scissors are loosely defined as uncomfortable stretches between keys on different rows; there is no universal definition of which stretches count as scissors, but they should be low under most definitions. The worst potentially-uncomfortable stretches are
CO
as in “could,”BY
as in “by,”UC
/CU
as in “much” and “cute,” andXP
, as in “expect.” I personally findCO
,BY
,UC
, andCU
comfortable, andXP
is rare enough that it’s not a big deal. - Lateral stretches are low to moderate. A lateral stretch is a left-to-right (technically, radioulnar or mediolateral) stretch that occurs when reaching for a key on the far outer or inner columns. The main issue here is the magic key on the inner column, though most of these stretches are between non-adjacent fingers, making them manageable. Still, inner column usage is still relatively high due to
M
and the magic key, making Afterburner most suitable for people with large hands. - Movement and same-finger usage is concentrated on the stronger fingers. The pinky and ring fingers have almost no same-finger bigrams or skipgrams, whether same-key or different-key.
As for downsides:
- The left pinky and left thumb each have two relatively common letters, making them high movement. With the magic and skip magic keys, the high movement is balanced out with low velocity, as most would-be SFBs and SFSs are removed using magic. However, the left thumb still has to tank the most common SFB,
RL
, at 0.05% of all bigrams. - The addition of the magic and skip magic keys mean that the total frequency of the 26 letters is spread across 28 keys, instead of 26 keys on traditional, non-magic layouts. This necessitates the placement of letters of keys that are harder to reach, such as the outer pinky columns and a second letter on the thumb.
- The skip magic key has a steeper learning curve than the magic key, both because there are more skip magic rules than magic rules and because it is harder to build up muscle memory for skipgrams, which are disjoint, than bigrams, which are continuous. In my experience, I have found that I gain muscle memory for specific trigrams. It is easy to get used to using skip magic for common trigrams such as
t t
(typed ast $
), but remembering to use skip magic for rare trigrams will take much longer.
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:
- The word “movement,” typed as
movem$nt
, has two SFSs when using standard fingering (m_v
andv_m
), but these can both be avoided by pressingV
with the middle finger instead of the index finger as usual. This alt fingering is easy and very comfortable. - The word “admit,” typed without magic, normally has the SFB
dm
and the SFSm_t
, but these can both be avoided by typing theD
andT
with the middle finger. - The word “develop,” which happens to be annoying to type on many alt layouts, can be alt fingered somewhat comfortably with no SFBs or SFSs:
dev$lop
, with using the middle finger to type theV
. Afterburner concentrates most 2u SFSs and SFBs (that is, SFSs and SFBs that have a distance of two key edge lengths) onto the index fingers. Index finger 2u SFBs and SFSs can be alt fingered by moving the middle finger two rows directly above the index finger. - There are also alt fingering opportunities on the right hand involving the magic key. For example, the word “follow” can be typed as
fol$ow
, with the secondO
typed with the middle finger and theW
typed with the ring finger, eliminating all of the SFBs and SFSs.
To aid with alt fingering, the magic key and skip magic key interact with each other in useful ways:
- If the skip magic key is pressed, then the magic key is pressed, the magic key will “repeat” the skip magic key’s behavior, meaning that the second to last keystroke will be repeated. Example: in the word “rule,” the skip magic rules
r_l
andu_e
both apply, so “rule” can be typed asru$#
. Using the middle finger for skip magic avoids the SFB. - Similarly, if the magic key is pressed, and then two keystrokes later the skip magic key is pressed, the skip magic key will “repeat” the magic key’s behavior, thus outputting whatever the magic key would have produced in the given context. Example: in the word “issue,” the magic rules
ss
andue
both apply, so “issue” can be typedis#u$
, with skip magic being typed with the middle finger to avoid the SFB.
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.