![]() Registered Member ![]()
|
Hi. I've got a Logitech G5 Refresh mouse with two thumb buttons and a tilted mouse wheel.
Unfortunately, In KDE4 there is only a possibility to assign keyboard shortcuts to acitivities to actions, no mouse buttons. I'd like to workaround this by e.g. binding my mouse keys to Ctrl+F12 and Ctrl+F11 (for thumb keys) and tilted wheel for Ctrl+F10 and Ctrl+F9 - of course, these don't need to be exactly those, but just something I can bind my mouse to. I'd like the bigger mouse button to invoke "Present Windows - all desktops", the smaller one to "Desktop grid", and the tilted wheel to "Next Desktop" and "Previous Desktop" So How do I do that? I remember playing with xmodmap when I needed to make my keyboard media buttons work, but that was a long time ago and for some time they are already working OOTB. And is anyone planning to make it easier to craete mouse shortcuts in KDE4 in the future? |
![]() Administrator ![]()
|
You can use xbindkeys and xte. For example, I have this in my .xbindkeysrc:
xte is included in xautomation.
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 |
![]() Registered Member ![]()
|
Will try. And how about including mouse shortcuts in future KDE? Any plans on that? Brainstorm idea I can vote for?
PS.: I understand the
part, but don't really know how you trigger it. The "b:x" part symbolizes your mouse key? Does it work like that? If yes, how can I find out the identifiers of my mouse keys? PPS.: I'll take a look at this: http://www.kde-apps.org/content/show.ph ... tent=88647 PPPS.: I tried Makro, but it only allows me b:1, b:2 and b:3 as mouse triggers. PPPPS.: I tried xbindkeys --key, and it recognizes my keyboard buttons with no problem, but when I press any mouse button, it is not recognized. It applies to LMB and RMB as well. Only twice I got xbindkeys to recognize them as b:1 and b:3, and when I tried to re-run, it doesn't seem to respond to clicking any mouse buttons. And I know X server sees my thumb buttons, because they serve as Next/Previous Page in Firefox (were working like that by default) Last PS: Whoa, working! I tried the first line of yours (b:6 for previous desktop) and now tilting my mouse wheel left gives me previous desktop. Seems like I have to experiment. Is it needed to restart X server each time I mae changes to xbindkeysrc, or just restart xbindkeys? |
![]() Registered Member ![]()
|
I'm afraid not ![]()
Get problems solved faster - get reply notifications through Jabber!
|
![]() Registered Member ![]()
|
Ok, no more PS, time to double post - tilted mouse wheel works, thumb buttons only work with the gdbus command, can't get them to work with xte command. The smaller thumb button is b:8, the bigger one: b9. Don't know why they don't work with xte. I have xte installed. Will investigate more.
|
![]() Registered Member ![]()
|
Works fine now
![]() ![]() Big thanks to you guys! A guide like this for xbindkeys should be made a sticky! |
![]() Administrator ![]()
|
Nice to hear. Sorry, I forgot to mention that I use different keyboard shortcuts for the effects.
![]() As for finding out mouse buttons etc., I usually use xev. I've been thinking about writing a blog post about this, might do that sometime when I'm bored. EDIT: And yes, you only need to restart xbindkeys.
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 |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]