DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: IDEA to avoid double typing  (Read 4,540 times)

allesok

  • Participant
  • Joined in 2009
  • *
  • Posts: 9
IDEA to avoid double typing
« on: March 28, 2011, 09:29 PM »
It easily happens that you double-type, i.e. hit one key and at the same time happen to touch an adjacent key. You hit "x" and also happen to touch the "y" key at its edge, and you will have "xy" on the screen. But since the "y" key will activate its letter just fraction of a second later, the problem may be solved in the following way.

If there is a block of, say, 0.1 seconds whenever a key is hit, so that all other keys will be "dead" fore that 0.1 second, the "y" will not appear. In normal typing you will intentionally hit a second key that you want to hit a little more than 0.1 seconds later, and its letter will appear.

Of course, 0.1 second is just an example. I don't know what the proper value would be. The "dead" time will, therefore, have to be adjustable from 0 to, maybe, 0.5 seconds - or maybe even more - and the user will have to experiment until he finds the value that suits his typing pattern.

The block should obviously not apply to functional keys like CTRL etc., but just to keys which will put a character on the screen.

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA to avoid double typing
« Reply #1 on: March 29, 2011, 10:32 AM »
Though I think you'll find using software to solve this more cumbersome than getting a different keyboard, here's a way using AutoHoktey.  Just play with the timeout value of the second Input call (T0.08) until it's how you want.  The value is in seconds.

Code: (AutoHotkey)
Loop,
{
    Input, foo, L1 V I,
    If ( ErrorLevel = "MAX" )
    {
        Input, bar, T0.08
    }
}

Original address: https://www.donationcoder.com/forum/index.php?topic=26208.0