KeyboardEventBase<T0>.keyCode

public KeyCode keyCode;

Description

The key code.

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.


Did you find this page useful? Please give it a rating: