-\versionid $Id: config.but,v 1.27 2002/03/06 23:04:20 simon Exp $
+\versionid $Id: config.but,v 1.28 2002/03/09 11:47:39 simon Exp $
\C{config} Configuring PuTTY
these modes to be permanently disabled no matter what the server
tries to do.
+\S{config-features-mouse} Disabling \cw{xterm}-style mouse reporting
+
+\cfg{winhelp-topic}{features.mouse}
+
+PuTTY allows the server to send control codes that let it take over
+the mouse and use it for purposes other than copy and paste.
+Applications which use this feature include the text-mode web
+browser \c{links}, the Usenet newsreader \c{trn} version 4, and the
+file manager \c{mc} (Midnight Commander).
+
+If you find this feature inconvenient, you can disable it using the
+\q{Disable xterm-style mouse reporting} control. With this box
+ticked, the mouse will \e{always} do copy and paste in the normal
+way.
+
+Note that even if the application takes over the mouse, you can
+still manage PuTTY's copy and paste by holding down the Shift key
+while you select and paste, unless you have deliberately turned this
+feature off (see \k{config-mouseshift}).
+
\S{config-features-resize} Disabling remote terminal resizing
\cfg{winhelp-topic}{features.resize}
checkbox will cause Shift + mouse clicks to go to the server as well
(so that mouse-driven copy and paste will be completely disabled).
+If you want to prevent the application from taking over the mouse at
+all, you can do this using the Features control panel; see
+\k{config-features-mouse}.
+
\S{config-rectselect} Default selection mode
\cfg{winhelp-topic}{selection.rect}
int funky_type;
int no_applic_c; /* totally disable app cursor keys */
int no_applic_k; /* totally disable app keypad */
+ int no_mouse_rep; /* totally disable mouse reporting */
int no_remote_resize; /* disable remote resizing */
int no_alt_screen; /* disable alternate screen */
int no_remote_wintitle; /* disable remote retitling */
write_setting_i(sesskey, "LinuxFunctionKeys", cfg->funky_type);
write_setting_i(sesskey, "NoApplicationKeys", cfg->no_applic_k);
write_setting_i(sesskey, "NoApplicationCursors", cfg->no_applic_c);
+ write_setting_i(sesskey, "NoMouseReporting", cfg->no_mouse_rep);
write_setting_i(sesskey, "NoRemoteResize", cfg->no_remote_resize);
write_setting_i(sesskey, "NoAltScreen", cfg->no_alt_screen);
write_setting_i(sesskey, "NoRemoteWinTitle", cfg->no_remote_wintitle);
gppi(sesskey, "LinuxFunctionKeys", 0, &cfg->funky_type);
gppi(sesskey, "NoApplicationKeys", 0, &cfg->no_applic_k);
gppi(sesskey, "NoApplicationCursors", 0, &cfg->no_applic_c);
+ gppi(sesskey, "NoMouseReporting", 0, &cfg->no_mouse_rep);
gppi(sesskey, "NoRemoteResize", 0, &cfg->no_remote_resize);
gppi(sesskey, "NoAltScreen", 0, &cfg->no_alt_screen);
gppi(sesskey, "NoRemoteWinTitle", 0, &cfg->no_remote_wintitle);
/*
* When the user reconfigures us, we need to check the forbidden-
- * alternate-screen config option.
+ * alternate-screen config option, and also disable raw mouse mode
+ * if the user has disabled mouse reporting.
*/
void term_reconfig(void)
{
if (cfg.no_alt_screen)
swap_screen(0);
+ if (cfg.no_mouse_rep) {
+ xterm_mouse = 0;
+ set_raw_mouse_mode(0);
+ }
if (cfg.no_remote_charset) {
cset_attr[0] = cset_attr[1] = ATTR_ASCII;
sco_acs = alt_sco_acs = 0;
{
pos selpoint;
unsigned long *ldata;
- int raw_mouse = xterm_mouse && !(cfg.mouse_override && shift);
+ int raw_mouse = (xterm_mouse &&
+ !cfg.no_mouse_rep &&
+ !(cfg.mouse_override && shift));
int default_seltype;
if (y < 0) {
IDC_BOX_FEATURES1,
IDC_NOAPPLICK,
IDC_NOAPPLICC,
+ IDC_NOMOUSEREP,
IDC_NORESIZE,
IDC_NOALTSCREEN,
IDC_NOWINTITLE,
case IDC_NOAPPLICK:
case IDC_NOAPPLICC:
return "JI(`',`features.application')";
+ case IDC_NOMOUSEREP:
+ return "JI(`',`features.mouse')";
case IDC_NORESIZE:
return "JI(`',`features.resize')";
case IDC_NOALTSCREEN:
cfg.funky_type == 5 ? IDC_FUNCSCO : IDC_FUNCTILDE);
CheckDlgButton(hwnd, IDC_NOAPPLICC, cfg.no_applic_c);
CheckDlgButton(hwnd, IDC_NOAPPLICK, cfg.no_applic_k);
+ CheckDlgButton(hwnd, IDC_NOMOUSEREP, cfg.no_mouse_rep);
CheckDlgButton(hwnd, IDC_NORESIZE, cfg.no_remote_resize);
CheckDlgButton(hwnd, IDC_NOALTSCREEN, cfg.no_alt_screen);
CheckDlgButton(hwnd, IDC_NOWINTITLE, cfg.no_remote_wintitle);
}
if (panel == featurespanelstart) {
- /* The Features panel. Accelerators used: [acgoh] ukswtbr */
+ /* The Features panel. Accelerators used: [acgoh] ukswtbrx */
struct ctlpos cp;
ctlposinit(&cp, hwnd, 80, 3, 13);
bartitle(&cp, "Enabling and disabling advanced terminal features ",
beginbox(&cp, NULL, IDC_BOX_FEATURES1);
checkbox(&cp, "Disable application c&ursor keys mode", IDC_NOAPPLICC);
checkbox(&cp, "Disable application &keypad mode", IDC_NOAPPLICK);
+ checkbox(&cp, "Disable &xterm-style mouse reporting", IDC_NOMOUSEREP);
checkbox(&cp, "Disable remote-controlled terminal re&sizing",
IDC_NORESIZE);
checkbox(&cp, "Disable s&witching to alternate terminal screen",
cfg.no_applic_k =
IsDlgButtonChecked(hwnd, IDC_NOAPPLICK);
break;
+ case IDC_NOMOUSEREP:
+ if (HIWORD(wParam) == BN_CLICKED ||
+ HIWORD(wParam) == BN_DOUBLECLICKED)
+ cfg.no_mouse_rep =
+ IsDlgButtonChecked(hwnd, IDC_NOMOUSEREP);
+ break;
case IDC_NORESIZE:
if (HIWORD(wParam) == BN_CLICKED ||
HIWORD(wParam) == BN_DOUBLECLICKED)
}
}
- cleanup_exit(msg.wParam);
+ cleanup_exit(msg.wParam); /* this doesn't return... */
+ return msg.wParam; /* ... but optimiser doesn't know */
}
/*
*/
void set_raw_mouse_mode(int activate)
{
+ activate = activate && !cfg.no_mouse_rep;
send_raw_mouse = activate;
SetCursor(LoadCursor(NULL, activate ? IDC_ARROW : IDC_IBEAM));
}