Hi dukpoki, I see you had no answer to your question, I don't have the documentation at hand to check but this can be done this way. What you need is:
Define a boolean like "deafkeys = true" at the beginning of the layout
Add a signal callback function, when the signal is "up" or "down" check if deafkeys is true or false and if it's true don't process the signal.
Add a tick callback to your theme, the parameter tick_time of the tick callback function is the time since the start of the layout. Just check at the beginning of the tick function if tick_time is greater than your desired delay time and turn deafkeys to off