1 |
sf-exg |
1.1 |
#! perl |
2 |
|
|
|
3 |
root |
1.4 |
=head1 NAME |
4 |
|
|
|
5 |
|
|
keysym-list - implement the "list" keysym expansion. |
6 |
|
|
|
7 |
|
|
=head1 SYNOPSIS |
8 |
|
|
|
9 |
|
|
urxvt -pe keysym-list |
10 |
|
|
|
11 |
|
|
=head1 DESCRIPTION |
12 |
|
|
|
13 |
|
|
The "list" keysym expansion was formerly part od the rxvt-unicode core, |
14 |
|
|
and has been moved into this extension for backwards compatibility. You |
15 |
|
|
shouldn't use this extension except for compatibility with old |
16 |
|
|
configurations. |
17 |
|
|
|
18 |
|
|
=cut |
19 |
|
|
|
20 |
|
|
|
21 |
sf-exg |
1.1 |
sub on_register_command { |
22 |
root |
1.2 |
my ($self, $keysym, $state, $str) = @_; |
23 |
sf-exg |
1.1 |
|
24 |
root |
1.2 |
if ($str =~ /^list(.)/) { |
25 |
|
|
my @list = split /\Q$1/, $str; |
26 |
sf-exg |
1.3 |
if (@list == 3 or @list == 4) { |
27 |
root |
1.2 |
$self->register_command ($keysym++, $state, "$list[1]$_$list[3]") |
28 |
|
|
for split //, $list[2]; |
29 |
sf-exg |
1.1 |
|
30 |
root |
1.2 |
return 1; |
31 |
|
|
} |
32 |
sf-exg |
1.1 |
|
33 |
root |
1.2 |
warn "unable to parse keysym '$str' as list, processing as normal keysym\n"; |
34 |
|
|
} |
35 |
|
|
|
36 |
|
|
() |
37 |
sf-exg |
1.1 |
} |