2017-05-08 5 views
0

私はスペースキーが押されたときに何かをするプログラムを書いています。 私がこれまで持っている:Mac上でC#を使用してスペースバーが入力/押されたかどうかを検出するにはどうすればよいですか?

Console.WriteLine("Listening for the BIG BUTTON:......... "); 
    ConsoleKeyInfo name = Console.ReadKey(); 
    Console.WriteLine("You pressed {0}", name.KeyChar); 

    if(//keyPressed is the spacekey"){ 

    Console.WriteLine("Space key is pressed); 
    } 

答えて

関連する問題