Disable input keys inactive window

Hi. Does anyone know how to use the “disable input when inactive window” action? I have a game with 800 x 600 resolution. Whenever i click the mouse outside the game window and then press the game button, the actions for the game button run multiple times as if it is doing the actions per frame. But when I click back on the game window, it returns to normal wherein it is only doing the actions once every time i press the button. “Disable the input inactive window” did not work. Thank you.