GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(tui): add Alt+V as fallback keybind for image paste on Windows Terminal by pirrozani · Pull Request #17539 · anomalyco/opencode

Conversation

@pirrozani

@pirrozani pirrozani commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #13800, #10154
Related issues: #13322, #12075
Related unmerged PRs from other contributors: #13161, #13871, #8626

Type of change

  • Bug fix

What does this PR do?

On Windows Terminal, Ctrl+V is intercepted by the terminal before the TUI's onKeyDown fires. When the clipboard has only an image, Windows Terminal sends nothing — so the existing clipboard image read path never triggers.

Adds alt+v as a second default for input_paste ("ctrl+v,alt+v"). Windows Terminal doesn't intercept Alt+V, so it reaches onKeyDown and the existing PowerShell clipboard read works as intended.

Safe cross-platform: @opentui/core blocks character insertion when key.meta is true, so Alt+V with no image in clipboard does nothing. On macOS/Linux where Ctrl+V already passes through, it's a harmless extra binding.

How did you verify your code works?

Tested on Windows 11 + Windows Terminal. Alt+V with an image in clipboard inserts [Image 1] in the prompt. Ctrl+V text paste unaffected.

Screenshots / recordings

image

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@pirrozani
fix(tui): add alt+v as fallback keybind for image paste on Windows Te…
9c6af7e
…rminal bug
@github-actions github-actions Bot added the contributor label Mar 15, 2026
@github-actions

github-actions Bot commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found several related PRs that may be duplicates or closely related to PR #17539:

Potential Duplicates/Related PRs:

  1. fix: add alt+v keybind for pasting images #8495 - "fix: add alt+v keybind for pasting images"

    • Directly addresses the same Alt+V keybind solution for image pasting
  2. fix(tui): make Windows image paste reliable #13161 - "fix(tui): make Windows image paste reliable"

    • Mentioned in the current PR as a related unmerged PR; addresses Windows image paste reliability
  3. fix: handle text clipboard paste on Ctrl+V for Windows terminals #13871 - "fix: handle text clipboard paste on Ctrl+V for Windows terminals"

    • Mentioned in the current PR as a related unmerged PR; addresses Ctrl+V clipboard paste on Windows
  4. fix(tui): fix Ctrl+V paste on Windows/WSL2 (#6560 and #8209) #8626 - "fix(tui): fix Ctrl+V paste on Windows/WSL2"

    • Mentioned in the current PR as a related unmerged PR; addresses Ctrl+V paste issues on Windows/WSL2
  5. fix(tui): support clipboard image paste with proper filename on WSL2 #8209 - "fix(tui): support clipboard image paste with proper filename on WSL2"

    • Related to clipboard image paste functionality on Windows environments

These PRs all relate to the same underlying issue: clipboard image paste on Windows Terminal/environments. PR #8495 appears to be the most directly related as it also implements the Alt+V keybind solution.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pirrozani

pirrozani commented Mar 15, 2026

Copy link
Copy Markdown
Contributor Author

PR #8495 does exactly the same (did not find that earlier), so i am closing this PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pirrozani pirrozani closed this Mar 15, 2026
@pirrozani
pirrozani deleted the pirrozani/fix-tui-windows-terminal-image-paste branch March 15, 2026 02:16
@github-actions github-actions Bot mentioned this pull request Mar 15, 2026
📊 Bản tin hàng ngày công cụ AI CLI 2026-03-15 compasify/agents-radar#45
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Ctrl+V paste not working on Windows 11 TUI

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@pirrozani
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.