Program stops after button press

OK, but he still needs to detect the state change.