Is button pressed? If yes how long? Won´t work

The variables with numeric suffixes are a big clue that the code is crying out for arrays to be used to avoid the repeated code.