Added support for multiple button presses and hold