Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IKeyboardEvent

This interface describes the data used by keyboard events.
Read time 1 minuteLast updated 12 days ago

Definition

public interface IKeyboardEvent

Remarks

Refer to the Keyboard events manual page for more information and examples.
Additional Resources: KeyDownEvent, KeyUpEvent

Properties

Property

Description

actionKeyGets a boolean value that indicates whether the platform-specific action key is pressed.
altKeyGets a boolean value that indicates whether the Alt key is pressed.
characterGets the character entered.
commandKeyGets a boolean value that indicates whether the Windows/Cmd key is pressed.
ctrlKeyGets a boolean value that indicates whether the Ctrl key is pressed.
keyCodeThe key code.
modifiersGets flags that indicate whether modifier keys (Alt, Ctrl, Shift, Windows/Cmd) are pressed.
shiftKeyGets a boolean value that indicates whether the Shift key is pressed.