Rework button press detection.