PDA

View Full Version : KDE mouse gestures


dsvilko
September 17th, 2007, 04:07 PM
By combining an excellent KDE 'Input Action' system (System Settings -> Accessibility -> Input Actions) and xte (xautomation package in Ubuntu) I've been able to construct a few convenient mouse gestures.

For example, I have mapped 'down-stroke' mouse gesture to the command:

xte 'keydown Super_L'; sleep 3; xte 'keyup Super_L'

Now, by doing a down-stroke mouse gesture, in the next 3 seconds I have the 'Windows' key pressed and I can easily adjust the 'Enhanced Zoom Desktop' zoom level (mouse wheel) or select the windows for grouping (left mouse button).
In the same way, I have mapped a 'upward-stroke' to:

xte 'keydown Alt_L' 'keydown Control_L'; sleep 2; xte 'keyup Alt_L' 'keyup Control_L'

That gives me 2 seconds to initiate the cube rotation on any place in the screen using the left mouse button. You can also use it to change to text size in the Firefox, using the mouse wheel :)
I also made a mouse gesture shortcut for negate window but the possibilities are more or less endless :)

I would gladly hear about your mouse gesture bindings!

A QUICK HOWTO:
1) Open System Settings -> Accessibility -> Input Actions
2) New Action
3) Pick a descriptive Action Name under General
4) Triggers -> New -> Gesture trigger
5) Actions -> New -> Command/URL (enter your xte command)
6) Apply

Aldoo
September 17th, 2007, 06:49 PM
Speaking of this, there is one thing I still did not achieve : how to make an extra mouse button (like button 9) behave like a "Super" modificator ?
It would be really useful because it would allow me to trigger a lot compiz commands using the mouse only, and without using esoteric gestures.

I tried playing with xbindkeys and xte, but xbindkeys does not seem to be able to manage separately "mouse down" and "mouse up" events, i.e. : if I catch a "mouse down" to map it to enabling the "Super" modificator, then I cannot catch the "mouse up" that will release it.

If I could simply play with xkb to manage mouse buttons, I would just have to declare the mouse button as a "Super" modificator. But xkb only works with keyboards. Or am I wrong ?

Belgabor
September 17th, 2007, 08:40 PM
Speaking of this, there is one thing I still did not achieve : how to make an extra mouse button (like button 9) behave like a "Super" modificator ?
Probably possible with mxk:
http://welz.org.za/projects/mxk
Very complex to set up though.