javascriptnode.jselectron

Paste, or otherwise output text outside of an Electron app?


From an Electron application, is it possible to output text to wherever the cursor is currently located at, i.e. even if that is somewhere outside of the actual Electron app?

So far the best solution I've come up with is to write the text on to the clipboard, and notify the user that the text is ready to be pasted. I'd like to get rid of that extra step.


Solution

  • I would give RobotJS a try. It appears to do what you need.