Reputation:
Without using Cocoa, how could I detect if a key is currently pressed in objective-c++? In Windows you use 'GetAsyncKeyState'.
Upvotes: 0
Views: 435
Reputation: 7367
What you're trying to do is not possible. Command line programs interact with input and output files (stdin
, stdout
, stderr
), which do not transmit events such as "key pressed" or "key released", but only streams of characters (bytes, actually).
Upvotes: 1