Open chicco64 opened 2 years ago
This library is window-agnostic, so there's no option to emulate events "towards" other programs. One option would be to alt+tab or somehow change the current window, send the spacebar event, and come back. This is fairly invasive and will lead to screen flashing, however.
If you are pressing spacebar to play/pause a video in Chrome, you can try sending a 'play/pause media'
event, which is equivalent to most keyboards' media key. Chrome is able to understand those commands and pause the current video. This would be preferred if it works for your use case.
I would need with your software to emulate the "spacebar" key towards an already open window running google-chrome (debian11). This is to be able to activate an audio player that requires the physical keyboard command "spacebar" and that I would like to emulate through the bash command. can you kindly help me? Thank you very much