From bab9d1fa18f57616d78a29242cdd31faa372947b Mon Sep 17 00:00:00 2001 From: Alex Tanskanen Date: Mon, 13 Jan 2020 15:23:20 +0100 Subject: Add emulated middle mouse button Not every mouse has three buttons e.g. laptops. Some OS might not have support for middle mouse button emulation. This commit adds emulation for middle mouse button when pressing both left and right mouse button simultaneously. --- vncviewer/parameters.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'vncviewer/parameters.cxx') diff --git a/vncviewer/parameters.cxx b/vncviewer/parameters.cxx index 0cf5436e..bb8e47fa 100644 --- a/vncviewer/parameters.cxx +++ b/vncviewer/parameters.cxx @@ -55,6 +55,10 @@ static LogWriter vlog("Parameters"); IntParameter pointerEventInterval("PointerEventInterval", "Time in milliseconds to rate-limit" " successive pointer events", 17); +BoolParameter emulateMiddleButton("EmulateMiddleButton", + "Emulate middle mouse button by pressing " + "left and right mouse buttons simultaneously", + false); BoolParameter dotWhenNoCursor("DotWhenNoCursor", "Show the dot cursor when the server sends an " "invisible cursor", false); @@ -158,6 +162,7 @@ static VoidParameter* parameterArray[] = { &CSecurityTLS::X509CRL, #endif // HAVE_GNUTLS &SecurityClient::secTypes, + &emulateMiddleButton, &dotWhenNoCursor, &autoSelect, &fullColour, -- cgit v1.2.3