Re: Mouse interface for text mc via console telnet



Hi Pavel,

Thanx for your friendly and useful answers - much appreciated (almost as 
much as I appreciate your work on mc! :-)

On 4 Sep 2001, at 17:19, Pavel Roskin wrote:
Mouse support on the Linux console is implemented using gpm library. This
library reads mouse events from a UNIX socket /dev/gpmctl using gpm own
protocol.  I don't tring it's worth the trouble to emulate it.

Mouse support on xterm actually works remotely if you run telnet or ssh in
xterm.  I always wanted an emulator for Windows that would emulate xterm
closely enough to support xterm mouse.

Our package of emulators on Windows does not include xterm.  But I think 
we should investigate the posibility of producing one.  Since our bread-and-
butter depends on selling the package, we can not use GPL code to write 
an xterm.  (You're welcome to try our linux console - just ask.)

However, there are three important limitations.  They are likely to be
removed in the future, but they exist in all versions of MC including
4.5.55:

1) The terminal name on the remote side must begin with "xterm" or be
equal to "dtterm".

2) This cannot be overridden even by the "-x" option.

3) The protocol must be exactly the one used by xterm.  The sequences are
hardcoded - they are not taken from terminfo.

In other words, to support xterm mouse, xterm should be emulated quite
closely, but this requirement may be relaxed in the future versions of MC.

These limitations do not sound too hard!?
 
You could search for documents about xterm mouse reporting, but I just
want to suggest you one.  Get rxvt-2.6.3 from
ftp://ftp.rxvt.org/pub/rxvt/rxvt-2.6.3.tar.gz and look for "mouse" in
doc/rxvtRef.txt

Thanx - I'll get it.
 
How can I send the mouse clicks to the linux box? My emulator allows me
to add scripted functions.  Currently I translate mouse clicks into certain
keystrokes depending on position and content on the screen.

At least implement xterm mouse reporting without the ability to disable
it.  Even that will be safer.

Yes - I guess that is the direction I should be looking at.
My idea was that I send an escape sequence from the terminal to mc 
giving the type of mouse-click and the position.  Something like:
"M-mouse 1 down;03;56".  It would then work from many different 
terminals, provided they can translate their mouse-clicks to the required 
string.

If we only could make all already existing code in MC work, without any
new stuff!

Yes - first things first - but it seems one never gets there  :-/

Greetings
Ferdi




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]