Skip to content

Complete the mobile terminal keyboard and paste interaction #1763

Description

@wjin17

Summary

#1622 makes a short terminal tap focus xterm on iOS, but the full keyboard workflow is still incomplete. The terminal can be covered by the software keyboard, iOS can leave the textarea focused after the keyboard closes, and there is no natural way to paste clipboard text.

Workflow

I was using bb remotely from an iPhone to reauthenticate Claude Code:

  1. Open a terminal in bb.
  2. Run the authentication command.
  3. Follow the browser authentication flow.
  4. Return to the terminal.
  5. Paste the resulting code or other clipboard text.

Current behavior

  • The software keyboard can cover the bottom of the terminal, including the active prompt.
  • After dismissing the keyboard, iOS may leave xterm's textarea focused. A later tap cannot use DOM focus alone to determine whether it should reopen the keyboard.
  • Mobile users do not have an obvious way to paste clipboard text into the terminal.
  • Adding persistent typing and paste buttons would consume limited terminal space and duplicate gestures already familiar on mobile.

Expected

  • With the keyboard closed, a short tap opens it.
  • With the keyboard open, a short tap offers Paste directly above the terminal cursor.
  • Paste sends clipboard text through xterm's normal paste path.
  • The terminal follows the visual viewport so the active prompt remains visible above the keyboard.
  • Scroll, drag, long-press, and multi-touch gestures do not trigger keyboard or paste actions.
  • No persistent typing or paste controls are needed.

Suggested direction

Use the visual viewport to distinguish an open software keyboard from a stale focused textarea. Let terminal drawers follow keyboard-driven viewport changes, refit xterm after those changes, and anchor a compact Paste action to the visible cursor cell.

This builds on #1622 rather than replacing its touch-focus gesture handling.

AGENT GENERATED: by GPT-5

Activity

  1. added
    mobile
    on Aug 18, 2026
  2. wjin17 commented on Aug 18, 2026

    @wjin17
    ContributorAuthor

    Prototype implementation: wjin17#1

    Maintainers: please review the proposed mobile terminal UI and confirm whether it is aligned for an upstream PR.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    mobile

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions