Search Results for

    Show / Hide Table of Contents

    Class KeyboardDispatcher

    Dispatches keyboard events associated with a Surface or a Window.

    Inheritance
    object
    KeyboardDispatcher
    AndroidKeyboardDispatcher
    FormsKeyboardDispatcher
    SDLKeyboardDispatcher
    WPFKeyboardDispatcher
    WebKeyboardDispatcher
    WinUIKeyboardDispatcher
    IOSKeyboardDispatcher
    Namespace: Evergine.Common.Input.Keyboard
    Assembly: Evergine.Common.dll
    Syntax
    public abstract class KeyboardDispatcher

    Constructors

    KeyboardDispatcher()

    Initializes a new instance of the KeyboardDispatcher class.

    Declaration
    public KeyboardDispatcher()

    Methods

    DispatchEvents()

    Dispatches accumulated events.

    Declaration
    public void DispatchEvents()

    HandleKeyChar(char)

    Handles the given character event.

    Declaration
    protected void HandleKeyChar(char character)
    Parameters
    Type Name Description
    char character

    The character.

    HandleKeyChar(string)

    Handles the given character event.

    Declaration
    protected void HandleKeyChar(string characters)
    Parameters
    Type Name Description
    string characters

    The characters.

    HandleKeyDown(Keys)

    Handles the down event of the given key.

    Declaration
    protected void HandleKeyDown(Keys key)
    Parameters
    Type Name Description
    Keys key

    The key.

    HandleKeyUp(Keys)

    Handles the key up event of the given key.

    Declaration
    protected void HandleKeyUp(Keys key)
    Parameters
    Type Name Description
    Keys key

    The key.

    IsKeyDown(Keys)

    Gets a value indicating whether the current state of a keyboard key is Pressing or Pressed.

    Declaration
    public bool IsKeyDown(Keys key)
    Parameters
    Type Name Description
    Keys key

    The key to be checked.

    Returns
    Type Description
    bool

    true if the key is pressed; false otherwise.

    ReadKeyState(Keys)

    Gets the current state of a keyboard key.

    Declaration
    public ButtonState ReadKeyState(Keys key)
    Parameters
    Type Name Description
    Keys key

    The key to check.

    Returns
    Type Description
    ButtonState

    The state of the specified key.

    ResetKeyboardStatus()

    Resets the current key statuses for the dispatcher.

    Declaration
    protected void ResetKeyboardStatus()

    Events

    KeyChar

    Occurs when a key is pressed, and a character is generated.

    Declaration
    public event EventHandler<KeyCharEventArgs> KeyChar
    Event Type
    Type Description
    EventHandler<KeyCharEventArgs>

    KeyDown

    Occurs when a key is pressed.

    Declaration
    public event EventHandler<KeyEventArgs> KeyDown
    Event Type
    Type Description
    EventHandler<KeyEventArgs>

    KeyUp

    Occurs when a key is released.

    Declaration
    public event EventHandler<KeyEventArgs> KeyUp
    Event Type
    Type Description
    EventHandler<KeyEventArgs>

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX