Skip to content

Added: Request soft keyboard for a cursor response after a mouse-tracked finger tap - #5422

Open
trissim wants to merge 1 commit into
termux:masterfrom
OpenHCSDev:mouse/tap-cursor-keyboard
Open

trissim wants to merge 1 commit into
termux:masterfrom
OpenHCSDev:mouse/tap-cursor-keyboard

Conversation

@trissim

@trissim trissim commented Nov 2, 2026

Copy link
Copy Markdown

Summary

A tracking-on finger tap authorizes one soft-keyboard request if a cursor-enabled screen update follows within3000ms. No new escape sequence, stored MotionEvent, polling timer, or keyboard popups from unarmed cursor animation. This focused patch is independent of the two mouse-gesture PRs#5420/#5421.

Owner path

  • TerminalView authorizes only its existing quick finger-tap branch, before emitting LEFT press/release. Physical mouse, finger scroll and recognizer-suppressed long press do not enter it.
  • onScreenUpdated consumes the authorization before requesting IME, reading only the view's current emulator and DECTCEM (isCursorEnabled), not the local blink animation phase.
  • The existing Activity client's text-update path already requires the visible/current session. We do not drive IME from the generic cursor-state callback, which covers both12 and25 and carries no session identity.
  • TerminalViewClient.onRequestSoftKeyboard has a concrete default no-op for non-IME clients. The actual app implements the existing disable-flags/KeyboardUtils.showSoftKeyboard path, shared with its old tracking-off tap handler. URL processing is not rerun and keyboard preferences remain authoritative.
  • New down/cancel/multitouch, session replacement, window-focus loss and detachment invalidate the request. Tracking off or text selection also clears it. The timeout is a single declared monotonic-time window, not a scheduled task.

Automatic hide is deliberately not added: cursor hiding during rendering must not repeatedly dismiss a keyboard. A later tap may request the keyboard even when the focused application's cursor is already enabled.

Verification

  • Source traced through real touch recognition, current-session publication, emulator cursor state and the app keyboard policy. git diff --check passes.
  • Fourteen native-graphics Robolectric cases are authored, not yet executed: one-shot response, unsolicited visibility, animation versus DECTCEM, expiration, new-down/cancel/focus-loss/detach invalidation, tracking-off transition and normal callback, physical mouse, long press, scroll, and another tap for an already-enabled cursor.
  • The shared fixture uses real TerminalView/recognizer/emulator and native font metrics, not gesture or renderer mocks. It observes keyboard-request intent; it does not claim Android IME display or phone acceptance.
  • Hosted combined qualification follows in Integrate touch mouse gestures and verify candidate APK signatures OpenHCSDev/termux-app#1. The already-passing two-gesture head's318 executions do not verify this new keyboard code.

Counterpart and limits

A TUI must show its terminal cursor while text entry has focus. Textual's cursor-focus counterpart is separately maintained; no Textual/Toad dependency or application-name special case is added here. SSH/mosh/device acceptance remains outstanding. The current tester uses Google Play Termux; no compatibility of its installed signer with this fork's public GitHub test key is assumed. No uninstall, forced downgrade, app-ID workaround or data loss is authorized.

Copilot AI balanced review requested due to automatic review settings November 2, 2026 08:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

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.

2 participants