hex/ios/docs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 7f16c79379 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.
2026-11-21 05:40:06 -05:00
..
typing-logs.md iOS: arrange each keyboard language's letters on another layout (engine) 2026-11-21 05:40:06 -05:00