I have a custom keyboard created for IOS that replaces the last word of the string with another string.
I want to recreate this functionality for macOS and windows, so I need a background process to listen for a shortcut ( let's say CTRL+A ) and whenever that shortcut is pressed, the process described above will be executed.
For example, I am on a messanger application, I write "Happy String1" and when I press CTRL+A, the text should become "Happy String2".
I tried using macros for this but macros lack of flexibility ( I want to also save what word will be replaced ).
Also, I do not target any specific technology/programming language ! I just want some hints of what could I use to make this to work!