Using the input agent will allow you to manage input devices based on their PHYS ID.
The input agent uses 3 configuration files:
/etc/hotplug/kbd.conf
/etc/hotplug/mouse.conf
/etc/hotplug/event.conf
To configure the keyboards you have to adjust /etc/hotplug/kbd.conf
If I wanted to use the PS2 keyboard for the primary Display and for the VGA console, I would have:
#
# keyboard configuration
#
# vt_name device_physicaly_location
VT0 isa0060/serio0/input0
VT1 usb-00:10.1-1.1/input0
|
Or, if I want to use the USB keyboard for the primary Display and for the VGA console:
#
# keyboard configuration
#
# vt_name device_physicaly_location
VT0 usb-00:10.1-1.1/input0
VT1 isa0060/serio0/input0
|
you could also use "*.*" instead of the pci function of the USB controller:
#
# keyboard configuration
#
# vt_name device_physicaly_location
VT0 usb-*.*-1.1/input0
VT1 isa0060/serio0/input0
|
For mouse devices you have to edit /etc/hotplug/mouse.conf
#
# mouse device configuration
#
# sym_link device_physicaly_location
mouse0br usb-00:10.1-1.2/input0
mouse1br usb-*.*-2.7.*/input0
mouse2br isa0060/serio1/*
|
and adjust the XFree configuration file.
For the first mouse change
......
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse0"
Option "ZAxisMapping" "4 5"
......
|
to :
......
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse0br"
Option "ZAxisMapping" "4 5"
......
|
For the second mouse change
......
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse1"
Option "ZAxisMapping" "4 5"
......
|
to :
......
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouse1br"
Option "ZAxisMapping" "4 5"
......
|
and so on.
For Event devices edit /etc/hotplug/event.conf
#
# input event device config file
#
# symbolic_link device_physicaly_location
event0br isa0060/serio0/*
event1br isa0060/serio1/input0
event2br usb-*.*-3/input0
|
and configure the applications which use them to use the symbolic links instead of the real devices