Quick fix to prevent keys (Input) from keep being pressed when tabbing out of game?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Tybobobo
:warning: Old Version Published before Godot 3 was released.

I have discovered that if I tab out or click outside the game window while holding down a button; the button is registered as being pressed.

Anyone got a quick fix to either check or prevent buttons from being pressed when the game is not focused?

Thank you :slight_smile: