Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IKeyboardEvent

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

Definition

public interface IKeyboardEvent

Properties

Property

Description

actionKeyGets a boolean value that indicates whether the platform-specific action key is pressed. True means the action key is pressed. False means it isn't.
altKeyGets a boolean value that indicates whether the Alt key is pressed. True means the Alt key is pressed. False means it isn't.
characterGets the character entered.
commandKeyGets a boolean value that indicates whether the Windows/Cmd key is pressed. True means the Windows/Cmd key is pressed. False means it isn't.
ctrlKeyGets a boolean value that indicates whether the Ctrl key is pressed. True means the Ctrl key is pressed. False means it isn't.
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. True means the Shift key is pressed. False means it isn't.