Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [tip] mouse support



On Thu, Nov 11, 2004 at 05:07:36PM +0100, Andy Spiegl wrote:
[...] 
> wow great idea!  Not that I use the mouse a lot while typing in the
> shell but sometimes it would really be useful, especially with very
> long lines or multiline commands.
> 
> With multilines it doesn't work however. :-(

The new one I provided fixes that.

> And it also breaks the usual copy&paste behaviour.  It is necessary
> to hold the SHIFT key to be able to copy&paste.  Hm, maybe it would
> be better to just get the new behaviour holding down some modifier key.
[...]

I don't think it is possible. We'd have to tell xterm to send
the mouse tracking escape sequences on other events than the
default ones, and I don't think it is possible.

We could map any action on <Ctrl-btn<n>> but not the sending of
the cursor position. We may be able to do something with
dired-button(), though.

That would involve install a new translation table, you could
map:

someModifiers <BtnDown1>: string(0x1b) string("[M1") dired-button()\n\
someModifiers <BtnDown2>: string(0x1b) string("[M2") dired-button()\n\
someModifiers <BtnDown3>: string(0x1b) string("[M3") dired-button()\n\

and modify the code of zle-xterm-mouse so that it recognizes
those new sequences.

-- 
Stéphane



Messages sorted by: Reverse Date, Date, Thread, Author