Fair point, multiple people have circled this snippet as problematic. I'll confess, I didn't spend much time testing this for performance.
My idea was that separate inputs should have separate debounced handlers, but it's likely you could do away with that and just listen for input events globally with no adverse effect on data collection.