User Tools

Site Tools


en:examples:input:keyboard_key_up

This is an old revision of the document!


Detecting Keyboard Key Up

Code

orxSTATUS orxFASTCALL Init()
{
  orxClock_Register(orxClock_FindFirst(orx2F(-1.0f), orxCLOCK_TYPE_CORE), Update, orxNULL, orxMODULE_ID_MAIN, orxCLOCK_PRIORITY_NORMAL);
...
void orxFASTCALL Update(const orxCLOCK_INFO *_pstClockInfo, void *_pContext)
{
	if (orxInput_IsActive("MyKey") == orxFALSE && orxInput_HasNewStatus("MyKey") == orxTRUE) {
		orxLOG("MyKey is released.");
	}
}
...

Config

[KeysForInput]
KEY_ESCAPE	= Quit
KEY_SPACE	= MyKey
en/examples/input/keyboard_key_up.1518598064.txt.gz · Last modified: 2018/02/14 00:47 (7 years ago) by 127.0.0.1