Possible Duplicate:
How to avoid press enter with any getchar()
I need to get keyboard pressed key in console Objective-C app without pressing 'Enter' button
This code reads pressed key code only after I press 'Enter'
int key;
key=getchar();
NSLog(@"%i", key);
I need something like this but without pressing 'Enter'. How can I do this?