What is the best way to implement an input timeout?

I would like to get notified if the player does not interact with the game for some time so i can go to standby / pause. Please help.

After receiving any inputs reset a global timer (you could have it in the game instance for it to be accessible anywhere). Once the timer gets to a set amount call standby / pause.

Game Instance



Player controller

Thanks. Is there a way to get notified in case of any input to the enhanced player input system? Thinking of a solution where i don’t have to reset the time on each action.

Not that I know of. There is no bind event in the enhanced input.
Oh and you’ll need to extend the clear function to actually reset the timer once it’s done. Otherwise it won’t start counting again (just did a test run without the actual pause)

3draven’s timer is the right shape. the piece youre missing is a single choke point for input: add a reset idle function on the game instance, then call it from the Started pin of every input action plus one Any Key event on the player controller for teh odd keys and mouse clicks. axis inputs tick every frame so gate those behind a dead zone check or they will spam the reset.

you can also try Kiosk Lockdown Toolkit, a kiosk mode plugin for Unreal Engine that fires On Idle Started and On Idle Ended on a timeout you set and has a Notify Activity node for inputs the engine cant see: Kiosk Lockdown Toolkit — Block Alt+Tab, Win Key & Taskbar for Kiosks | Fab