cInput Reference Manual
  • Introduction
  • Using cInput
    • Initial Setup
    • A Brief Explanation of cInput
    • Setting Up the Default Inputs
      • The Keys Class
      • A Note About Xbox Controllers
      • Using Modifier Keys
    • Using cInput to Control Your Game
    • Changing Inputs from the Defaults
      • The OnKeyChanged Event
    • General Tips and Tricks
  • Script Reference
    • Variables and Properties
      • allowDuplicates
      • anyKey
      • anyKeyDown
      • deadzone
      • externalInputs
      • gravity
      • length
      • scanning
      • sensitivity
      • usePlayerPrefs
    • Methods
      • AddModifier
      • AxisInverted
      • Calibrate
      • ChangeKey
      • Clear
      • ForbidAxis
      • ForbidKey
      • GetAxis
      • GetAxisDeadzone
      • GetAxisGravity
      • GetAxisRaw
      • GetAxisSensitivity
      • GetButton
      • GetButtonDown
      • GetButtonUp
      • GetKey
      • GetKeyDown
      • GetKeyUp
      • GetText
      • Init
      • IsAxisDefined
      • IsKeyDefined
      • LoadExternal
      • RemoveModifier
      • ResetInputs
      • SetAxis
      • SetAxisDeadzone
      • SetAxisGravity
      • SetAxisSensitivity
      • SetKey
    • Valid Inputs
  • Changelog
Powered by GitBook
On this page
  • Parameters
  • Description
  • Example

Was this helpful?

  1. Script Reference
  2. Methods

AddModifier

void AddModifier(KeyCode modifierKey) void AddModifier(string modifier)

Parameters

modifierKey: The KeyCode of the key to be used as a modifier. modifier: The string name of the key to be used as a modifier. Allows you to use the Keys class.

Description

Designates modifier or modifierKey to be used as a modifier. Note that a modifier key cannot be used as a standalone input key. See Using Modifier Keys for more details.

Example

PreviousMethodsNextAxisInverted

Last updated 6 years ago

Was this helpful?