title: Alternative of a custom keyboard( textDocumentProxy/UIKeyInput ) for MacOS & Windows
body: <p>I have a custom keyboard created for IOS that replaces the last word of the string with another string.</p>
  <p>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.</p>
  <p>For example, I am on a messanger application, I write &quot;Happy String1&quot; and when I press CTRL+A, the text should become &quot;Happy String2&quot;.</p>
  <p>I tried using macros for this but macros lack of flexibility ( I want to also save what word will be replaced ).</p>
  <p>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!</p>