Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    KeyboardDeviceExtensions Class

    Namespace: Stride.Input
    Assembly: Stride.Input.dll
    System.Object → KeyboardDeviceExtensions
    Derived from KeyboardDeviceExtensions:

    public static class KeyboardDeviceExtensions
    Name Description
    Methods
    IsKeyDown(IKeyboardDevice, Keys)

    Determines whether the specified key is being pressed down

    IsKeyPressed(IKeyboardDevice, Keys)

    Determines whether the specified key is pressed since the previous update.

    IsKeyReleased(IKeyboardDevice, Keys)

    Determines whether the specified key is released since the previous update.

    | Improve this Doc View Source

    Methods


    IsKeyDown(IKeyboardDevice, Keys)

    Determines whether the specified key is being pressed down

    public static bool IsKeyDown(this IKeyboardDevice keyboardDevice, Keys key)
    Parameters
    Type Name Description
    IKeyboardDevice keyboardDevice

    The keyboard

    Keys key

    The key

    Returns
    Type Description
    System.Boolean

    true if the specified key is being pressed down; otherwise, false.


    IsKeyPressed(IKeyboardDevice, Keys)

    Determines whether the specified key is pressed since the previous update.

    public static bool IsKeyPressed(this IKeyboardDevice keyboardDevice, Keys key)
    Parameters
    Type Name Description
    IKeyboardDevice keyboardDevice

    The keyboard

    Keys key

    The key

    Returns
    Type Description
    System.Boolean

    true if the specified key is pressed; otherwise, false.


    IsKeyReleased(IKeyboardDevice, Keys)

    Determines whether the specified key is released since the previous update.

    public static bool IsKeyReleased(this IKeyboardDevice keyboardDevice, Keys key)
    Parameters
    Type Name Description
    IKeyboardDevice keyboardDevice

    The keyboard

    Keys key

    The key

    Returns
    Type Description
    System.Boolean

    true if the specified key is released; otherwise, false.


    • Improve this Doc
    • View Source
    In This Article

    Back to top

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