Input event type for keyboard events.
    public class InputEventKey : InputEventWithModifiers

Stores key presses on the keyboard. Supports key presses, key releases and Echo events.

Inheritance Chain


    public InputEventKey()


    public bool Echo { get; set; }

If true the key was already pressed before this event. It means the user is holding the key down.

    public bool Pressed { get; set; }

If true the key’s state is pressed. If false the key’s state is released.

    public int Scancode { get; set; }

Key scancode, one of the KEY_* constants in [@GlobalScope].

    public int Unicode { get; set; }

Key unicode identifier when relevant.


    public int GetScancode()

Getter for Scancode

    public int GetScancodeWithModifiers()

    public int GetUnicode()

Getter for Unicode

    public void SetEcho(bool echo)

Setter for Echo

    public void SetPressed(bool pressed)

Setter for Pressed

    public void SetScancode(int scancode)

Setter for Scancode

    public void SetUnicode(int unicode)

Setter for Unicode