非常有用的ConsoleKeyInfo類

ConsoleKeyInfo類有3個可訪問屬性用於幫助確定被按下的是哪個或哪些鍵。 ConsoleKeyInfo keyPressed=Console::ReadKey(true); Console::WriteLine(L"控制檯按鍵:{0}",keyPressed.Key); Console::WriteLine(L"按鍵的Unicode碼:{0}",keyPressed.KeyChar);
相關文章
相關標籤/搜索