Added -g, --oldmouse option to support of NORMAL/BUTTON_EVENT mouse type.

Required for some terminals (screen/tmux) to force needed mouse type
(BUTTON_EVENT by default).

Normal tracking mode sends an escape sequence on both button press and release.
Mouse highlight tracking notifies a program of a button press, receives a range of
lines from the program, highlights the region covered by the mouse within that
range until button release, and then sends the program the release coordinates.
It is enabled by specifying parameter 1001 to DECSET.

Button-event tracking is essentially the same as normal tracking, but xterm also
reports button-motion events. Motion events are reported only if the mouse pointer
has moved to a different character cell. It is enabled by specifying parameter 1002 to DECSET.
On button press or release, xterm sends the same codes used by normal tracking mode.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

changed mc.1.in, added description of command line options -g, --oldmouse.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
Ilia Maslakov 2011-09-07 11:17:03 +04:00 committed by Andrew Borodin
parent bfbe9b94ae
commit 67c35a20a6
11 changed files with 49 additions and 5 deletions

View File

@ -111,6 +111,10 @@ Muestra la versión del programa.
.I \-x, \-\-xterm
Fuerza el modo xterm. Usado cuando se ejecuta en terminales con características de xterm (dos
modos de pantalla, y pueden enviar secuencias de escape de ratón).
.TP
.I \-g, \-\-oldmouse
Force a "normal tracking" mouse mode. Used when running on
xterm\-capable terminals (tmux/screen).
.PP
Si se especifica, el primer directorio se mostrará en el
panel activo y el segundo directorio en el otro panel.

View File

@ -100,6 +100,10 @@ Megmutatja a program verziószámát.
.I "\-x"
Belép xterm módba. (Két képernyős módban használható, és az egér escape
szekvenciái is használhatóak).
.TP
.I \-g, \-\-oldmouse
Force a "normal tracking" mouse mode. Used when running on
xterm\-capable terminals (tmux/screen).
.PP
Ha megadtad, akkor az első útvonal tartalma jelenik meg az aktuális
panelen; a második könyvtár útvonal pedig a másik panelen jelenik meg.

View File

@ -118,6 +118,10 @@ Mostra la versione del programma.
Forza la modalità xterm. Usata quando è in funzione su terminali
abilitati\-xterm (due modalità video e in grado di spedire sequenze
mouse di escape).
.TP
.I \-g, \-\-oldmouse
Force a "normal tracking" mouse mode. Used when running on
xterm\-capable terminals (tmux/screen).
.PP
Se specificato, il primo percorso è la directory mostrata nel
pannello selezionato; il secondo è la directory mostrata nell'altro

View File

@ -159,6 +159,10 @@ Display the version of the program.
.I \-x, \-\-xterm
Force xterm mode. Used when running on xterm\-capable terminals (two
screen modes, and able to send mouse escape sequences).
.TP
.I \-g, \-\-oldmouse
Force a "normal tracking" mouse mode. Used when running on
xterm\-capable terminals (tmux/screen).
.PP
If specified, the first path name is the directory to show in the
selected panel; the second path name is the directory to be shown in

View File

@ -103,6 +103,10 @@ Wyświetla wersję programu.
.I \-x
Wymusza włączenie trybu xterm. Używane kiedy działa się na terminalach wyposażonych
w opcje xterm (dwa tryby ekranu i możliwość wysyłania myszą sygnałów wyjścia).
.TP
.I \-g, \-\-oldmouse
Force a "normal tracking" mouse mode. Used when running on
xterm\-capable terminals (tmux/screen).
.PP
Jeśli wybrano, pierwszy katalog używany jest do wyświetlenia w pierwszym panelu.
Drugi wyświetlany jest w drugim panelu.

View File

@ -139,6 +139,10 @@ terminfo: в этом случае Midnight Commander использует зн
работающих в режиме xterm (два режима работы экрана и возможность
формировать экранирующие последовательности с помощью мыши) (two screen
modes, and able to send mouse escape sequences).
.TP
.I \-g, \-\-oldmouse
Принудительно устанавливает режим мыши "normal tracking". В xterm-совместимых
терминалах (например, tmux/screen).
.PP
Первое путевое имя (path name) в командной строке (если указано) задает
каталог, который будет отображаться в активной панели; второй путь \-

View File

@ -98,6 +98,10 @@ termcap/terminfo. Корисно је само на ХП\-овим термин
Захтева режим Икс терминала. Користи се када је програм покренут на
терминалима који имају подршку за Икс терминале (два екранска режима,
и могућност слања мишјих комбинација избегавања).
.TP
.I \-g, \-\-oldmouse
Force a "normal tracking" mouse mode. Used when running on
xterm\-capable terminals (tmux/screen).
.PP
Ако је ово задано, прва путања се тумачи као директоријум кога би
требало приказати у изабраном окну, а друга путања као директоријум

View File

@ -78,6 +78,7 @@ mc_global_t mc_global = {
.disable_colors = FALSE,
.skin = NULL,
.ugly_line_drawing = FALSE,
.old_mouse = FALSE,
},
.widget =

View File

@ -214,6 +214,8 @@ typedef struct
/* If true use +, -, | for line drawing */
gboolean ugly_line_drawing;
/* Tries to use old highlight mouse tracking */
gboolean old_mouse;
} args;
struct

View File

@ -313,6 +313,11 @@ tty_init_xterm_support (gboolean is_xterm)
/* Enable mouse unless explicitly disabled by --nomouse */
if (use_mouse_p != MOUSE_DISABLED)
{
if (mc_global.args.old_mouse)
use_mouse_p = MOUSE_XTERM_NORMAL_TRACKING;
else
{
/* FIXME: this dirty hack to set supported type of tracking the mouse */
const char *color_term = getenv ("COLORTERM");
if (strncmp (termvalue, "rxvt", 4) == 0 ||
(color_term != NULL && strncmp (color_term, "rxvt", 4) == 0) ||
@ -323,5 +328,6 @@ tty_init_xterm_support (gboolean is_xterm)
}
}
}
}
/* --------------------------------------------------------------------------------------------- */

View File

@ -203,6 +203,13 @@ static const GOptionEntry argument_terminal_table[] = {
NULL
},
{
"oldmouse", 'g', ARGS_TERM_OPTIONS, G_OPTION_ARG_NONE,
&mc_global.tty.old_mouse,
N_("Tries to use an old highlight mouse tracking"),
NULL
},
{
"nomouse", 'd', ARGS_TERM_OPTIONS, G_OPTION_ARG_NONE,
&mc_args__nomouse,