small change in debounce

Only debounce when key is triggered