octalmage / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
12.38k stars 961 forks source link

Send keystroke outside the app. #624

Open qroft opened 3 years ago

qroft commented 3 years ago

As the documentation is not online ATM I would love to know if I can do this with robotjs:

Let's say I create an electron app and there is a button with the binding for F1 (help key under Windows). Can this keystroke be send to an outside program running like MS Windows ?

So, I want to send the F1 not directly from within Word, but through my own electron app.

Thanks and best wishes!

JairusSW commented 3 years ago

Doing the same thing! Havn't found any solution besides using two computers and having a window open on #1 and moving the mouse on #1.