ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/keysym-list
(Generate patch)

Comparing rxvt-unicode/src/perl/keysym-list (file contents):
Revision 1.1 by sf-exg, Fri Dec 2 09:13:50 2011 UTC vs.
Revision 1.2 by root, Sat Dec 3 09:56:40 2011 UTC

1#! perl 1#! perl
2 2
3sub on_register_command { 3sub on_register_command {
4 my ($self, $keysym, $state, $str) = @_; 4 my ($self, $keysym, $state, $str) = @_;
5 5
6 if ($str =~ /^list(.)/) { 6 if ($str =~ /^list(.)/) {
7 my @list = split /\Q$1/, $str; 7 my @list = split /\Q$1/, $str;
8 if (@list == 4) { 8 if (@list == 4) {
9 for (0 .. (length $list[2]) - 1) { 9 $self->register_command ($keysym++, $state, "$list[1]$_$list[3]")
10 my $middle = substr $list[2], $_, 1; 10 for split //, $list[2];
11 my $def = $list[1] . $middle . $list[3];
12 $self->register_command ($keysym + $_, $state, $def);
13 }
14 return 1;
15 }
16 11
17 warn "unable to parse keysym '$str' as list, processing as normal keysym\n"; 12 return 1;
18 } 13 }
19 14
15 warn "unable to parse keysym '$str' as list, processing as normal keysym\n";
16 }
17
20 () 18 ()
21} 19}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines