Debounce pushbuttons in event loop