Is it possible to keep held key after set game paused

I’m not fimiliar with automatic way to address it. I’d manually bind to on pause ended and check if the button is still held down.