pub enum Effect<'a> {
None,
Click(MouseButton),
Shortcut(Shortcut),
Key(&'a KeyCombo),
Scroll {
dx: i8,
dy: i8,
},
Media(MediaKey),
Native(NativeAction),
Script(Script<'a>),
Text(&'a str),
AgentSide,
}Expand description
Variants§
None
Suppress the input entirely: no OS event at all.
Click(MouseButton)
Synthesise a physical mouse button click.
Shortcut(Shortcut)
Fire a named shortcut. Each backend maps this to its own platform
chord (or, for the rare shortcut with no chord at all on some OS, a
dedicated native code path) — see that backend’s combo table.
Key(&'a KeyCombo)
Press an already-resolved keyboard chord: a user-recorded
Action::CustomShortcut, or a workflow’s PressKey step.
Scroll
Synthesise one scroll tick. dx/dy are unit direction (-1/0/1);
each backend applies its own tick magnitude.
Fields
Media(MediaKey)
Fire a media/volume key. Every backend reaches these through a dedicated OS mechanism rather than an ordinary keyboard chord.
Native(NativeAction)
A window-manager or power action with no shared cross-platform chord — each backend has its own dedicated handling, which may be a debug-logged no-op where the OS has no equivalent at all.
Script(Script<'a>)
A power-user scripting escape hatch.
Text(&'a str)
Type this text via unicode input.
AgentSide
Handled entirely by the agent/hook layer — DPI presets, SmartShift, the Actions Ring, and launching an application. The injector logs and does nothing.
Action::OpenApplication is included here even though
openlogi_inject::execute does open it: that happens in the
platform-independent dispatcher before a backend ever sees the
action (the config target is opened via the opener crate, not
through any per-OS synthesis path), so from a backend’s point of
view it is exactly as much a no-op as the DPI actions.
Trait Implementations§
impl<'a> Copy for Effect<'a>
impl<'a> Eq for Effect<'a>
impl<'a> StructuralPartialEq for Effect<'a>
Auto Trait Implementations§
impl<'a> Freeze for Effect<'a>
impl<'a> RefUnwindSafe for Effect<'a>
impl<'a> Send for Effect<'a>
impl<'a> Sync for Effect<'a>
impl<'a> Unpin for Effect<'a>
impl<'a> UnsafeUnpin for Effect<'a>
impl<'a> UnwindSafe for Effect<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.