You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: support pasting images from the clipboard #1429
It would be awesome to be able to paste images from the clipboard. Sometimes I don't want to save a screenshot to disk and then drag and drop it. Pasting copied images is super convenient.
It works for me on Linux with Ptyxis (VTE). On Windows Terminal (at least WSL) it doesn't work. I tried wezterm on Linux and it works.
Edit:
Today I tried some combinations and found that the following happens in both Windows Terminal and wezterm:
Scenario 1, copying an image with Windows Photos and pasting into opencode within WSL:
Open an image using Windows Photos.
Press ctrl+c to copy the content of the image.
Launch opencode on Ubuntu 24.04 using WSL.
Paste the image using ctrl+v
Result: The image is not pasted at all, nothing happens.
Scenario 2, copying an image with ImageGlass and pasting into opencode within WSL:
Open an image using ImageGlass.
Repeat steps 2, 3 and 4 from scenario 1
Result: It shows as if some text was pasted.
Scenario 3, taking a screenshot and pasting into opencode within WSL:
Take a screenshot using Windows snipping tool, the screenshot is in the clipboard now.
Launch opencode on Ubuntu 24.04 using WSL.
Paste the screenshot using ctrl+v
Result: The image is not recognized as such but as a giant block of text that was pasted. LLMs will reject this most of the time. And opencode will crash some time after that.
Cheers.
Reacted by Cristian Palau, Matthew Groff, MelonCholi and JulianSeibel
I thought this was not working for me on mac as I was using cmd-v. ctrl-v worked!
However for large blocks of text cmd-v works just fine. It seems it just doesn't work for images from clipboard.
Can you pls support cmd-v as well for images for consistency?
love the app!! Used it for a demo for a client!
Reacted by Pravin Adhav, Milen Boev, Andrejs Jermakovics and Thomas Willems
Whilst I am on a mac and cmd + v did fool for a bit. Its actually when running opencode i a container. I am using devpod and devcontainers to run all my lsp and interpreter config access to the database etc. So running opencode in the container is awesome as it can run all the tests etc.
But I can't paste images into it, I can paste in text but not say something I just screen shotted. Now, if I run opencode on the host ie, right on the Mac then ctrl+v does work. But then I lose all the LSPs and the ability to run the tests.
I just figured it out - Windows Terminal has a key binding on ctrl+v by default, preventing it from being forwarded to OpenCode. Claude Code accepts alt+v, which isn't captured by WT. For OpenCode to accept ctrl+v, you need to delete the key binding from the Windows Terminal settings, like this:
Under Actions, find the "Paste" entry with "ctrl+v", then delete it. ctrl+v should now work properly in OpenCode:
Reacted by Muhammad Suhaib, JEM, freezy, Lih, Raul Pereira da Silva, Naufaldi, DuyTranSipher, Gåbriél Sosa, MelonCholi, kenci and 10 more
I just figured it out - Windows Terminal has a key binding on ctrl+v by default, preventing it from being forwarded to OpenCode. Claude Code accepts alt+v, which isn't captured by WT. For OpenCode to accept ctrl+v, you need to delete the key binding from the Windows Terminal settings, like this:
Under Actions, find the "Paste" entry with "ctrl+v", then delete it. ctrl+v should now work properly in OpenCode:
Yea it works but then you can't paste text directly from clipboard, you can post images direct from clipboard but not text, also you have to use ctrl + shift + V then
I just figured it out - Windows Terminal has a key binding on ctrl+v by default, preventing it from being forwarded to OpenCode. Claude Code accepts alt+v, which isn't captured by WT. For OpenCode to accept ctrl+v, you need to delete the key binding from the Windows Terminal settings, like this:
Under Actions, find the "Paste" entry with "ctrl+v", then delete it. ctrl+v should now work properly in OpenCode:
Then you were able to paste text using ctrl + v in opencode tui ??
Activity
Rich107 commentedon Jul 31, 2025
I was just shammed in a pairing session and had to go over to cursor.... *shudders to past in the image I screenshotted.
Whining aside great job on opencode, loving it !
adamdotdevin commentedon Jul 31, 2025
there's a keybind for this, default is ctrl+v, is this not working for you?
dyskette commentedon Aug 2, 2025
It works for me on Linux with Ptyxis (VTE). On Windows Terminal (at least WSL) it doesn't work. I tried wezterm on Linux and it works.
Edit:
Today I tried some combinations and found that the following happens in both Windows Terminal and wezterm:
Scenario 1, copying an image with Windows Photos and pasting into opencode within WSL:
Scenario 2, copying an image with ImageGlass and pasting into opencode within WSL:
Scenario 3, taking a screenshot and pasting into opencode within WSL:
Cheers.
mattgillard commentedon Aug 11, 2025
I thought this was not working for me on mac as I was using cmd-v. ctrl-v worked!
However for large blocks of text cmd-v works just fine. It seems it just doesn't work for images from clipboard.
Can you pls support cmd-v as well for images for consistency?
love the app!! Used it for a demo for a client!
tnthi115 commentedon Aug 11, 2025
Thanks @adamdotdevin, this is works for me. I was using cmd+v instinctively. Feel free to close this issue for the original problem.
Rich107 commentedon Sep 5, 2025
Whilst I am on a mac and cmd + v did fool for a bit. Its actually when running opencode i a container. I am using devpod and devcontainers to run all my lsp and interpreter config access to the database etc. So running opencode in the container is awesome as it can run all the tests etc.
But I can't paste images into it, I can paste in text but not say something I just screen shotted. Now, if I run opencode on the host ie, right on the Mac then ctrl+v does work. But then I lose all the LSPs and the ability to run the tests.
rekram1-node commentedon Dec 28, 2025
[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
dhruvkej9 commentedon Jan 5, 2026
@rekram1-node We need it, still not working in WSL, we have to first save the image and then only paste works
awakecoding commentedon Jan 13, 2026
I just figured it out - Windows Terminal has a key binding on ctrl+v by default, preventing it from being forwarded to OpenCode. Claude Code accepts alt+v, which isn't captured by WT. For OpenCode to accept ctrl+v, you need to delete the key binding from the Windows Terminal settings, like this:
Under Actions, find the "Paste" entry with "ctrl+v", then delete it. ctrl+v should now work properly in OpenCode:
dhruvkej9 commentedon Jan 13, 2026
Yea it works but then you can't paste text directly from clipboard, you can post images direct from clipboard but not text, also you have to use ctrl + shift + V then
goleary commentedon Jan 29, 2026
why not use cmd + v like claude code?
adgower commentedon Feb 3, 2026
any updates on this?
dhruvkej9 commentedon Feb 3, 2026
Then you were able to paste text using ctrl + v in opencode tui ??
dhruvkej9 commentedon Feb 3, 2026
@tnthi115 you can reopen it, not solved yet
dansan92 commentedon Feb 11, 2026
One option is to create a
~/.config/opencode/opencode.jsonand add:{ "$schema": "https://opencode.ai/config.json", "keybinds": { "input_paste": "alt+v" } }Worked for me with WSL, now I can paste text with standard
ctrl+v, and images withalt+v.