02 August, 2010

mouse buttons in linux

While going through openFATE (the feature tracking tool openSUSE uses), I bumped into one asking for "Present Windows" effect as mouse button shortcut. In essence, this user has one of those million-button-mouses, and wants to use them.

I've heard that tune before, and last time I checked, linux users were still out of luck. Now I never had any idea what to use these 'extra' buttons for, until I bumped into this request. Having a button to triger an expose-like effect: great idea. Sure, I go with my mouse to the top-left of my screen and I can see all my apps just fine.

Still, I have only 4 corners on my screen (yes, it is square, as most computer screens) and 3 are in use already (app launcher, close window and clock). So I'd love such flexibility...

Now I don't know where the limiting factor is right now - what is needed to make it possible to assign actions to mousebuttons other than the left, right and middle one? Anyone who knows? Anyone up for doing something about this?

Oh, one more thing, on the openSUSE forums, IRC channels and mailinglists a discussion about the strategic direction of openSUSE is going on. Will blog about it later, but for now - if you care about openSUSE, this might be a good time to check things out. Finding a direction matters!

19 comments:

  1. Jos, I managed to got the exposé effect working with my Logitech MX 1000 window switch button (look at Google for pictures). It's actually pretty easy. Install the xbindkeys and xvkbd packages, create a xbindkeys file and make sure you start xbindkeys at startup of your desktop environment.

    "/usr/bin/xvkbd -text "\[Control_L]\[F9]""
    m:0x0 + b:10

    Adding those lines to a ~/.xbindkeysrc file will redirect a press of mouse button 10 (check 'xev' to find out what button it is on your mouse) to a key press of CTRL+F9, which is exposé for me. Works great :)

    ReplyDelete
  2. Not related to your post, but i think you need to change your KDE banner :)

    ReplyDelete
  3. The expert you're looking for is mjansen, pinging him on IRC would probably be the best idea. At the moment he doesn't have much time for development, though, so don't expect any lobbying to take immediate effect ;)

    ReplyDelete
  4. Plasma seems to have limited support for those extra buttons under Desktop Activity Settings. I'm assuming someone just needs to implement it into the relevant control module(s).

    ReplyDelete
  5. You'll find it here:
    http://rpm.pbone.net/index.php3/stat/4/idpl/11672222/dir/opensuse/com/btnx-config-0.4.9-29.2.i586.rpm.html

    Thanks for all the great work you've done for KDE. Your recommendation got me started with Arch and it's been a truly joyful ride.

    Not shure how BTNX blends with KDE - it has gtk dependencies and I have not used it for a coupple of years. Potential HAL issues? Don't know

    ReplyDelete
  6. I don't know if this will help, but I always use a method simular of what is described here:
    http://ubuntuforums.org/showthread.php?t=332256
    But I'm not sure if this was your question. Remapping mouse buttons is not as nice as having them in system settings, but with this method you can actually do this. Look with xev that the mousebutton is correctly interpreted and then change it with xbindkeys to Ctrl+F10 or whatever.
    With a very large keyboard I often had a message "This Key is not supported by QT". So perhaps it is a limitation of the toolkit. I think the Krita people know more because they can handle extended Input Devices an such stuff.

    ReplyDelete
  7. This feature implemented inside system-settings with plasma's goodness would be great. I did it some time ago patching directly the udev X module for my gentoo. But it is clearly a feature needed to be configurable in an easy way for a common user in the system settings. For instance, something like...Button 5-> (Home), Button 6-> (Enter), etc.

    ReplyDelete
  8. That is a feature that is clearly missing in KDE - I always hated it that I couldn't turn the Desktop Cube like in Compiz!

    ReplyDelete
  9. On my tx1000 I don't have such buttons, but I have two unused buttons (DVD and QuickPlay) that I assigned to Present Windows and Dashboard. I use them all the time now. If you have shortcuts, why not using them? I vote for this.

    ReplyDelete
  10. When I was still a Mac user, I mapped Exposé to the 3rd mouse button. It was a huge boost in usability. However, as on X11 platforms the 3rd button is constantly used for something else and I also expect buttons 4 and 5 to be Back and Forward in web browsers (and Dophin if that would work already), I'm out of luck... :-(

    ReplyDelete
  11. KDE SC needs a working mouse button configuration module to systemsettings. Without it we are stuck to basic mouse uses. The use should be such that you can just click "receive buttons" and then press all buttons. Then configure them in wanted functions or (global/) shortcuts.

    Of course best thing could be that user can download mouse configs from opendesktop.org where is the configuration infos and blueprint of the physical mouse (this needs artists) so you can see a model of mouse (not just screenshot/product image) and when you click button in mouse, the button would blink in the screen.

    ReplyDelete
  12. This is easily the most often-reported request in the KDE Brainstorm forum, and 2 of the most-wanted features in bugs.kde.org

    It isn't just activating kwin effects that people would want to use mouse buttons for. It is as simple as using the back and forward buttons found on pretty much every mouse nowadays to navigate back and forward in konqueror, dolphi, rekonq, or anything else with back and forward buttons. That works out-of-the-box on firefox, but there is no support for it anywhere in KDE.

    There are also lots of other things the mouse could be useful for, for instance triggering the application launcher, switching activities/desktops, triggering the run command interface, switching between open applications, and probably a lot else.

    Currently KDE has a pretty piecemeal approach to input device support. We have a keyboard shortcut system, an entirely separate remote control shortcut system, an entirely separate joystick system implemented in some games, an entirely separate mouse shortcut system for plasma, and now it seems like we are considering yet another separate mouse shortcut system for kwin.

    I think it would be much better at the very least to have a single shortcut system for all mouse commands instead of a bunch of different implementation. I think it would be much better yet, however, if all input devices were all folded into the keyboard shortcut system so we could use a single standard interface for configuring how button presses on all sorts of input devices affected KDE. So we would configure keyboard buttons, mouse button, remote control buttons, joystick buttons, and combinations thereof using a single interface. Every KDE application would get support for any input device for free.

    I wrote a bug report about this a few years ago, but noting has come of it: https://bugs.kde.org/show_bug.cgi?id=171295

    I looked into it a little. It may be possible to modify the underlying KDE shortcut system to support mouse buttons as shortcuts without changing the underlying system in too fundamental of a manner, but I am not certain. Doing that sort of thing is a bit beyond my capabilities.

    ReplyDelete
  13. There are several ways to achieve that, but many of the software permitting that are unmaintained.

    Easystroke is the easiest way to achieve it in my opinion. It is a really user-friendly app (in Gtk... sorry...) to configure mouse gestures, and it is also possible to configure clicks for all the buttons of a mouse.

    But adding this feature to KDE current keyboard shortcuts would be nice.

    ReplyDelete
  14. There's a limitation in Qt to support only 3 mouse buttons, IIRC, cos the Windows platform only supports that.

    Rekonq and Arora support back and forward with mouse buttons, may be its a webkit feature?

    ReplyDelete
  15. From http://doc.trolltech.com/main-snapshot/qt.html#MouseButton-enum

    Qt::NoButton 0x00000000 The button state does not refer to any button (see QMouseEvent::button()).
    Qt::LeftButton 0x00000001 The left button is pressed, or an event refers to the left button. (The left button may be the right button on left-handed mice.)
    Qt::RightButton 0x00000002 The right button.
    Qt::MidButton 0x00000004 The middle button.
    Qt::MiddleButton MidButton The middle button.
    Qt::XButton1 0x00000008 The first X button.
    Qt::XButton2 0x00000010 The second X button.

    Aren't both X button (1 and 2) what we are talking about?

    ReplyDelete
  16. The x buttons are the x-axis buttons, in other words the vertical scroll wheel.

    And yes, there is a limitation in Qt, but KDE can implement its own support for additional mouse buttons.

    ReplyDelete
  17. But in Windows it is so easy. Why is in Linux so hard? How can Qt have such a limitation?

    ReplyDelete
  18. Ouch! OMG...certainly they are the vertical scroll. :-)
    Of course it would be more desirable adding the extra buttons in Qt (it is not so strange mouses with more than 2 buttons and a wheel) but as a "workaround" it could be implemented in KDE::Plasma in the meanwhile.

    ReplyDelete

Say something smart and be polite please!