freedesktop.libevdev
#includelibevdev 1.13.7 — a wrapper for the Linux evdev input interface, event-name tables pre-generated
#include <libevdev.h>
mcpp add freedesktop.libevdev@1.13.7
Usage
From this repository's own test project — built and run by CI, not written for the website.
// libevdev, exercised without an input device.
//
// The package's whole reason to be a fork is `event-names.h` — 1,692 lines of
// generated tables mapping every kernel input constant to its string. So that
// is what the test asks about: a package that linked but whose tables were
// generated from the WRONG headers (the host's rather than the bundled ones,
// which produces a measurably different file) answers these differently.
//
// No device is opened. libevdev's name lookups are pure functions of the
// tables, which is exactly why they are testable anywhere.
#ifdef __linux__
#include <libevdev.h>
#include <linux/input.h>
#include <cstdio>
#include <cstring>
#include <string>
namespace {
int failures = 0;
// …
tests/examples/libevdev/tests/libevdev.cpp · project tests/examples/libevdev
Build · upstream manifest
- targets
evdev (lib)- language
c++23- manifest version
1.13.7- source
https://raw.githubusercontent.com/mcpplibs/libevdev/1.13.7/mcpp/evdev/mcpp.toml