changing a key back to default

Hello, so in battle I have the space bar mapped to activate a common event under certain conditions, but after the condition activates the space bar is no longer usable as it's default way of selecting menu commands. I want to change it back to it's default.
This is the script call I'm using to map the space key. Maybe a different way would work better.
Input.keyMapper[32] = 'space'
Thank you.
the problem has nothing to do with the script call itself but where you use it.

please show us the entire context of your menu control
By default the key name for key 32 (space) is ok, i.e. the reset script should be:
JavaScript:
Input.keyMapper[32] = 'ok';
It does seem like a lazy/hacky approach, but I think it should work in the specific situation you describe.

If that's not what you meant, then like Andar says, we'd need more context.
By default the key name for key 32 (space) is ok, i.e. the reset script should be:
JavaScript:
Input.keyMapper[32] = 'ok';
It does seem like a lazy/hacky approach, but I think it should work in the specific situation you describe.

If that's not what you meant, then like Andar says, we'd need more context.
perfect, that worked. thanks.

Original thread: https://forums.rpgmakerweb.com/threads/changing-a-key-back-to-default.139307/