Tests if a key was pressed down during the last frame.

bool Input_KeyDown(
  int key


Specifies one of virtual-key codes. For more information see Key codes section.

Return value

If the key was pressed down during the last frame, returns true. Otherwise returns false.


Input_KeyDown handles keyboard keys and mouse buttons.

The key states are updated outside user's frame function. So don't use Input_KeyDown in a loop to wait a key to be pressed or released, this will result in system hang up.


Header: hge.h
Import library: hge.lib

See also

Input_KeyUp, Input_GetKeyName, Input_GetKey, Input_GetChar, Key codes