{"id":31376557,"url":"https://github.com/dkosmari/libevdevxx","last_synced_at":"2025-09-28T03:58:00.949Z","repository":{"id":311956522,"uuid":"618385378","full_name":"dkosmari/libevdevxx","owner":"dkosmari","description":"A C++ wrapper for libevdev","archived":false,"fork":false,"pushed_at":"2025-09-12T05:52:38.000Z","size":534,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-12T06:25:18.946Z","etag":null,"topics":["cplusplus-20","evdev","libevdev","linux"],"latest_commit_sha":null,"homepage":"https://dkosmari.github.io/libevdevxx/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dkosmari.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-24T11:01:07.000Z","updated_at":"2025-09-12T05:52:42.000Z","dependencies_parsed_at":"2025-08-28T02:23:03.203Z","dependency_job_id":"e0640107-50d7-4817-8486-7fc4c71ba0d1","html_url":"https://github.com/dkosmari/libevdevxx","commit_stats":null,"previous_names":["dkosmari/libevdevxx"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/dkosmari/libevdevxx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkosmari%2Flibevdevxx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkosmari%2Flibevdevxx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkosmari%2Flibevdevxx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkosmari%2Flibevdevxx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dkosmari","download_url":"https://codeload.github.com/dkosmari/libevdevxx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkosmari%2Flibevdevxx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277322052,"owners_count":25798726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-28T02:00:08.834Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cplusplus-20","evdev","libevdev","linux"],"created_at":"2025-09-28T03:57:57.249Z","updated_at":"2025-09-28T03:58:00.938Z","avatar_url":"https://github.com/dkosmari.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libevdevxx - a C++ wrapper for libevdev\n\n![build status](https://github.com/dkosmari/libevdevxx/actions/workflows/build.yml/badge.svg)\n\n`libevdevxx` is a C++20 wrapper for the C library `libevdev`, which is a high-level C\nlibrary for the `evdev` Linux driver. This library exposes all of `libevdev` as C++ classes\nand methods, with RAII and type safety.\n\n\n## Documentation\n\nHTML documentation can be found here: https://dkosmari.github.io/libevdevxx/\n\n\n## Example\n\nThis example ([examples/circle-mouse.cpp](examples/circle-mouse.cpp)) creates a virtual\nmouse, through the `uinput` subsystem, and generates events to simulate the mouse moving\nin a circle.\n\n```cpp\n#include \u003cchrono\u003e\n#include \u003ccmath\u003e\n#include \u003ciostream\u003e\n#include \u003cthread\u003e\n\n#include \u003clibevdevxx/evdevxx.hpp\u003e\n\nusing std::cout;\nusing std::endl;\nusing std::flush;\n\nusing namespace std::literals;\n\nint\nmain()\n{\n    using evdev::Code;\n\n    evdev::Device dev;\n\n    dev.set_name(\"Fake Mouse\");\n\n    dev.enable_rel(Code{REL_X});\n    dev.enable_rel(Code{REL_Y});\n    // needs at least one button to be recognized as a mouse\n    dev.enable_key(Code{BTN_LEFT});\n\n    evdev::Uinput udev{dev};\n    cout \u003c\u003c \"Created uinput device at \"\n         \u003c\u003c udev.get_devnode()\n         \u003c\u003c endl;\n    cout \u003c\u003c \"Doing a circle... \" \u003c\u003c flush;\n\n    const float radius = 10;\n    for (int i = 0; i \u003c 100; ++i) {\n\n        float angle = i/100.0f * 2 * M_PI;\n        int x = static_cast\u003cint\u003e(radius * std::cos(angle));\n        int y = static_cast\u003cint\u003e(radius * std::sin(angle));\n\n        udev.write_rel(Code{REL_X}, x);\n        udev.write_rel(Code{REL_Y}, y);\n        udev.flush();\n\n        std::this_thread::sleep_for(16ms);\n    }\n\n    cout \u003c\u003c \"done.\" \u003c\u003c endl;\n}\n```\n\nSee the contents of [examples](examples) and [tools](tools) for more examples.\n\n\n## Building\n\n### Dependencies\n\n- A C++20 compiler, usually installed by a meta package like `task-c++` or `build-essential`.\n\n- C/C++ compilation tools such as:\n  - `autoconf`\n  - `automake`\n  - `libtool`\n  - `pkg-config`\n\n- [libevdev](http://www.freedesktop.org/wiki/Software/libevdev) 1.13+: usually available as a\n  package in your distro (you need the \"devel\" package.)\n\n\n### Instructions\n\nYou can obtain the source through a release tarball, or by cloning the repository. If you\nuse a release tarball, you can skip step 0.\n\n0. `./bootstrap`\n1. `./configure`\n2. `make`\n3. `sudo make install`\n\nThis is a standard Automake package; more installation details can be found in the file\n[INSTALL](INSTALL) or by running `./configure --help`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkosmari%2Flibevdevxx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdkosmari%2Flibevdevxx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkosmari%2Flibevdevxx/lists"}