diff --git a/espanso-engine/src/event/mod.rs b/espanso-engine/src/event/mod.rs index 43397e7..841310e 100644 --- a/espanso-engine/src/event/mod.rs +++ b/espanso-engine/src/event/mod.rs @@ -82,6 +82,7 @@ pub enum EventType { Enabled, DisableRequest, EnableRequest, + ToggleRequest, SecureInputEnabled(internal::SecureInputEnabledEvent), SecureInputDisabled, diff --git a/espanso-engine/src/process/middleware/disable.rs b/espanso-engine/src/process/middleware/disable.rs index 5b7e633..41438cf 100644 --- a/espanso-engine/src/process/middleware/disable.rs +++ b/espanso-engine/src/process/middleware/disable.rs @@ -93,6 +93,10 @@ impl Middleware for DisableMiddleware { *enabled = false; has_status_changed = true; } + EventType::ToggleRequest => { + *enabled = !*enabled; + has_status_changed = true; + } _ => {} }