ドキュメント

Unity Engine

Unity Engine

keyCode

The key code.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

KeyCode keyCode { get; }

Remarks

This is the code of the physical key that was pressed. It doesn't take into account the keyboard layout, and it displays modifier keys, since a key was pressed. For example, pressing the "A" key will cause this property to return KeyCode.A regardless of whether the Shift key is pressed or not. The Shift key itself returns KeyCode.LeftShift since it is a physical key on the keyboard.