vmux
AppsvmuxKeyboardExtension

Swipe gestures

Swipe-to-type, the candidate bar, the spacebar trackpad, and every other touch gesture vmuxKeyboardExtension recognizes.

Swipe to type

Swipe typing lets you slide a finger across the letter keys instead of tapping each one. Lift your finger and the keyboard inserts the most likely word.

How it works

Touch down on the first letter, drag through each subsequent letter without lifting, then release on the last letter. While you drag, a fading tail shows your stroke path. While you are mid-stroke, the function row at the top is replaced by up to four word candidates — the keyboard's best guesses. Tap any candidate to commit that word instead. If you do nothing and just lift, the top candidate (the leftmost one, with the highest score) is committed automatically.

Behind the scenes the keyboard:

  • Resamples your stroke to a fixed-density polyline so finger speed does not matter.
  • Looks up words in a bundled English wordlist using the start and end keys you touched plus the rough length of your stroke.
  • Scores each candidate by how well its letter-center path matches your stroke — direction codes, point-by-point distance, and a small bonus for high-frequency words.
  • Adds a personal boost for words you have committed recently (and a penalty for words you immediately backspaced).

The wordlist is on-device. There is no network call, no analytics, no telemetry.

Candidate bar

While you are inside a word, the function row temporarily shows up to four word buttons. The candidate buttons share the same theme as the rest of the keyboard, and the highest-scoring word sits on the left. Each candidate button is a normal tap target — tap it once to insert the word, with a single trailing space, and the candidate bar disappears.

The candidate bar collapses back to the function row as soon as:

  • You commit a candidate.
  • You start typing a new word.
  • You delete the entire previous swipe.
  • You tap somewhere outside the keyboard.

Punctuation and shifted variants while swiping

Letters are the only key class that participates in swipe scoring. If your stroke crosses a non-letter key (a number, a bracket, the spacebar) the keyboard splits the path into segments — letters become a swipe candidate; the non-letters are inserted literally in order. In practice, this means you can swipe linux and end on a punctuation key to insert a period in one motion.

Turning swipe off

Open the vmux Keyboard host app from your home screen. Toggle Enable Swipe Typing off. The keyboard immediately stops decoding strokes — every drag becomes a no-op and lifting your finger triggers a single tap on the key under your fingertip, like the system keyboard. Toggle it back on at any time.

You can also temporarily defeat swipe by tapping each letter in place (lift between every letter). Single taps never enter the swipe decoder.

Trackpad mode on the spacebar

Long-press the spacebar to turn it into a trackpad for cursor movement. This is faster than tapping the arrow keys when you need to move more than a few cells.

How to enter

  1. Tap and hold anywhere on the wide spacebar.
  2. After about a quarter second of staying mostly still (less than 12 pt of finger movement), the keyboard switches into trackpad mode and the visible swipe tail switches to a different color.
  3. Slide your finger in any direction.

How it sends arrows

In trackpad mode the keyboard does not insert text. It accumulates your finger motion and emits one arrow keypress for every 14 pt of movement on the screen:

Finger motionWhat is sent
RightESC [ C (right arrow)
LeftESC [ D (left arrow)
DownESC [ B (down arrow)
UpESC [ A (up arrow)

Diagonal motion alternates between the dominant axes. Modifiers are intentionally cleared on entry to trackpad mode — Shift+drag does not select; it just moves the cursor — because most shells do not understand modified arrow keys reliably across SSH.

How to leave

Lift your finger. The next time you tap the spacebar normally, you get a single space; trackpad mode only activates after the long-press hold timer expires.

Other gestures

GestureWhat it does
Tap a keyInserts the key's primary character or runs the special function.
Tap a sticky modifier (Ctrl, Alt, Shift, Cmd, Fn)Arms it for the next keystroke. Tap again to disarm.
Tap CapsLockToggles persistent uppercase. Tap again to release.
Drag from a letter to another letterSwipe typing (above).
Long-press spacebar then dragTrackpad mode (above).
Tap the globe keyCycle to the next system keyboard.
Long-press the globe keyOpen the keyboard picker for direct selection.
Long-press a candidate wordCurrently inserts the word the same as a tap. (Reserved for a future "remove from learned list" action.)

Hysteresis when fingers move between keys

Each key has a 12 pt hysteresis margin. Once your finger is registered on a key, the keyboard prefers to keep that key active until you cross the margin into a neighbor. The reason is shaky-finger tolerance — without the margin, swipe typing along a row would flicker between adjacent keys and produce noisy strokes. With it, the decoder sees a clean letter-center sequence even when your finger drifts.

Adapting to your typing

The keyboard maintains a small personal dictionary that lives in your device's UserDefaults:

  • Each time you commit a candidate (by tap or by lift), that word's frequency goes up.
  • Each time you immediately backspace a committed word, its frequency goes down (and the entry is removed if the count reaches zero).
  • The boost decays with a seven-day half-life, so words you used heavily a month ago do not crowd out current vocabulary.
  • The dictionary is capped at 500 entries; the least-recently-used entries are evicted first.

The personal dictionary stays on your device. It is never uploaded, never shared with the host app, and never read by anything other than the keyboard extension itself.

Limitations

  • Swipe typing is currently English-only and ASCII-only — non-Latin scripts are not in the wordlist.
  • Compound shell phrases (git push) require two strokes — there is no inter-word path.
  • Numbers and symbols cannot be predicted; they always insert literally.
  • Swipe is disabled while a sticky modifier is armed (the next keystroke is treated as a chord, not a swipe start).

See also