Skip to content

Ctrl+V paste not working on Windows 11 TUI #13800

@jabing

Description

@jabing

Description

Bug Description

On Windows 11, Ctrl+V does not paste text in the TUI prompt. The issue occurs in Windows Terminal, cmd, and PowerShell.

Plugins Used

None

OpenCode Version

1.1.53

Steps to Reproduce

  1. Install opencode on Windows 11
  2. Start TUI: opencode
  3. Copy some text to clipboard
  4. Press Ctrl+V in the prompt
  5. Expected text to be pasted, but nothing happens

Root Cause

The current implementation only handles image paste via Ctrl+V and relies on terminal bracketed paste for text content. However, Windows terminals may not properly send bracketed paste sequences.

Environment

  • OS: Windows 11
  • Terminal: Windows Terminal / cmd / PowerShell

Proposed Fix

Directly read clipboard and insert text when Ctrl+V is pressed, instead of relying on terminal bracketed paste.

Plugins

None

OpenCode version

1.1.53

Steps to reproduce

  1. Install opencode on Windows 11
  2. Start TUI: opencode
  3. Copy some text to clipboard
  4. Press Ctrl+V in the prompt
  5. Expected text to be pasted, but nothing happens

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal / cmd / PowerShell

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiwindows

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions