[clug] _more_ heads up for those going to Jaunty... (Mouse buttons)

Andrew Janke a.janke at gmail.com
Wed Apr 29 03:18:25 GMT 2009


If you (like me) use a left-right click on the mouse to emulate middle
button (wheel) as you are sick of inadvertently scrolling then you are
going to want to do something like this in xorg.conf

   Section "InputDevice"
       Identifier     "rattus rattius"
       Driver         "mouse"
       Option     "Emulate3Buttons" "true"
   EndSection

To turn it back "on". Mind you if you do the above you are considered
naughty these days as such things are supposed to be handled by hal.
So instead you should do something like this:

  $ hal-device | grep input.product
  input.product = 'Logitech Optical USB Mouse'  (string)
  input.product = 'Microsoft Natural? Ergonomic Keyboard 4000'  (string)
  input.product = 'Microsoft Natural? Ergonomic Keyboard 4000'  (string)
  input.product = 'Macintosh mouse button emulation'  (string)
  input.product = 'PC Speaker'  (string)
  input.product = 'HDA Digital PCBeep'  (string)
  input.product = 'Sleep Button (CM)'  (string)
  input.product = 'Power Button (FF)'  (string)

Figure out from the above which is your rat, I'll punt on "Logitech
Optical USB Mouse" in my case and then add a hal policy file to
/etc/hal/fdi/policy like the below:

   # cat /etc/hal/fdi/policy/10-middle-to-left-right
   <?xml version="1.0" encoding="ISO-8859-1"?>
    <deviceinfo version="0.2">
    <device>
     <match key="info.product" string="Logitech Optical USB Mouse">
      <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
     </match>
    </device>
   </deviceinfo>

And then uplug and replug your mouse and pat yourself on the back for
not having to restart X to make it all work again. There may well be
another way to do this via the hal device manager or the likes but
this was fun too.


--
Andrew Janke
(a.janke at gmail.com || http://a.janke.googlepages.com/)
Canberra->Australia    +61 (402) 700 883


More information about the linux mailing list