How to get time of a button is being held down if button is not release

Instead of K, use the button you want.

267231-anwser.png