When using a workstation with a mouse to emulate a terminal, one problem is
how to send mouse-position data inband to the host. This is important, for
example, if you want to use the mouse with a host-based editor like Emacs
that is designed for use with traditional character-oriented crt terminals.
My question: has any standard arisen for encoding such mouse data?
One possibility, of course, is to transmit a cursor-position sequence (if
the emulation is ANSI standard, that's ESC [ <line> ; <row> R ), but one
frequently wants to have the mouse cursor be independent of the display
cursor, so this is a bad choice. A variation on this theme is to send
a sequence of relative motion command, as if the user had pressed arrow
keys. Another (even uglier) possibility is to second-guess why the host
application program wants to know the mouse cursor; for example, in
Interlisp-D a click of the mouse sends a sequence of Emacs commands (^A,
^P, ^N, ^F, etc.) to move the typein point to match the mouse position.
Another possibility, which I prefer, is that used on the BBN Bitgraph --
to send a special command sequence to report on mouse position and status
(e.g. buttons). For BBN, that sequence is ESC : 2 ; <x> ; <y> ; <flags> c
where x and y are window- or screen-relative pixel coordinates, and flags
encodes such things as which mouse button was pressed, or whether x and y
represent deltas from the previous mouse position. The Bitgraph may
be programmed to send status reports at timed intervals (to allow host
tracking), on button events, on motion, etc.
I would like to see some standard including these features and others
(e.g. status reports when the mouse enters a host-settable hotzone or
crosses a boundary such as a window edge, position reporting in either
pixel or character units, and perhaps support for multiple or 3d pointing
devices). Ideally, this would become an extension to X3.64.
Is such a standard unreasonable? Are there any de facto standards now?