Hotkeys only work from the Game window and from the Controls tab.
So, if the Settings window is open, the Controls tab must be selected. If the Settings window is closed, the Game window must have focus (in other words, don't click on another application or the desktop or the Start menu, etc; if you do, click the Game window again so it has focus).