Repository navigation
Conversation
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.
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.
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.
dev pruned the Android feature-map tree from docs/features/README.md (#2979), so that file takes dev's version; the lab's row in android/README.md is kept before **Keyboard › Spatial autocorrect**, and the HexSettings and TypingPreferences conflicts keep both sides' rows (Delete words when held, then Hold space to move the cursor).
Conflicts are adjacent additions: the Page list and its Labs parent keep Hold delays and Sounds; the Labs card keeps Delete words when held, then Hold delay; the page switch keeps both cards. dev's reworked hold in typesOnLift is kept (talks, flick and Click when a hold opens) with its delay now read from TypingPreferences.holdDelay; docs/features/README.md takes dev's pruned version (#2979) and the lab's row in android/README.md is kept.
docs/features/README.md takes dev's pruned version (#2979); the lab's row in android/README.md is kept. The delete-slide guard keeps the search's (no delete slide while a search is open) on dev's renamed strip call (showStrip), and the search also clears the strip through showStrip.
The space bar's hold keeps the search's guard (no menu or trackpad while the emoji search is open) on #2963's holdSpace, and the held trackpad's first character still waits for a whole step. The Labs strings and the README keep both labs' rows.
Both labs' strings are kept, and the README keeps Hold delay, Hold space to move the cursor and Emoji search in the order the Labs card shows them.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From a Hex Preview tester's feedback that Ryan tagged: "why can't I search emojies???". Hex for iPhone has emoji search; this brings it to Android.
What changes
New lab, Labs › Keyboard › Emoji search, off by default.
KeyboardEngine.emojiQuery, the same idea as iPhone'sEmojiRoutedTarget). Nothing typed there is suggested, autocorrected, swiped, learned by adaptive touch or kept; shift starts lowercase.EmojiLibrary.search+EmojiSuggester.search): each word typed must start a word of the emoji's English name or keywords; whole name words, then name prefixes, then keywords; among equals a short name the query fills, then your recent emoji and the twelve everyday ones. Up to 60.Data (new asset: 86 KB)
assets/emoji/search-en.txt: 1,923 lines ofemoji<TAB>name words|keywords, cut from the iPhone keyboard'semoji-index-en.txt(Unicode emoji-test 18.0, CLDR 49 annotations under the Unicode License already inassets/licenses/unicode.txt, plus Hex's chat words) by the newandroid/scripts/build-emoji-search.py, which keeps only that column. 86 KB raw, about 32 KB compressed in the APK. Read once, off the main thread, the first time a search opens, and kept to emoji the phone can draw (Paint.hasGlyph, as Emoji suggestions does). English only. No network request.Wording for Ryan to approve
Checks
:app:testDebugUnitTest: 404 tests pass, including five new ones in EmojiKeywordsTest.kt: name and keyword matches on the real asset (heart → ❤️, thumbs up → 👍, laugh → 😂, party → 🎉), word starts, case and accent folding, the ranking order and recent boost, the empty-query order, and the query's typing, delete and Return.:app:minifyReleaseWithR8passes.Notes
android/README.mdanddocs/features/README.mdupdated.