… | |
… | |
675 | @TERM_EXT = (); |
675 | @TERM_EXT = (); |
676 | $TERM->register_package ($_) for @pkg; |
676 | $TERM->register_package ($_) for @pkg; |
677 | } |
677 | } |
678 | |
678 | |
679 | for ( |
679 | for ( |
680 | @{ delete $TERM->{perl_ext_3} }, |
|
|
681 | grep $_, map { split /,/, $TERM->resource ("perl_ext_$_") } 1, 2 |
680 | grep $_, map { split /,/, $TERM->resource ("perl_ext_$_") } 1, 2 |
682 | ) { |
681 | ) { |
683 | if ($_ eq "default") { |
682 | if ($_ eq "default") { |
684 | |
683 | |
685 | $ext_arg{$_} ||= [] |
684 | $ext_arg{$_} = [] |
686 | for |
685 | for |
687 | qw(selection option-popup selection-popup readline), |
686 | qw(selection option-popup selection-popup readline), |
|
|
687 | @{ delete $TERM->{perl_ext_3} }, |
688 | map $_->[0], values %{ $TERM->{meta}{binding} }; |
688 | map $_->[0], values %{ $TERM->{meta}{binding} }; |
|
|
689 | |
|
|
690 | for ($TERM->_keysym_resources) { |
|
|
691 | next if /^(?:string|command|builtin|builtin-string|perl)/; |
|
|
692 | next unless /^([A-Za-z0-9_\-]+):/; |
|
|
693 | |
|
|
694 | my $ext = $1; |
|
|
695 | |
|
|
696 | $ext_arg{$ext} = []; |
|
|
697 | } |
689 | |
698 | |
690 | } elsif (/^-(.*)$/) { |
699 | } elsif (/^-(.*)$/) { |
691 | delete $ext_arg{$1}; |
700 | delete $ext_arg{$1}; |
692 | |
701 | |
693 | } elsif (/^([^<]+)<(.*)>$/) { |
702 | } elsif (/^([^<]+)<(.*)>$/) { |
… | |
… | |
697 | $ext_arg{$_} ||= []; |
706 | $ext_arg{$_} ||= []; |
698 | } |
707 | } |
699 | } |
708 | } |
700 | |
709 | |
701 | # now register default key bindings |
710 | # now register default key bindings |
|
|
711 | for my $ext (sort keys %ext_arg) { |
702 | while (my ($k, $v) = each %{ $TERM->{meta}{binding} }) { |
712 | while (my ($k, $v) = each %{ $TERM->{meta}{ext}{$ext}{binding} }) { |
703 | $TERM->bind_action ($k, "$v->[0]:$v->[1]"); |
713 | $TERM->bind_action ($k, "$v->[0]:$v->[1]"); |
|
|
714 | } |
704 | } |
715 | } |
705 | |
716 | |
706 | for my $ext (sort keys %ext_arg) { |
717 | for my $ext (sort keys %ext_arg) { |
707 | my @files = grep -f $_, map "$_/$ext", @dirs; |
718 | my @files = grep -f $_, map "$_/$ext", @dirs; |
708 | |
719 | |
… | |
… | |
1487 | to the locale-specific encoding using C<< $term->locale_encode >>. |
1498 | to the locale-specific encoding using C<< $term->locale_encode >>. |
1488 | |
1499 | |
1489 | =item $term->tt_write_user_input ($octets) |
1500 | =item $term->tt_write_user_input ($octets) |
1490 | |
1501 | |
1491 | Like C<tt_write>, but should be used when writing strings in response to |
1502 | Like C<tt_write>, but should be used when writing strings in response to |
1492 | the user pressing a key, to invokes the additional actions requested by |
1503 | the user pressing a key, to invoke the additional actions requested by |
1493 | the user for that case (C<tt_write> doesn't do that). |
1504 | the user for that case (C<tt_write> doesn't do that). |
1494 | |
1505 | |
1495 | The typical use case would be inside C<on_action> hooks. |
1506 | The typical use case would be inside C<on_action> hooks. |
1496 | |
1507 | |
1497 | =item $term->tt_paste ($octets) |
1508 | =item $term->tt_paste ($octets) |