Reputation: 682
I'm creating a 2-D platformer game in C that will run in the terminal. I need a way to register "KEY_DOWN" and "KEY_RELEASE" events. As far as I know getchar() reads from stdin and thus can not be used for registering "KEY_RELEASE" events. Neither can it be used for registering if multiple keys are being pressed down at the same time.
Is there a Mac OSX 10.10.5 C library that I can use to solve this problem? Maybe a library which reads input directly from the keyboard instead of the terminal?
Upvotes: 0
Views: 704
Reputation: 54515
None of the potential answers are likely to be simple:
Here are a few:
For reference (Cocoa Event Handling Guide):
Upvotes: 1