ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/keysym-list
Revision: 1.1
Committed: Fri Dec 2 09:13:50 2011 UTC (12 years, 5 months ago) by sf-exg
Branch: MAIN
Log Message:
Reimplement keysym list parsing in a perl extension.

File Contents

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