So I’m working to learn about how to get DIRECT keyboard input with c++. Right now i know how to use the getch() function and functions of that nature but I don’t know how to define all the different keyboard inputs. These are the kind of ones I’m looking for.
#define KB_UP 72
#define KB_DOWN 80
#define KB_LEFT 75
#define KB_RIGHT 77
#define KB_ESCAPE 27
#define KB_ENTER 28
So ultimately what are the others, are there others? I’m working with c++ on code::blocks on windows.
Thanks in advance 🙂
Look at the windows API doc for the winapi function
GetAsyncKeyState()which has a link to a page listing the virtual key codes returned by this function. The list includes the codes you mention in your q, but they are prefixed with VK_ rather than KB_.http://msdn.microsoft.com/en-us/library/windows/desktop/ms646293(v=vs.85).aspx