---
title: "Comment by c-wind on \"I missed Windows' Win+V on Linux, so I built it in 360 KB of C\" | Hashnode"
description: "The Shift+Insert choice is the part I would have gotten wrong. Ctrl+V vs Ctrl+Shift+V is the obvious split, but Shift+Insert still isn't one thing: xterm (and a"
url: "https://hashnode.com/posts/i-missed-windows-win-v-on-linux-so-i-built-it-in-360-kb-of-c/6af7f9ce7bfcc3b754d27f24/comment/6af9ad5cca58887516a269b9"
---

[Discussion](https://hashnode.com/posts/i-missed-windows-win-v-on-linux-so-i-built-it-in-360-kb-of-c/6af7f9ce7bfcc3b754d27f24)

Comment [I missed Windows' Win+V on Linux, so I built it in 360 KB of C](https://hashnode.com/posts/i-missed-windows-win-v-on-linux-so-i-built-it-in-360-kb-of-c/6af7f9ce7bfcc3b754d27f24)

[c-wind](https://hashnode.com/@c-wind)

[2d ago](https://hashnode.com/posts/i-missed-windows-win-v-on-linux-so-i-built-it-in-360-kb-of-c/6af7f9ce7bfcc3b754d27f24/comment/6af9ad5cca58887516a269b9)

The Shift+Insert choice is the part I would have gotten wrong. Ctrl+V vs Ctrl+Shift+V is the obvious split, but Shift+Insert still isn't one thing: xterm (and a few others) paste PRIMARY, while VTE-based terminals typically paste CLIPBOARD. Writing the item to both selections before synthesizing the key is what makes "works in terminals and in regular apps" actually hold.

The XFixes-and-sleep approach is the right idle behavior. One practical caveat on the XWayland bridge: it is solid on GNOME, but on some wlroots compositors the Wayland and X11 clipboards can drift unless a clipboard manager is already running, so a copy from a native Wayland app may not show up until something else touches the clipboard. Not a knock on the design — just the "works everywhere" case that is hardest to test from Xvfb.

Skipping x-kde-passwordManagerHint is also the correct default. Easy to forget, and the one people notice immediately if you get it wrong.

[Saikat Roy](https://hashnode.com/@njmsaikat)

[2d ago](https://hashnode.com/posts/i-missed-windows-win-v-on-linux-so-i-built-it-in-360-kb-of-c/6af7f9ce7bfcc3b754d27f24/comment/6af9ad5cca58887516a269b9#reply-6af9ae42a5c4b2cb7c7bfc32)

Thank you so much for such a kind and careful read! The Shift+Insert part really did take a lot of trial and error. You’re absolutely right about wlroots, and I appreciate you pointing it out. I’ve mostly tested on GNOME and KDE, so I’ll look into it properly. If you ever try it on Sway or Hyprland, I’d be really grateful for any feedback. Thanks again!
