How to have keys correspond to battle options?

Is there any way to have keyboard/button inputs select actor commands in battle, eg 'A' key selects the physical attack option, 'S' key opens the skill select menu?

Open to scripting ideas too. Thanks!
I just used the following prompt in Google AI Mode and it gave me a very nice description of options and explained it much better than I could.

"In RPG Maker MZ, how would I make it so a key press selects an option in combat, like press the A key to select Attack?"

The response covered possible existing plugins as well as how to make your own simple plugin which is similar to a key mapping plugin tutorial that I have on my YouTube channel.

The response might not be perfect, but it should give you some direction options to experiment with and further research.

Also, others might be able to provide better specific assistance without using an AI search at all, which is even better.

Good luck with your project!
bump...
Add your custom keys to the Input.keyMapper (or get a plugin for custom keys).

I always like to access everything by using the "forceSelect" and "processOk". If your commands are fixed (like 0 attack, 1 skills, 2 guard, 3 items), I think you can just do something like below to check the keyboard presses in processHandling (like the base keys). If the commands vary, you'll need additional code to get the correct index. (I only wrote two keys there, continue the list.)

const _MyEdit1_actorCommand_processHandling = Window_ActorCommand.prototype.processHandling;

Window_ActorCommand.prototype.processHandling = function() {
if (this.isOpenAndActive()) {
if (Input.isTriggered("a")) {
this.forceSelect(0);
return this.processOk();
}
if (Input.isTriggered("s")) {
this.forceSelect(1);
return this.processOk();
}
}
_MyEdit1_actorCommand_processHandling.call(this);
}

EDIT:
Might add the if (this.isOpenAndActive()) at the beginning of your custom check list too (just to be sure?)
EDIT2: Added the above conditional into the code and also added the return statements in the triggers.

@RPGMakerUser4001, please do not bump your topic unless it has been 24 hours later since your last post. You can review our forum rules here. Thank you.

Is there any way to have keyboard/button inputs select actor commands in battle
It doesn't support going to a menu (such as skill selection), as I recall. But I have a plugin for assigning keys to activate skills.

Add your custom keys to the Input.keyMapper (or get a plugin for custom keys).

I always like to access everything by using the "forceSelect" and "processOk". If your commands are fixed (like 0 attack, 1 skills, 2 guard, 3 items), I think you can just do something like below to check the keyboard presses in processHandling (like the base keys). If the commands vary, you'll need additional code to get the correct index. (I only wrote two keys there, continue the list.)

const _MyEdit1_actorCommand_processHandling = Window_ActorCommand.prototype.processHandling;

Window_ActorCommand.prototype.processHandling = function() {
if (this.isOpenAndActive()) {
if (Input.isTriggered("a")) {
this.forceSelect(0);
return this.processOk();
}
if (Input.isTriggered("s")) {
this.forceSelect(1);
return this.processOk();
}
}
_MyEdit1_actorCommand_processHandling.call(this);
}

EDIT:
Might add the if (this.isOpenAndActive()) at the beginning of your custom check list too (just to be sure?)
EDIT2: Added the above conditional into the code and also added the return statements in the triggers.
This seems to do it. Thanks so much!
It doesn't support going to a menu (such as skill selection), as I recall. But I have a plugin for assigning keys to activate skills.

rpglord69's method seems to work for skill selection, too.
Add your custom keys to the Input.keyMapper (or get a plugin for custom keys).

I always like to access everything by using the "forceSelect" and "processOk". If your commands are fixed (like 0 attack, 1 skills, 2 guard, 3 items), I think you can just do something like below to check the keyboard presses in processHandling (like the base keys). If the commands vary, you'll need additional code to get the correct index. (I only wrote two keys there, continue the list.)

const _MyEdit1_actorCommand_processHandling = Window_ActorCommand.prototype.processHandling;

Window_ActorCommand.prototype.processHandling = function() {
if (this.isOpenAndActive()) {
if (Input.isTriggered("a")) {
this.forceSelect(0);
return this.processOk();
}
if (Input.isTriggered("s")) {
this.forceSelect(1);
return this.processOk();
}
}
_MyEdit1_actorCommand_processHandling.call(this);
}

EDIT:
Might add the if (this.isOpenAndActive()) at the beginning of your custom check list too (just to be sure?)
EDIT2: Added the above conditional into the code and also added the return statements in the triggers.
I know it's been a little while, but might you also know how to disable the moving of the cursor with the arrow keys during this, while still allowing the inputs to select the commands?
Yeah, I guess you can set Window_ActorCommand.prototype.isCursorMovable method to return false. Or change the .processCursorMove . Or .cursorDown and other direction methods to empty.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-have-keys-correspond-to-battle-options.180552/