--- rxvt-unicode/src/perl/tabbed 2006/01/20 15:40:39 1.7 +++ rxvt-unicode/src/perl/tabbed 2006/01/20 15:47:55 1.8 @@ -210,13 +210,32 @@ () } +sub tab_key_press { + my ($self, $tab, $event, $keysym, $str) = @_; + + if ($event->{state} & urxvt::ShiftMask + && ($keysym == 0xff51 || $keysym == 0xff53)) { + my ($idx) = grep $self->{tabs}[$_] == $tab, 0 .. $#{ $self->{tabs} }; + + --$idx if $keysym == 0xff51; + ++$idx if $keysym == 0xff53; + + $self->make_current ($self->{tabs}[$idx % @{ $self->{tabs}}]); + $self->refresh; + + return 1; + } + + () +} + package urxvt::ext::tabbed::tab; # helper extension implementing the subwindows of a tabbed terminal. # simply proxies all interesting calls back to the tabbed class. { - for my $hook qw(start destroy) { + for my $hook qw(start destroy key_press) { eval qq{ sub on_$hook { my \$parent = \$_[0]{term}{parent}