Disable 'X' button from opening menu?

Is there a way, through the engine itself or through a plugin, to disable the 'x' key from opening up the game menu? I'd still like for the key to function as a cancel button.

Every other forum post I can find on this topic leads to just completely disabling the menu altogether - which I'm not trying to achieve. Thanks!
See if running the script in your game does anything.
Code:
Input.keyMapper[88] = 'cancel';
Is there a way, through the engine itself or through a plugin, to disable the 'x' key from opening up the game menu? I'd still like for the key to function as a cancel button.

Every other forum post I can find on this topic leads to just completely disabling the menu altogether - which I'm not trying to achieve. Thanks!
try adding this as a plugin
Code:
Input._isEscapeCompatible = function(keyName) {};
See if running the script in your game does anything.
Code:
Input.keyMapper[88] = 'cancel';
An amazingly simple yet effective solution! This worked perfectly, thank you.
Code:
Input._isEscapeCompatible = function(keyName) {};
You wouldn't want it to be empty, though, right? You would still want 'menu' to return true, just make "X" not be 'menu' as above. Or perhaps I'm misunderstanding what you're going for.
You wouldn't want it to be empty, though, right? You would still want 'menu' to return true
I should have kept the keyname === 'cancel' to only block 'escape' from opening the menu, but i had misunderstood OP from the start.

i thought they wanted to disable the 'x' key's input ('escape') from opening the menu and didnt realize they only wanted to stop the 'x' key specifically from opening the menu. Yanfly's keyboard config plugin lives rent free in my mind and i forget not everyone uses it to be able to rebind keys:LZSgrin:

Original thread: https://forums.rpgmakerweb.com/threads/disable-x-button-from-opening-menu.174034/