(simple) Debouncing 2 button state machine

From the library docs at Bounce2/src at master · thomasfredericks/Bounce2 · GitHub

@brief Returns true if pin signal transitions from high to low.
*/
bool fell() const;

/**
@brief Returns true if pin signal transitions from low to high.
*/
bool rose() const;

You can use these two methods to detect a rising or falling input state