With Hammerspoon⁽³⁾ and the Accessibility API, I’ve found there’s not really much I can’t do.
For example, I use the Claude desktop app, but when I copy something from it, the Clipboard gets multiple content types, including RTF and Markdown, but I usually want the latter. So I wrote a quick snippet in Hammerspoon so that when Claude.app is the active app and the Clipboard changes, strip all the parts from the Clipboard except the “UTF8” part so I get just the Markdown (unless the Shift key is held down, which leaves it as-is). No more “formatted text” when I want to paste the Markdown.
My biggest problem now is that when I help somebody else on their Mac, I’m so used to “my controls” that I have to stop and think how to do things the normal way.