How to limit the frequency of pushing of keys in the BGE?
Here you have simple Python script:

import bge
from bge import logic

REFRESH_RATE = 60

cont = logic.getCurrentController()
owner = cont.owner

owner["timer"] += 1

keyboard = bge.logic.keyboard
JUST_ACTIVATED = bge.logic.KX_INPUT_JUST_ACTIVATED

if keyboard.events[bge.events.SPACEKEY] == JUST_ACTIVATED:
    if owner["pressed"] &lt; 2:
        owner["toggle"] = not owner["toggle"]
        owner["pressed"] += 1
if owner["timer"] &gt;= REFRESH_RATE/2:
    owner["timer"] = 0
    owner["pressed"] = 0


toggle property is used here just to present the effect of the mechanism, it changes if the user input is accepted. Keep in mind that the REFRESH_RATE should be the same as the one stored in Render Properties. 
The Logic Editor setup in this case would be:


You can also download it as .blend file here:

I hope this can help you solve the problem. Cheers.