hex/ios/HEXKeyboard
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 742516b580
iOS: the keyboard is iOS's own glass again; the backdrop shows only over an earlier Hex keyboard iOS left on screen (#2302)
A tester on build 117 (iPhone 14 Pro, iOS 27.2.1, Spotlight) marked the top
of Hex's keyboard: a greyer rounded panel sitting inside iOS's panel, with a
seam under the band iOS adds above a third-party keyboard. Ryan: the space
is fine as long as it is the same colour.

Cause: since #2256 a thin material sat under the whole keyboard, always. It
compresses whatever is behind it: on an iPhone 17 Pro (iOS 27.2, dark mode)
Hex's area read 36 where the glass is 31 (Notes), 45 where it is 54 (a light
page), and stayed neutral grey where the glass takes a wallpaper's tint
(Spotlight: 37,38,38 under a band of 32,37,39 in the tester's screenshot).
No tint can match glass that follows its background, so Hex was a panel of
another colour inside iOS's panel, with its own corners.

The material was there for one reason: iOS can leave Apple's keyboard under
a third-party one, and Hex's keys are translucent. What the extension can
observe turned out to mark that case exactly. iOS makes a new input view
controller each time the keyboard comes up, tells the one before it
disappeared, and frees it. In a field that takes focus as its screen appears
and has an input accessory view, opened with Hex, it doesn't: switching to
Apple's keyboard gives Hex no viewWillDisappear and keeps its controller and
remote view; Apple's keyboard is added beside it, and switching back makes a
second Hex on top without taking Apple's away. Opened with Apple's keyboard,
the same field hides and frees Hex as usual and nothing is left behind, and
so do a field focused by a tap, Safari and Spotlight (iOS 27.0 and 27.2
simulators, a keyboard extension logging its own lifecycle).

Changed:
- KeyboardsOnScreen (new, pure): Hex's keyboards on screen in this process,
  in order, each with its field (UIKit's documentIdentifier). A keyboard is
  over another when an earlier one was never told to disappear and is still
  in the same field; a field UIKit hasn't named counts as the same one.
- KeyboardViewController keeps one for the process (viewWillAppear,
  viewWillDisappear, deinit, and the field in textDidChange) and shows its
  backdrop only while its keyboard is over another. Otherwise the backdrop
  is hidden and Hex draws nothing behind its keys: its background is iOS's
  glass, the colour of iOS's band and of the globe row, on any background.
- KeyboardBackdropView is unchanged in what it draws (the ultra-thin
  material, shaded in dark mode, the panel's corners).

Replaced: the always-on material from #2256. Its protection is kept for the
case it was for; in that case Hex still shows the material's slightly
different tone until the keyboard is next dismissed.

Verified:
- xcodebuild test on an iPhone 17 Pro simulator (iOS 27.2), Mac Studio: 693
  tests, 3 skipped (AppleSpeechClipTests and the two TypingReplayTests, which
  need local files), 0 failures. KeyboardLayoutTests has the on-screen rule
  (dismiss and reopen, the kept keyboard, another field, an unnamed field,
  a keyboard appearing again) beside the material's and outline's cases.
- iOS 27.0 and 27.2 simulators with this build: the accessory field opened
  with Hex is clear; after Hex, Apple's keyboard, Hex it is covered and shows
  no key shapes (light and dark); reopened it is clear again. Opened with
  Apple's keyboard, a tap-focused field, Safari, another app after Safari
  and Spotlight stay clear after switching, with nothing showing through.
  Hex's area equals the glass beside it exactly (0 of 255) over a white app,
  light and dark web pages and Spotlight, light and dark.
- The strip over real glass, light and dark: suggestions, the correction
  chip, the Full Access hint, the emoji panel and emoji search (live), and
  recording, transcribing and Undo dictation in the snapshot stage.
- Apple's keys overlaid on Hex's (iPhone 17 Pro, iOS 27.2 simulator), with
  and without iOS's band: every key edge on Apple's pixel, as before.
- Ryan's iPhone 17 Pro (iOS 27.2): Spotlight over his wallpaper, Notes, a
  Safari form and DuckDuckGo. The step at Hex's top edge went from 8, 5 to
  the background's own texture (0 in Notes), and at its bottom edge from 6,
  5, 8, 9 to 1, 0, 0, 0. Switching to Apple's keyboard and back in each, and
  dismissing and refocusing DuckDuckGo's field, stayed clear with no trace of
  another keyboard.

Not verified: the leftover-keys case on a real iPhone (no field there
reproduces it, so the cover engaging on a device is untested), a keyboard
process iOS restarts between the two keyboards (the new process can't know
of the earlier keyboard), Paste and Paste dictation over glass (they need
Full Access on the simulator), iOS 26 and earlier, an iPad, a Duo.
2026-11-21 21:29:58 -05:00
..
CleanupTagger iOS: clean up what I say with an on-device tagger (experiment) (#2023) 2026-11-20 01:29:41 +00:00
TypingModel iOS: German autocorrect capitalises common nouns (haus, auto, zeit) (#2169) 2026-11-21 05:30:03 -05:00
ContainingAppOpener.swift Open Hex from the iPhone keyboard and show live keyboard setup (#599) 2026-10-31 09:56:02 -07:00
HEXKeyboard.entitlements Set up Hex Mobile internal TestFlight releases (#1997) 2026-11-19 11:48:49 -05:00
Info.plist iOS: plain permission prompts and no pre-prompt Allow button, for App Review (#2058) 2026-11-20 16:13:36 +00:00
KeyboardInputView.swift iOS: delete keeps an autocorrection and the strip offers the revert, smart quotes, a two-way trackpad, and key clicks (#2192) 2026-11-21 09:22:10 -05:00
KeyboardLocalDictation.swift iOS keyboard: stale microphone errors clear, Hex key audio calls leave the main thread, counts read 1, 2, 3 (#2203) 2026-11-21 10:08:42 -05:00
KeyboardViewController.swift iOS: the keyboard is iOS's own glass again; the backdrop shows only over an earlier Hex keyboard iOS left on screen (#2302) 2026-11-21 21:29:58 -05:00
PrivacyInfo.xcprivacy iOS: version 1.0, iPhone only, privacy manifests (#2052) 2026-11-20 15:54:01 +00:00