Send keystroke to background window [HELP]

RMCA

New Member
Joined
Aug 29, 2021
Messages
7
Reaction score
0
Credits
84
Hello Linux community...

I use an Arch based distribution called Manjaro and I'm trying to implement the following routine;

I open a certain application (native for Windows, I use Wine) and leave it in the background, while using another Linux application.

I made a command using xdotool, where it should send the "F12" keypress to that particular window that is in the background (the native Windows application)

xdotool key --window $(xdotool search --name 'WindowsApp') F12;

The problem they are facing is that the "F12 keypress" is only sent to the window if it is in the foreground, and I would like it to be sent even if it is in the background.

Because as I said, the windows application is running in the background, while I do other things, and even if it is in the background, I need the "F12" to be sent to that particular application.

Is this possible?
Could anyone help me to resolve this issue?
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online

No members online now.

Top