Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

KeyboardEventBase<T0>.character

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public char character;

Description

Gets the character entered.

This is the character entered when a key is pressed, taking into account the current keyboard layout. For example, pressing the "A" key causes this property to return either "a" or "A", depending on whether the Shift key is pressed at the time. The Shift key itself does not produce a character. When pressed, it returns an empty string.