Libinput

libinput is an input device driver for Wayland compositors and X.org window system. It is a drop-in replacement for the slowly deprecating evdev and synaptics input drivers. It provides device detection, device handling, input device event processing and abstraction so minimize the amount of custom input code compositors need to provide the common set of functionality that users expect.

USE flags
Add to the  INPUT_DEVICES  variable:

After the update the packages and  should be installed.

Additional software
In order to enable actions gestures on the touchpad using the libinput driver, follow the install notes from the official project page on GitHub.

Remember to install the required dependencies:

Xorg
By default, when libinput is the only available input driver for Xorg, no additional configuration is needed. Simply (re)start the graphical environment for the changes to take effect.

If multiple input drivers are available on the system ( and for example), then additional configuration is required.

Selecting libinput
When multiple drivers are available on the system, Xorg must be instructed to use libinput before trying to use other input drivers. This can be simply performed by symlinking the file into the  directory:

Xorg gives priority to the files in the directory.

(Re)start the graphical environment for the changes to take effect.

Removing another input driver from INPUT_DEVICES does not prevent Xorg from loading it
This issue can occur in a variety of situations, but it is most prominent when migrating from evdev to libinput.

Be sure the package is no longer installed on the system. If exists then Xorg will still reference it.

Verify the evdev driver is no longer referenced anywhere by Portage (check and ), then depclean the system:

External resources

 * Latest API documentation
 * Gentoo forums discussion on libinput
 * Arch Linux wiki article on libinput
 * profiles: Switch default INPUT_DEVICES to libinput on Linux.