MV Help? Trying to make Inv popup using yanfly button CE & Keyboard.

So currently Im using Yanfly's ButtonCommonEvent and KeyboardConfig and it's currently working.

My task is simple: Open and close the Inventory screen With the "I"key.

My Current Script is:

SceneManager.push(Scene_Item);

So Im able to open the Inventory screen but not close it. Does anyone know how to add a "if statement" so it closes when the screen is already open?

Thanks for taking the time to read this 😀
can't work this way, because there is no interpreter for the common event on the inventory screen.

if you want to close the inventory screen with I instead of the cancel button, you'll need a plugin for changing the inventory screen.
You've saved me countless hours of googling and for that I thank you lol. Do you by chance know of such a plug in?
there are many ways, there is a solution how to do that.

for the input key trigger I to open and close it.
keyboard config by YEP is also 1, button common event might
work as well, as there are many ways.

a keymapper can help you in this way as well.
depending which way you ant the methode though.

let me see if I can find the snippet for you that explains how.

EDIT:
I cannot find it at this point, but could try later.

Original thread: https://forums.rpgmakerweb.com/threads/help-trying-to-make-inv-popup-using-yanfly-button-ce-keyboard.147525/