mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-28 13:02:21 +01:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
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.
|
||
| .. | ||
| Emoji | ||
| AccentPicker.swift | ||
| AutocorrectEngine.swift | ||
| DeleteWordSwipe.swift | ||
| FullKeyboardEngine.swift | ||
| FullKeyboardPalette.swift | ||
| FullKeyboardSettings.swift | ||
| FullKeyboardView+Emoji.swift | ||
| FullKeyboardView.swift | ||
| HexKeyGesture.swift | ||
| HexKeyViews.swift | ||
| KeyboardClipboard.swift | ||
| KeyboardKeyPlaneView.swift | ||
| KeyboardLanguage.swift | ||
| KeyboardLayout.swift | ||
| KeyboardStripView.swift | ||
| never-suggest.tsv | ||
| OffensiveWords.swift | ||
| ShiftStateMachine.swift | ||
| TypingDecoder.swift | ||
| TypingJournal.swift | ||
| TypingJournalLearning.swift | ||