hex/android/app
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel c2e5b305bb Android keyboard: slide on the space bar to move the cursor, as on Gboard
What changed: a slide on space now moves the cursor along the text at once. Measured from Gboard on
a Pixel 8 emulator (API 36, black box): the first character after about 45 px (17 dp) of travel and
one more every 33 px (12.6 dp), linear, both ways; Hex uses those numbers. It moves whole characters
(an emoji with a skin tone is one) by setting the selection from where the slide began; without a
known cursor position, or in a password field whose text it shouldn't read, it steps with arrow keys.
Why: Android users slide on space to place the cursor; Hex had no cursor control at all.

Spaces are never lost: a press that lifts within 180 ms types its space however far it drifted, and
so does any press that never started moving the cursor, even one that slid off the key. Replaced:
before, a press that left the space key's bounds typed nothing. Long press, held still, still opens
Hex's dictation-language menu (Gboard types a space there); once the finger moves it doesn't.

Verified (emulator only, Pixel 8 AVDs, probe app field "The quick brown fox jumps over the lazy dog",
cursor at the end, 'input swipe' gestures):
- quick taps of 60, 100 and 150 ms drifting 8, 21, 31, 42 and 63 px (up to 24 dp) typed a space
  15 of 15 times on API 36 and on API 31; Gboard: 15 of 15;
- slides over 300 ms of 21/42/63/126/252/525 px: Hex space, space, 1, 3, 7, 15 characters left;
  Gboard exactly the same; right at the end of the text moves nothing; up types a space;
- differences: Gboard types a space for some 200 ms flicks (63 and 252 px) where Hex moves the
  cursor; a still hold opens Hex's menu where Gboard types a space (decided);
- "ab👍🏽cd": 3 characters left lands before the emoji's start (offset 2), 5 at 0; password field:
  160 px moved 4 characters with arrow keys;
- testDebugUnitTest: three new cases in InsertionTest (drifting taps, slide steps, emoji steps),
  19 tests pass.
2026-11-21 15:55:06 -05:00
..
src Android keyboard: slide on the space bar to move the cursor, as on Gboard 2026-11-21 15:55:06 -05:00
build.gradle.kts Bump Hex Android to 0.1.1 (build 2) for internal testing (#2082) 2026-11-20 18:09:21 +00:00
proguard-rules.pro Hex for Android: on-device dictation keyboard (#2074) 2026-11-20 17:27:17 +00:00