Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Cocoaを使用せずに、objective-c ++でキーが現在押されているかどうかをどのように検出できますか?Windowsでは、「GetAsyncKeyState」を使用します。
あなたがやろうとしていることは不可能です。コマンドラインプログラムは、「キーが押された」や「キーが離された」などのイベントを送信せず、文字のストリーム(実際にはバイト)のみを送信する入力ファイルと出力ファイル(、、)と対話しますstdin。stdoutstderr
stdin
stdout
stderr