tablet touch screen with xdotool

257 views
Skip to first unread message

Paul S

unread,
Aug 18, 2010, 8:01:50 PM8/18/10
to xdotoo...@googlegroups.com
Thanks for the latest release. I'm using it already.

I'm trying to activate a middle mouse click in firefox to open the link
in a new tab. I'm using a netbook tablet pc with a newly developed
cando touchscreen driver. It's a capacitive type that works with finger
touches.

It's a convertible netbook and also has a synaptics touchpad and keyboard.

I have the following script linked to a button on the panel. I touch
the panel button, which activates the script, then the next point I
touch gets the mouse click 2:

#!/bin/bash
MCUR=`xdotool getmouselocation`
MNOW=$MCUR
until [[ "$MNOW" != "$MCUR" ]] ; do
MNOW=`xdotool getmouselocation`
done
xdotool click 2
exit 0

The expected result occurs with the new tab opening. However, it
apparently also registers a left click first, because the current page
loads that same link that goes in the new tab.

So, I notice the "clearmodifiers" in the man page, and substitute this
line in the above script.

xdotool click --clearmodifiers 2

After, the desktop (gnome) is dead to touches or even mouse click from
the synaptics. I can't launch any menus or even a logout dialog. But
the keyboard still works enough to do cntl-alt-del or cntl-alt-F1, where
I can restart the xserver. Upon restart, everything is fine until I run
this script again.

Please help.

Or, any other idea how I could get the desired click 2 from the touch
screen?

Jordan Sissel

unread,
Aug 18, 2010, 10:52:12 PM8/18/10
to paul...@gmail.com, xdotoo...@googlegroups.com

I think the problem is your touch actually invokes a click (expected).
We can probably hack around that that.

The latest version may provide you way to swallow the physical click
while still sending click 2. Here's what I came up with; you can
change your whole script to just this invocation:

xdotool selectwindow click 2

'selectwindow' will block mouse events from being sent to the server.
When you tap the location where you invoke your script, it will print
the window you selected (which you don't care about) but the click is
otherwise ignored by what you click on. Then, the 'click 2' will send
mouse 2 where the mouse cursor is now (where you clicked).

This should help your particular issue until we get something better
that lets you block the server for input, or something.

-Jordan

>
> --
> You received this message because you are subscribed to the Google Groups
> "xdotool-users" group.
> To post to this group, send email to xdotoo...@googlegroups.com.
> To unsubscribe from this group, send email to
> xdotool-user...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/xdotool-users?hl=en.
>
>

Paul S

unread,
Aug 19, 2010, 8:27:41 AM8/19/10
to xdotoo...@googlegroups.com
Jordan Sissel said the following on 08/18/2010 10:52 PM:

> I think the problem is your touch actually invokes a click (expected).
> We can probably hack around that that.
>
> The latest version may provide you way to swallow the physical click
> while still sending click 2. Here's what I came up with; you can
> change your whole script to just this invocation:
>
> xdotool selectwindow click 2

Your right, it works. I also can use these for right click and double
click:

xdotool selectwindow click 3
xdotool selectwindow click 1 click 1

How did we ever live without xdotool? It makes my life computing
experience a lot more enjoyable!

Thanks,

Reply all
Reply to author
Forward
0 new messages