| Disabling the mouse scroll wheel left and right click for Ubuntu 10.04 |
|
| Sunday, 25 April 2010 18:08 |
|
With the release of Lucid Lynx, Ubuntu 10.04, my method for disabling the left and right clicks of the mouse now longer works. I need to disable this because, as a Blender3D user, the middle mouse button is held down to rotate the editor view, and triggering a mouse wheel left or right click breaks Blender out of rotate mode, which is a tad annoying. Unfortunately, my previous fix didn't work. The first thing I did was try my previous fix. No luck there, it didn't work anymore. Googling for more info, I found that Ubuntu 10.04 had moved on from hal, to using udev. Half an hour later I was left scratching my head because my udev rule simply wasn't working. There was no doubt that udev was picking up the rule, it was just ignoring it. Googling for more info, I found that Ubuntu 10.04 had moved on from udev to using xorg.conf.d and that I'd have to create an xorg.conf. Deprecating input device configuration twice during one release? You guys have gotta slow down, you're giving me wind-burn! Luckily, it's pretty straightforward. First of all, you'll need to find out the name of your device. The easiest way is simply run lshal and pipe the output to a text file. lshal >> ~/devices.txt The text file will be in the root of your home folder. Search through it for the string 'input.mouse' (without quotes) and inside this block there will be a line that specifies the product. If, like me, you have some sort of Logitech wireless mouse, then the product will look a lot like 'Logitech USB RECEIVER' Next, create a text file in the xorg.conf.d folder. gksudo gedit /X11/xorg.conf.d/20-middle-mouse-button.conf Then paste the following into it. Section "InputClass" You can enter anything you like inside the quotes on the second line, but you'll need to put the product you found via lshal into the quotes on the third line. Finally, enter your button mapping into the second set of quotes on line 5, putting zeros in the position corresponding with the buttons you want to disable. If you don't know what the button id's are, then run xev. xev Clicking the scroll wheel left and right will put event info into the xev window. One of the fields of info includes the button. You'll find that the scroll wheel triggers two events, each with a different button id, one for click and one for release, so you'll end up with four numbers. In my case, those numbers were 6, 7, 11 and 12, so I simply put zero's into position 6 and 7 in the ButtonMapping value. I didn't bother with 11 and 12 because they didn't seem to trigger anything. After rebooting, your scroll wheel left and right click should be blissfully absent blog comments powered by Disqus |
