Advertisements

Kensington Expert Mouse Trackball vs X Server 1.8

After the fuffing and fawing required to get the Wacom tablet up to speed, swapping the buttons on the Kensington trackball required just one stanza in /etc/X11/xorg.conf.

To wit:

Section "InputClass"
Identifier      "Kensington Trackball"
MatchProduct    "Kensington Expert Mouse"
Option          "SendCoreEvents" "True"
Option          "ButtonMapping" "3 8 1 4 5 6 7 2"
EndSection

For some no-doubt logical reason, it Just Works without an InputDevice stanza or anything in ServerLayout.

That will swap the buttons on any matching trackball, should I be so bold as to plug more than one in at a time …

The old FDI file is there.

Advertisements
  1. #1 by Frans on 2011-04-06 - 18:03

    Alright, this worked as advertised on Debian Squeeze (which is HAL-less). Definitely simpler than my old FDI file.

    
    <?xml version="1.0" encoding="UTF-8"?>
    <deviceinfo version="0.2">
        <device>
            <match key="info.capabilities" contains="input.mouse">
                <!-- Kensington tweaks -->
                <match key="input.originating_device" contains="usb_device_47d_1020"><!-- should only match the Kensington Expert Mouse, shouldn't be relevant if you only have one mouse attached afaik -->
                    <merge key="input.x11_driver" type="string">evdev</merge><!-- have to specify this, otherwise it doesn't work-->
                    <merge key="input.x11_options.Emulate3Buttons" type="string">false</merge><!-- shouldn't need this, but on a mouse with 3 or more buttons it's really just annoying if it's enabled -->
    <!--                <merge key="input.x11_options.CorePointer" type="string">On</merge>--><!-- some search results suggested this enabled, but I haven't noticed any difference either way -->
                    <!--
                        1 = bottom left (left click)
                        2 = top left
                        3 = bottom right (right click)
                        4 = scroll up
                        5 = scroll down
                        8 = top right
    
                        the default buttonmapping is thus
                    <merge key="input.x11_options.ButtonMapping" type="string">1 2 3 4 5 6 7 8</merge>
    
                        ergo, to edit the 4 buttons, the ones to edit are (marked by x)
                    <merge key="input.x11_options.ButtonMapping" type="string">x x x 4 5 6 7 x</merge>
    
                        to swap scroll directions
                    <merge key="input.x11_options.ButtonMapping" type="string">1 2 3 5 4 6 7 8</merge>
    
                        or change any of these to 0 to disable and/or use with an alternative program like btnx
                    -->
                    <!-- simple remapping -->
                    <merge key="input.x11_options.ButtonMapping" type="string">0 1 2 4 5 6 7 3</merge>
                    <!-- disabling for use with btnx -->
                    <!--<merge key="input.x11_options.ButtonMapping" type="string">0 0 0 4 5 6 7 0</merge>-->
                </match>
            </match>
        </device>
    </deviceinfo>
    
    • #2 by Ed on 2011-04-06 - 21:30

      Whew!

      All along I’d thought the whole point of this computerization thing was to make stuff easier for us. XML may be easier for our robotic overlords, but I’m not seeing the point for config files like this…

      Time for me to correct the error of my thinking, I suppose.

      • #3 by Frans on 2011-04-07 - 03:18

        In all fairness, most of it is just comments from my ’08 self for my future self.

        But yeah, plain text configuration is much more user-friendly. (okay, technically XML is plain text also…)

        • #4 by Ed on 2011-04-07 - 06:50

          comments from my ’08 self for my future self.

          Obligatory XKCD reference

          The comic is thought-provoking, but the flyover text rocked me back on my heels…

          What comments would I leave for my ’08 self now?

          • #5 by Frans on 2011-04-07 - 07:01

            Correction, the comments were left by my ’09 self, and were also potentially for others who might’ve come across it through a search or some such. Anyway, I have an idea for a message that I would send to my ’08 self, but the mid-June ’09 self was already in the middle of it so it was too late to make a slightly different choice a few months earlier. Ultimately it didn’t matter too much, but it was still a stupid choice. Then again, otherwise I might’ve made a similar mistake at a later point in time.

            So never mind more life-related choices and I’d just tell myself to ignore the FDI files and just go for xorg.conf. That’s about it. :P

            • #6 by Ed on 2011-04-07 - 08:43

              So never mind more life-related choices

              I’ve decided that if I knew then what I know now, I’d get in much more complex trouble… so it’s best to go though life once, cold, without any hints.

          • #7 by Frans on 2011-04-07 - 10:08

            Haha, that is quite possible.

  1. Optiplex 980 Bringup Notes | The Smell of Molten Projects in the Morning