Bind script or keystroke on mouse/touchpad movement
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Bind script or keystroke on mouse/touchpad movement
Hi!
Is there some way to bind some action to mouse movement? For now I need to send some keys instead of movement for one device (not all). Also, need to ignore pointer itself movement.
For instance, left moving sends <- keystoke or execs some script, etc. Some kind of gestures.
xdotool can do mouse movement, too.
but of course you have to write yourself a script that utilizes these functions.
no clue what easystroke is. sounds androidy.
Nope, I need not to send mouse clicks/positions but bind/map script to mouse movement, like gesture control, eh.
Here is easystroke: http://lifehacker.com/5049268/easyst...-easy-in-linux
As I mentioned before, it requires some mouse button to be pressed, so unsuitable.
Other soft briefly tested is Touchegg and ginn - seems works with multitouch touchpads only. Anyway, not figured out yet how to configure properly.
Nope, I need not to send mouse clicks/positions but bind/map script to mouse movement, like gesture control, eh.
yes, xdotool can tell you where the mouse pointer is, without clicking anything.
you can use that in some script that would then interprete these positions as gestures.
but i'm beginning to notice that there's a serious flaw in that approach; it means that every mouse movement would be interpreted as a gesture.
this makes sense on a touchscreen device, but on a normal screen/mouse/keyboard combo, the mouse would become unusable for anything else.
yes, xdotool can tell you where the mouse pointer is, without clicking anything.
you can use that in some script that would then interprete these positions as gestures.
but i'm beginning to notice that there's a serious flaw in that approach; it means that every mouse movement would be interpreted as a gesture.
this makes sense on a touchscreen device, but on a normal screen/mouse/keyboard combo, the mouse would become unusable for anything else.
Yes, so one of requirements is to catch only one device and leave alone other. I am Win programmer and can relatively easy make this in C#, but stucked with Lin. Considering that gestures are really simple, there is just direction&length of stroke evaluation.
xinput allows to remap mouse buttons for particular device, but nothing with movement.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.