LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

This version of Unity is unsupported.

KeyCode.LeftShift

Description

Left shift key.

using UnityEngine;

public class Example : MonoBehaviour { void Update() { if (Input.GetKeyDown(KeyCode.LeftShift)) { Debug.Log("Left Shift key was pressed"); }

if (Input.GetKeyUp(KeyCode.LeftShift)) { Debug.Log("Left Shift key was released"); }

if (Input.GetKey(KeyCode.LeftShift)) { Debug.Log("Left Shift key is being pressed"); } } }