Disable Inputs
Classes
Section titled “Classes”DisableInputs
Section titled “DisableInputs”Defined in: packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:37
Extends
Section titled “Extends”Feature
Methods
Section titled “Methods”areInputsEnabled()
Section titled “areInputsEnabled()”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.
Returns
Section titled “Returns”boolean
enableAllInputs()
Section titled “enableAllInputs()”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.
Parameters
Section titled “Parameters”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.
Returns
Section titled “Returns”void
disableInputs()
Section titled “disableInputs()”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.
Parameters
Section titled “Parameters”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.
buttonActions
Section titled “buttonActions”…readonly ButtonAction[]
An array of the actions to action.
Returns
Section titled “Returns”void
disableAllInputs()
Section titled “disableAllInputs()”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.
Parameters
Section titled “Parameters”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.
Returns
Section titled “Returns”void
enableAllInputsExceptFor()
Section titled “enableAllInputsExceptFor()”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.
Parameters
Section titled “Parameters”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.
blacklist
Section titled “blacklist”ReadonlySet<ButtonAction>
A set of ButtonActions to disallow.
Returns
Section titled “Returns”void
disableAllInputsExceptFor()
Section titled “disableAllInputsExceptFor()”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.
Parameters
Section titled “Parameters”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.
whitelist
Section titled “whitelist”ReadonlySet<ButtonAction>
A set of ButtonActions to allow.
Returns
Section titled “Returns”void
disableMovementInputs()
Section titled “disableMovementInputs()”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.
Parameters
Section titled “Parameters”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.
Returns
Section titled “Returns”void
disableShootingInputs()
Section titled “disableShootingInputs()”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.
Parameters
Section titled “Parameters”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.
Returns
Section titled “Returns”void
