hex/ios/HEXShared
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 33c2a4ed3a
iOS: choose QWERTY, QWERTZ, AZERTY or Dvorak per keyboard language (#2172)
* iOS: arrange each keyboard language's letters on another layout (engine)

TestFlight (build 56, iPhone 16 Pro, iOS 27.0.1): a German tester types on
the English keyboard but wants QWERTZ, which Apple's Settings offers and
Hex didn't. This adds KeyboardLetterLayout (own, QWERTY, QWERTZ, AZERTY,
Dvorak) and, per language, the layouts Apple's Keyboard Layout list offers
for it, observed black box in the iOS 27.0 simulator (Settings › General ›
Keyboard › Keyboards › Add New Keyboard, and each layout typed on in
Messages, read from screenshots and the accessibility tree only). Each
language's own (today's) layout stays first and is the default.

- KeyboardLanguage.letterRows(_:) builds the rows; the plain layouts are the
  same 26 letters in every language (as on Apple's). French's "– French"
  variants differ only by the ´ key Hex already leaves out, so French
  offers the plain three.
- letterHolds(on:) keeps the language's holds and, on a plain layout without
  the language's own letter keys, holds them right after their base, as
  Apple's German QWERTZ/QWERTY (A Ä…, O Ö…, U Ü…) and Spanish QWERTY (N Ñ Ń) do.
- KeyboardLayout takes letters:, with Apple's Dvorak geometry (delete ends
  row 1, row 2 from the edge, shift plus nine letters on narrower keys).
- Autocorrect's neighbouring-key cost reads the layout's arrangement
  (setKeys, partner included); the decoder, swipe typing, next-key growth
  and Adaptive touch already read the drawn keys, and Adaptive touch keys
  its contexts by the letters, so a new arrangement is a new context.
- LanguageSettings stores the choice per language in the App Group
  (settings.keyboardLanguages.layouts); unset or not offered is the
  language's own layout. Typing logs' layout lines name the letters.

Nothing changes for anyone who doesn't pick another layout: every language's
default rows equal today's (tested).

Verified: xcodebuild test, HEXMobile scheme, iPhone 17 simulator iOS 27.2:
498 tests, 0 failures (1 skipped, as before), with new KeyboardLayoutTests
for the offered layouts, plain rows, English QWERTZ (y/z swap, English's
holds, adjacency), plain-layout holds, Dvorak and per-language storage.

* iOS: Settings › Keyboard › Languages › Layout picks each language's layout

Each language the keys show (every chosen one, Automatic's while none is,
and only the first of English and Spanish together, whose keys both type on)
gets a Layout menu listing the layouts Apple offers for it, the current one
ticked, in the page's existing row and menu style, with zh-Hans strings.
The keyboard reads the choice for KeyboardLanguageList.layout's language, so
the bilingual English & Spanish keyboard uses the first language's layout;
without the App Group (no Full Access on an iPhone that keeps it from the
keyboard) every language types on its own layout, as before. Snapshot
fixtures take --keyboard-letters and the -on languages fixture shows English
on QWERTZ. README documents the observed layouts and behaviour.

Verified: xcodebuild test, HEXMobile scheme, iPhone 17 simulator iOS 27.2:
498 tests, 0 failures (1 skipped, as before), with new FullKeyboardEngineTests
for English QWERTZ typing (keys, decoder centres, swipe keys, holds), Spatial
autocorrect on QWERTZ, Adaptive touch contexts per layout and the shared
English & Spanish layout following the first language.
2026-11-21 10:41:12 +00:00
..
FullKeyboard iOS: choose QWERTY, QWERTZ, AZERTY or Dvorak per keyboard language (#2172) 2026-11-21 10:41:12 +00:00
TypingLog iOS: choose QWERTY, QWERTZ, AZERTY or Dvorak per keyboard language (#2172) 2026-11-21 10:41:12 +00:00
AppleIntelligenceCleanupSettings.swift ios: optional Apple Intelligence transcript cleanup (experiment) (#1538) 2026-11-08 08:07:11 -05:00
AppleSpeechModule.swift iOS: dictation follows the keyboard's language, English and Spanish share one layout, and Spanish never goes to Parakeet (#2164) 2026-11-21 08:46:10 +00:00
AudioSessionControlling.swift iOS: recording leaves the hardware sample rate alone, and the keepalive backs off (#2160) 2026-11-21 07:55:13 +00:00
CleanupGuard.swift iOS: Clean up what I say keeps names, and is on by default (#2132) 2026-11-21 03:12:53 +00:00
CleanupReconstruction.swift iOS: clean up what I say with an on-device tagger (experiment) (#2023) 2026-11-20 01:29:41 +00:00
CleanupTagger.swift iOS: Clean up what I say keeps names, and is on by default (#2132) 2026-11-21 03:12:53 +00:00
CleanupTokenizer.swift iOS: clean up what I say with an on-device tagger (experiment) (#2023) 2026-11-20 01:29:41 +00:00
CustomVocabularySettings.swift ios: custom vocabulary experiment (#1547) 2026-11-08 12:15:00 -05:00
DictationCorrections.swift ios: learn dictation and typing fixes from edits (Learn how I type) (#2022) 2026-11-20 01:04:58 +00:00
DictationEditInference.swift ios: learn dictation and typing fixes from edits (Learn how I type) (#2022) 2026-11-20 01:04:58 +00:00
DictationEditTracker.swift ios: learn dictation and typing fixes from edits (Learn how I type) (#2022) 2026-11-20 01:04:58 +00:00
DictationLanguage.swift iOS: choose QWERTY, QWERTZ, AZERTY or Dvorak per keyboard language (#2172) 2026-11-21 10:41:12 +00:00
DictationLanguageSwitch.swift iOS: Hinglish dictation, Hindi in Latin letters (Experiment, off by default) (#2119) 2026-11-21 00:29:24 +00:00
DictationPipeline.swift iOS: text replacements without autocorrect, End with a period, and emoji and symbols on the Dictation bar (#2147) 2026-11-21 06:24:16 +00:00
DictationTranslation.swift iOS: fewer paste prompts, and a translate switch in the keyboard (#2134) 2026-11-21 03:24:58 +00:00
DotScope.swift iOS: a tap after a swiped word starts the next word, and the Metal HUD stays off the home page (#2159) 2026-11-21 07:54:19 +00:00
DotScopeShader.metal fix(ios): eliminate handoff frame stalls and add overlapping ballistic swipe throw (t1153) (#757) 2026-10-31 22:14:22 -07:00
EmptyCapture.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
HexTheme.swift fix(ios): eliminate handoff frame stalls and add overlapping ballistic swipe throw (t1153) (#757) 2026-10-31 22:14:22 -07:00
HinglishLexicon.swift iOS: Hinglish dictation, Hindi in Latin letters (Experiment, off by default) (#2119) 2026-11-21 00:29:24 +00:00
HinglishRomanizer.swift iOS: Hinglish dictation, Hindi in Latin letters (Experiment, off by default) (#2119) 2026-11-21 00:29:24 +00:00
HomeSwipeCue.swift iOS: a tap after a swiped word starts the next word, and the Metal HUD stays off the home page (#2159) 2026-11-21 07:54:19 +00:00
KeyboardBridge.swift iOS: a handoff to Hex can't leave the keyboard stuck, and dismissed dictations still deliver (#2163) 2026-11-21 08:31:48 +00:00
KeyboardSurface.swift iOS: a handoff to Hex can't leave the keyboard stuck, and dismissed dictations still deliver (#2163) 2026-11-21 08:31:48 +00:00
SpeechModelInstall.swift iOS: model preparation loads once, keeps moving, and survives the background (#2171) 2026-11-21 10:39:38 +00:00
SpokenCleanupRules.swift iOS: dictation styles apply in the keyboard and read differently, plus Lowercase (#2103) 2026-11-20 21:47:04 +00:00
SpokenLists.swift iOS: format dictated lists, and write out gonna and wanna (#2131) 2026-11-21 03:01:16 +00:00
TranscriptFormatter.swift iOS: text replacements without autocorrect, End with a period, and emoji and symbols on the Dictation bar (#2147) 2026-11-21 06:24:16 +00:00
UserFacingError.swift iOS: fewer paste prompts, and a translate switch in the keyboard (#2134) 2026-11-21 03:24:58 +00:00
VocabularySpelling.swift ios: custom vocabulary experiment (#1547) 2026-11-08 12:15:00 -05:00