hex/ios/HEXShared/FullKeyboard
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 9a06976d0e
iOS: Italian, French and Portuguese layouts that autocorrect in their own language; spoken @ and email addresses (#2069)
* iOS: Italian, French and Portuguese full-keyboard layouts that autocorrect in their own language

A TestFlight tester on build 31 with an Italian iPhone reported that Hex kept
autocorrecting their Italian into English. KeyboardLanguage only knew en, nb, es
and de, so Automatic mapped an it-IT dictation language (and any other language
without a layout) to English: English letters, and UITextChecker's en_US
dictionary rewriting Italian words.

Adds italian/french/portuguese cases. They type on the English QWERTY rows
(Apple's Italian and Portuguese keyboards are QWERTY; Hex has no AZERTY yet, so
French is QWERTY too), with their own long-press accent order (Italian à è ì ò ù,
é right after è), their UITextChecker dictionary (it, fr, pt_BR then pt_PT), and an
Italian common two-letter list. Automatic now resolves it-*, fr-* and pt-* to these;
the dictation language still wins over the iPhone's keyboards, and Hebrew or
Russian still get English. Automatic deliberately ignores Hex's own input mode:
its primaryLanguage is the Info.plist's en-US whatever you type. Spatial
autocorrect (#2059) only has en and es models; the new layouts get no model and
fall back to the dictionary engine in their own language (the decoder also
refuses a model of another language). The space bar already names the dictation
language ("Italiano").

Snapshot scenes get Italian, French and Portuguese drafts
(--dictation-language it-IT, --keyboard-layout it|fr|pt).

Verified on an iOS 27.2 iPhone 17 Pro simulator: full HEXMobileTests suite
(272 tests, 0 failures, 1 skipped as before). New cases in KeyboardLayoutTests,
AutocorrectEngineTests and FullKeyboardEngineTests. Measured on 12 Italian
sentences (19 one-slip typos, 59 correct words) with the real dictionary:
English fallback fixed 4, miscorrected 4 and broke 19 correct words
(Domani->Domain, stai->stay, Sono->Soon, molto->moto); Italian fixed 17,
miscorrected 0 and broke none. Renders of the Italian keyboard (typing with the
"ritardo" suggestion, the E and I accent menus, "Italiano" on the space bar)
checked by eye.

* iOS: spoken "at the rate" and "at sign" become "@", joining a spoken email address

An Indian English TestFlight tester (build 32) said "at the rate", India's name for
@, and got the words. Apple's on-device models don't fix it: checked on macOS 27.2
with Hex's settings and an en_IN voice, SpeechTranscriber (Hex's default) writes
"My email is John at the rategmail.com." and "Send it to Priya at signyahoo.com."
(gluing the domain to the word before), and DictationTranscriber writes "at the
rate gmail.com", though it already writes "priya@yahoo.com" for "at sign" and
"john@gmail.com" for "john at gmail dot com".

SpokenCleanupRules.spokenSymbols (English only) turns "at the rate" and "at sign"
into "@". Before a domain ("gmail dot com", "gmail.com", "co dot in", or glued as
above), the word before (with any "dot"-joined parts) and the domain join into one
lowercase address, "dot" becoming "." only there: "John at the rate Gmail dot com."
becomes "john@gmail.com.". "at the rate" counts only before a domain, so "at the
rate of 5%" and "at the rate we planned" stay, and "at" alone is never touched;
"at sign" elsewhere is a lone "@" (but not in "at sign language"). Only the
matched words change.

It runs from CleanupTagger.cleanIfEnabled, which both the app's and in-keyboard
dictation call: in every style but Verbatim, with Clean up what I say on or off
(the experiment's guard moved below it; the tagger itself still only runs when on).

TranscriptFormatter: Polished capitalized after every full stop, which would have
written "john@gmail.Com."; a sentence now starts only after ".", "!" or "?" and a
space, an address keeps its case (Polished and Notes), and a lone address gets no
full stop.

Verified on an iOS 27.2 simulator: full HEXMobileTests suite (272 tests, 0
failures, 1 skipped as before), with new cases in TranscriptCleanupTests (Apple's
real outputs included) and CleanupTaggerTests.
2026-11-20 16:43:10 +00:00
..
Emoji iOS: emoji panel with on-device suggestions (Experiments › Emoji) (#2051) 2026-11-20 15:53:24 +00:00
AccentPicker.swift iOS: Norwegian, Spanish and German full-keyboard layouts 2026-11-20 07:52:48 -05:00
AutocorrectEngine.swift iOS: spatial autocorrect experiment with Google Books models, plus accent and two-letter fixes (#2059) 2026-11-20 16:18:07 +00:00
FullKeyboardEngine.swift iOS: spatial autocorrect experiment with Google Books models, plus accent and two-letter fixes (#2059) 2026-11-20 16:18:07 +00:00
FullKeyboardPalette.swift iOS keyboard: follow the keyboard's live traits for light and dark, not the proxy's appearance (#2050) 2026-11-20 15:53:21 +00:00
FullKeyboardSettings.swift iOS: full keyboard by default, typing without Full Access, and a logging mark (#2067) 2026-11-20 16:41:37 +00:00
FullKeyboardView+Emoji.swift iOS: emoji panel with on-device suggestions (Experiments › Emoji) (#2051) 2026-11-20 15:53:24 +00:00
FullKeyboardView.swift iOS: full keyboard by default, typing without Full Access, and a logging mark (#2067) 2026-11-20 16:41:37 +00:00
HexKeyGesture.swift iOS: fix six TestFlight tester issues (audio error, leaked error text, Live Activity, haptics, capitals, push to talk) (#2035) 2026-11-20 13:21:16 +00:00
HexKeyViews.swift iOS: full keyboard by default, typing without Full Access, and a logging mark (#2067) 2026-11-20 16:41:37 +00:00
KeyboardClipboard.swift Replace the keyboard's blank Paste control with a Paste chip (#2011) 2026-11-19 21:06:32 +00:00
KeyboardKeyPlaneView.swift iOS: emoji panel with on-device suggestions (Experiments › Emoji) (#2051) 2026-11-20 15:53:24 +00:00
KeyboardLanguage.swift iOS: Italian, French and Portuguese layouts that autocorrect in their own language; spoken @ and email addresses (#2069) 2026-11-20 16:43:10 +00:00
KeyboardLayout.swift iOS: emoji panel with on-device suggestions (Experiments › Emoji) (#2051) 2026-11-20 15:53:24 +00:00
KeyboardStripView.swift iOS: full keyboard by default, typing without Full Access, and a logging mark (#2067) 2026-11-20 16:41:37 +00:00
ShiftStateMachine.swift iOS: full keyboard experiment flag, key layout and shift model (#910) 2026-11-01 12:43:35 -08:00
TypingDecoder.swift iOS: spatial autocorrect experiment with Google Books models, plus accent and two-letter fixes (#2059) 2026-11-20 16:18:07 +00:00
TypingJournal.swift ios: learn dictation and typing fixes from edits (Learn how I type) (#2022) 2026-11-20 01:04:58 +00:00
TypingJournalLearning.swift ios: learn dictation and typing fixes from edits (Learn how I type) (#2022) 2026-11-20 01:04:58 +00:00