I’m trying to write an app where I need to accept keypresses, and call a function whenever the user has stopped typing (or when there is a specified delay between keystrokes).
How do I measure the time between two keystrokes?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Probably a better approach is to pick up the NSEvent associated with each keypress and compare the difference in their -timestamp property.