curses mouse right-click

Right button is button3 rather than button2.  Accept either and treat
both as "not left" to pass CLICK_2 back to the core.

Treat <Ctrl>+left-click as "not left" too, to simplify usage with Mac
one-button mouse (where <Ctrl>+left-click can be configured to send
"secondary click" but might not be set do so) or one-button laptop
trackpad (where having two fingers on the scrolling portion of the pad
while clicking the button is necessary to send "secondary click").
This commit is contained in:
PatR
2019-06-27 15:02:49 -07:00
parent aada9e2706
commit 56387dccb6
2 changed files with 19 additions and 10 deletions

View File

@@ -838,8 +838,10 @@ curses_init_options()
#ifdef NCURSES_MOUSE_VERSION
if (iflags.wc_mouse_support) {
mousemask(BUTTON1_CLICKED, NULL);
curses_mouse_support(iflags.wc_mouse_support);
}
#else
iflags.wc_mouse_support = 0;
#endif
}