Send keystroke to background window [HELP]

RMCA

New Member
Joined
Aug 29, 2021
Messages
8
Reaction score
0
Credits
101
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?
 


Top