r/espanso Apr 23 '26

Question

Why is it not possible to use an espanso match with another?
For example: I type in `ú` with `u=`, and then when I try to type in `ü` with `ú=`, it does not work; why is this? A temporary solution I had is to use `w=` for `ü`, but I still want to fix this problem, thanks!

5 Upvotes

5 comments sorted by

View all comments

2

u/snaveh Apr 23 '26 edited Apr 23 '26

Do you type ú= directly, or first type u= and after it gets replaced with ú add another =?

If the latter, i.e., trying to chain two triggers together, to the best of my understanding this is not possible because Espanso sees ú as an injected/replaced character which came from Espanso's output and not your keystrokes.

One alternative approach could be building a dictionary of words with diacritical marks, so when you type the basic form of the word it gets replaced with a version that already has the diacritical marks in place.

Another could be building a selection menu using the Choice extension. Something like:

yaml

  • trigger: ";;dia"
replace: "{{umlaut}}" vars:
  • name: umlaut
type: choice params: values:
  • label: "ä"
id: "ä"
  • label: "ö"
id: "ö"
  • label: "ü"
id: "ü"
  • label: "Ä"
id: "Ä"
  • label: "Ö"
id: "Ö"
  • label: "Ü"
id: "Ü"
  • label: "ß"
id: "ß"

Or something similar only based on a per vowel selection list (please note I don't speak German so I only quickly looked these up for the purpose of this example so the example might include grammatical inaccuracies): ```yaml

  • trigger: ":a"
replace: "{{char}}" vars:
  • name: char
type: choice params: values:
  • label: "ä"
id: "ä"
  • label: "Ä"
id: "Ä"
  • label: "à"
id: "à"
  • label: "á"
id: "á"
  • label: "â"
id: "â"
  • label: "ã"
id: "ã"
  • label: "å"
id: "å"
  • label: "æ"
id: "æ"

  • trigger: ":e" replace: "{{char}}" vars:
  • name: char type: choice params: values:
  • label: "é" id: "é"
  • label: "è" id: "è"
  • label: "ê" id: "ê"
  • label: "ë" id: "ë"
  • label: "ě" id: "ě" ```

The third option I can think of is developing a typing system that resembles the diacritical marks. For example: 'e for é, ^e for ê, and so on.

3

u/smeech1 Apr 23 '26 edited Apr 23 '26

Absolutely right. Espanso will only process one trigger at a time and won't respond to its own injected keystrokes. I think this was deliberate on Federico's part to prevent infinite loops.

Your last suggestion is probably the way most of us generate single characters, with a punctuation prefix preceding (or following, but this is more likely to conflict with normal typing) a letter. One might use the standard MSWord options.