3 Repeat and Magic Key
jasmine edited this page 2025-10-18 05:58:01 +08:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Repeat and Magic Key

Two intelligent repeat mechanisms on the thumb keys that reduce keystrokes and improve typing flow. Inspired by magic sturdy by Ikcelaks.

Repeat Key

Replays the last key press with intelligent overrides for common patterns.

Repeat Key Overrides

First Key Output Result Frequency
A nd and 3.293%
I ng ing 3.476%
Y ou you 3.492%
N f nf 0.036%
B ecause because -
W ould would -
, and , and -
Space for for -

Path Shortcuts

Keys Output
` + Repeat ~/
. + Repeat ../
. + Repeat × 2 ../../

Magic Key

Context-aware completions based on the previous key. Reduces same-finger bigrams and enables common suffixes.

Same Finger Bigrams

First Key Output Bigram Frequency
Y S YS 0.123%
E O EO 0.121%
R L RL 0.114%
U I UI 0.073%
O E OE 0.060%
P T PT 0.050%
S Y SY 0.024%
D G DG 0.021%

Magic Suffixes

First Key Output Example
B efore before
I on ion, action, question
J ust just, adjust
M ent ment, moment, movement
N ion nation, station
T ment treatment, investment
V er over, never, ever
W hich which
X es fixes, boxes
, but text, but more text
Space the the

Coding Shortcuts

Compound Assignment:

First Key Output Result
+ = +=
- = -=
* = *=
/ = /=

Auto-pair Cursor Positioning:

First Key Output Result (│ = cursor)
> Left <│>
) Left (│)
] Left [│]
} Left {│}

Usage Examples

Natural Language

Type: "n" + Magic → "union, opinion"
Type: "treat" + Magic → "treatment"
Type: "b" + Repeat → "because"
Type: "y" + Magic → "ys" (avoiding SFB)

Coding

Type: "count +" + Magic → "count +="
Type: "{}" + Magic → "{│}" (cursor inside)
Type: "array[" + Magic → "array[│]"

Reference

For the complete implementation, see our keymap.c.