MV Press Shift to Close Options Menu

Hello, I have a slightly strange request.

I would love to be able to have the player exit the Options menu by pressing the Shift key but after searching the forums for a day I couldn't find anything that would help. If anyone can help me I would really appreciate that, thank you very much.
main closing options or any menu is using the X or esc button.
if you use a keymapper or a keyboard rebound the buttons,
you can set it to any button you wish to use for opening, closing
etc.
main closing options or any menu is using the X or esc button.
if you use a keymapper or a keyboard rebound the buttons,
you can set it to any button you wish to use for opening, closing
etc.
Thanks for replying! I actually was thinking of having it be in the code itself, where once the Options menu is opened it can detect when the Shift button is pressed (Input.isTriggered) and then exit out of the menu (SceneManager.pop) but I'm not sure how or where to code this.
Plugins work by replacing code, and the poster above gave you names for specific types of plugins.

and going directly into the engine code without a plugin to manage like you thought, that has several disadvantages.

you have a big problem anyway: both ways won't limit the shift button to that specific case. Replacing a key in that way will replace it everywhere, so every screen will be closed by shift if you do that.
if you want the effect limited to the option screen, that entire screen would have to be reprogrammed.
Plugins work by replacing code, and the poster above gave you names for specific types of plugins.

and going directly into the engine code without a plugin to manage like you thought, that has several disadvantages.

you have a big problem anyway: both ways won't limit the shift button to that specific case. Replacing a key in that way will replace it everywhere, so every screen will be closed by shift if you do that.
if you want the effect limited to the option screen, that entire screen would have to be reprogrammed.
Theoretically, if you were to try and edit the engine code and add some kind of check that detects if the Shift button is pressed once the Options menu has loaded, would that be possible and if so how would you do that?
would that be possible and if so how would you do that?
as I already explained above, you would have to rewrite the scene by copying the code into a plugin file and rewriting it there, and most likely that would not be a few lines because you would have to use your own button check to prevent the same code to close every screen.

that is both the advantage and the disadvantage of object-oriented programming: it is easy to copy or parent things that are repeated, but you have to replace the entire code from the parent object if you want something to behave differently.
as I already explained above, you would have to rewrite the scene by copying the code into a plugin file and rewriting it there, and most likely that would not be a few lines because you would have to use your own button check to prevent the same code to close every screen.

that is both the advantage and the disadvantage of object-oriented programming: it is easy to copy or parent things that are repeated, but you have to replace the entire code from the parent object if you want something to behave differently.
So if I was to rewrite the scene by copying the code into a plugin file and rewriting it there like how you described, how would I go about doing that? I'm sorry if I'm being frustrating, I'm not trying to be difficult I just genuinely have no idea how I would actually write the code for this.
I just genuinely have no idea how I would actually write the code for this.
OK, then a completely different question:
how good is your programming experience (as in for how many years have you written programs) and in which languages?

Depending on the answers you might better ask a mod to move this into the learning javascript forum.
OK, then a completely different question:
how good is your programming experience (as in for how many years have you written programs) and in which languages?

Depending on the answers you might better ask a mod to move this into the learning javascript forum.
I'm transitioning from beginner to intermediate, I've had quite a long time editing code and writing my own code but due to certain learning difficulties I sometimes have problems with reading code or understanding where and how to write code.

In my mind, this is how the code should be written:
if (Input.isTriggered('shift')) { SceneManager.pop(); }

But I don't know where I would put that so that it can trigger once you hit Shift in the Options menu.
your code wont really work, as you need the button Number.
that key code is first use, but using shift, and the sceneManager.pop()
would do it so by EVERY scene.

shift = keycode 16.

EDIT:
check [this] forum to know how to make some functions on your own,
there is another one as well, but to late for me to search.

it can get you started, and you might want to dive into the scene file
for the options to be closed by "shift" rather than X or esc.
I'll move this to Learning Javascript since you want to learn how to code it yourself.
your code wont really work, as you need the button Number.
that key code is first use, but using shift, and the sceneManager.pop()
would do it so by EVERY scene.

shift = keycode 16.

EDIT:
check [this] forum to know how to make some functions on your own,
there is another one as well, but to late for me to search.

it can get you started, and you might want to dive into the scene file
for the options to be closed by "shift" rather than X or esc.
Thank you for linking me this forum, it now works perfectly. 🙂

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/press-shift-to-close-options-menu.145291/