5.4. More about XFree with event interface support

Using the "Dev Phys" option of XFree with event device support simplifies a lot the configuration of input devices in XFree, especially when a bigger number of displays are used.

As USB devices are connecting in a tree form, you can really easy specify the way keyboard and mice devices are bound to a specified X display. You have to use one USB hub with number of ports equal(or bigger) to the number of the X displays, to this hub are connected smaller (2-4 port) hubs (or keyboards with integrated hub). To the first port of the smaller (integrated) hub are connected the keyboards, to the second the mice (in case there are free ports you can connect usb-audio devices to them :) ). This results in the following layout of the usb-id's in case the primary USB hub is the first USB device :

Note

In the following explanations and examples I use for first device on the secondary(integrated) hub keyboard device because my keyboard is internally connected to the 1st port of the integrated hub. I assume this will apply for most of the keyboards with integrated hub, but in case the one you own uses different port you will have to make small adjustments.

Note

The examples below are for multiple XFree configuration files, if you use a single XFree configuration file you have to adjust the identifiers.

The configuration for the input devices for the 1st display would look something like this:


Section "InputDevice"
    Identifier  "Keyboard1"
    Driver      "kbd"
    Option      "Protocol"      "evdev"
    Option      "Dev Phys"      "usb-*-1.1.1/input0"
    Option      "AutoRepeat"    "250 30"
    Option      "XkbRules"      "xfree86"
    Option      "XkbModel"      "pc101"
    Option      "XkbLayout"     "dvorak"
EndSection
Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "mouse"
    Option      "Protocol"      "evdev"
    Option      "Dev Phys"      "usb-*-1.1.2/input0"
    Option      "ZAxisMapping"  "4 5"
EndSection

For the 2nd display something like this:


Section "InputDevice"
    Identifier  "Keyboard1"
    Driver      "kbd"
    Option      "Protocol"      "evdev"
    Option      "Dev Phys"      "usb-*-1.2.1/input0"
    Option      "AutoRepeat"    "250 30"
    Option      "XkbRules"      "xfree86"
    Option      "XkbModel"      "pc101"
    Option      "XkbLayout"     "dvorak"
EndSection
Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "mouse"
    Option      "Protocol"      "evdev"
    Option      "Dev Phys"      "usb-*-1.2.2/input0"
    Option      "ZAxisMapping"  "4 5"
EndSection

For the 3rd display something like this:


Section "InputDevice"
    Identifier  "Keyboard1"
    Driver      "kbd"
    Option      "Protocol"      "evdev"
    Option      "Dev Phys"      "usb-*-1.3.1/input0"
    Option      "AutoRepeat"    "250 30"
    Option      "XkbRules"      "xfree86"
    Option      "XkbModel"      "pc101"
    Option      "XkbLayout"     "dvorak"
EndSection
Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "mouse"
    Option      "Protocol"      "evdev"
    Option      "Dev Phys"      "usb-*-1.3.2/input0"
    Option      "ZAxisMapping"  "4 5"
EndSection

and so on.

You could also use the "?", so wherever you plug the primary hub, all displays will still have the desired configuration.


Section "InputDevice"
    Identifier  "Keyboard1"
    Driver      "kbd"
    Option      "Protocol"      "evdev"
    Option      "Dev Phys"      "usb-*-?.1.1/input0"
    Option      "AutoRepeat"    "250 30"
    Option      "XkbRules"      "xfree86"
    Option      "XkbModel"      "pc101"
    Option      "XkbLayout"     "dvorak"
EndSection
Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "mouse"
    Option      "Protocol"      "evdev"
    Option      "Dev Phys"      "usb-*-?.1.2/input0"
    Option      "ZAxisMapping"  "4 5"
EndSection