This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to set up a new gesture ?

Tags: None
(comma "," separated)
User avatar
[Moviuro]
Registered Member
Posts
86
Karma
0
OS

How to set up a new gesture ?  Topic is solved

Sat Apr 09, 2011 3:25 pm
Hi all !

I'm back and I'd like to set up gestures in KDE to close/minimize/maximize windows. For example, if I slash a window from top right to left bottom while pushing the wheel, it closes the window.
I saw the "Shortcuts and gestures" menu but was unable to do anything with it ><" Please help ! there isn't any help page for it and I didn't find anything on the web to help myself...

Thanks :)
KDE 4.5.5


KDE 4.10.1 Archlinux x86_64 on both laptops :)
"Our life is the immortals' death"
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS

Re: How to set up a new gesture ?

Sat Apr 09, 2011 3:42 pm
In System Settings -> Shortcuts and Gestures -> Custom Shortcuts:

First you need to enable mouse gestures: Settings -> check "Gestures" and choose a mouse button.
Then you need to create a new gesture: Edit -> New -> Mouse Gesture Action -> e.g. Command/URL.

In Trigger tab, click on Edit and draw your gesture.
I tried to use "Send Keyboard Input" to send the keyboard shortcuts (e.g. Alt+F4 for close) but it didn't work well for me. There's another way using a tool called xte, see this blog post for more information. (There might be a better way, but in that case I don't know about it.)


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
User avatar
[Moviuro]
Registered Member
Posts
86
Karma
0
OS

Re: How to set up a new gesture ?

Sat Apr 09, 2011 3:59 pm
Hans wrote:First you need to enable mouse gestures: Settings -> check "Gestures" and choose a mouse button.
Then you need to create a new gesture: Edit -> New -> Mouse Gesture Action -> e.g. Command/URL.


What command should i type in ?
quit
exit
close ?


KDE 4.10.1 Archlinux x86_64 on both laptops :)
"Our life is the immortals' death"
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS

Re: How to set up a new gesture ?

Sat Apr 09, 2011 6:35 pm
Did you check the link? With xte (normally in the xautomation package) you can emulate keyboard presses with a command, for example
Code: Select all
xte 'keydown Alt_L' 'key F4' 'keyup Alt_L'


to send the shortcut to close the active window. To work with maximize/minimize, you need to specify shortcuts for these actions first (in the Global Keyboard Shortcuts module in System Settings).


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
User avatar
[Moviuro]
Registered Member
Posts
86
Karma
0
OS

Re: How to set up a new gesture ?

Sat Apr 09, 2011 7:06 pm
yes, but it doesn't really fits my needs, because i want to get rid of keyboard and only click and draw something with my mouse...

What I would like is like :
> I draw a line from top right to bottom left, pressing the 2nd button of my mouse
> The window closes.

What you propose is :
> I click and hold a key on the key board
> The window closes.

Do you see what i mean ?


KDE 4.10.1 Archlinux x86_64 on both laptops :)
"Our life is the immortals' death"
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS

Re: How to set up a new gesture ?

Sat Apr 09, 2011 8:29 pm
No, I'm describing what you asked for. You need to set a "close window" action for the mouse gesture, and one way to do that is to emulate Alt+F4, which is what I used xte for. The trigger for the action is a mouse gesture, for example "drawing" a line with the mouse while holding down one mouse button.


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
User avatar
[Moviuro]
Registered Member
Posts
86
Karma
0
OS

Re: How to set up a new gesture ?

Thu Apr 21, 2011 3:52 pm
Okay all, I installed easystroke : easy to use, perfectly reliable. No more problems :D


KDE 4.10.1 Archlinux x86_64 on both laptops :)
"Our life is the immortals' death"
musonio
Registered Member
Posts
19
Karma
0
OS

Re: How to set up a new gesture ?

Thu Apr 21, 2011 9:38 pm
KDE's mouse gestures work with Ctrl+Q instead of Alt+F4.
I don't have the faintest clue as to why this happens, but it works. :o
User avatar
[Moviuro]
Registered Member
Posts
86
Karma
0
OS

Re: How to set up a new gesture ?

Fri Apr 22, 2011 11:11 am
Yeah... It won't work enough for me !
Easystroke is the best software I've got at time.


KDE 4.10.1 Archlinux x86_64 on both laptops :)
"Our life is the immortals' death"
musonio
Registered Member
Posts
19
Karma
0
OS

Re: How to set up a new gesture ?

Fri Apr 22, 2011 11:43 am
You're right. It IS wonderful.
(Unfortunately, it's not available in my distro due to some dependency problems.)


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]