ranelpadon / ngram-type

Touch typing trainer using N-grams as data source, with options to customize the auto-generated lessons and specify the minimum typing performance needed. There are sound/color effects as well.
208 stars 39 forks source link

Pause timer button #13

Closed Natan-P closed 2 years ago

Natan-P commented 2 years ago

I've been having a blast (both in fun and in wpm :D), but one thing that's been bothering me is the fact that the timer in the top-left corner is unpausable. I feel that this would be a pretty easy feature to implement. It would obviously unpause when the user starts typing again.

ranelpadon commented 2 years ago

@Natan-P Thanks for your feedback! Hmm the main reason I included the timer is to have an idea/awareness of how much time I spent using Ngram Type since I was using various tools before. It's not really a metric for accuracy, WPM, or something else. I'm curious though why would you want it to be pausable? Note that the WPM/Accuracy are computed using the typing time only, so it's pretty accurate, and independent to that of the displayed timer.

If you're distracted by the timer maybe I could make it optional like the Sound toggler?

Natan-P commented 2 years ago

Hey! Sorry for the late response. The main reason why I would like this, is because sometimes you have to go away for a bit, and then when you come back, you wouldn't have any measurement of how long you have actually been practicing.

ranelpadon commented 2 years ago

@Natan-P I refined the behavior of the timer now for more granular/precise timing:

  1. timer will show immediately on page load for better visual balance, but will be on pause
  2. timer will start once the user types in the input field
  3. timer will pause after each phrase (Pass/Fail will both pause the timer). will resume once the user types again

I think this is also consistent with what you want? Just make sure that you finish typing the current phrase before you go away.

Did some testing and works as intended: https://ranelpadon.github.io/ngram-type/

Let me know if you have issues or suggestions. Thanks :)

Natan-P commented 2 years ago

Yep, works perfectly. This is actually a good way to solve my problem. Thank you!

ranelpadon commented 2 years ago

@Natan-P glad that you're happy with it. Will close this then. Cheers :)