Simultaneous short and long presses

that's the tricky part to code.

As you said, both buttons won't be pressed exactly at the same time so If you detect a short press on button 1 you don't want to trigger "Scroll UP" right away to get a chance to catch a potential short press on button 2 in which case you want to send LOOPER instead

You also need to decide if the press is going to turn into a long presss, so you can't react to the button going down, you need to wait long enough to know if it's turning into a long press

you might benefit from studying state machines. Here is a small introduction to the topic: Yet another Finite State Machine introduction