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.
Asked
Active
Viewed 5,860 times
2 Answers
11
For the above symbol, there are two options:
Xdotool generates the character and types it:
xdotool key U2200The 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
echoon arbitrary text; useprintf '%s'instead. If for example,TEXT='-e', you won't get anything printed since-eis a flag toechoand there's no way to escape it properly. – wjandrea Nov 30 '22 at 17:20
ctrl+shift+uthen2200will input a unicode symbol. Or in KDE set a compose sequence to do it. – pbhj Feb 27 '19 at 20:17