I want to know as to how do you detect if a key press event or a mouse pointer event has been generated by an (automation like) application like xdotool.
Basically, I am writing an application to check if there is no real mouse or keyboard activity.
In my application I want to flag idle activity only if we don't have real mouse movement or real key press/release on the keyboard.
Any reference regarding this would be great.
I want to do this using pure XLib API.
I don't want to use XCB.
Any extensions such XRecord(which I am currently using to capture events) are fine.