Version: 2021.2
public bool control ;

描述

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

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

using UnityEngine;

public class Example : MonoBehaviour { void OnGUI() { Event e = Event.current; if (e.control) { Debug.Log("Control was pressed."); } } }