-
Notifications
You must be signed in to change notification settings - Fork 1
getKeys() Usage
KonPet edited this page Jan 10, 2021
·
3 revisions
Detects a button press/held/release and returns a true/false statement. This is to be used in a if/while statement.
Before using this function make sure to call scanKeys() first
bool getKeys(
KEYPAD_BITS key // enum from libnds
KeyPhase phase // KeyPhase enum
)
KEYPAD_BITS:
KEYPAD_BITS enum
KeyPhase enum contain:
press, held, release
if (getkeys(KEY_A, KeyPhase::release)) {
[YOUR CODE GOES HERE]
}