hex/android/app
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 8ac05c2fa9 Android keyboard: Labs › Keyboard › Adaptive touch, wired to the keys (off by default)
What: the keyboard now runs Adaptive touch when its Labs switch is on.
- KeyPlaneView hands the decoder its key plane (each letter's keycap, touch
  cell and row; the width in 10 dp steps, orientation and number row name
  it) and says when a touch slid onto its key (a slide from shift or ?123, a
  swipe that came back as a tap).
- KeyboardEngine: a session per field; letters, held accents, delete,
  space, marks, Return, picks and undoing a fix tell Adaptive touch what
  became of each word, and the cursor moving, pastes, swipes, dictation and
  pads forget what was in hand. It learns only in a field that takes
  corrections and lets Hex learn, with Autocorrect and Spatial autocorrect on
  and the layout's own model; never in a password, email, web address or
  no-learning field. The decoder reads your centres wherever the lab is on.
- AdaptiveTouchStore keeps the averages as one Base64 value in their own
  private SharedPreferences, "adaptiveTouch" (23,588 bytes as a table, under
  32 KB as text, never more; allowBackup is off), saved every 400 labels and
  when the keyboard hides, shared by the keyboard and Settings in one process.
- Settings › Labs › Keyboard: Adaptive touch, with "Learning: n of 400 taps"
  or "Active, using your own key centres" under it, and Reset touch learning
  behind a confirmation while anything is stored, lab on or off. Delete what
  Hex learned clears it too. Every string in English and Simplified Chinese,
  the wording Ryan approved.
- AdaptiveTouchTest (the one new test file, approved): what teaches it, the
  evidence floor, the grip fallback, key planes apart, the table and reset,
  untrained typing exactly as without it, and that your centres never
  correct a word the drawn ones leave alone.
- docs/features: the Android Labs entry.

Why: a tester asked for iPhone's adaptive touch on Android; Ryan approved it
as a Labs switch knowing the gate shows 1-4% fewer word errors for typists
who aim off the centres.

Off, the keyboard makes no learner, reads no table and types exactly as
before. Verified on the Studio (host JVM, Gradle --no-daemon, -x
prepareSpeechModel): testDebugUnitTest passes, 310 tests with
AdaptiveTouchTest's 11; scripts/code-shape.py --check has no hard problems.
Not yet tried on an emulator or a device.
2026-11-24 19:45:52 -05:00
..
src Android keyboard: Labs › Keyboard › Adaptive touch, wired to the keys (off by default) 2026-11-24 19:45:52 -05:00
build.gradle.kts android: Português typing (Brazilian model, accent holds, autocorrect, suggestions, swipe) (#2780) 2026-11-24 19:06:14 -05:00
proguard-rules.pro Android: faster English dictation (Labs) (#2704) 2026-11-24 13:36:38 -05:00