![]() |
Simulate touch event?
Is there an xterm command that can simulate a touch event at X;Y? If this is possible then we can do a lot of things with predefined scripts.
I just did a quick search and wonder why nobody have thought about this before. |
Re: Simulate touch event?
uhm... xdotool? http://www.semicomplete.com/projects/xdotool/
|
Re: Simulate touch event?
Or xautomation (apparently not ported to Fremantle, but it should be just a recompile). A a touch event at X Y would be:
Code:
xte "mousemove $X $Y" "mouseclick 1" |
Re: Simulate touch event?
Thanks. I just tried Xdotool. It works really well.
http://maemo.org/packages/view/xdotool/ About Xautomation, how does it differ with xdotool (just curiousity, since I've already had xdotool working), better/worse? |
Re: Simulate touch event?
Well, looking at xdotool docs it seems it uses the same commands, maybe it's a wrapper? Didn't knew about Xautomation before :)
Glad to be helpful, bye :) |
Re: Simulate touch event?
Now new questions:
1/ How can I bind keys to touchscreen? (Like the "keyboard mapping" in preenv?) 2/ How exactly does the multitouch feature of preenv work? Can it be implemented for the whole system? It seems like it's real multitouch with keyboard (can press as many button as I like) (and of course it will need configuration for each app). |
Re: Simulate touch event?
1) I think you could do this by a simple shell script which asks for the key as input and executes the "xdotool" command you need;
2) sorry I don't know how it works, try following the threads of preenv or the wiki pages where it's explained how to configure the "multitouch" feature, IIRC it uses a modified version of one of the SDL libraries; |
Re: Simulate touch event?
Thanks for the reply.
1/ I know nothing about coding, so guess I can't write shell scripts (for now). Instead I've found xbindkeys. Haven't tried it yet, but I suppose it can bind the keys to xdotool command. 2/ I did. Actually I did a very thorough search about it. And now I'm able to configure it as I wanted (ie. map any key to any position on the screen). It uses gconftool. It looks interesting since it looks like real multitouch rather than some "fake multitouch" by making use of the middle point. P/S: The bad thing about resistive screen is that if 2 point is touched, it uses the middle point. It's better if it's the last point that is touched. |
Re: Simulate touch event?
Yes, didn't know about xbindkeys, you could use it :)
|
All times are GMT. The time now is 09:51. |
vBulletin® Version 3.8.8