View Single Post
Posts: 45 | Thanked: 30 times | Joined on Feb 2010 @ Germany
#1
When running native applications, we always face the following problems:
  • You can't do right or middle clicks with the stylus
  • You can't do mouse-wheel
  • Even double-clicks are hard, because with the stylus it is difficult to hit the exact same spot twice

I remember a thread where qole tried to solve this problem, AFAIK without fully satisfying results

There is libktkstylus.so which solves the right-click problem, albeit only in gtk applications.

Then there are some solutions involving xbindkeys and xdotool, but they are difficult do set up and a bit messy.

So I was wondering: wouldn't it be possible to take the sources of xbindkeys and xdotool, do some copy-and-paste and some editing and end up with a simple stand-alone program ("stylus2mouse") which solves these problems one and for all on X11-level, i.e. regardless of the toolkit used?

Something like:
  • tap-tap-right is a right click
  • tap-tap-left is a middle-click
  • tap-tap-up is wheel-up
  • tap-tap-down is wheel down

I am not asking anyone to write this, I know I'll have to do this myself, but I'd like to hear some advice, so I don't set out to try the impossible. There are quite a number of things I am not sure about:
  • Can a stand-alone programm really eat up X-events? E.g. a mouse-down must be withheld until stylus2mouse decided that it is really a mouse-down and not part of a more complex gensture. This needs to be based on time.
  • Is xbindkeys a good source to lookup how to capture mouse-events or does it handle only keyboard events, as the name suggests?