Length of keypress question
Awesome board you've got here. Everyone is incredibly helpful and informative. Thanks in advance for any help with my problem.
I've Google'd this (is how I ended up here) and read your FAQ and done a search on this board and have found some interesting possibilities, but didn't find a definitive answer.
I'm using Dev-cpp and WinXP.
I'd like to be able to tell when the user has held down the key for double or triple the time of a normal keypress. For instance, tapping 'T' causes the gun to fire single shots, but holding 'T' down will cause a more powerful shot to occur after 1 second or half a second of holding down 'T'.
Some possibilities I've found from this board so far include kbhit(), GetAsyncKeyState, ::QueryPerformanceCounter(), ::QueryPerformanceFrequency(), and difftime.
I plan on researching more about those now, but wanted to see if I'm on the right track or if perhaps anyone can direct me down a better path.