Shows a unified view of system input events.
On Linux, events are captured through X11 or libinput. A native Windows backend is in progress, with macOS to follow.
Show input events by running the command, which prints events to stdout:
evgetTo store output to a file, specify -o and a JSON or sqlite file. The file extension determines the format:
evget -o store.json # store data in a JSON file.
evget -o store.sqlite # or, store it in an sqlite database.When reusing an existing file, new events are appended.
Events are stored on an interval-based system where --store-n-events determines how many events are needed to initiate
a write, and --store-after-seconds determines how often to write. When the number of events buffered passes
--store-n-events, or --store-after-seconds time has passed, a write is called.
This project uses a just to manage development, conan as the package manager and cmake as the build tool. To build the project, run:
just buildThis requires a C++23 compiler, at least gcc-14 or clang-19 on Linux, or MSVC 17.11 on Windows.
For backend, OS, or compiler specific commands, see recipes/README.md.
Tests can be run using:
just testThis project uses pre-commit and clang-tidy to lint code. To format and lint the code run:
just checkThis project can also be built and used as a library. View the API docs here.
The library can be built without the binary using:
just build_libIf using this project as a submodule and cmake, it can be included by using add_subdirectory and linking against
libevget (the core) and a backend target (libevgetx11 or libevgetlibinput on Linux, libevgetwindows on Windows):
add_subdirectory(evget)
target_link_libraries(${PROJECT_NAME} PRIVATE libevget)
add_subdirectory(evgetx11)
target_link_libraries(${PROJECT_NAME} PRIVATE libevgetx11)
add_subdirectory(evgetwindows)
target_link_libraries(${PROJECT_NAME} PRIVATE libevgetwindows)Code documentation can be generated by running:
just doc