No description
  • Rust 78.5%
  • JavaScript 6.6%
  • TypeScript 4%
  • HTML 4%
  • Shell 2%
  • Other 4.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 2863cd6507
iOS: delete keeps an autocorrection and the strip offers the revert, smart quotes, a two-way trackpad, and key clicks (#2192)
* iOS: delete after an autocorrection takes only its space, and the strip offers what you typed

X tester Brandon McConnell (and a TestFlight tester about text replacements, fixed in
uncorrected version." Apple's keyboard doesn't (black box, iOS 27.2 simulator, a
UITextView): after "becuase " became "Because ", delete took only the space and the text
view showed "Becuase" with an undo arrow; space then kept "Because ", a letter continued
the word, a second delete took a letter, a comma went like a space, tapping the bubble put
"Becuase" back without the space, and deleting back to the word later brought the bubble
back. Revisions ("well see " -> "We'll see ", bubble "Well see") and splits ("ofthe" ->
"Of the", bubble "Ofthe") work the same.

Removed: Hex's deliberate "one backspace undoes the correction" (FullKeyboardEngine.
deleteBackward's undo branch and AutocorrectEngine's pending undo, consumed by the next
delete). Replaced by:
- AutocorrectEngine.lastCorrection keeps the latest autocorrection with what was typed,
  what went in and an anchor (the text before the cursor right after it); it is offered
  while the text before the cursor reads that again (its last 64 characters for long
  text), and forgotten on a new field, a new language or a newer correction. The many
  clearPendingUndo calls after other input are gone: the anchor check covers them.
- KeyboardSuggestion.Kind.revert: the strip's left slot shows it in place of the word as
  it reads, pill-highlighted with Apple's undo arrow (a keyboard can't draw a bubble in
  the host's text). Tapping it puts back what was typed, suppresses the fix for the
  session, and counts as an undone autocorrection for Learn how I type and Adaptive touch
  (whose word taps the delete of the space now keeps for it). Typing logs: autocorrect_undo
  with src strip, context why revert.
- Merges, splits and #2144's revisions go through the same record.
- deleteBackward's allowAutocorrectUndo is now takesSwipeBack: it only gates a swipe's
  whole-word delete, which stays.

Verified on the Studio (iPhone 17, iOS 27.2 simulator): AutocorrectEngineTests,
FullKeyboardEngineTests and TypingLogTests pass (updated: the keep loop, the revision,
the edge-space join, punctuation and Adaptive touch tests now revert from the strip; new:
testDeleteAfterAnAutocorrectionTakesOnlyItsSpaceAsOnApplesKeyboard with the black-box
cases).

* iOS: smart quotes and dashes as the system keyboard types them, per language

X tester Brandon McConnell: "no smart quotes/etc." Hex typed straight quotes and two
hyphens everywhere. Apple's keyboard (black box, iOS 27.2 simulator, a UITextView with
each trait on and off, a text field, Messages, and 15 of its keyboards):
- ' and " open at the start, after a space or new line, a bracket or an opening quote,
  and close elsewhere: 'hi' it's "yes" ("ok") 5'9" became ‘Hi’ it’s “yes” (“ok”) 5’9”.
- A second hyphen makes an em dash (a--b is a—b, a third stays a hyphen, delete takes
  the dash whole); " - " stays.
- Autocorrect's apostrophes are ’ (Don’t, I’ll), and the strip shows I’m.
- smartQuotesType or smartDashesType .no turns each off; Messages' composer types
  straight quotes and -- (both off there).
- Quotes per keyboard: „ “ ‚ ‘ in German and Swiss German (the apostrophe key types ‘
  even inside a word), « » with no-break spaces inside in French, Canadian and Swiss
  French, „ ” ‚ ’ in Polish, « » in Norwegian, Russian and Ukrainian, “ ” ‘ ’ in English,
  Spanish, Italian, Portuguese and Romanian. Serbian (no simulator keyboard) gets the
  English ones.
- smartInsertDeleteType changed nothing it types: after a picked suggestion, , . ! ? ;
  : ) took the suggestion's space ("Hello,") with it on or off; " ( @ kept it, and so did
  a space typed by hand ("Hello .").

Hex now does the same:
- SmartPunctuation.swift: SmartQuotes per KeyboardLanguage, curled() for typed keys and
  for autocorrect, suggestion, swipe and revert text, the em dash in typeIntoField, and
  the strip's apostrophes (displayed). Accent picks, emoji and text replacements go in as
  they are. KeyboardTextTarget gains smartQuotesType and smartDashesType (the proxy's;
  nil, off, for fixtures); .default counts as on, Smart Punctuation's default, which a
  keyboard can't read.
- The keys still reason with straight quotes: FullKeyboardEngine reads textBefore, the
  field's text with curly quotes made straight one for one (SmartPunctuation.plain), so
  tokens, revisions, reverts and swipes keep matching what they typed.
- dropsSuggestionSpace: , . ! ? ; : ) right after a picked suggestion delete its space.
- AutocorrectEngine.midSentenceMarks gains ' (what ’ reads as now).

Verified on the Studio (iPhone 17, iOS 27.2 simulator): AutocorrectEngineTests,
FullKeyboardEngineTests, TypingLogTests and EmojiSuggesterTests pass, with new
testSmartQuotesAndDashesFollowTheFieldAsOnApplesKeyboard, testSmartQuotesFollowTheKeysLanguage
and testMarksGoAgainstAPickedSuggestion. Live in the simulator's HEXKeyboard (Release, App
Group) in a UITextView host: 'hi' it's "yes" well--known dont typed ‘hi’ it’s “yes”
well—known don’t, straight quotes with smartQuotesType .no, well--known with smartDashesType
.no, and the strip showed I’m.

* iOS: the space-bar trackpad moves up and down lines, as the system keyboard's does

X tester Brandon McConnell: "holding down on the space bar only allows scrubbing
horizontally, whereas Apple's keyboard treats it like a cursor on both x/y axes".

Apple's (black box, iOS 27.2 simulator, iPhone 17, a UITextView with 17 pt text and
20.3 pt lines, the caret read back from the host): after the hold, the caret moved a line
every 15 to 16 pt of finger travel up or down, the first after about 8 (crossings at 9,
24, 39, 54, 72 and 87 pt both ways), kept its x, and stayed on the first or last line
past them; in a wrapped paragraph it moved by a wrapped line (about 43 characters in a
360 pt line). Along a line it moved about a character per 6 pt and stopped at the line's
ends.

A keyboard can only move the cursor by characters (adjustTextPosition), so
TrackpadCursor works out the line before or after from the text the field shares around
the cursor: lines split at new lines and every lineLength characters (the keyboard's
width less 40 pt, at 8.2 pt a character, as the field's width and font can't be read),
at the same column, kept across short lines until a move along the line. Vertical steps
are trackpadPointsPerLine (15.5 pt), the first half as far; past the first or last line
the cursor stays and coming back moves it at once. Horizontal movement is unchanged (7.5 pt
a character, crossing line ends as before).

The host's context lags the moves: in the simulator a second line up read the text from
before the first, and after a move the host shared only the cursor's own line. So each
gesture keeps a copy of the text (TrackpadCursor.State) and adds the host's context once it
has caught up (it reads the same either side of the cursor). Lines the host never shares
stay out of reach. KeyboardTextTarget gains documentContextAfterInput.

Not done: Apple's tap with a second finger while holding space starts a selection. The
iOS 27.2 SDK's UITextDocumentProxy has documentContextBeforeInput/AfterInput, selectedText
(read-only), documentInputMode, documentIdentifier, adjustTextPosition(byCharacterOffset:),
setMarkedText(_:selectedRange:) and unmarkText, and UIInputViewController nothing more: no
public API makes or extends a selection, and marked text would type provisional text into
the field, so Hex doesn't fake it.

TrackpadCursor is surface-independent so the dictation bar's trackpad (#2180) can use it
too; it isn't wired there here.

Verified on the Studio (iPhone 17, iOS 27.2 simulator): FullKeyboardEngineTests (new
testTheSpaceBarTrackpadMovesUpAndDownLines), AutocorrectEngineTests and EmojiSuggesterTests
pass. Live in the simulator's HEXKeyboard (Release) in a UITextView with four lines: from
the end, holding space and sliding up moved the cursor 88 -> 64 -> 41 -> 20 (each line up,
same column), further up kept it on the first line, and sliding back down returned it 41 ->
64 -> 88; nothing was typed.

* iOS: key clicks: the keyboard's input view adopts UIInputViewAudioFeedback

TestFlight: "Cannot hear the iOS typing sound when using your keyboard. Need the clicky
sound for my dopamine pls."

Hex already called UIDevice.playInputClick() on every key's touch-down, but the
UIInputViewAudioFeedback conformance sat on FullKeyboardView, a subview; UIKit plays the
click only for the input view itself. In the iOS 27.2 simulator's keyboard log, typing
"abc" and a delete reached AudioServices' system sound 1104 0 times with the old view and
4 times (one per press) with the new one.

- KeyboardInputView (HEXKeyboard): a UIInputView adopting UIInputViewAudioFeedback, with
  enableInputClicksWhenVisible true. KeyboardViewController.loadView keeps UIKit's own input
  view's style, size and sizing flags but makes it this class; nothing else in the
  controller's lifecycle changes.
- Removed: FullKeyboardView's UIInputViewAudioFeedback conformance, which did nothing.
  keyFeedback plays the click first, through a playInputClick seam tests count.
- The dictation bar's key feedback clicks too.
- One click for every key (delete, shift, 123 and return included, and each delete repeat):
  Apple's keyboard plays other sounds for delete and the modifier keys, but the click is the
  only keyboard sound the API offers a keyboard.
- No setting: the click follows Settings › Sounds & Haptics › Keyboard Feedback › Sound
  (in the simulator, keyboard-audio NO in com.apple.preferences.sounds made it play none).
  Apple's custom keyboard guide lists playing keyboard clicks among the things that need
  open access; the simulator played it with the keyboard's Full Access rows removed too, so
  Hex calls it either way and iOS decides.

Verified on the Studio (iPhone 17, iOS 27.2 simulator): FullKeyboardEngineTests (new
testEveryKeyClicksOnTouchDown) and HexKeyGestureTests pass; the Release HEXKeyboard
launched, laid out and typed as before in a UITextView host, with the click counts above.
A real iPhone must confirm the sound itself, with Full Access on and off.
2026-11-21 09:22:10 -05:00
.cargo Add KB-Whisper Medium for Swedish (#1991) (#1992) 2026-11-19 05:44:56 -05:00
.cloudflare/cache ci(aur): a dispatchable check that the AUR accepts the deploy key 2026-10-23 14:41:55 -04:00
.config feat(onboarding): the first run is one story, from a bad conversation to your first words (#1501) 2026-11-09 17:29:51 -08:00
.github Set up Hex Mobile internal TestFlight releases (#1997) 2026-11-19 11:48:49 -05:00
android Bump Hex Android to 0.1.1 (build 2) for internal testing (#2082) 2026-11-20 18:09:21 +00:00
app Keep the old Sparkle key so 2.3.1 and Swift Hex can update into the new Hex (t1217) (#1092) 2026-11-02 21:44:19 -08:00
assets Show Jay's photo in onboarding (#1630) 2026-11-10 13:41:20 -08:00
crates annotate: record the screen under the pointer on wayland (labs), list hex annotate without a shortcuts portal (#2094) 2026-11-20 15:58:16 -05:00
design Captures: the Scrawl capsule and ink overlay on Rune 2026-10-26 10:48:55 -07:00
docs ios: learn each language separately (experiment) (#2188) 2026-11-21 09:00:58 -05:00
ios iOS: delete keeps an autocorrection and the strip offers the revert, smart quotes, a two-way trackpad, and key clicks (#2192) 2026-11-21 09:22:10 -05:00
macos/HexMicrophoneDriver feat(macos): the app is anomaly.hex, a new app to macOS, from the first Anomaly-signed release 2026-10-23 14:57:13 -04:00
native macOS: close the Screen Recording guide once Hex reads the grant (#2086) 2026-11-20 14:50:03 -05:00
nix fix: drop parakeet's padding mel frame before the encoder (#2072) (#2076) 2026-11-20 13:01:29 -05:00
packaging windows: sign the setup engine so smart app control can run setup (#1987) 2026-11-19 02:38:03 -05:00
perf perf: listening bench waits for the listener before measuring rest (#1615) 2026-11-09 16:19:11 -06:00
prototypes/app-shell Rename voice-control to hex everywhere, without migrations (#293) 2026-10-28 13:08:44 -04:00
release-notes feat: add local transcription service and resilient capture 2026-07-21 14:22:12 -04:00
resources linux: recolor the tray mark with the panel's text color (#1691) 2026-11-11 10:46:08 -05:00
scripts ci: make linux installer fixture server startup robust (#2168) 2026-11-21 04:24:19 -05:00
sdk add fluid speech pro to the speech model catalog (#2007) 2026-11-19 15:19:06 -05:00
site feat(labs): make six everyday features available without switches (#1922) 2026-11-21 02:08:17 -08:00
skills/hex-personal-commands docs: rewrite README minimal, shorten CONTRIBUTING 2026-11-01 12:44:35 -05:00
src windows: back off the dictation HUD after a failed show instead of rebuilding it every dictation (#2177) 2026-11-21 07:12:18 -05:00
tests feat(labs): make six everyday features available without switches (#1922) 2026-11-21 02:08:17 -08:00
.gitignore iOS: German autocorrect capitalises common nouns (haus, auto, zeit) (#2169) 2026-11-21 05:30:03 -05:00
.hivemind.toml feat(land): add declarative .hivemind.toml land queue + Hex.app swap (t811) (#387) 2026-10-29 09:52:47 -07:00
.markdownlint-cli2.jsonc feat: unify desktop modes and platform runtime 2026-07-23 17:33:22 -04:00
AGENTS.md feat(labs): make six everyday features available without switches (#1922) 2026-11-21 02:08:17 -08:00
build.rs feat(onboarding): the first run is one story, from a bad conversation to your first words (#1501) 2026-11-09 17:29:51 -08:00
Cargo.lock fix: drop parakeet's padding mel frame before the encoder (#2072) (#2076) 2026-11-20 13:01:29 -05:00
Cargo.toml fix: drop parakeet's padding mel frame before the encoder (#2072) (#2076) 2026-11-20 13:01:29 -05:00
clippy.toml Add agent marker and drop internal references (#702) 2026-10-31 18:30:32 -07:00
CONTRIBUTING.md docs: rewrite README minimal, shorten CONTRIBUTING 2026-11-01 12:44:35 -05:00
flake.lock feat(linux): add wlroots Wayland support and Nix packaging (#36) 2026-08-28 12:05:21 -04:00
flake.nix nix: build for aarch64-linux (#1057) 2026-11-02 14:11:35 -05:00
LICENSE feat: unify desktop modes and platform runtime 2026-07-23 17:33:22 -04:00
README.md Add KB-Whisper Medium for Swedish (#1991) (#1992) 2026-11-19 05:44:56 -05:00
ROADMAP.md Roadmap: Hex Mobile clipboard history (#2167) 2026-11-21 08:55:35 +00:00
SECURITY.md Rename voice-control to hex everywhere, without migrations (#293) 2026-10-28 13:08:44 -04:00
strobe.json perf: listening bench waits for the listener before measuring rest (#1615) 2026-11-09 16:19:11 -06:00
THIRD_PARTY_NOTICES.md add fluid speech pro to the speech model catalog (#2007) 2026-11-19 15:19:06 -05:00

Hex

Hex is local voice dictation for Mac, Windows and Linux. Hold a key, speak, and it pastes.

How it works

  • hold the shortcut, speak, then let go
  • Hex transcribes on your device and pastes into whatever app you're in
  • the first run downloads a speech model; after that nothing leaves your machine
  • experimental features live in Labs, at the bottom of the sidebar

What it does

  • hold the shortcut to dictate, or set Shortcut mode to Tap to start and stop with a press
  • the text lands at the cursor in whatever app you're in
  • Option-Shift-V pastes the last dictation again (Ctrl-Alt-V on Windows and Linux)
  • History keeps your dictations, searchable, for 7 days by default
  • Output runs every dictation through steps you choose (word replacements, built-in cleanups, your own scripts, an optional OpenCode rewrite), with different steps per app or website
  • Vocabulary is one list of names Hex should know; Whisper and Qwen3-ASR read it while transcribing, Parakeet models read it with Labs › Vocabulary help on, and the OpenCode rewrite uses it
  • Annotate records the screen while you draw and talk, on macOS, Linux and Windows (GNOME Wayland needs Labs › Annotate on GNOME)
  • an authenticated local API and the TypeScript SDK transcribe with the same model, for your own tools
  • Meetings is a macOS lab that records a call and writes the transcript

Output and History:

Hex output: the steps every dictation runs, a Try box, and different steps per app Hex history: past dictations, a search field, and one entry's raw transcript, app, processing and model

Speech models

Hex downloads one model the first time it runs and transcribes with it on your machine from then on. On an English system that's Parakeet Unified English: it writes while you talk, so the text is ready when you let go. Other languages start with the model recommended for them. That model also serves meetings and hex transcribe.

Settings' picker offers more, among others:

  • Parakeet v3: 25 European languages, and it hears which one you speak
  • Cohere Transcribe: the fewest wrong words, in 14 languages; a big download
  • Whisper large-v3-turbo: almost any language, and it reads your vocabulary
  • Qwen3-ASR 0.6B: Chinese and 29 more, and it reads your vocabulary
  • SenseVoice Small: Chinese, Japanese, Korean and English; a small download
  • Nemotron 3.5 ASR: writes while you talk, in 27 languages
  • Granite Speech 5.0: IBM's model, seven languages, with punctuation
  • one-language models: ivrit.ai Whisper for Hebrew, GigaAM v3 for Russian, NB-Whisper for Norwegian, KB-Whisper for Swedish, QwenCleo-ASR for Egyptian Arabic
  • more English models: Parakeet v2 and Underdog Bark 3.0

Add a GGUF model of your own with "Add model file…" in the picker; see your own speech models.

Downloads

Stable is the current release. Dev is the newest build of dev and updates itself from the dev channel.

Platform Stable Dev
macOS (Apple silicon) DMG DMG
Windows x64 Installer Installer
Windows ARM64 Installer Installer
Linux x86_64 Executable Executable
Linux x86_64 (Debian, Ubuntu) .deb .deb
Linux x86_64 (Fedora, openSUSE) .rpm .rpm
Linux ARM64 Executable Executable
Linux ARM64 (Debian, Ubuntu) .deb .deb
Linux ARM64 (Fedora, openSUSE) .rpm .rpm

Or install with:

  • Homebrew: brew install --cask anomalyco/tap/hex
  • AUR: yay -S hex-bin
  • install script (Linux): curl -fsSL https://anoma.ly/hex/install-linux.sh | sh
  • Nix (Linux): nix profile add github:anomalyco/hex

Command line

hex transcribe meeting.m4a prints a recording's transcript, whether or not the app is running. It reads WAV, AIFF, CAF, FLAC, MP3, Ogg, WebM, and MP4/M4A/MOV, including a video's soundtrack. The same hex controls the running app (hex status, hex dictation, hex settings); see docs/cli.md.

On macOS the CLI is inside the app. Homebrew links it for you; otherwise link it somewhere on your PATH that you own:

ln -s /Applications/Hex.app/Contents/MacOS/hex ~/.local/bin/hex

Linux and Windows installs put hex on your PATH.

More docs are in docs/.

Contributing

We don't take pull requests. Open an issue describing the bug or idea, and our agents usually turn it around fast.

MIT licensed.