Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I map a keystroke to a mouse button click on the remote machine?

0
Posted

Can I map a keystroke to a mouse button click on the remote machine?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123