Skip to content

[Bug]: Mobile terminal ctrl+v pastes the host PC's clipboard instead of the phone's #9198

Description

@lnieuwenhuis

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/mobile

Steps to reproduce

  1. Run the T3 Code server on a Windows machine (the terminal shell defaults to PowerShell).
  2. On the iOS app, copy a shell command, e.g. a git command from a chat code block.
  3. Open the thread's terminal.
  4. In the keyboard accessory toolbar tap ctrl, then type v on the software keyboard.

Expected behavior

The command on the phone's clipboard is pasted into the terminal. Ctrl+V is the paste chord every user of a Windows host reaches for, and the web terminal pastes the browser's clipboard on the same chord. There is no other way to paste on iOS: the terminal surface has no edit menu and long-press does nothing (#6394 tracks adding a visible paste control).

Actual behavior

Whatever the host PC last copied gets pasted. In my case that was the last prompt I had sent the thread, not the git command on my phone.

The mobile toolbar encodes ctrl+v as the raw 0x16 control byte and forwards it to the pty. PSReadLine binds Ctrl+V to Paste, which reads the host machine's clipboard, so the remote shell inserts the desktop's clipboard rather than the phone's. On macOS or Linux hosts the same byte is quoted-insert and pastes nothing at all, so the chord is a silent no-op there.

Impact

Major degradation or frequent failure

Version or commit

main @ 70cd258

Environment

iOS app (native Ghostty terminal surface), Windows 11 host running pwsh.exe.

Workaround

None on iOS. Retype the command by hand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions