I was thinking if it’s possible to press a key (as a) with Cocoa. I already searched in the web, but I don’t found anything. Actually, I don’t want to use AppleScript or Python to do it. Just cocoa.
Any idea?
Thanks in advance!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m not entirely sure what you want, but you can work with system wide events through EventTaps.
Quartz Event services reference
I’m not entirely sure what the appstore allows, I do know my app with a listening event tap has been approved. There are 2 types of taps, filtering and listening => their names are both pretty straight forward. I think using a event tap you should also be able to post new events.. ( thus fake a key press.. )