JaderoChan/hidtool
LibraryA cross-platform HID devices (Keyboard and Mouse now) tool. Contains HID hooker and simulator for listen HID events or send HID events.
A cross-platform HID devices (Keyboard and Mouse now) tool. Contains HID hooker and simulator for listen HID events or send HID events.
No GitHub topics on this repo.
- C++95.5%
- CMake4.5%
1 Review
hidtool is a promising, focused C++ library for a problem that is easy to underestimate: cross-platform keyboard and mouse event listening plus input simulation. What stood out most is that the project is already organized like something meant to be consumed by other developers, not just a demo. The public API is separated under include/hidtool, platform-specific code is split cleanly across src/.../win, src/.../macos, and src/.../linux, and the CMake setup supports both static and shared builds, install targets, generated config files, and find_package integration. That is a strong adoption signal for a young repo, especially compared with many input automation projects that stay locked to one OS or one example binary.
The README is also better than the repo’s current size would suggest. It explains the keyboard and mouse modules, calls out macOS Accessibility permissions and Linux privilege requirements, documents CMake options, and includes practical snippets for KeyboardHooker, KeyboardSimulator, MouseHooker, and MouseSimulator. The three examples, especially the event listener and simple clicker, help make the API feel concrete. The bilingual docs and Doxygen config are another nice touch, and the MIT license makes the project easy to evaluate for real use.
The biggest thing holding the project back right now is confidence-building around behavior. I did not see CI, tests, or a contribution guide, and for a library that hooks global input and synthesizes events, regressions can be subtle and platform-specific. Even a small test strategy would help: unit tests for key-code conversion tables, mouse coordinate/range helpers, event construction, and CMake package installation would give users more trust before they wire this into automation tools. A GitHub Actions matrix that at least builds Windows, macOS, and Linux would be especially valuable because cross-platform support is one of the project’s core claims.
I would also make the README slightly more explicit about safety and intended use. Input hook/simulation libraries can be used for accessibility tooling, testing, macros, and productivity, but they also raise understandable security concerns. A short section on permissions, user consent, foreground/background behavior, and known OS limitations would make the project feel more mature. The TODO already points toward Touchpad/Gamepad support and Unicode keyboard input; before expanding the surface area too much, I’d prioritize CI, a minimal changelog/release flow, and documented failure modes for each OS. Overall, this is a clean and useful foundation with unusually good packaging instincts for a new C++ HID/input library; the next leap is proving reliability across platforms.
