KeyCode Escape

robot_2Generated
code_blocksInput

Description

The Editor.KeyCode.Escape field represents the Escape key on a keyboard. It is part of the Editor.KeyCode enumeration, which defines a comprehensive list of key codes used to identify keyboard keys in the editor environment.

Usage

Use Editor.KeyCode.Escape to detect when the Escape key is pressed in your application. This can be useful for implementing functionality such as closing dialogs, canceling operations, or exiting full-screen mode.

Example

// Example of using Editor.KeyCode.Escape in a key event handler
void OnKeyPress(Editor.KeyCode key)
{
    if (key == Editor.KeyCode.Escape)
    {
        // Handle the Escape key press
        CloseCurrentDialog();
    }
}

void CloseCurrentDialog()
{
    // Logic to close the dialog
}