*-select: fixed unused keys scrolling; more doc

This commit is contained in:
Bert 2010-08-13 22:04:04 +02:00
parent 4a1e3a32c8
commit 82544b57e5
4 changed files with 12 additions and 19 deletions

View File

@ -69,7 +69,7 @@ Requires xsel to be installed!
After installing, put the folling lines in your .Xdefaults: After installing, put the folling lines in your .Xdefaults:
URxvt.perl-ext-common: clipboard URxvt.perl-ext-common: ...,clipboard
URxvt.keysym.M-c: perl:clipboard:copy URxvt.keysym.M-c: perl:clipboard:copy
URxvt.keysym.M-v: perl:clipboard:paste URxvt.keysym.M-v: perl:clipboard:paste
URxvt.keysym.M-C-v: perl:clipboard:paste_escaped URxvt.keysym.M-C-v: perl:clipboard:paste_escaped

View File

@ -8,7 +8,7 @@
# Requires xsel to be installed! # Requires xsel to be installed!
# Usage: put the following lines in your .Xdefaults: # Usage: put the following lines in your .Xdefaults:
# URxvt.perl-ext-common: clipboard # URxvt.perl-ext-common: ...,clipboard
# URxvt.keysym.M-c: perl:clipboard:copy # URxvt.keysym.M-c: perl:clipboard:copy
# URxvt.keysym.M-v: perl:clipboard:paste # URxvt.keysym.M-v: perl:clipboard:paste
# URxvt.keysym.M-C-v: perl:clipboard:paste_escaped # URxvt.keysym.M-C-v: perl:clipboard:paste_escaped

View File

@ -67,8 +67,6 @@ sub key_press {
move_cursor($self, 'left'); move_cursor($self, 'left');
} elsif ($char eq 'l' || $keysym == 0xff53) { } elsif ($char eq 'l' || $keysym == 0xff53) {
move_cursor($self, 'right'); move_cursor($self, 'right');
} else {
return;
} }
return 1; return 1;

View File

@ -10,19 +10,19 @@
# it also makes URLs clickable with the middle mouse button. # it also makes URLs clickable with the middle mouse button.
# Usage: put the following lines in your .Xdefaults: # Usage: put the following lines in your .Xdefaults:
# - URxvt.perl-ext-common: url-select # URxvt.perl-ext-common: ...,url-select
# - URxvt.keysym.M-u: perl:url-select:select_next # URxvt.keysym.M-u: perl:url-select:select_next
# Use Meta-u to activate URL selection mode, then use the following keys: # Use Meta-u to activate URL selection mode, then use the following keys:
# - 'k': select next upward URL (also with Meta-u) # k: select next upward URL (also with Meta-u)
# - 'j': select next downward URL # j: select next downward URL
# - Return: open selected URL in browser and quit selection mode # Return: open selected URL in browser and quit selection mode
# - 'y': copy (yank) selected URL and quit selection mode # y: copy (yank) selected URL and quit selection mode
# - Escape: cancel URL selection mode # Escape: cancel URL selection mode
# Options: # Options:
# - URxvt.urlLauncher: browser/command to open selected URL with # URxvt.urlLauncher: browser/command to open selected URL with
# - URxvt.underlineURLs: if set to true, all URLs get underlined # URxvt.underlineURLs: if set to true, all URLs get underlined
use strict; use strict;
@ -98,26 +98,21 @@ sub key_press {
if ($keysym == 0xff1b) { if ($keysym == 0xff1b) {
# escape # escape
deactivate($self); deactivate($self);
return 1;
} elsif ($keysym == 0xff0d) { } elsif ($keysym == 0xff0d) {
# return # return
$self->exec_async($self->{browser}, ${$self->{found}[$self->{n}]}[4]); $self->exec_async($self->{browser}, ${$self->{found}[$self->{n}]}[4]);
deactivate($self); deactivate($self);
return 1;
} elsif ($char eq 'y') { } elsif ($char eq 'y') {
$self->selection(${$self->{found}[$self->{n}]}[4]); $self->selection(${$self->{found}[$self->{n}]}[4]);
$self->selection_grab($event->{time}); $self->selection_grab($event->{time});
deactivate($self); deactivate($self);
return 1;
} elsif ($char eq 'k') { } elsif ($char eq 'k') {
select_next($self, -1); select_next($self, -1);
return 1;
} elsif ($char eq 'j') { } elsif ($char eq 'j') {
select_next($self, 1); select_next($self, 1);
return 1;
} }
() return 1;
} }