[PR #520] feat: detect image events on paste with ctrl +v or command v #591

Open
opened 2026-03-02 23:47:15 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/520
Author: @tyrellshawn
Created: 1/14/2026
Status: 🔄 Open

Base: mainHead: detect-image-events


📝 Commits (10+)

📊 Changes

15 files changed (+421 additions, -82 deletions)

View changed files

📝 bun.lock (+0 -1)
📝 packages/core/src/examples/index.ts (+7 -0)
packages/core/src/examples/paste-demo.ts (+163 -0)
packages/core/src/lib/KeyHandler.paste-binary.test.ts (+31 -0)
📝 packages/core/src/lib/KeyHandler.test.ts (+15 -0)
📝 packages/core/src/lib/KeyHandler.ts (+38 -7)
packages/core/src/lib/paste-detect.test.ts (+16 -0)
packages/core/src/lib/paste-detect.ts (+39 -0)
packages/core/src/lib/stdin-buffer.paste-binary.test.ts (+26 -0)
📝 packages/core/src/lib/stdin-buffer.test.ts (+2 -1)
📝 packages/core/src/lib/stdin-buffer.ts (+69 -65)
📝 packages/core/src/renderables/Input.ts (+1 -1)
📝 packages/core/src/renderables/Textarea.ts (+11 -4)
📝 packages/core/src/renderables/__tests__/Textarea.paste.test.ts (+2 -2)
📝 packages/core/src/renderer.ts (+1 -1)

📄 Description

Tested using the examples but havent done any integration tests with opencode yet.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/520 **Author:** [@tyrellshawn](https://github.com/tyrellshawn) **Created:** 1/14/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `detect-image-events` --- ### 📝 Commits (10+) - [`5aec63b`](https://github.com/anomalyco/opentui/commit/5aec63bfaeb620df3370770c5da680cf003eab27) detect image events with tests - [`ae0a0f3`](https://github.com/anomalyco/opentui/commit/ae0a0f39dedfb466b1d38971d2307da31b6ce1d5) add example - [`bb0f265`](https://github.com/anomalyco/opentui/commit/bb0f265ace607517fb028c93625212b3bece53bf) Merge branch 'main' into detect-image-events - [`bfa893e`](https://github.com/anomalyco/opentui/commit/bfa893eb7423da9c564a0cab329667dca0595b02) fixes - [`123c5f8`](https://github.com/anomalyco/opentui/commit/123c5f835e45bfd47b0b2fe0fb2ff6c7499ef35d) Merge branch 'main' into detect-image-events - [`ba45a97`](https://github.com/anomalyco/opentui/commit/ba45a9717a9b3006cbae91ceaa772e3bfbbc2218) Merge branch 'main' into detect-image-events - [`36d0f31`](https://github.com/anomalyco/opentui/commit/36d0f31ad66e2931e25ee1377752ceb7ac26ef87) ;Merge branch 'detect-image-events' of https://github.com/tyrellshawn/opentui into detect-image-events - [`331dd8f`](https://github.com/anomalyco/opentui/commit/331dd8f54c779082b7650e819d3bc4e6056fda64) use just the buffer - [`da530c4`](https://github.com/anomalyco/opentui/commit/da530c4678df0772747020fe208a9ab8d4f64088) Merge branch 'main' into detect-image-events - [`ceb4e09`](https://github.com/anomalyco/opentui/commit/ceb4e09833fba2eb9e6a064ffb8b5237f51651d5) Merge remote-tracking branch 'upstream/main' into detect-image-events ### 📊 Changes **15 files changed** (+421 additions, -82 deletions) <details> <summary>View changed files</summary> 📝 `bun.lock` (+0 -1) 📝 `packages/core/src/examples/index.ts` (+7 -0) ➕ `packages/core/src/examples/paste-demo.ts` (+163 -0) ➕ `packages/core/src/lib/KeyHandler.paste-binary.test.ts` (+31 -0) 📝 `packages/core/src/lib/KeyHandler.test.ts` (+15 -0) 📝 `packages/core/src/lib/KeyHandler.ts` (+38 -7) ➕ `packages/core/src/lib/paste-detect.test.ts` (+16 -0) ➕ `packages/core/src/lib/paste-detect.ts` (+39 -0) ➕ `packages/core/src/lib/stdin-buffer.paste-binary.test.ts` (+26 -0) 📝 `packages/core/src/lib/stdin-buffer.test.ts` (+2 -1) 📝 `packages/core/src/lib/stdin-buffer.ts` (+69 -65) 📝 `packages/core/src/renderables/Input.ts` (+1 -1) 📝 `packages/core/src/renderables/Textarea.ts` (+11 -4) 📝 `packages/core/src/renderables/__tests__/Textarea.paste.test.ts` (+2 -2) 📝 `packages/core/src/renderer.ts` (+1 -1) </details> ### 📄 Description Tested using the examples but havent done any integration tests with opencode yet. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#591
No description provided.