Putting aside the IO details (possibly more editor-dependent than you hope) of:
Mouse position -> word selection -> word text -> word replacement
,
one approach to term lookup is to:
- Hold your lexicon of alternative terms as a Keyboard Maestro variable in JSON dictionary format, and
- use the Keyboard Maestro
%JSONValue%
token to the fetch specificSource -> Target
matching string.
Broadly, using a three-term dummy lexicon, and illustrating the use of %JSONValue%
with it: