aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer/parameters.cxx
diff options
context:
space:
mode:
authorAlex Tanskanen <aleta@cendio.com>2020-01-13 15:23:20 +0100
committerAlex Tanskanen <aleta@cendio.com>2020-01-16 09:04:49 +0100
commitbab9d1fa18f57616d78a29242cdd31faa372947b (patch)
tree02ab52404a5418c573e9ec2e44fea527a0ced094 /vncviewer/parameters.cxx
parentb9b7f68b40f6638b5a1fef202f482889c0a74a4f (diff)
downloadtigervnc-bab9d1fa18f57616d78a29242cdd31faa372947b.tar.gz
tigervnc-bab9d1fa18f57616d78a29242cdd31faa372947b.zip
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.
Diffstat (limited to 'vncviewer/parameters.cxx')
-rw-r--r--vncviewer/parameters.cxx5
1 files changed, 5 insertions, 0 deletions
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,