Expand description
Representation of keyboard and mouse events.
When an event is generated, EventReceiver::recv
can be called to receive the event.
The received event is blocked (other programs are not yet notified).
Calling NativeEventHandler::block
will continue blocking and no notification will be made.
Alternatively, calling NativeEventHandler::dispatch
will notify other programs of the event.
If neither is called, the event is notified.
§Warning
On Windows, Calling function that perform input (e.g. Button::press
) before calling NativeEventHandler::block
or NativeEventHandler::dispatch
will take time.
Therefore, call these functions before calling function that performs the input.
§Examples
let rx = hookmap_core::install_hook();
while let Ok((event, native_handler)) = rx.recv() {
// Blocks all the events
native_handler.block();
}
Structs§
- Button
Event - Indicates button event.
- Cursor
Event - Indicates mouse cursor event.
- Native
Event Handler - Decide whether to notify other programs of generated events.
- Wheel
Event - Indicates mouse wheel event.
Enums§
- Event
- An event
- Native
Event Operation - Indicates whether to pass the generated event to the next program or not.