6

I know that I can copy and paste text in rxvt by using the middle mouse button, but I was wondering if there was a way to define keyboard-shortcuts in the .Xdefaults for copy and pasting text.

Moreover it would be really awesome if it would be possible to select the text with the keyboard as well.

EDIT:

Trying to use urxvt-perls does not seem to work (maybe because of the zsh-VI-bindings?). When I try running the script from the command line I also get the following errors:

% perl keyboard-select 
Bareword "urxvt::ControlMask" not allowed while "strict subs" in use at keyboard-select line 137.
Bareword "urxvt::ControlMask" not allowed while "strict subs" in use at keyboard-select line 151.
Execution of keyboard-select aborted due to compilation errors.

Unfortunately I know nothing about a perl and have no idea if this is anyhow related to it not working in urxvt itself.strong text

  • 3
    For pasting, there is the default shift+insert. This is a fairly universal method of pasting (in that different OSes and applications support it). – Patrick Jan 25 '12 at 23:31
7

You can use urxvt-perls to enable keyboards shortcuts for copy and paste in urxvt.

Place the required scripts in /usr/lib/urxvt/perl/ and add these lines to your .X{resources,defaults}:

URxvt.perl-ext-common: ...,keyboard-select
URxvt.keysym.M-Escape: perl:keyboard-select:activate
  • Is there any way to see if the modules are loaded and do something? Following the github instructions does not work - or could it be that it does not work with the ZSH-vi-bindings? – Gjallar Jan 26 '12 at 18:48
  • It should work once you have reloaded your resources file: xrdb -merge ~/.Xresources It may be an issue with the bindings otherwise... – jasonwryan Jan 26 '12 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.