You are always gathering input. However, when a significant input occurs, you need to act on it and resolve it. For example, if someone dismisses a menu then your UI state must be updated as such so that it is only handled once. In UI libraries this is commonly done by detecting the key press and dispatching a single KEY_PRESSED event. When your code handles that event, the core game state is updated and the menu is dismissed.
When you have a continually running UI input/render loop, you no longer necessarily do logic every single pass. Instead you might have a timer or something that invokes the logic update only once per second.
To learn more about UI states, I would study your favourite UI library to see how it does it. For example, if you're using Java then you can study awt/Swing.