MZ Referring to controls in text boxes

Hello! I'm a bit stumped with this one - I want to use some short text tutorial that refers to a control prompt - specifically PgDown or RB/R1 (as is default on controllers), in this case. It's the button required to open the quick menu for the Field Skills plugin, and I just want a short prompt to let players know how to open it. Obviously I don't want to just type PgDown, R1, or RB because players can remap controls and may be using various controllers, so I need to refer to the control directly.


I was looking at the \V[x] text code, and thought perhaps I could set some variable to refer to this control, but I've hit a brick wall there. I think I need a script call, but can't find anything suitable. Any searches for plugins or advice is only turning up results for remapping controls, which isn't what I'm after.

There's probably a simple solution for this but alas. Could anyone help?
you can store a string into a variable by simply typing it (bracketed with "") into the script box of control variable.

However that rises the question on where and how the control reconfiguration takes place.
If that is done inside your game, then you know the default and can assign the correct label whenever the configuration is changed.

If that control reconfiguration is not provided by you, then you would have to detect the current configuration, and I don't know how to do that.
However that rises the question on where and how the control reconfiguration takes place.
If that is done inside your game, then you know the default and can assign the correct label whenever the configuration is changed.

If that control reconfiguration is not provided by you, then you would have to detect the current configuration, and I don't know how to do that.

I'm not exactly sure what you mean - but to clarify, the control configuration option is untouched, both configuration method and the controls themselves are at default.

When you say "assign the correct label", that's the part I'm stuck with - if you mean a label that points towards, let's say for example, the "confirm" button, whatever key or button that's currently bound to, I don't know how to point to that.

Specifically, I need to point to "Switch Right".
Since you've been using VS plugins, I assume you're giving the option of rebinding etc with those.
They have methods to get the keycodes or buttoncodes in an array:
Input.getKeyboardMappingByKeyType("pagedown");
Input.getGamepadButtonID("pagedown");
But after getting the codes, I don't know if there's some straight way of getting what keyboard key or controller button (you can get the controller with Input.getLastGamepadUsed()) they represent, or if you need to make some kind of list to compare against (like 74 -> j).
Ah, so close! Thank you! Yeah, I've got that somewhat working and am able to call up the codes but the keyboard ones are gibberish xD At the very least I can type "Button \v[n]" in the text box to get Button 5, for example, and this is correctly changing along with any custom mapping. And since PgDn is seemingly ALWAYS bound to Switch Right that can work as a backup too so I could just display "Press PgDn / Button \v[n]" (I'm not sure where I'm supposed to enter
Code:
Input.getLastGamepadUsed()
but my test just displayed the text "Gamepad Button")

Perhaps I can revisit this to make it better at another time because the idea of making a list for every key on the keyboard is giving me conniptions at this time D:

Thank you for the help!

Original thread: https://forums.rpgmakerweb.com/threads/referring-to-controls-in-text-boxes.180673/