Version: 2017.3
public bool shift ;

描述

Shift 键是否被按住?(只读)

如果按住了任何 Shift 键,则返回 true。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnGUI() { Event e = Event.current; if (e.shift) Debug.Log("Shift was pressed :O"); } }