X.Org/Input drivers

INPUT_DEVICES
INPUT_DEVICES is an alias for the -* packages, and in the case of, acts as "pull in" USE-Flags. So INPUT_DEVICES="synaptics" is the same as the USE-Flag. 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-drivers-... INPUT_DEVICES="...." VIDEO_CARDS="..."

Add the INPUT_DEVICES variable with the driver you want in ,

evdev
The evdev driver configures your input devices, as needed, using HAL or udev. 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. 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 set in  -- no other devices need to be listed:

Depending on the version of xorg-server, you need to enable the or the  USE flags (if applicable) on  and. When both are applicable, you can enable both.

The HAL or udev daemons needs to be running when applicable, and your user must be part of the plugdev group. Naturally, your kernel must have Event interface enabled.

Default Keymap
To check which keymap a running X session is using, run:

To set the keymap for a running X session:

To set the keymap for all X sessions

And add the line:

Option "XkbLayout" "gb"

To the keyboard section of the evdev.conf

If you're starting X manually from the command line, adding to your  will set the keymap for that session:

HAL
HAL has been deprecated, see bug 313389, and x11-base/xorg-server Changelog for 2011-03-27.

If you want to override the default keymap settings -- which is US -- you'll need to copy to. Open 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,

udev
Using udev, the default input configuration is stored into.

If you want to modify any of them, you have to create a new config file into. If you want to create a new keyboard configuration, you have to create. You can copy and modify the keyboard input class from.

Example, if you have a Logitech Access keyboard for the French part of Switzerland, you can use the following:

For an in-depth explanation, read and

Note that a list of keyboard layouts and models can be found in.

Troubleshooting
The first thing to do is to read : If a problem occurs, be on the lookout for any lines beginning with (EE) which represent errors, and also (WW) which are warnings that could indicate other issues.

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.)

Since Xorg 1.8, all you have to do is to add the options from the preceding example into the input class section of


 * 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

Switching Multiple Keyboard Layout
To be able to easily switch keyboard layouts, modify the Options used in either of the above two methods. For example, to switch between a US and a Swedish layout using the Caps Lock key, use:

You can get a list of possible options for grp: in

Eingabegeräte