Windows 10, visual Studio, c++

There are some times when I want to prevent the screen saver for activating when there has been no input from the user. But not all the time.
What is the most simple way I can generate some data in an app and make the computer think someone pecked a key or moved the mouse?