User Tools

Site Tools


en:examples:input:keyboard_key_up

Detecting Keyboard Key Up

Code

orxSTATUS orxFASTCALL Init()
{
  orxClock_Register(orxClock_Get(orxCLOCK_KZ_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.txt · Last modified: 2022/12/06 13:39 (2 years ago) by iarwain