Here's the button driver and event queue logic