I'm Trying to Get a Keystroke to Not Go Through After Some Time

This thread

will give you some pointers for how to do it.

(There are other examples in the forum - just do a search for long press)