Ivan Tomica

Fixing URxvt copy/paste

URxvt, or if you wish to call it rxvt-unicode, has this weird thing turned on by default where it binds ctrl+shift keys to all sorts of insanity (keycap picture insert mode and stuff like that).

Dammit, I want my “normal” terminal behavior back! By “normal” I think that if I press:

  • Ctrl + Shift + V -> paste contents of my main clipboard (from X)
  • Ctrl + Shift + C -> copy current selection to clipboard

So to restore that functionality here’s the magic thing you need in your .Xresources file in order to achieve it:

! Restore Ctrl+Shift+(c|v)
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
URxvt.iso14755: false
URxvt.iso14755_52: false

Once you have that just merge settings with:

xrdb -merge .Xresources

Sysadmin on the everlasting journey of learning. Always in search for an opportunity to prove myself and to learn something new. My addiction is learning and my main goal is to excel in every aspect of Linux/Unix system administration.


Leave a Reply

Your email address will not be published. Required fields are marked *