1

I'm new in this, I want to make a program that will take a screenshot every time the mouse clicks. I have knowledge that a mouse event is also stored in a buffer file but don't know how to access it and fetch related data coordinates etc, to implement it. Help me out, please and share any resources where I can read about it.

I'm using ubuntu 20.04 and C language. I know how to capture keyboard event but don't know about mouse events.

Please take your time to explain because I'm a noob.

Thank you in advance.

Dan Eyal B
  • 11
  • 2
  • it's not a simple thing to do, and tbh if you're new at programming you might find this a hell of confusing. You'll need to capture the mouse event ([take a look this StackOverflow question](https://stackoverflow.com/questions/43272952/capturing-mouse-event-in-c-linux) ) and then take a screenshot ([read this](https://stackoverflow.com/questions/25200011/take-a-screenshot-in-c-windows])). There must be other ways to do it, but this is what I can think of. – Ramon Dias Aug 08 '20 at 19:25
  • 1
    Does this answer your question? [Take a screenshot in C - windows](https://stackoverflow.com/questions/25200011/take-a-screenshot-in-c-windows) – eracer9 Aug 08 '20 at 23:30
  • lol he said Ubuntu. I doubt that the code for doing something like this would be cross platform – Ramon Dias Aug 09 '20 at 15:01
  • @RamonDias **Thank you** Currently, I'm done with capturing keyboard events (Keystrokes) but don't know anything about mouse events, couldn't find anything online... PRAY FOR ME GUYS... – Dan Eyal B Aug 09 '20 at 17:28

0 Answers0