简体   繁体   中英

GetAsyncKeyState and Numpad numbers [C++]

How would you detect a numpad number keypress? I know this is a stupid question, but I just started recently getting into programming a few days ago and working my way into C/C# and C++.

Here's what I have so far:

if (GetAsyncKeyState(VK_NUMPAD0) {
    // do this
}

I figured out my own question. The code above does work. I just forgot to close the main with another bracket. Silly mistake. Sorry!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM