Generating Keyboard Events

Joined
May 5, 2010
Messages
1
Reaction score
0
Points
1
Hi all,
I recently started my development in MAC OS. My aim is to generate keyboard events programatically, and I came across this method CGEventCreateKeyboardEvent and CGPostToPSN.....My doubt here is there is flag in CGEventCreateKeyboardEvent method, which indicates key down or key up...........In our keyboards if I press and hold down a key, it keeps on producing the event.. I thought even this API does the samething on setting the flag TRUE..but it isn't the case...Any pointers on this!!!!
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Note: Moved to appropriate forum.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top