Added a button press X event handler.