Skip to content

LeeSinLiang/claude-wsl-image-paste

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Claude Code Image Paste Fix for WSL2

Fixes image pasting in Claude Code when running inside WSL2 on Windows Terminal.

Problem

When you copy an image on Windows and try to paste it in Claude Code running in WSL2, nothing happens. Windows Terminal intercepts Ctrl+V as its own paste shortcut. When the clipboard has image data (not text), nothing is sent to Claude Code — it never sees the keypress.

Claude Code v2.1.121+ already handles BMP→PNG conversion internally (issue #25935), so the clipboard format isn't the problem — the keypress just never arrives.

Solution

Bind Alt+V to chat:imagePaste in Claude Code. Windows Terminal doesn't intercept Alt+V, so the keypress reaches Claude Code, which then reads the clipboard image directly via wl-paste.

Installation

git clone https://github.com/LeeSinLiang/claude-image-paste.git
cd claude-image-paste
chmod +x setup.sh
./setup.sh

Restart Claude Code after running setup.

Usage

Copy any image on Windows (Win+Shift+S, browser, etc.), then press Alt+V in Claude Code.

What the setup does

Creates ~/.claude/keybindings.json with one binding:

{ "context": "Chat", "bindings": { "alt+v": "chat:imagePaste" } }

That's it. No daemon, no background process, zero resource cost.

Why not Ctrl+V?

Windows Terminal reserves Ctrl+V (paste) and Ctrl+Shift+V (paste as plain text) at the terminal level. These keybindings cannot be passed through to CLI applications. Alt+V is also what Claude Code uses on native Windows.

Requirements

  • WSL2 with WSLg (Windows 11 or Windows 10 with WSLg support)
  • Claude Code v2.1.121+

Troubleshooting

If wl-paste errors with "compositor does not seem to implement seat", restart WSL from PowerShell: wsl --shutdown, then reopen your terminal.

About

Fix image pasting (Ctrl+V) in Claude Code when running inside WSL2

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages