You are not logged in.
Hello everyone,
Is it possible to capture an application window (screenshot) running in a different workspace and send keyboard/mouse events to it without leaving the current workspace ?
Any help to get me started will be very appreciated
Thanks in advance
Blizz4rd
Offline
I don't know about screenshots, but for sending events you might try xdotool. It can either just simulate input, or it can send events to a specific window if the window allows it. See "Sendevent notes" in its manual page on the limitations that apply.
Offline
Well I was hoping to resolve this by programming, ie: java or C but thanks anyway, at least I know it's kinda doable
Offline
Sorry, I sometimes miss the forum category...
man XSendEvent and XTestFakeKeyEvent for sending events. With XSendEvent, you can compose synthetic events and send them to specific windows. The downside is that windows may refuse those events. Some apps allow them by default, some don't allow them at all, some let the user decide. With XTest you can simultate events, i.e. send a key as if the user had hit it, which means it will end up in any window currently focused. Also, if you send a "c" while the user holds down ctrl, it will result in Ctrl+c... So both methods have some limitations.
I still don't know about screenshots, but afaik x11 has sth called the BackingStore in which visual contents of windows are cached that are not currently visible.
Offline