Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rebinding copy & paste in urxvt

Tags:

rxvt

rxvt-unicode has the ability to copy to/from system clipboard using Ctrl+Meta+C and Ctrl+Meta+V (Meta is Alt usually).

Is there a way to rebind those functions to other keys? Ctrl+Shift+C and Ctrk+Shift+V would be more intuitive choice.

like image 650
Slimior Avatar asked Oct 24 '25 13:10

Slimior


1 Answers

I just managed to get this working yesterday. Here are the X resources I needed:

! Disable ISO 14755 unicode input so we can use Ctrl-Shift bindings
URxvt.iso14755:        false
URxvt.iso14755_52:     false

! Disable Ctrl-Alt-c & Ctrl-Alt-v bindings (optional)
URxvt.keysym.C-M-c:    builtin-string:
URxvt.keysym.C-M-v:    builtin-string:

! Bind Ctrl-Shift-c & Ctrl-Shift-v to copy and paste
! I dont know why, but I needed to use hex keysym values to get it to work
URxvt.keysym.C-S-0x43: eval:selection_to_clipboard
URxvt.keysym.C-S-0x56: eval:paste_clipboard
like image 77
Alex Griffin Avatar answered Oct 27 '25 04:10

Alex Griffin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!