Class in reactor_core_io.js

Input

9 public functions in 5 groups · show internal (_) functions

The Database: everything Core loads at boot.

Familiar territory. Input keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.

The static class that handles input data from the keyboard and gamepads.

@namespace
function Input()

Quick Reference

Setup & Creation 1

initialize() Initializes the input system.

Checks (True / False) 5

isPressed() Checks whether a key is currently pressed down.
isTriggered() Checks whether a key is just pressed.
isReleased() Checks whether a key was released during the latest update.
isRepeated() Checks whether a key is just pressed or a key repeat occurred.
isLongPressed() Checks whether a key is kept depressed.

Actions 1

clear() Clears all the input data.

Updating & Drawing 1

update() Updates the input data.

Other 1

virtualClick() Virtual click.

Setup & Creation

initialize

static source
Input.initialize()

Initializes the input system.

Checks (True / False)

isPressed

static source
Input.isPressed(keyName)

Checks whether a key is currently pressed down.

Details

Checks whether a key is currently pressed down.

@param
keyName string The mapped name of the key.
@returns
boolean True if the key is pressed.

isTriggered

static source
Input.isTriggered(keyName)

Checks whether a key is just pressed.

Details

Checks whether a key is just pressed.

@param
keyName string The mapped name of the key.
@returns
boolean True if the key is triggered.

isReleased

static source
Input.isReleased(keyName)

Checks whether a key was released during the latest update.

Details

Checks whether a key was released during the latest update.

@param
keyName string The mapped name of the key.
@returns
boolean True if the key was released.

isRepeated

static source
Input.isRepeated(keyName)

Checks whether a key is just pressed or a key repeat occurred.

Details

Checks whether a key is just pressed or a key repeat occurred.

@param
keyName string The mapped name of the key.
@returns
boolean True if the key is repeated.

isLongPressed

static source
Input.isLongPressed(keyName)

Checks whether a key is kept depressed.

Details

Checks whether a key is kept depressed.

@param
keyName string The mapped name of the key.
@returns
boolean True if the key is long-pressed.

Actions

clear

static source
Input.clear()

Clears all the input data.

Updating & Drawing

update

static source
Input.update()

Updates the input data.

Other

virtualClick

static source
Input.virtualClick(buttonName)

Virtual click. (Same as the RPG Maker MZ method of this name.)