3 unstable releases
0.2.0 | Feb 16, 2025 |
---|---|
0.1.1 | Feb 10, 2025 |
0.1.0 | Feb 9, 2025 |
#1397 in Hardware support
376 downloads per month
17KB
308 lines
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 callingHidMonitor::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 handlingWinApi
messages,HidMonitor::message_loop
serves as a convenience function for starting a simple message handler. - Read more about the implications of
HidMonitor::enable
on theWinApi
documentation forSetWindowsHookExA
- You MUST have a message loop running on the same thread as any
-
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.
Dependencies
~123MB
~2M SLoC