From b6fcc1723c2d445aef9a53a4e33c006c51e08915 Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Sat, 31 Jul 2021 22:05:01 +0200 Subject: [PATCH] fix(core): add SHIFT as conflicting modifier to avoid bad pasting when trigger ends with shifted char --- espanso/src/cli/worker/engine/funnel/modifier.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/espanso/src/cli/worker/engine/funnel/modifier.rs b/espanso/src/cli/worker/engine/funnel/modifier.rs index bb73eae..f2eea12 100644 --- a/espanso/src/cli/worker/engine/funnel/modifier.rs +++ b/espanso/src/cli/worker/engine/funnel/modifier.rs @@ -32,10 +32,12 @@ use crate::engine::process::ModifierStatusProvider; /// after a while. const MAXIMUM_MODIFIERS_PRESS_TIME_RECORD: Duration = Duration::from_secs(30); -// TODO: should we add also Shift on Linux to avoid any conflict in the expansion process? Investigate -/// These are the modifiers that might conflict with the expansion process. For example, -/// if espanso injects some texts while Alt or Ctrl are pressed, strange things might happen. -const CONFLICTING_MODIFIERS: &[Modifier] = &[Modifier::Ctrl, Modifier::Alt, Modifier::Meta]; +const CONFLICTING_MODIFIERS: &[Modifier] = &[ + Modifier::Ctrl, + Modifier::Alt, + Modifier::Meta, + Modifier::Shift, +]; #[derive(Debug, Hash, PartialEq, Eq)] pub enum Modifier {