X.Org/Input drivers
From Gentoo Linux Wiki
Contents |
[edit] INPUT_DEVICES
INPUT_DEVICES is an alias for the x11-drivers/xf86-input-* packages, and in the case of x11-base/xorg-server, acts as "pull in" USE-Flags. So INPUT_DEVICES="synaptics" is the same as the USE-Flag input_devices_synaptics. Setting the INPUT_DEVICES variable is a good idea as it will make the emerge include your drivers or enable support for your input device.
To see what INPUT_DEVICES variables can be set, run,
and look at the the output following INPUT_DEVICES,
[ebuild N ] x11-base/xorg-server-...USE="..." INPUT_DEVICES="...." VIDEO_CARDS="..."
Add the INPUT_DEVICES variable with the driver you want in /etc/make.conf,
... INPUT_DEVICES="evdev synaptics" ...
[edit] evdev
The evdev driver configures your input devices, as needed, using HAL. This allows for the X server to automatically detect the keyboard and mouse you're using for your input devices, and removes the need to specify your devices in xorg.conf. Also, it allows for hot-plugging keyboards, mice and the various devices you might find yourself having to unplug the devices from a running machine and later plugging the devices back into the same running machine.
Add INPUT_DEVICES with evdev set in /etc/make.conf -- no other devices need to be listed:
... INPUT_DEVICES="evdev" ...
You need to enable the hal USE-Flag (if applicable) on x11-drivers/xf86-input-evdev and x11-base/xorg-server. The HAL daemon needs to be running and your user must be part of the plugdev group. Naturally, your kernel must have Event interface enabled.
| Linux Kernel Configuration: Enabling the Event Interface |
Input device support --->
<*> Event interface
|
[edit] Default Keymap
If you want to override the default keymap settings -- which is US -- you'll need to copy /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi to /etc/hal/fdi/policy/10-my-keymap.fdi. Open /etc/hal/fdi/policy/10-my-keymap.fdi and change the layout and variant settings to your liking. If, for example, you want the German keymap with no dead keys, it might look like this,
... <merge key="input.xkb.layout" type="string">de</merge> <merge key="input.xkb.variant" type="string">nodeadkeys</merge> ....
[edit] Troubleshooting
[edit] Multiple Keyboard Layouts
Below is an example of keyboard configuration. This example shows how to enable two keyboard layouts in order to be able to switch between these in your Window Manager. Note the XkbVariant option, which can be ignored in most configurations, but some regions needs it. (French Canadian [multi], French Swiss [fr], etc.)
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us,ca(fr)"
Option "XkbVariant" ",multi"
EndSection- The XkbModel is usually one of the following:
- pc105: Identified by the Enter/Return key being two rows tall or a backwards L shape
- pc104: Enter key is one row tall
- pc102: Without Super or Windows key