Jump to content
Sign in to follow this  
Igitur

How to detect a double tap keyboard input ?

Recommended Posts

Well, I know the trick for a single key detection and its shift, ctrl, alt variant. I also know how to check a multiple keys combo, but how do you detect a double tap key input ?

Any hint ?

Share this post


Link to post
Share on other sites

are you trying to detect the existing key binding or just any key doubletap?

Share this post


Link to post
Share on other sites
are you trying to detect the existing key binding or just any key doubletap?

Any key doubletap would be great. I want to fix an issue I have in my Walk-As-Default-Mod when the Walk/run toggle key is bound to a double tap key (2x leftShift for instance). It requires some kind of delay in the key detection, but i've no clue how to.

Share this post


Link to post
Share on other sites

It can be done with a combination of keydown and keyup event handlers but it ain't gonna look pretty. I wonder how BIS is doing their doubletap detection.

Share this post


Link to post
Share on other sites

Store the time of the last key press and compare the difference. There really is no other way.

Share this post


Link to post
Share on other sites

Ok, thanks for the replies. I'll run some tests when I have more time.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×