Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    KeyboardDeviceBase Class

    Namespace: Stride.Input
    Assembly: Stride.Input.dll

    Base class for keyboard devices

    System.Object → KeyboardDeviceBase
    Derived from KeyboardDeviceBase: KeyboardSimulated

    public abstract class KeyboardDeviceBase : IKeyboardDevice, IInputDevice
    Name Description
    Constructors
    KeyboardDeviceBase()
    Fields
    Events
    KeyRepeats
    Properties
    DownKeys
    Id
    Name
    PressedKeys
    Priority
    ReleasedKeys
    Source
    Methods
    HandleKeyDown(Keys)
    HandleKeyUp(Keys)
    Update(List<InputEvent>)
    | Improve this Doc View Source

    Constructors


    KeyboardDeviceBase()

    protected KeyboardDeviceBase()
    | Improve this Doc View Source

    Fields


    Events

    protected readonly List<KeyEvent> Events
    Field Value
    Type Description
    System.Collections.Generic.List<KeyEvent>

    KeyRepeats

    public readonly Dictionary<Keys, int> KeyRepeats
    Field Value
    Type Description
    System.Collections.Generic.Dictionary<Keys, System.Int32>
    | Improve this Doc View Source

    Properties


    DownKeys

    public IReadOnlySet<Keys> DownKeys { get; }
    Property Value
    Type Description
    IReadOnlySet<Keys>

    Id

    public abstract Guid Id { get; }
    Property Value
    Type Description
    System.Guid

    Name

    public abstract string Name { get; }
    Property Value
    Type Description
    System.String

    PressedKeys

    public IReadOnlySet<Keys> PressedKeys { get; }
    Property Value
    Type Description
    IReadOnlySet<Keys>

    Priority

    public int Priority { get; set; }
    Property Value
    Type Description
    System.Int32

    ReleasedKeys

    public IReadOnlySet<Keys> ReleasedKeys { get; }
    Property Value
    Type Description
    IReadOnlySet<Keys>

    Source

    public abstract IInputSource Source { get; }
    Property Value
    Type Description
    IInputSource
    | Improve this Doc View Source

    Methods


    HandleKeyDown(Keys)

    public void HandleKeyDown(Keys key)
    Parameters
    Type Name Description
    Keys key

    HandleKeyUp(Keys)

    public void HandleKeyUp(Keys key)
    Parameters
    Type Name Description
    Keys key

    Update(List<InputEvent>)

    public virtual void Update(List<InputEvent> inputEvents)
    Parameters
    Type Name Description
    System.Collections.Generic.List<InputEvent> inputEvents

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    KeyboardDeviceExtensions.IsKeyPressed(IKeyboardDevice, Keys)
    KeyboardDeviceExtensions.IsKeyReleased(IKeyboardDevice, Keys)
    KeyboardDeviceExtensions.IsKeyDown(IKeyboardDevice, Keys)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation