MZ Holding Keys to Escape Battle

I'm looking for a way to initiate a custom escape skill on a players turn using keyboard keys.

For instance, One the actors turn, the player holds page up and page down for x seconds it will activate the escape skill. But will still be blocked if escape is disabled on a fight.

Is this possible?
The answer to "is this possible?" is almost always going to be yes.

The implementation of this would involve a plugin that aliases the input update function in Scene_Battle to check for Input.isPressed("pageup") and Input.isPressed("pagedown") both being true, and if so add to a timer. Then if the timer is X, activate escape if escaping is possible. And in the else for the input check, reset the timer. (you could probably leverage Input._pressedTime for this, and then the reset part is already done for you)
is there a js script for an actor cast a specific skill? Similar to how one would trigger a common event via js script.
You want to look at the forceAction function.

Original thread: https://forums.rpgmakerweb.com/threads/holding-keys-to-escape-battle.155081/