Get Input Key Time Down

Hey @szwarc9311, how do you find this approach? It uses Timers to get how long something happened here! So every second the Timer fires off the “IncrementHoldTime” Event which +1 the HoldTime Variable. On release, it gets the elapsed time since the last loop and adds that float to the Holdtime, ends the Timer and does something, here, it PrintStrings the Holdtime for prove.

Edit:

If you want to use the HoldTime in f.e. a progress bar, you could lower the Timer delay for better responsiveness and a neater Code:

Mind the delay as it could cost performance if set too low. :slight_smile:

1 Like