Hello, I looking for an advice as the previously posted extensions shows some problems : The double-click to select the part of a line seems disabled when I load this extension. Moreover, if I start to select something, I cannot stop selecting-mode whatever I click with my mouse.
My guess is that the on_button_press override the others actions for the given event rather than adding itself to the actions queue for this event. Any idea ? Raph On Fri, Sep 25, 2009 at 05:33:41PM +0200, [email protected] wrote: > Hi, > I just tried to make an extension to give the ability to map the wheel. > So here comes a kind of draft (1st extension + I don't know perl) > > advices welcome (in case someone would be interested in) > > (I also noticed a problem in the urxvtperl [tabbar section] documentation > as the resources should not be prefixed by the perl extension name ("tabbed") > to have it taken into account) (urxvt 9.05) > > Confirmation that $self->x_resource() in on_start() is correct ? > (some extensions use it in on_init) > > > Raph > > On Sun, Sep 20, 2009 at 05:29:02PM +0200, Marc Lehmann wrote: > > On Sun, Sep 20, 2009 at 05:12:34PM +0200, [email protected] wrote: > > > I just discovered the vt100.translations resource > > > > > > But ... in urxvt it doesn't work and I my attempts to diff > > > > that's an xterm-specific resource, it has nothing to do with terminal > > emulation or terminfo. > > > > > In the theory I know it's up to mutt to handle the mouse and the > > > > It's an option for mutt to do so, it doesn't _have_ to :) > > > > > anyway urxvt has the mouseWheelScrollPage resource so I still think > > > that the wheel is somewhere internally ""handled"". > > > > Sure, urxvt handles the mouse wheel. mutt could ask urxvt (or xterm) to get > > sent mouse events instead, but doesn't do so. > > > > mouse events are not part of keysym handling, btw., with either xterm or > > urxvt. > > > > the equivalent of the event translations for xterm is a perl extension in > > urxvt, which is vastly more flexible and powerful than the xterm (actually > > Xt) resource method. urxvt is not based on Xt, so xt-specific resources > > don't apply. > #! perl > > sub on_start { > my ($self) = @_; > > $self->{onmouseup} = $self->x_resource ("onmouseup"); > $self->{onmousedown} = $self->x_resource ("onmousedown"); > > if ( ! $self->{onmouseup}) { > warn "wheel extension: no 'onmouseup' resource event configured"; > } > if ( ! $self->{onmousedown}) { > warn "wheel extension: no 'onmousedown' resource event configured"; > } > > () > } > > sub on_button_press { > my ($self, $event) = @_; > > if ($event->{button} == 4 && $self->{onmouseup}) { > $self->tt_write($self->locale_encode($self->{onmouseup})); > } > if ($event->{button} == 5 && $self->{onmousedown}) { > $self->tt_write($self->locale_encode($self->{onmousedown})); > } > > 1 > } > _______________________________________________ rxvt-unicode mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode
