Can anyone tell me how I can set the top button on my mouse to be a shortcut for the desktop effect “Present Windows”? I have a Logitech MX900 mouse and the button I’m talking about is the one on the top that looks like two overlapping rectangles.
See picture here: ImageBam - Fast, Free Image Hosting and Photo Sharing
I do not know the answer. But I do know what is missing in your post. Please tell which level of openSUSE and which desktop (KDE, Gnome, …) you are using.
I know some people will simply not answer such a question where even this basic info is missing.
Try going to Configure Desktop (Personal Settings)>Desktop Effects>All Effects>Present Windows and click the wrench icon next to it. Down at the bottom is Activation. Here you can set the shortcut for Present Windows. Just choose which Present Windows you want to activate and then choose Custom and then click where it says None and it will change to Input. Click the mouse button you want to use and click ok. Hopefully it uses the mouse button. I tried with the middle mouse button and it wouldn’t accept it. Hopefully your extra button will be accepted.
Hi! I have set mine to trigger at the top left corner, but I was thinking that it wouldn’t be bad to have a mouse button shortcut to it. Maybe it’s to difficult for me to achieve, though… I don’t know much about editing config files etc. I like nice little GUIs for that. Thanks for your help y’all!
I found the config file last night and tried editing it to do something with the middle mouse button but it didn’t work. You can try if you want but you have to figure out what the button press is called when you press that button on your mouse. The config file is at /home/username/.kde4/share/config/kglobalshortcutsrc
Look for the Kwin section and you’re going to want to change one of these three:
Expose=**Ctrl+F9**,Ctrl+F9,Toggle Present Windows (Current desktop)
ExposeAll=**Ctrl+F10**,Ctrl+F10,Toggle Present Windows (All desktops)
ExposeClass=**Ctrl+F7**,Ctrl+F7,Toggle Present Windows (Window class)
The first key combo is where you have to make the change to change the custom key combo.
In general, assigning mouse buttons to actions right now isn’t supported very well (if at all). I have no idea how this technically could be done, nor who might be interested in doing it. I’ll try to mention it in a blog on planet.kde.org, see if any dev is interested…
I think the problem is that some mice have a bunch of extra non standard buttons. And it may be difficult for Xwindows to sort them out. In Windows these rodents require special drivers to use all the non standard features. You can map the buttons in an xorg.conf file but it is really guess work.
Just install those two programs and disable the repos again.
Secondly, you need figure out which mouse-button the button in question is. Your mouse look identical to mine (also a logitech even if not the exact model - MX518 in my case) so chances are the button numbers are the same.
Now we need to create a configuration file. You can use mine as a template:
Save the following script in that folder as say bindkeys:
make sure it is executable:
chmod u+x /home/username/.kde4/Autostart/bindkeys
Almost there. Enter the Desktop effects settings module, and change the keyboard shortcut to meta (windows key usually) +f10 (since that’s what the config script
wants) for “Toggle present windows (all desktops)”. Apply the changes.
Close all programs and logout and back in again. Now you should be able to use that button to toggle present windows and the two buttons on the side to switch virtual desktop.
Thanks SauronXXX for your help, but that just might be a little overkill to get a mouse button to work. I think I’ll wait and see if it gets easier in the future. Maybe it gets into to KDE as another KCM or something…
I thought so too at first, but once I got it working I soon came to think “How did ever get by without this?” Anyway, yes. It would certainly be much better to have it as a KCM and I hope it will someday.
xbindkeys is very powerful.
Does it have a way to catch double click event but doesn’t affect single click?
I try to toggle Present Windows (Window class) just by double click on right mouse button…It’s very import as it couldd help switch between one application’s several instances if using smooth tasks instead of traditional taskbar.