1

How can I create an overlay that has only one button for right-mouse-click, that always stays on top even in graphical games.

I would like to use that to play some games on my touchscreen, that need a right mousebutton to play.

I already created an AutoHotkey script to map the Touchscreen Windows Button to right-mouseclick But that seems to make some Problems with the resolution of some games.

2 Answers 2

1

By "create an overlay" I assume you mean programmatically, because I've never heard of such a thing already available on the market. So, you'd have to write some code.

WPF would be nice for this, I think, but I don't think you can do this in userspace for fullscreen apps, just for windowed maximized apps. Here's a general idea:

  • Make a new WPF project (recommend .NET 4.0 or later).
  • Make a window that's transparent, with no window border and pass all input events through to the window(s) underneath.
  • Apply some slight coloring to a small, non-transparent element (button, etc) on the window so you know where to tap for a right-click. The size and position of the element is up to you.
  • Handle the TouchDown and TouchUp events on the window. If you receive a TouchDown and then a TouchUp while the TouchDown is still occurring, then you can simulate a right mouse click at the location of the first TouchDown event. You now have a gesture where you put one finger on the screen where you want to right-click, and another finger on your "right click button", to cause a right click where your first finger was placed.

If you're not up to coding this, it's probably not going to be possible. I certainly don't know of any program that can implement this on full-screen applications which aren't running as windowed maximized.

2
  • OK, that would be cool already, to have the maximized games covered. I will try and see if WPF is easy to understand, and try to program that. thanks.
    – rubo77
    Apr 22, 2014 at 0:06
  • It's not very hard to write WPF, especially in this case, if you use the visual designer, and have some experience with GUI programming before (in C#, Visual Basic .NET, F#, etc.) You may run into some sticking points where you need to resort to Windows API (native code) as indicated by one of the answers I linked, but overall it should be feasible, if not particularly easy. Apr 22, 2014 at 0:08
0

I found the solution:

TouchMousePointer - its a virtual on-screen touchpad.

You can use it on the side, or transparent floating or fullscreen.

On windowed games it works floating or on the side, but for fullscreen games it only works correctly with fullscreen mode, then the whole screen simulates a touchpad, meaning that the mouse doesn't go where you tap, but it can be moved by taping and moving anywhere on the screen like on a touchpad.

And a two finger tap results in a right-click.

Perfect workaround for old games!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .