Skip to content

Disable Inputs

Defined in: packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:37

  • Feature

areInputsEnabled(): boolean

Defined in: packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:123

Helper function to check if the ISCFeature.DISABLE_INPUTS feature is turned on in some capacity.

In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS.

boolean

enableAllInputs(key): void

Defined in: packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:144

Helper function to enable all inputs. Use this function to set things back to normal after having used one of the other helper functions to disable inputs.

In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS.

string

The name of the mod feature that is requesting the enable/disable. For example, if this was part of the code for a custom enemy called “Super Gaper”, then you could use a key of “SuperGaper”. The name is necessary so that multiple mod features can work in tandem.

void

disableInputs(key, …buttonActions): void

Defined in: packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:167

Helper function to disable specific inputs, like opening the console.

This function is variadic, meaning that you can specify as many inputs as you want to disable. (To disable all inputs, see the disableAllInputs function.

Use the enableAllInputs helper function to set things back to normal.

In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS.

string

The name of the mod feature that is requesting the enable/disable. For example, if this was part of the code for a custom enemy called “Super Gaper”, then you could use a key of “SuperGaper”. The name is necessary so that multiple mod features can work in tandem.

…readonly ButtonAction[]

An array of the actions to action.

void

disableAllInputs(key): void

Defined in: packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:190

Helper function to disable all inputs. This is useful because EntityPlayer.ControlsEnabled can be changed by the game under certain conditions.

Use the enableAllInputs helper function to set things back to normal.

In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS.

string

The name of the mod feature that is requesting the enable/disable. For example, if this was part of the code for a custom enemy called “Super Gaper”, then you could use a key of “SuperGaper”. The name is necessary so that multiple mod features can work in tandem.

void

enableAllInputsExceptFor(key, blacklist): void

Defined in: packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:211

Helper function to enable all inputs besides the ones provided. This is useful because EntityPlayer.ControlsEnabled can be changed by the game under certain conditions.

Use the enableAllInputs helper function to set things back to normal.

In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS.

string

The name of the mod feature that is requesting the enable/disable. For example, if this was part of the code for a custom enemy called “Super Gaper”, then you could use a key of “SuperGaper”. The name is necessary so that multiple mod features can work in tandem.

ReadonlySet<ButtonAction>

A set of ButtonActions to disallow.

void

disableAllInputsExceptFor(key, whitelist): void

Defined in: packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:235

Helper function to disable all inputs besides the ones provided. This is useful because EntityPlayer.ControlsEnabled can be changed by the game under certain conditions.

Use the enableAllInputs helper function to set things back to normal.

In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS.

string

The name of the mod feature that is requesting the enable/disable. For example, if this was part of the code for a custom enemy called “Super Gaper”, then you could use a key of “SuperGaper”. The name is necessary so that multiple mod features can work in tandem.

ReadonlySet<ButtonAction>

A set of ButtonActions to allow.

void

disableMovementInputs(key): void

Defined in: packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:259

Helper function to disable only the inputs used for moving the character (or moving the cursor in the UI). This is useful because EntityPlayer.ControlsEnabled can be changed by the game under certain conditions.

Use the enableAllInputs helper function to set things back to normal.

In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS.

string

The name of the mod feature that is requesting the enable/disable. For example, if this was part of the code for a custom enemy called “Super Gaper”, then you could use a key of “SuperGaper”. The name is necessary so that multiple mod features can work in tandem.

void

disableShootingInputs(key): void

Defined in: packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:278

Helper function to disable only the inputs used for shooting tears. This is useful because EntityPlayer.ControlsEnabled can be changed by the game under certain conditions.

Use the enableAllInputs helper function to set things back to normal.

In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS.

string

The name of the mod feature that is requesting the enable/disable. For example, if this was part of the code for a custom enemy called “Super Gaper”, then you could use a key of “SuperGaper”. The name is necessary so that multiple mod features can work in tandem.

void