I want my program to press certain keys on my keyboard without me doing it physically.
So I need a subroutine that simulates pressing any key.
What code could I use to accomplish this (Press Any Key) in C++?
(I’m creating a program for MacOSX in Xcode)
Ok I got the mouse sorted now I just need key presses
You could use low-level event functions such as
CGEventPost. At a higher level, look at the Accessibility APIs, such asAXUIElementPerformAction.