--- rxvt-unicode/src/urxvt.pm 2014/05/17 17:12:29 1.236 +++ rxvt-unicode/src/urxvt.pm 2014/05/28 15:51:29 1.239 @@ -677,15 +677,25 @@ } for ( - @{ delete $TERM->{perl_ext_3} }, grep $_, map { split /,/, $TERM->resource ("perl_ext_$_") } 1, 2 ) { if ($_ eq "default") { - $ext_arg{$_} ||= [] + $ext_arg{$_} = [] for qw(selection option-popup selection-popup readline), - map $_->[0], values %{ $TERM->{meta}{binding} }; + map $_->[0], values %{ $TERM->{meta}{binding} }, + @{ delete $TERM->{perl_ext_3} }; + + for ($TERM->_keysym_resources) { + next if /^(?:string|command|builtin|builtin-string|perl)/; + next unless /^([A-Za-z0-9_\-]+):/; + + my $ext = $1; + $ext =~ y/-/_/; + + $ext_arg{$ext} = []; + } } elsif (/^-(.*)$/) { delete $ext_arg{$1}; @@ -699,8 +709,10 @@ } # now register default key bindings - while (my ($k, $v) = each %{ $TERM->{meta}{binding} }) { - $TERM->bind_action ($k, "$v->[0]:$v->[1]"); + for my $ext (sort keys %ext_arg) { + while (my ($k, $v) = each %{ $TERM->{meta}{ext}{$ext}{binding} }) { + $TERM->bind_action ($k, "$v->[0]:$v->[1]"); + } } for my $ext (sort keys %ext_arg) { @@ -1489,7 +1501,7 @@ =item $term->tt_write_user_input ($octets) Like C, but should be used when writing strings in response to -the user pressing a key, to invokes the additional actions requested by +the user pressing a key, to invoke the additional actions requested by the user for that case (C doesn't do that). The typical use case would be inside C hooks.