Can I map a keystroke to a mouse button click on the remote machine?
This can be done directly in some X servers using AccessX and Pointer_EnableKeys, but is a bit awkward. It may be more convenient to have x11vnc do the remapping. This can be done via the -remap option using the fake “keysyms” Button1, Button2, etc. as the “to” keys (i.e. the ones after the “-“) As an example, consider a laptop where the VNC viewer is run that has a touchpad with only two buttons. It is difficult to do a middle button “paste” because (using XFree86/Xorg Emulate3Buttons) you have to click both buttons on the touch pad at the same time. This remapping: -remap Super_R-Button2 maps the Super_R “flag” key press to the Button2 click, thereby making X pasting a bit easier. Note that once the key goes down, the button down and button up events are generated immediately on the x11vnc side. When the key is released (i.e. goes up) no events are generated.