Modify debounce to avoid keyup if button already up (same for keydown)