Skip to content

Android: Labs › Hold space to move the cursor - #2963

Draft
R44VC0RP wants to merge 3 commits into
devfrom
android-space-hold-cursor
Draft

R44VC0RP wants to merge 3 commits into
devfrom
android-space-hold-cursor

Conversation

@R44VC0RP

@R44VC0RP R44VC0RP commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

From a Hex Preview tester's feedback that Ryan tagged: "please keep the long press on space bar for moving the cursor … I do need to go back and correct".

What changes

New lab, Labs › Keyboard › Hold space to move the cursor, off by default.

  • On: holding the space bar still for Android's touch-and-hold delay (400 ms by default) no longer opens the dictation-language menu. A click says the hold took, and the space bar is a trackpad from where the finger is: one character per 12.6 dp (the same step as today's slide), with no extra travel first, as iPhone Hex's trackpad.
  • A hold released without moving types nothing. Chosen because the iPhone's trackpad does the same ("Letting go of a trackpad types nothing; a tap types a space", KeyboardSurface.swift), and because a deliberate hold that ends in a space would be a surprise edit right where you are correcting. A tap still types a space; a slide without a hold still moves the cursor as before.
  • Language switching stays one tap away in the Hex menu › Language page (the same page the hold opened). TalkBack's long-click action on the space bar still opens it, since TalkBack users can't slide the cursor anyway.
  • Off: nothing changes; the hold opens the language menu as today.

SpaceGesture.hold() re-anchors the slide at the finger and marks the press as one that types no space; KeyPlaneView's hold runnable picks the trackpad or the menu from TypingPreferences.spaceHoldCursor.

Wording for Ryan to approve

English 简体中文
Row Hold space to move the cursor 按住空格键移动光标
Detail Hold the space bar, then slide to move the cursor. Change language from the Hex menu 按住空格键后滑动即可移动光标。在 Hex 菜单中切换语言

Checks

  • :app:testDebugUnitTest: 400 tests pass, including the new aHeldSpaceBarMovesTheCursorFromWhereItWasHeldAndTypesNothing (InsertionTest.kt, beside the existing space-bar tests).
  • Release build: :app:minifyReleaseWithR8 passes (assembleRelease needs the upload key).
  • API 36 emulator (Pixel 8 size): hold then slide moved the cursor left and back; hold and release typed nothing; a tap typed a space; with the lab off the hold opened the language menu. Settings row checked in light and dark, English and Chinese; a short screen recording of the hold was made. Screenshots and the recording are with the coordinating session.

Notes

  • Separate from the hold-delay PR, which touches the same postDelayed line; whichever merges second needs a one-line rebase.
  • Docs: android/README.md and docs/features/README.md updated.

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.
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).
R44VC0RP pushed a commit that referenced this pull request Nov 28, 2026
The space bar's hold is now one line: #2963's holdSpace, scheduled with
#2964's delay (HoldDelay.space). The Labs card and android/README.md keep the
Hold delay row and the Hold space to move the cursor row, both kept across the
merge of origin/dev.
R44VC0RP pushed a commit that referenced this pull request Nov 28, 2026
The space bar's hold is now one line: #2963's holdSpace, scheduled with
#2964's delay (HoldDelay.space). The Labs card and android/README.md keep the
Hold delay row and the Hold space to move the cursor row, both kept across the
merge of origin/dev.
R44VC0RP pushed a commit that referenced this pull request Nov 28, 2026
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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant