Files
Ryan VogelandAnomaly 97b645b393 Android: Labs › Emoji search (#2965)
* feat(android): Labs › Hold space to move the cursor

A tester asked to keep the space bar's hold for moving the cursor: today a
still hold opens the dictation-language menu and ends the press, so hold
then slide never moves the cursor. With the new lab on, a still hold for
Android's touch-and-hold delay turns the space bar into a trackpad (a click
says it took), one character per 12.6 dp from where the finger was held, as
iPhone Hex's trackpad, and lifting types nothing whether or not it moved.
Taps and plain slides are unchanged. The language stays in the Hex menu's
Language page, and TalkBack's long click on the space bar still opens it.
Off (the default), holding opens the menu exactly as before.

Verified: :app:testDebugUnitTest (400 tests, including the new
aHeldSpaceBarMovesTheCursorFromWhereItWasHeldAndTypesNothing) and the
release build's R8 step pass; on an API 36 emulator, hold-slide moved the
cursor, hold-release typed nothing, a tap typed a space, and with the lab
off the hold opened the language menu.

* feat(android): Labs › Hold delay for accents, symbols and the space bar

A tester asked to adjust how long a long press takes. Letter holds used a
fixed 300 ms and the space bar Android's touch-and-hold delay. The new
Labs › Keyboard › Hold delay row offers Short (200 ms), Default (300 ms)
and Long (500 ms), inside Gboard's Key long press delay slider (100 to
700 ms, 300 default). Default is today's timing exactly, so it is the lab
off. The space bar keeps Android's delay at Default and is scaled by the
same share otherwise (400 ms becomes 266 or 666 ms), so it always waits
longer than a letter. Pop-ups, haptics and Delete's repeat are unchanged.

Verified: :app:testDebugUnitTest (400 tests, including the new
holdDelayDefaultKeepsTodaysTimingAndTheSpaceBarScales) and the release
build's R8 step pass; on an API 36 emulator a held e showed its accents at
240 ms only with Short, at 350 ms with Default but not Long, and a 520 ms
space hold opened the language menu with Short and Default but not Long.

* feat(android): Labs › Emoji search in the emoji panel

A tester asked why emoji can't be searched; Hex for iPhone can. With the
new lab on, the emoji panel gets a Search emoji bar. Tapping it brings the
keys back under a search field in the strip's place; every key types into
the query (KeyboardEngine.emojiQuery), never the app's field, with no
suggestions, corrections, swipes, adaptive touch or learning, and nothing
kept. Results follow each key in two rows in the panel's extra height, so
the keyboard keeps its height, ranked as iPhone Hex's EmojiLibrary.search
plus EmojiSuggester's everyday boost, with recent emoji lifted among
equals; an empty query shows recents, then the everyday emoji. A pick types
into the app's field and joins Recently used; the close button and Return
go back to the panel, and Back leaves for the letters (an
OnBackInvokedCallback on Android 13+, the key on 12). Off, the panel is
unchanged.

The index is a new 86 KB asset (1,923 emoji: name words and keywords),
generated from the iOS emoji index by android/scripts/build-emoji-search.py,
read the first time a search opens and kept to emoji the phone can draw.
No network request.

Verified: :app:testDebugUnitTest (404 tests, including five new search
tests in EmojiKeywordsTest) and the release build's R8 step pass; on an API
36 emulator in light and dark: search, pick, close, Return, Back, recents,
and the lab off.

* android: Turkish for the space-bar hold lab's strings

* android: Turkish for the hold delay lab's strings

* android: Turkish for emoji search's strings

---------

Co-authored-by: Anomaly <anomaly@anomastudio.husky-tilapia.ts.net>
2026-12-01 07:22:45 -05:00
..