You are not logged in.
Hello.
How do I change hotkeys for tabbed urxvt? For example Shift+Right to Ctrl+Right to switch to next tab? Shift conflicts with editing in mcedit.
Last edited by Mr. Alex (2012-03-20 12:31:43)
Offline
You might have to tweak the corresponding perl extension.
Offline
This one? > /usr/lib/urxvt/perl/tabbed
I don't code Perl so could you tell which thing to change? Simple search for "shift" in file doesn't give me a keybinding.
Offline
This one? > /usr/lib/urxvt/perl/tabbed
I don't code Perl so could you tell which thing to change? Simple search for "shift" in file doesn't give me a keybinding.
Sorry, I don't know Perl either.
It shouldn't be that hard though.
Offline
It's quite simple.
Just edit /usr/lib/urxvt/perl/tabbed and go to line 315. It reads:
if ($event->{state} & urxvt::ShiftMask) {All you have to do, is replace "Shift", with "Control". The line must look like this:
if ($event->{state} & urxvt::ControlMask) {I already checked it, and it works.
Keep in mind though, that it's a system file, and maybe it will be overwritten after an update.
But you can copy it under another name and execute it like this:
urxvt -pe your-new-fancy-script-- Beware of he who would deny you access to information, for in his heart he dreams himself your master.
Offline
Thanoulis, thanks. Where do I find Ctrl+D combo to make it Ctrl+W?
Offline
It seems that the key may be here:
sub tab_destroy {
my ($self, $tab) = @_;
$self->{tabs} = [ grep $_ != $tab, @{ $self->{tabs} } ];
if (@{ $self->{tabs} }) {
if ($self->{cur} == $tab) {
delete $self->{cur};
$self->make_current ($self->{tabs}[-1]);
} else {
$self->refresh;
}
} else {
# delay destruction a tiny bit
$self->{destroy} = urxvt::iw->new->start->cb (sub { $self->destroy });
}
()
}but I can't parse it...
Offline
Thanoulis, thanks. Where do I find Ctrl+D combo to make it Ctrl+W?
I don't know if you can change that...C-d sends End-Of-File to the current process. It might be that rvxt-unicode is set to terminate when it receives EOF.
Offline
Hi, I have write one using .Xresources to configure the shortkeys. Hope you can find it useful. Here is the link
http://kuantkid.github.com/urxvt-utils/
One thing, if you want to use the like Ctrl+W , you have to make the CtrlKey to be ctrl rather than Shift as Shift+W will not triger the ($event->{state} & urxvt::ShiftMask) but only response as a Capital W.
This is not tested intensively and you may find many bugs :-) . If you have any problem please do leave me a message either in github or in this thread. I will try to correct it asap.
Last edited by cvhacker (2012-08-28 06:47:20)
My GitHub: kuantkid.github.com
Offline