If your desktop environment is Gnome or KDE (not sure if this will work anywhere else - and no idea about Gnome 3), then AutoKey is probably exactly what you're looking for (and a lot more!)
AutoKey does a lot of what
xdotool does, but lets you configure everything in a GUI. It's a full keyboard/mouse event scripting system with phrases and scripting in Python3. Find info here with installation instructions here.
Normal output from AutoKey appears to your system as if you typed it on your keyboard, so no API or other changes to your applications are necessary.
In the simplest case, you define a phrase with an abbreviation and, optionally, a hotkey. When you type the abbreviation followed by a trigger character such as
tab (or press the hotkey), the abbreviation is replaced by the text of your phrase. There are a number of additional options controlling exactly how this works.
If you need to get more sophisticated, you can write an AutoKey script.
AutoKey scripts are written in Python3 which means that they are only limited by you coding ability. They can do almost anything (even invoke
The current version is 0.95. If your package manager has an older version, you would be very much better off using the PPA or installing from source.