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