hidmon

Crates.iohidmon
lib.rshidmon
version0.2.0
created_at2025-02-09 06:36:23.228667+00
updated_at2025-02-16 22:19:08.114667+00
descriptionLightweight, callback-based keyboard/mouse monitoring
homepage
repositoryhttps://github.com/koenigbs18/hidmon
max_upload_size
id1548705
size41,568
Brett Koenig (koenigbs18)

documentation

README

License: Apache 2.0

HIDMON

Simple library for monitoring HID (keyboard, mouse) events via callbacks.

Supported Targets

  • Windows
    • Tested as working on Windows 11 Build 22631

Example Usage

See src/main.rs

Limitations/Warnings

  • Windows

    • You MUST have a message loop running on the same thread as any HidMonitor before calling HidMonitor::enable, otherwise your system may become unresponsive! For maximum safety, ensure the message loop is running before enabling any hooks, or shortly after. For applications which otherwise do not care about handling WinApi messages, [HidMonitor::message_loop] serves as a convenience function for starting a simple message handler.
    • Read more about the implications of HidMonitor::enable on the WinApi documentation for SetWindowsHookExA
  • Unix

    • TODO

TODO

  • Unix support
  • Unit testing
  • Handle panics that occur inside inside user-defined callbacks (and documentation on this behavior)

License

This project is licensed under the Apache License 2.0.
See the LICENSE file for details.

Commit count: 10

cargo fmt