MV A little help Anyone?

I'm trying to setup a idle for the actor with a common event. I need it to check if there is any key input. if there is, the plugin command for off for idle is on. If this isn't, 15 frames later it plugin command for idle on. How would I do this? any help is apperciated.
I'm a little lost on what you need help with. Are you trying to get your actor to have an idle animation while no keys are being pressed?

If so
- Do you want this to happen all game?
OR
- During certain times?
Hello @KillerPixEEL !

I made this little helper plugin, it's actually just a basic function made with Javascript.

checkAnyKeyPressed.js
JavaScript:
/*:
 * @author DevWithCoffee
 * @plugindesc Check if there is any key pressed
 *
 * @help
 * In conditional branching enter this command
 * to check if there is any key pressed:
 *  isKeyPressed()
 *
 * And to check if the player is stopped use this:
 *  !isKeyPressed()
 */
function isKeyPressed(){
    var keyState=false;
    for (const [key, value] of Object.entries(Input._currentState)){
        if(value==true){
            keyState=true;
            break;
        }
    }
    return keyState;
}

How use:
Code:
◆If:Script:isKeyPressed()
  ◆Comment:There is one or more pressed keys
  ◆
:End

Or:
Code:
◆If:Script:isKeyPressed() == true
  ◆Comment:There is one or more pressed keys
  ◆
:End

None keypressed:
Code:
◆If:Script:!isKeyPressed()
  ◆Comment:There is one or more pressed keys
  ◆
:End
Code:
◆If:Script:isKeyPressed() == false
  ◆Comment:There is one or more pressed keys
  ◆
:End

Hope it works.
Sorry for my bad English.

Good luck.
All
Hello!

Try this:
Input._currentState -> Return Objetct

JavaScript:
Object.keys(Input._currentState).length

On Events:
Code:
◆If:Script:Object.keys(Input._currentState).length > 0
  ◆Comment:There is one or more pressed keys
  ◆
:End
lol sometimes I feel real stupid with scripting. I'm not sure how to use this exactly.
I'm making a character creator and I have it setup to change actor graphic to idle (with all the character edits on) with a plugin comand. How would I use that code to have it turn on after 15 frames on map if theres no input.
The Conditional Branching example is very simple and easy to understand.

However the "State" of the keys only clears after clicking outside the window, which is not functional. Tomorrow, test the RMMV API further to see a way to check if all the keys are out of use.

Edited:
I managed to remember how to check items of an object in javascript, try it now.

Original thread: https://forums.rpgmakerweb.com/threads/a-little-help-anyone.139908/