Find the answer to your Linux question:
Results 1 to 6 of 6
I have a 5 button mouse (4 buttons and a wheel) that I am trying to change the configuration. I have been searching and trying all sorts of things to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2007
    Posts
    17

    Configure mouse buttons


    I have a 5 button mouse (4 buttons and a wheel) that I am trying to change the configuration. I have been searching and trying all sorts of things to change what the 2 extra buttons do. It comes down to this: in xorg.conf there is a line for the mouse like this:
    pointer = 1 2 3 4 5 6 7 8 9

    My questions is where are the assignments for 1 2 3 4 5 6 7 8 9 done. My guess is there is a file somewhere that maps 1 to Left click, 3 to right click, 4 to scroll up, 5 to scroll down. How do I change the commands for 8 and 9? These are the codes assigned to the extra two buttons. I discovered this using xev. I am running Fedora 16 with the KDE 4 desktop. xbindkeys does not work - I have tried it.

  2. #2
    Just Joined! charleseddy's Avatar
    Join Date
    Mar 2012
    Location
    France
    Posts
    27
    I believe they're done automatically based on what the mouse driver tells X. You can type xev in a console and when you click a button it gives you feedback on which button you're hitting (button 1,3,5). By rearranging them in the xorg.conf file you remap what the buttons do.

    For the two extra buttons, if you want them to do extra features that aren't already mapped to at least one button, I think it's a bit trickier. Have you tried easystroke (available on SourceForge)? It's made for mapping mouse gestures but does a good job with button config too.

  3. #3
    Linux User peteh's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    339
    Xbindkeys and xmacro work perfectly for me on KDE4. I map button 8 to double-click.
    Pete

  4. #4
    Just Joined!
    Join Date
    Nov 2007
    Posts
    17
    Where are the default mappings set? What file and where is it stored?

  5. #5
    Just Joined! charleseddy's Avatar
    Join Date
    Mar 2012
    Location
    France
    Posts
    27
    Quote Originally Posted by vhradice View Post
    Where are the default mappings set? What file and where is it stored?
    As I said I'm pretty sure it's X that handles them. It can vary by operating system (although not usually that much), but it's generally the file: /etc/X11/xorg.conf

  6. #6
    Linux User peteh's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    339
    Quote Originally Posted by vhradice View Post
    Where are the default mappings set? What file and where is it stored?
    Create a xbindkeysrc file with
    Code:
    xbindkeys -d
    Record a macro with xmacro and add the macro to the xbindkeysrc file. I think you need to do little tweaking but look at the other entries in xbindkeysrc.

    The file will be in your /home/yourname/ folder
    Last edited by peteh; 03-25-2012 at 09:21 AM. Reason: add where file stored
    Pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •