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(opencode): image paste on Windows Terminal 1.25+ with kitty keyboard by Hona · Pull Request #17674 · anomalyco/opencode

Conversation

@Hona

@Hona Hona commented Mar 16, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Summary

  • Enable kitty keyboard events: true so Windows Terminal 1.25+ reports key release events
  • Detect Ctrl+V key release on Windows to trigger clipboard image probe (WT 1.25+ swallows the press but leaks the release)
  • Add comments documenting the three Windows paste trigger paths

Depends on anomalyco/opentui#819 (stdin parser fix for split escape sequences across reads) for stability, without the opentui change, only about half of ctrl+v events are detected.

Context

Windows Terminal 1.25+ with kitty keyboard support does not send an empty bracketed paste for image-only clipboard (stable WT does). The only signal we get is the Ctrl+V key release event (CSI 118;modifier;3u), which requires events: true in the kitty keyboard config.

Sorry, something went wrong.

Uh oh!

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

All reactions
Copilot AI review requested due to automatic review settings March 16, 2026 00:41
Copilot started reviewing on behalf of Hona March 16, 2026 00:42
View session
Copilot AI reviewed Mar 16, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the TUI paste handling to support image paste on Windows Terminal Preview when kitty keyboard mode is enabled, by enabling key release events and using Ctrl+V release as the signal to probe the clipboard for image data.

Changes:

  • Enable kitty keyboard events: true in the TUI renderer config.
  • Add a Windows-only Ctrl+V release keyboard handler in the prompt to trigger an image clipboard probe/paste.
  • Clarify clipboard/paste-path behavior with additional inline comments.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/opencode/src/cli/cmd/tui/util/clipboard.ts Adds documentation about Windows-specific paste trigger paths and clarifies why direct clipboard probing is needed for images.
packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx Adds Ctrl+V release detection on Windows to paste clipboard images; updates comments around paste behavior.
packages/opencode/src/cli/cmd/tui/app.tsx Enables kitty keyboard events globally so key release events can be observed (needed for WT Preview behavior).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx Resolved

Uh oh!

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

Comment thread packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx Resolved

Uh oh!

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

@Hona
fix(opencode): image paste on Windows Terminal 1.25+ with kitty keyboard
342719d
@Hona
Hona force-pushed the fix/windows-image-paste branch from 34e50c3 to 342719d Compare March 16, 2026 00:47
@Hona Hona changed the title fix(opencode): image paste on Windows Terminal Preview with kitty keyboard fix(opencode): image paste on Windows Terminal 1.25+ with kitty keyboard Mar 16, 2026
@github-actions github-actions Bot mentioned this pull request Mar 16, 2026
📊 Bản tin hàng ngày công cụ AI CLI 2026-03-16 compasify/agents-radar#50
Open
@Hona

Hona commented Mar 16, 2026

Copy link
Copy Markdown
Member Author

vouch @Hona

All reactions

Sorry, something went wrong.

Uh oh!

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

rekram1-node
rekram1-node approved these changes Mar 18, 2026
View reviewed changes
@Hona
fix(opencode): gate kitty keyboard events to windows
01c0902
@github-actions github-actions Bot mentioned this pull request Mar 20, 2026
fix(bug) paste image #18361
Closed
2 of 6 tasks
Hona added 4 commits March 23, 2026 11:08
@Hona
Merge branch 'dev' into fix/windows-image-paste
b0cb887
@Hona
tui: clarify Windows Terminal paste path comments
601131c
@Hona
tui: remove invalid markdown color props
18f96e2
@Hona
tui: restore markdown color props
a9dd7ac
@Hona Hona added the beta label Mar 23, 2026
opencode-agent Bot added a commit that referenced this pull request Mar 23, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
82ab9d6
… with kitty keyboard
@github-actions github-actions Bot mentioned this pull request Mar 23, 2026
📊 Bản tin hàng ngày công cụ AI CLI 2026-03-23 compasify/agents-radar#75
Open
opencode-agent Bot added a commit that referenced this pull request Mar 23, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
7045060
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 23, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
73e351c
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 23, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
6fd78aa
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 23, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
dfefb00
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 23, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
b27599f
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 23, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
50d5f3d
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 23, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
df95e71
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 23, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
80ddefd
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 23, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
5110798
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 24, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
11f90d0
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 24, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
6cebcf6
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 24, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
ca050af
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 24, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
ae3a309
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 24, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
3a165bb
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 24, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
02b0906
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 24, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
de37fa2
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 25, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
eb0fc83
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 25, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
9718375
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 25, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
b350e29
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 25, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
bcdbf67
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 25, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
a49d3cc
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 25, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
100d460
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 25, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
bc845ff
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 25, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
c991b28
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 25, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
805a207
… with kitty keyboard
opencode-agent Bot added a commit that referenced this pull request Mar 25, 2026
@opencode-agent
Apply PR #17674: fix(opencode): image paste on Windows Terminal 1.25+…
03aaa70
… with kitty keyboard
@Hona Hona mentioned this pull request Mar 31, 2026
fix(tui): revert kitty keyboard events workaround on windows #20180
Merged
@achin90 achin90 mentioned this pull request Apr 10, 2026
DispatchTUI prtest achin90/Dispatch#3
Closed
@coleleavitt coleleavitt mentioned this pull request Apr 21, 2026
fix/memory 20695 coleleavitt/opencode#5
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@rekram1-node rekram1-node rekram1-node approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

beta

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

3 participants

@Hona @rekram1-node
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.