hex/ios/HEXMobileTests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 667f771825
iOS: the space-bar trackpad moves like Apple's (#2219)
What changed
- The trackpad drags a point through the text at the text's own scale, in two
  dimensions, and puts the cursor at the nearest position (TrackpadCursor.State),
  as Apple's does. The text the field shares is laid out with the body font's own
  character widths, rows wrapped at the keyboard width less 40 pt, 20 pt lines.
- Gain follows the finger's speed like Apple's: 1x slowly, 1.4x at 400 pt/s, 2x at
  1,000, 2.6x at 2,000 (TrackpadCursor.gain), from a windowed speed of the touch's
  own timestamps, the same up, down or slanting.
- Lines: one per line height (the first after half a line), x kept across short
  lines; it stops at a line's start and end and at the first/last line. Replaces
  the fixed 7.5 pt per character and 15.5 pt per line, and the move on past a line
  end into the next line.
- Hosts share only the cursor's sentence/line (UITextView: "Lin" | "e two is a bit
  longer"), and drop a move that would leave the text (moves sent together add
  up). So at the edge of what's known the cursor waits for the host to show more,
  and past the first/last known line it steps just past it in one move, which the
  host makes only if text is there; no answer in 100 ms means it never moved.
  Before, moving down past the current line did nothing.
- Offsets are UTF-16 (the proxy's unit): a 👍🏽 is one step, not four (three of
  them stalled inside the emoji).
- Keys blank to keycaps 60% of the way to the backdrop (Apple: 242,242,247 on
  226,227,232 light, 54 on 32 dark); Hex kept white keycaps.
- No haptic on start or per character (Apple's keyboard asks for no feedback after
  the space bar's own); a second finger while the trackpad is on types nothing
  (it typed the blank key under it). Selection stays impossible:
  UITextDocumentProxy can't set one.
- Trackpad code moved to FullKeyboardEngine+Trackpad.swift; FullKeyboardEngine.swift
  is 1,476 lines.

Verified
- Apple black box, iOS 27.2 simulator, same scripted HID gestures on Apple's,
  origin/dev and this build (UITextView logging selectedRange): 80 pt right at
  150/400/1,000/2,000 pt/s gave 11/13/21/26 characters on Apple's, 10/10/10/10
  before, 11/13/20/26 now; 140 pt down from line 1 reached line 5 on Apple's and
  now, nothing before; up 40 pt in 40 ms: 4 lines on both (before 3); 100 pt past
  a line end stops at it on both (before ran into the next line); column kept up
  8 lines (index 7 on both).
- Independent check (coordinator, iPhone 15 Pro / iOS 27.2 simulator, native
  UITextView, matched HID): build 56 up stays line 8 / down stays 5 / right moves 4;
  build 110 (19747178) up 8->6 / down stays 5 / right 4; this candidate up 8->6 /
  down 5->6 / right moves one, no text edits.
- xcodebuild test: 624 tests, 0 failures, 1 skipped; after rebasing on dev
  3f374f42, FullKeyboardEngineTests' 118 pass.
2026-11-21 13:23:46 -05:00
..
Fixtures iOS: emoji panel with on-device suggestions (Experiments › Emoji) (#2051) 2026-11-20 15:53:24 +00:00
AutocorrectEngineTests.swift iOS: Czech keyboard, and custom words for typing (#2205) 2026-11-21 10:37:55 -05:00
CleanupTaggerTests.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
CustomVocabularyTests.swift ios: custom vocabulary experiment (#1547) 2026-11-08 12:15:00 -05:00
DictationControllerTests.swift iOS: Czech keyboard, and custom words for typing (#2205) 2026-11-21 10:37:55 -05:00
DictationLanguageTests.swift iOS: dictate Latin American Spanish with Latin America's model, and keep a picked variant when the keyboard switches (#2193) 2026-11-21 09:53:34 -05:00
DictationLearningTests.swift iOS: hold the bar to dictate, Learn how I type on, a plain centred Paste, and typing logs off (#2210) 2026-11-21 12:11:58 -05:00
DotScopeTests.swift fix(ios): eliminate handoff frame stalls and add overlapping ballistic swipe throw (t1153) (#757) 2026-10-31 22:14:22 -07:00
EmojiSuggesterTests.swift iOS: swipe reads the letters under the path, and the emoji bar scrubs (#2189) 2026-11-21 08:47:45 -05:00
FullKeyboardEngineTests.swift iOS: the space-bar trackpad moves like Apple's (#2219) 2026-11-21 13:23:46 -05:00
HexKeyGestureTests.swift iOS: translation says when it pastes as spoken, retries, and never turns itself off (#2176) 2026-11-21 06:33:37 -05:00
KeyboardBridgeTests.swift iOS: onboarding always shows the Hex key, and practice needs Hex's dictation (#2211) 2026-11-21 12:20:32 -05:00
KeyboardLayoutTests.swift iOS: Czech keyboard, and custom words for typing (#2205) 2026-11-21 10:37:55 -05:00
LanguageLearningTests.swift ios: learn each language separately (experiment) (#2188) 2026-11-21 09:00:58 -05:00
ShiftStateMachineTests.swift iOS: Greek keyboard, tonos autocorrect, and a final ς in Lowercase (#2184) 2026-11-21 08:26:30 -05:00
SwipeDecoderTests.swift iOS: swipe reads the letters under the path, and the emoji bar scrubs (#2189) 2026-11-21 08:47:45 -05:00
TranscriptCleanupTests.swift iOS: Czech keyboard, and custom words for typing (#2205) 2026-11-21 10:37:55 -05:00
TypingLogTests.swift iOS: hold the bar to dictate, Learn how I type on, a plain centred Paste, and typing logs off (#2210) 2026-11-21 12:11:58 -05:00