- [NEW] input::anyKeyPressed()

This commit is contained in:
2023-10-12 17:07:59 +02:00
parent 5cb9caa966
commit 9f623b249f
2 changed files with 9 additions and 0 deletions

View File

@@ -35,6 +35,11 @@ namespace input
return keydown != 0;
}
bool anyKeyPressed()
{
return keypressed != 0;
}
// Torna el codi de la tecla que està sent polsada ara mateix
const uint8_t whichKey()
{

View File

@@ -21,6 +21,10 @@ namespace input
/// @return true si hi ha alguna tecla polsada, false si no
bool anyKey();
/// @brief El equivalent a anykey per a keypressed
/// @return true si hi ha alguna tecla polsada, false si no
bool anyKeyPressed();
/// @brief Torna el codi de la tecla que està sent polsada ara mateix
/// @return Quina tecla està sent polsada
const uint8_t whichKey();