Search Results for

    Show / Hide Table of Contents

    Class KeyboardDispatcher

    Dispatch keyboard events associated to a Surface or a Window.

    Inheritance
    object
    KeyboardDispatcher
    FormsKeyboardDispatcher
    SDLKeyboardDispatcher
    WPFKeyboardDispatcher
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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()

    Dispatch accumulated events.

    Declaration
    public void DispatchEvents()

    HandleKeyChar(char)

    Handle the given character event.

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

    The character.

    HandleKeyChar(string)

    Handle the given characters event.

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

    The characters.

    HandleKeyDown(Keys)

    Handle the down event of the given key.

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

    The key.

    HandleKeyUp(Keys)

    Handle the 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 down; otherwise, false.

    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 be checked.

    Returns
    Type Description
    ButtonState

    The state of the specified key.

    ResetKeyboardStatus()

    Resets current keys status for 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