PDA

View Full Version : [ubuntu] Mouse click from terminal


Squid Tamer
July 13th, 2008, 08:14 PM
I hate to bother all of ya'll, but I'm looking for a program that allows me to send a mouse click to from the terminal (or more importantly, a script).

I have xvkbd, and it's website says it can do clicks, but all of my attempts have failed.

I've been googleing my fingers off, but I can't find anything.

Please tell me if you know of such an program, or can help me with xvkbd

xvkbd -text "human brain"works just fine, but
xvkbd -text \m1 and all variations that I have tried so far only type m1.

Squid Tamer
July 13th, 2008, 08:37 PM
Bump

I won't bump this again. I think repeated bumping is bad manners. I'm surprised this didn't get a single view.

marshag63
July 13th, 2008, 09:43 PM
Squid Tamer, what is "\ml" supposed to do? What kind of mouse are you using?

marshag63

Squid Tamer
July 13th, 2008, 10:08 PM
Apparently it (or something like it) is supposed to generate a click of the first mouse button. I've tried with spaces, and quotes, but none work.

The website says "\mdigit - simulate click of the specified mouse button"

I don't think the type of mouse should matter, but it's a wireless optical mouse.

marshag63
July 13th, 2008, 10:14 PM
Have you defined your mouse in xorg.conf? Isn't xvkbd an on-screen keyboard?

I found a gentoo howto for setting up a mouse.

http://gentoo-wiki.com/HOWTO_Advanced_Mouse/Individual_Configurations

Squid Tamer
July 13th, 2008, 10:19 PM
My mouse works fine. xvkbd is a virtual keyboard, but it can be used from the terminal using the -text option. The text function works fine, but it's website claims it can generate mouse clicks by using "\m". The man page does not mention this feature.

"\mdigit - simulate click of the specified mouse button "

^It says that on it's website, http://homepage3.nifty.com/tsato/xvkbd/

Thanks for the help anyway.

marshag63
July 13th, 2008, 10:26 PM
You want a left click, correct?

\[keysym] - the keysym keysym (e.g., \[Left])

Oh, I get it now "\m1" means left click is first (1) button? Maybe check to see what xorg.conf is saying your left mouse button is. You are specifically want to send a left click to the terminal?

I also found this - says its under xvkbd properties window.

"Automatic Click
Set on/off of the automatic click feature and the delay before automatic click is activated. If this feature is set, xvkbd will work as if left mouse button is clicked when mouse pointer is moved on a button and stays long enough. You may want to set Jump Pointer? to OFF to avoid auto-repeating."

Squid Tamer
July 13th, 2008, 10:38 PM
Correct, though I tried xvkbd -text \m[left], and xvkbd -text \[left], but they just type out "[left]. I wonder if I have an outdated version.

marshag63
July 13th, 2008, 10:49 PM
Perhaps taking a peak at xorg.conf can shed some light on what is assigned as left mouse button.

marshag63

tarvtarv
December 21st, 2009, 03:54 PM
Hows goin mate i was looking for the same thing and found it here http://ubuntuforums.org/showthread.php?t=1275341&highlight=mouse+click+recorder

the link is for xdotool wich i have just been playing with great if your ok with a terminal.

One thing it dosent refrence in either xdotools help or the above thread is the the sleep switch usage:sleep x = sleep x seconds.

The sleep function is great, Cause if your using xdotool it all happens really quick so if you need to have it wait a while between clicks use the sleep switch.

Cheers happy scripting