hex/ios/HEXShared/FullKeyboard
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 88c5165aef iOS keyboard: bilingual autocorrect for two Latin-script languages
With two or more keyboard languages, autocorrect and the strip also check
the first other chosen language with Latin letters and an iOS dictionary,
on the current keys, as Apple's "Français et English" keyboard does:
French with English beside it, English with French; Russian alone (Cyrillic)
and no partner for Serbian (no iOS dictionary) or between two French
layouts (one dictionary).

AutocorrectEngine gets a partner engine with its own UITextChecker language
and, where one is bundled (en, es), Spatial autocorrect's model reading the
same taps on the current layout. It shares your words (learned words, text
replacements, Learn how I type). Rules:
- a word either language knows as typed is never changed (only your text
  replacements still apply), so French "dont" never becomes "don't" and
  English "the" never becomes "thé";
- a typo only one language can fix gets that fix ("teh" -> "the" while
  French types);
- when both can, the language of the last few words only one dictionary
  knows wins, else the clearly cheaper slip on these keys, else the
  keyboard's own language;
- the strip interleaves both languages' fixes and completions, the leaning
  language first; spelling guesses only for a word neither knows;
- one-letter words stay with the keyboard's own language (UITextChecker
  takes every letter as a word, so English "i" still becomes "I").
Slip costs now use the layout you type on (layoutLanguage), so the partner
prices AZERTY neighbours on the French keys.

Measured in the iOS 27.2 simulator (testABilingualKeyboardKeepsBothLanguagesWords,
iOS dictionaries plus the English Spatial model, each word in an empty field):
the English keyboard alone changed 34 of 77 common French words (demain ->
remain, dont -> don't, que -> we, cette -> centre...) and the French keyboard
alone 28 of 80 common English words (was -> sas, then -> the, people ->
peuple...); with English and French chosen, 0 of either, typing in either
layout, and neither language's own words changed.

Verified: xcodebuild test FullKeyboardEngineTests, AutocorrectEngineTests
and KeyboardLayoutTests (91 tests, 0 failures), with new cases for the
rules on stub dictionaries, the real-dictionary sentence "Bonjour merci the
meeting est dont teh tomorow demian" -> "... the tomorrow demain" on the
French keyboard, and the pairing rule.
2026-11-20 17:01:49 -05:00
..
Emoji iOS: emoji panel no longer blurs on a real keyboard; taps and holds behave (#2070) 2026-11-20 16:58:50 +00:00
AccentPicker.swift iOS: Norwegian, Spanish and German full-keyboard layouts 2026-11-20 07:52:48 -05:00
AutocorrectEngine.swift iOS keyboard: bilingual autocorrect for two Latin-script languages 2026-11-20 17:01:49 -05:00
DeleteWordSwipe.swift iOS: keep key haptics while dictating, and slide left on delete to delete words (#2080) 2026-11-20 17:55:51 +00:00
FullKeyboardEngine.swift iOS keyboard: bilingual autocorrect for two Latin-script languages 2026-11-20 17:01:49 -05: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: Spatial autocorrect is on by default, under Settings › Keyboard (#2097) 2026-11-20 20:39:27 +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 keyboard: bilingual autocorrect for two Latin-script languages 2026-11-20 17:01:49 -05:00
HexKeyGesture.swift iOS: the keyboard starts listening on touch-down, with its capture page ready when it opens (#2089) 2026-11-20 20:04:35 +00:00
HexKeyViews.swift iOS: the keyboard starts listening on touch-down, with its capture page ready when it opens (#2089) 2026-11-20 20:04:35 +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 keyboard: choose several languages and switch them on the space bar 2026-11-20 17:01:49 -05:00
KeyboardLanguage.swift iOS keyboard: bilingual autocorrect for two Latin-script languages 2026-11-20 17:01:49 -05:00
KeyboardLayout.swift iOS: taps land on the intended key more often, and Spatial autocorrect keeps lowercase names (#2091) 2026-11-20 20:08:59 +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
never-suggest.tsv iOS: never suggest slurs, and swear words only when asked (#2093) 2026-11-20 20:17:31 +00:00
OffensiveWords.swift iOS: never suggest slurs, and swear words only when asked (#2093) 2026-11-20 20:17:31 +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: never suggest slurs, and swear words only when asked (#2093) 2026-11-20 20:17:31 +00:00
TypingJournal.swift iOS: Delete what Hex learned also forgets the words autocorrect learned to keep (#2101) 2026-11-20 21:28:27 +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