Debounce different kinds of events.