Abort keyboard & url selection modes with Ctrl-c; fixes issue #46
This commit is contained in:
parent
6481d92137
commit
e54f4c238e
@ -59,7 +59,9 @@ sub key_press {
|
|||||||
my ($self, $event, $keysym, $char) = @_;
|
my ($self, $event, $keysym, $char) = @_;
|
||||||
my $key = chr($keysym);
|
my $key = chr($keysym);
|
||||||
|
|
||||||
if ($self->{search}) {
|
if (lc($key) eq 'c' && $event->{state} & urxvt::ControlMask) {
|
||||||
|
deactivate($self);
|
||||||
|
} elsif ($self->{search}) {
|
||||||
if ($keysym == 0xff1b) {
|
if ($keysym == 0xff1b) {
|
||||||
if ($self->{search_mode}) {
|
if ($self->{search_mode}) {
|
||||||
deactivate($self);
|
deactivate($self);
|
||||||
|
@ -122,7 +122,8 @@ sub key_press {
|
|||||||
my ($self, $event, $keysym) = @_;
|
my ($self, $event, $keysym) = @_;
|
||||||
my $char = chr($keysym);
|
my $char = chr($keysym);
|
||||||
|
|
||||||
if ($keysym == 0xff1b || lc($char) eq 'q') {
|
if ($keysym == 0xff1b || lc($char) eq 'q' ||
|
||||||
|
(lc($char) eq 'c' && $event->{state} & urxvt::ControlMask)) {
|
||||||
deactivate($self);
|
deactivate($self);
|
||||||
} elsif ($keysym == 0xff0d || $char eq 'o') {
|
} elsif ($keysym == 0xff0d || $char eq 'o') {
|
||||||
$self->exec_async(@{$self->{browser}}, ${$self->{found}[$self->{n}]}[4]);
|
$self->exec_async(@{$self->{browser}}, ${$self->{found}[$self->{n}]}[4]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user