I’m creating a program for mac and I need to simulate key presses but I don’t know how to simulate a key press. I have done it on windows using winapi, but not on xcode.
How would I go about doing that? (Using xcode on mac 10.7 creating a command line application)
I’m creating a program for mac and I need to simulate key presses but
Share
You should generate a key event by
keyEventWithType:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:and send it toNSApplicationbysendEvent:.