allows reacting to either button press or button release events