first of all, I know it's not a cross-platform solution, I'll try to make adjustments on other platforms (if they are possible, I'm open to any help/suggestion on this topic.).
My issue was that the keyboard events were sent only to the application/window in focus on OSX, but I wanted to control an OBS instance that was running in the background.
I cam across a possible solution via the CGEventPostToPid framework call.
For me this helped a lot, maybe could be useful for others too.
(I'm not that happy to introduce a new constructor, but that was the easiest a fastest for me.)
Hi,
first of all, I know it's not a cross-platform solution, I'll try to make adjustments on other platforms (if they are possible, I'm open to any help/suggestion on this topic.).
My issue was that the keyboard events were sent only to the application/window in focus on OSX, but I wanted to control an OBS instance that was running in the background. I cam across a possible solution via the CGEventPostToPid framework call.
For me this helped a lot, maybe could be useful for others too. (I'm not that happy to introduce a new constructor, but that was the easiest a fastest for me.)