In Arduinoland, ezButton is pretty handy. https://arduinogetstarted.com/tutorials/arduino-button-library - the button array is good for multiple buttons. Setting the pressed time when isPressed is true and then comparing it when isReleased is true and seeing what the delay was.
I did a similar ESP32 page turner using bluetooth - made it to send page up/down, line up/down, or next/prev window with a display to say which it was doing. That was before I encountered ezButton so it debounced by spotting the button press, hanging on briefly, then checking if the button was still pressed. Subsequently I saw another method which I thought was very clever - there's a variant on it at https://www.e-tinkers.com/2021/05/the-simplest-button-debounce-solution/ (go down to "The simplest debounce function").