I am looking some way where I can listen to the events like a click inside certain application. I am trying to develop an application(electron) where I have to generate some specific triggers when certain thing happens. For example, my application is watching the browsers and when the user opens their gmail account and views some emails then my application knows about it and then present the users with some helpful information based on the contents of emails. Also the application must be able to view these type of events in different application like Slack, Outlook, Safari etc.
I heard about a feature called Accessibility but it seems there is very less documentation on implementing it into the code. Is there any way of achieving this functionality or is it feasible at all? It would be very helpful if someone can answer this question and provide the necessary links to the documentation. Thanks.