Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DeDMakar

macrumors member
Original poster
Mar 24, 2008
39
0
I use function CGPostKeyboardEvent for Keyboard Event. I need to convert NSString in KeyCode. What offers?
 
Are you trying to convert it to a CGKeyCode? CGKeyCode is just an unsigned short essentially, so NSString's intValue may work (typecasted of course), but it depends what the NSString value is. Can you give an example?
 
I have a variable of type NSString *sStr = "password". Each letter I enter by means of CGPostKeyboardEvent. The letter "p" and following must to convert in CGKeyCode.
 
If there are no other variants, it is necessary to use this simple function keyCodeForKeyString.:rolleyes: Thank!!!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.