user1858143
user1858143

Reputation:

Detecting if key is pressed objective-c++

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

Answers (1)

Mark Probst
Mark Probst

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

Related Questions