MZ A plugin to make the Z, Enter and Space Keys work only on menu screens.

Greetings!

So, I think I have a really simple request. I believe there's something similar for MV, but I wasn't able to find something like this for MZ.

Simply put, I'd like to request a plugin where the functionalities of the Z, Enter, Space, and all the other keys responsible for the "Accept/Interact" functionalities of the game work only on menu screens. The other situations when the player is on the map, like, when the player interacts with an event, must cease to function.

This is because I'm making an adventure game where the mouse is responsible for all the interactions the player makes. The keys responsible for calling and closing the menu (Esc/X) and movement (Arrow Keys, WASD) can still function.

I'm currently using the following plugins if that means something:

Spoiler: Plugins
VisuMZ_0_EngineCore
VIsuMZ_1_EventsMoveCore
PKD_KeyCommands
PKD_MapInventory
PKD_EventContextMenu
Mimosa_MouseCursorPlus

(There's way more than that, but currently, these are those related to movement and controls.)

I hope I could make myself clear. If you'd like more details to work with, please let me know.
Thanks in advance!
Greetings!

So, I think I have a really simple request. I believe there's something similar for MV, but I wasn't able to find something like this for MZ.

Simply put, I'd like to request a plugin where the functionalities of the Z, Enter, Space, and all the other keys responsible for the "Accept/Interact" functionalities of the game work only on menu screens. The other situations when the player is on the map, like, when the player interacts with an event, must cease to function.

This is because I'm making an adventure game where the mouse is responsible for all the interactions the player makes. The keys responsible for calling and closing the menu (Esc/X) and movement (Arrow Keys, WASD) can still function.

I'm currently using the following plugins if that means something:

Spoiler: Plugins
VisuMZ_0_EngineCore
VIsuMZ_1_EventsMoveCore
PKD_KeyCommands
PKD_MapInventory
PKD_EventContextMenu
Mimosa_MouseCursorPlus

(There's way more than that, but currently, these are those related to movement and controls.)

I hope I could make myself clear. If you'd like more details to work with, please let me know.
Thanks in advance!
Here ya go. Should work as needed. 🙂

Use this code in the parameter setting:
Code:
$gamePlayer.canMove()
...like this:
1674167128796.png
I did some testing with the other plugins I have, and It worked flawlessly, @ct_bolt .

I have just one more request, however.

Could you maintain the left mouse click as the map action button? Like, make the events on the map interactable only with the left mouse click?
Also, disable the right-click function that makes the menu open. That would also be great.

Either way, thank you for putting your precious time into making this. I appreciate the help.
I'll be sure to be crediting you in the game's credits.

Cheers.

Original thread: https://forums.rpgmakerweb.com/threads/a-plugin-to-make-the-z-enter-and-space-keys-work-only-on-menu-screens.154156/