10

I'm trying to make a shortcut to send, for example, the universal quantifier symbol, ∀ (U+2200). Xdotool's own documentation doesn't really explain this.

wjandrea
  • 14,543

2 Answers2

11

For the above symbol, there are two options:

  1. Xdotool generates the character and types it:

    xdotool key U2200
    
  2. The shell (Bash) generates the character, and Xdotool types it:

    xdotool type $'\u2200'
    
wjandrea
  • 14,543
0

What I ended up doing is:

echo -n "${TEXT}"|xsel -b

xdotool key ctrl+v

This fills the mouse buffer, then pastes it.

Nmath
  • 12,744
  • Why not just xdotool type "$TEXT"? And how do you generate the Unicode character in the first place? It's usually a good idea to avoid non-ASCII text in source code. – wjandrea Nov 30 '22 at 17:19
  • Minor thing, but avoid using echo on arbitrary text; use printf '%s' instead. If for example, TEXT='-e', you won't get anything printed since -e is a flag to echo and there's no way to escape it properly. – wjandrea Nov 30 '22 at 17:20