feat: Add Ctrl+V to paste images from clipboard #8793

Closed
opened 2026-02-16 18:10:52 -05:00 by yindo · 3 comments
Owner

Originally created by @Fanimazahuia on GitHub (Feb 7, 2026).

Originally assigned to: @thdxr on GitHub.

Feature Request

Add the ability to paste screenshots directly from the clipboard using Ctrl+V, similar to how web apps and IDEs handle image paste.

Use Case

When sharing visual context with the AI assistant (error screenshots, UI mockups, diagrams), the current workflow requires:

  1. Save screenshot to file
  2. Navigate to screenshots directory
  3. Copy file path
  4. Paste path for the agent to look at

With Ctrl+V paste, it becomes:

  1. Take screenshot (Win+Shift+S)
  2. Ctrl+V in editor
  3. Done

Proposed Implementation

I have a working implementation ready:

  • Uses golang.design/x/clipboard for cross-platform clipboard access
  • Adds internal/tui/clipboard package with image reading utilities
  • Adds Ctrl+V key binding that checks for clipboard images
  • If image found: saves to temp file and attaches to message
  • If no image: normal text paste flows through

Limitations

  • 5MB max image size (matches existing attachment limits)
  • Max 5 attachments total
  • Windows legacy bitmap format (CF_DIB) may not work; modern Win+Shift+S works

Code

Happy to submit a PR with the implementation if this feature is wanted.

Originally created by @Fanimazahuia on GitHub (Feb 7, 2026). Originally assigned to: @thdxr on GitHub. ## Feature Request Add the ability to paste screenshots directly from the clipboard using Ctrl+V, similar to how web apps and IDEs handle image paste. ## Use Case When sharing visual context with the AI assistant (error screenshots, UI mockups, diagrams), the current workflow requires: 1. Save screenshot to file 2. Navigate to screenshots directory 3. Copy file path 4. Paste path for the agent to look at With Ctrl+V paste, it becomes: 1. Take screenshot (Win+Shift+S) 2. Ctrl+V in editor 3. Done ## Proposed Implementation I have a working implementation ready: - Uses `golang.design/x/clipboard` for cross-platform clipboard access - Adds `internal/tui/clipboard` package with image reading utilities - Adds Ctrl+V key binding that checks for clipboard images - If image found: saves to temp file and attaches to message - If no image: normal text paste flows through ## Limitations - 5MB max image size (matches existing attachment limits) - Max 5 attachments total - Windows legacy bitmap format (CF_DIB) may not work; modern Win+Shift+S works ## Code Happy to submit a PR with the implementation if this feature is wanted.
yindo closed this issue 2026-02-16 18:10:52 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 7, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #1429: Support pasting images from the clipboard
  • #906: Feature request: Paste to attach image
  • #523: Support for pasting images into context
  • #12181: [FEATURE] Paste images directly into the chat UI like another chat clients

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Feb 7, 2026): This issue might be a duplicate of existing issues. Please check: - #1429: Support pasting images from the clipboard - #906: Feature request: Paste to attach image - #523: Support for pasting images into context - #12181: [FEATURE] Paste images directly into the chat UI like another chat clients Feel free to ignore if none of these address your specific case.
Author
Owner

@Fanimazahuia commented on GitHub (Feb 7, 2026):

Closing as duplicate - this feature already exists (Ctrl+V). The issue on Windows is that Windows Terminal intercepts Ctrl+V. Fix: Remove the Ctrl+V keybinding from Windows Terminal Settings > Actions. See #1429 for details.

@Fanimazahuia commented on GitHub (Feb 7, 2026): Closing as duplicate - this feature already exists (Ctrl+V). The issue on Windows is that Windows Terminal intercepts Ctrl+V. Fix: Remove the Ctrl+V keybinding from Windows Terminal Settings > Actions. See #1429 for details.
Author
Owner

@Fanimazahuia commented on GitHub (Feb 10, 2026):

Update: confirmed on Windows Terminal that removing Ctrl+V terminal paste enables image paste but blocks text paste via Ctrl+V; text still requires Ctrl+Shift+V or Shift+Insert. This is discussed in #1429 thread.

@Fanimazahuia commented on GitHub (Feb 10, 2026): Update: confirmed on Windows Terminal that removing Ctrl+V terminal paste enables image paste but blocks text paste via Ctrl+V; text still requires Ctrl+Shift+V or Shift+Insert. This is discussed in #1429 thread.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8793