Pause input until key press?

I’m using WASD/arrow keys (via a basic 2D vector composite binding) for player movement as well as navigating a menu (a bunch of UI Buttons, controlled using the Input System UI Input Module). The menu appears when pressing a key, at which point the player’s movement is paused (within the player movement script itself)

If I hold down for example the S key, then open the menu whilst still holding the key down, when the menu pops up, it will start navigating down through the buttons quickly (based on the Move Repeat settings) because I’ve already had the S key held down for a while.

However, what I want is that in the above case, when the menu opens, nothing happens until the player releases the S key and presses it down again, i.e. the input for the menu doesn’t get passed on until they start inputing again.

I’ve tried all sorts of things - using a separate action map and switching to it when opening the menu, enabling/disabling the Input System UI Input Module during runtime, manually setting the Move action on that component during runtime, etc. But with everything I’ve tried, either the input for the menu is always being recorded (e.g. even when the separate action map is not active), or it gets paused completely (causing weird behaviour when re-opening the menu a second time, e.g. it thinks you’ve still got an input held down when you haven’t).

As a workaround, I’ve got Send Navigation Events on the Event System disabled, and when the menu opens, I start a couroutine which waits until any directional key is pressed down, then enables it. Feels like there should be some way within the InputSystem itself to do this, but it works!