using "while" in the setup

Your while loop seems to say "while none of the buttons is pressed, if one of them is pressed then do something"

If I am right then does that make sense ?