GetKey() function give the status of the specified key on the keyboard to knows if it is pushed or not.
This function can handle detection of several keys pushed at the same time. But remember a lot of non gaming keyboards are subjet to key ghosting problems. So use multiple keys capability carefully.
Keycode : The code of the key to test.
A boolean value depending on the status of the specified key. True means the key is pushed, false mean it is released.
Try this program to know the keycode associated with a given key. Informations outputs on the terminal. Use Blackvoxel in windowed mode for looking at the terminal.
// Listing #1: Keyboard polling.
function Voxel_Step()
{
local i;
for (i=0;i<1024;i++)
{
if (GetKey(i)) print("Key Pressed : " + i + " ");
}
}