CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2001
    Posts
    155

    Detect typing speed

    Ok, i have the following label caption:

    ABC

    How do i make it so that, when someone finishes typing abc in a textbox, it tells how many wpm they typed it, and their accuracy?

    --Ant
    --------------------------------------------------
    Create rollover effects in no time!, visit:
    http://members.fortunecity.com/ants12/rolloverwiz.html
    Or email me:
    [email protected]

  2. #2
    Join Date
    Jun 2001
    Location
    Sri Lanka
    Posts
    272

    Re: Detect typing speed

    WPM would be a bit difficult but letters per minute (LPM) is not a prob.

    Start a timer in a keypress event of a text box for it's first keypress.
    Keep a button to indicate the end of typing.
    Until pressing that button, increment a public variable.
    When the stop button is pressed, stop the timer & get the duration & number of key presses by the public var.
    From above u can get what u want!!!

    Accuracy cannot be measured as there is no reference and no way to think of ur accuracy needed. For e.g. it is not clear whether the "case" of the letter is taken in to consideration or not.
    If the issue is to compare two words & check whether each character is similar or not, then a error-counter can be incremented for each mismatch. Finally comparing the number of letters & the erroneous letters, the accuracy can be given

    If Any clarification is needed contact me.
    Good luck

    Srinika


    If u don't know how to Rate an answer, then Rate my answer to learn, If u know, then practice it

  3. #3
    Join Date
    Jun 2001
    Location
    Memphis, TN
    Posts
    146

    Re: Detect typing speed

    Hi there,
    Srinika is right! I just wanted to clear up one little thing. You can get a WPM count if you divide the Character /min count by 5. Since true words per minute wouldn't be fair (the word "I" and the word "Polymorphic" are both 1 word apiece but they sure differ in size!), most speed typing applications count every 5 characters (not spaces) as a word. Implement that in your app and you'll generate results comparable to other typing apps on the market.

    Jeff


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured