Can't assign Escape key in Yanfly's ButtonCommonEvents?

I might be missing something but I can't find the Escape key in the plugin, and I really want to replace the current functionality with a common event.

I found this thread, they discuss using a parallel process to open a common event when the player presses Escape, but this solution is not that great. I would much rather just use ButtonCommonEvents.

I've moved this thread to Javascript/Plugin Support. Thank you.

if you have an evented menu (like in my spoiler), pressing X or ESC open the menu,
but it doesn't close when you press X or ESC again.

in order to do that (which is stated in the helpfile) is to use the
Plugin Command: RevertButton Cancel so it will work again.

you place the plugin command inside the conditional brance before it opened the event,
than you can close it as well.

or you can explain a bit more in what event you want to use it for?
if you have an evented menu (like in my spoiler), pressing X or ESC open the menu,
but it doesn't close when you press X or ESC again.

in order to do that (which is stated in the helpfile) is to use the
Plugin Command: RevertButton Cancel so it will work again.

you place the plugin command inside the conditional brance before it opened the event,
than you can close it as well.

or you can explain a bit more in what event you want to use it for?

Thanks, but I don't want to create a menu this way, because I think it's more elegant to use BCE and actually assign the key to the (common) menu event, than to manually place another event in every single map.

For now I just want to understand how to assign a common event to the Escape key using Yanfly's BCE plugin.
I dont say you have to create an evented menu, it was an example on the way
you built your event.

it is possible without the event on every map, but it require a work around.
but when you activate a common event with a button to pop up and close,
do you use the plugin command: RevertButton Cancel (which is the X, ESC buttons)

if you use another button, let say T to open T and close, there is probably a button
to use as well, RevertButton T or the code of it (need to check the helpfile for that).

if those doesn't work, it might be a bit modified, but than we need to see the event itself,
or explain what the event does.

open and close, needs the revert button so it become useable again when you toggle
something.

Original thread: https://forums.rpgmakerweb.com/threads/cant-assign-escape-key-in-yanflys-buttoncommonevents.124221/