MV Plugin to choose which Keys I want for my game

The situation is: I made a custom menu with events. It is configured with the CANCEL key. But I've got a situation. When I enter a Shop, for example, and close the shop using the Cancel Key (both esc or X), it opnes my menu. I want to force the cancel button to be just X, and the ESC just open my custom menu. Is there a plugin for it?
You may want to check this thread out
Adding Keyboard Buttons

For plugins, there are several that might alter keyboard inputs:

Yanfly Keyboard Config

You could also make a common event that has the custom menu and make it be called with buttons with the help of these plugins.

Button Common Event (YEP)

HimeWorks Common Event Buttons
you can avoid with a custom menu to "disable the menu on its own",
so it wont open the menu during the evented one or shop you make.

there are some nice tricks for it as well.

I made an advance evented menu, that disables the default, but you can
re-activate it after wards if you want as well, so you can have a powerful
menu that works with the default buttons.
You make a plugin file with the code
Code:
Input.keyMapper[88] = 'cancel'
Make 'X' only cancel

You can also use this script in engine but it won't save so you'd have to run it every time the game is loaded.
Thanks guys

Original thread: https://forums.rpgmakerweb.com/threads/plugin-to-choose-which-keys-i-want-for-my-game.177672/