Skip to content

mmalenic/evget

Repository files navigation

MIT licensed Build status MIT licensed

evget - system input events

API Documentation

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.

Usage

Show input events by running the command, which prints events to stdout:

evget

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

Build

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 build

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

Development

Tests can be run using:

just test

This project uses pre-commit and clang-tidy to lint code. To format and lint the code run:

just check

Library usage

This 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_lib

If 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

About

No description, website, or topics provided.

Resources

License

Stars

3 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors