libinput provides device detection and setup as well as event handling for the Wayland compositor. Use this tag for libinput specific device related issues.
From the libinput documentation (v1.1.4, with minor corrections)
It provides device detection, device handling, input device event processing and abstraction so to minimize the amount of custom input code the user of libinput needs to provide the common set of functionality that users expect. Input event processing includes scaling touch coordinates, generating pointer events from touchpads, pointer acceleration, etc.