ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/urxvt.pm
(Generate patch)

Comparing rxvt-unicode/src/urxvt.pm (file contents):
Revision 1.249 by root, Fri Dec 26 21:26:37 2014 UTC vs.
Revision 1.250 by sf-exg, Fri Dec 26 21:49:11 2014 UTC

45 45
46 URxvt.perl-ext-common: default,selection-autotransform 46 URxvt.perl-ext-common: default,selection-autotransform
47 47
48Extensions may add additional resources and C<actions>, i.e., methods 48Extensions may add additional resources and C<actions>, i.e., methods
49which can be bound to a key and invoked by the user. An extension can 49which can be bound to a key and invoked by the user. An extension can
50define the resources it support and also default bindings for one or 50define the resources it support using so called META comments,
51more actions it provides using so called META comments, described
52below. Similarly to builtin resources, extension resources can also be 51described below. Similarly to builtin resources, extension resources
53specified on the command line as long options (with C<.> replaced by 52can also be specified on the command line as long options (with C<.>
54C<->), in which case the corresponding extension is loaded 53replaced by C<->), in which case the corresponding extension is loaded
55automatically. For this to work the extension B<must> define META 54automatically. For this to work the extension B<must> define META
56comments for its resources. 55comments for its resources.
57 56
58=head1 API DOCUMENTATION 57=head1 API DOCUMENTATION
59 58
118=head2 META comments 117=head2 META comments
119 118
120Rxvt-unicode recognizes special meta comments in extensions that define 119Rxvt-unicode recognizes special meta comments in extensions that define
121different types of metadata. 120different types of metadata.
122 121
123Currently, it recxognises only one such comment: 122Currently, it recognises only one such comment:
124 123
125=over 4 124=over 4
126 125
127=item #:META:RESOURCE:name:type:desc 126=item #:META:RESOURCE:name:type:desc
128 127
1349=item $success = $term->bind_action ($key, $action) 1348=item $success = $term->bind_action ($key, $action)
1350 1349
1351Adds a key binding exactly as specified via a C<keysym> resource. See the 1350Adds a key binding exactly as specified via a C<keysym> resource. See the
1352C<keysym> resource in the urxvt(1) manpage. 1351C<keysym> resource in the urxvt(1) manpage.
1353 1352
1354To add default bindings for an extension, the extension should call C<< 1353To add default bindings for actions, an extension should call C<<
1355->bind_action >> on it's C<init> hook for every such binding. Doing it 1354->bind_action >> in its C<init> hook for every such binding. Doing it
1356in the C<init> hook allows users the override or remove the the binding 1355in the C<init> hook allows users to override or remove the binding
1357again. 1356again.
1358 1357
1359Example: the C<searchable-scrollback> by default binds itself 1358Example: the C<searchable-scrollback> by default binds itself
1360on C<Meta-s>, using C<< $self->bind_action >>, which calls C<< 1359on C<Meta-s>, using C<< $self->bind_action >>, which calls C<<
1361$term->bind_action >>. 1360$term->bind_action >>.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines