Results 1 to 3 of 3

Thread: Middle mouse button config

  1. #1
    Join Date
    May 2006
    Location
    San Francisco Bay Area
    Beans
    37
    Distro
    Ubuntu 10.04 Lucid Lynx

    Middle mouse button config

    I have been having trouble with text appearing in documents that look like something I might have typed but otherwise randomly placed. After all this time I finally figured it out. Pressing the middle mouse button (scroll wheel) performs a "paste" in Ubuntu, so whatever I copied previously gets randomly "pasted" into my documents when using the scroll wheel too hard. Not good.

    My question is how can I disable the scroll wheel from acting like a button? I found this link which seems to indicate others are having this problem:

    https://wiki.ubuntu.com/X/Config/Input

    Scrollwheel mice support a middle-button click event when pressing the scrollwheel. This is a great feature, but you may find it irritating. Fortunately it can be disabled.
    The solution they present there disables the middle button temporarily but the original configuration returns if I restart or the mouse goes to sleep and is re-awakened. Does anyone know of a way to set this configuration permanently?

    These are the steps that did not work. First I get the mouse ID:
    Code:
    xinput list | grep 'id='
    For me the mouse ID was 13. So next I get the current mapping:
    Code:
    xinput get-button-map 13
    It returned 1 2 3 4 5 6 7. Then I write back my altered map replacing the 2 with a zero:
    Code:
    xinput set-button-map 13 1 0 2 3 4 5 6 7
    Like I said, this fix works temporarily but I think I need to edit some config file further upstream where the defaults are set since it keep reverting.

    I suspect many others are having this problem but have not figured out what's happening yet since it happens so seldom. I seems to me that it's more of a bug than a feature. The default should be to not let unsuspecting users paste text randomly. It's fine to have this as a feature but it's definitely something that should be enabled by the power user IMHO.

  2. #2
    Join Date
    Nov 2010
    Location
    Berlin, Germany
    Beans
    4,534
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Middle mouse button config

    You should be able to achieve that using "xmodmap", works for me at least. For that, create a file called ".Xmodmap" (hidden) at the top level of your home directory with this content:

    ~/.Xmodmap:
    Code:
    pointer = 1 0 3 4 5 6 7
    The next time you log in, you may be asked if you want to use that keymap file.* If so, just choose "Add" and confirm with "OK". It should work then.

    * depends on what Ubuntu version you are using, and if you already had such a file before, and have already confirmed/disabled that query

    Regards.

  3. #3
    Join Date
    May 2006
    Location
    San Francisco Bay Area
    Beans
    37
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Middle mouse button config

    That fixed it. Thanks. I'm using Ubuntu 12.10 and there was no message, it just came up configured when I logged in. Thanks again, that was really causing me problems.

Bookmarks

Posting Permissions

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