Artemis Artemis
Artemis Artemis

Search Results for

    Interface IInputService

    A service that allows you to interact with keyboard and mice input events

    Inherited Members
    IDisposable.Dispose()
    Namespace: Artemis.Core.Services
    Assembly: Artemis.Core.dll
    Syntax
    public interface IInputService : IDisposable

    Properties

    KeyboardToggleStatus

    Gets the current keyboard toggle status

    Declaration
    KeyboardToggleStatus KeyboardToggleStatus { get; }
    Property Value
    Type Description
    KeyboardToggleStatus

    Methods

    AddInputProvider(InputProvider)

    Adds an input provided

    Declaration
    void AddInputProvider(InputProvider inputProvider)
    Parameters
    Type Name Description
    InputProvider inputProvider

    The input provider the add

    BustIdentifierCache()

    Clears the identifier cache

    Declaration
    void BustIdentifierCache()

    GetDeviceByIdentifier(InputProvider, object, InputDeviceType)

    Attempts to identify the device using the provided identifier

    Declaration
    ArtemisDevice? GetDeviceByIdentifier(InputProvider provider, object identifier, InputDeviceType type)
    Parameters
    Type Name Description
    InputProvider provider

    The input provider to identify the device for

    object identifier

    The value to use to identify the device

    InputDeviceType type

    A device type to fall back to if no match is found

    Returns
    Type Description
    ArtemisDevice

    If found, the Artemis device matching the provider and identifier

    IdentifyDevice(ArtemisDevice)

    Identifies the provided device by assigning the next received device identification to it

    Declaration
    void IdentifyDevice(ArtemisDevice device)
    Parameters
    Type Name Description
    ArtemisDevice device

    The device to identify - Must be a keyboard or mouse

    IsButtonDown(MouseButton)

    Determines whether the button key is pressed by any device

    Declaration
    bool IsButtonDown(MouseButton button)
    Parameters
    Type Name Description
    MouseButton button

    The button to check

    Returns
    Type Description
    bool

    true if the button is pressed; otherwise false

    IsKeyDown(KeyboardKey)

    Determines whether the provided key is pressed by any device

    Declaration
    bool IsKeyDown(KeyboardKey key)
    Parameters
    Type Name Description
    KeyboardKey key

    The key to check

    Returns
    Type Description
    bool

    true if the key is pressed; otherwise false

    ReleaseAll()

    Flush all currently pressed buttons/keys

    Declaration
    void ReleaseAll()

    RemoveInputProvider(InputProvider)

    Removes an input provided

    Declaration
    void RemoveInputProvider(InputProvider inputProvider)
    Parameters
    Type Name Description
    InputProvider inputProvider

    The input provider the remove

    StopIdentify()

    Cancels identifying the device last passed to IdentifyDevice(ArtemisDevice)

    Declaration
    void StopIdentify()

    Events

    DeviceIdentified

    Occurs when a device has been identified after calling IdentifyDevice(ArtemisDevice)

    Declaration
    event EventHandler DeviceIdentified
    Event Type
    Type Description
    EventHandler

    KeyboardKeyDown

    Occurs whenever a key on a keyboard was pressed

    Declaration
    event EventHandler<ArtemisKeyboardKeyEventArgs> KeyboardKeyDown
    Event Type
    Type Description
    EventHandler<ArtemisKeyboardKeyEventArgs>

    KeyboardKeyUp

    Occurs whenever a key on a keyboard was released

    Declaration
    event EventHandler<ArtemisKeyboardKeyEventArgs> KeyboardKeyUp
    Event Type
    Type Description
    EventHandler<ArtemisKeyboardKeyEventArgs>

    KeyboardKeyUpDown

    Occurs whenever a key on a keyboard was pressed or released

    Declaration
    event EventHandler<ArtemisKeyboardKeyUpDownEventArgs> KeyboardKeyUpDown
    Event Type
    Type Description
    EventHandler<ArtemisKeyboardKeyUpDownEventArgs>

    KeyboardToggleStatusChanged

    Occurs whenever a one or more of the keyboard toggle statuses changed

    Declaration
    event EventHandler<ArtemisKeyboardToggleStatusArgs> KeyboardToggleStatusChanged
    Event Type
    Type Description
    EventHandler<ArtemisKeyboardToggleStatusArgs>

    MouseButtonDown

    Occurs whenever a button on a mouse was pressed

    Declaration
    event EventHandler<ArtemisMouseButtonEventArgs> MouseButtonDown
    Event Type
    Type Description
    EventHandler<ArtemisMouseButtonEventArgs>

    MouseButtonUp

    Occurs whenever a button on a mouse was released

    Declaration
    event EventHandler<ArtemisMouseButtonEventArgs> MouseButtonUp
    Event Type
    Type Description
    EventHandler<ArtemisMouseButtonEventArgs>

    MouseButtonUpDown

    Occurs whenever a button on a mouse was pressed or released

    Declaration
    event EventHandler<ArtemisMouseButtonUpDownEventArgs> MouseButtonUpDown
    Event Type
    Type Description
    EventHandler<ArtemisMouseButtonUpDownEventArgs>

    MouseMove

    Occurs whenever a a mouse is moved

    Declaration
    event EventHandler<ArtemisMouseMoveEventArgs> MouseMove
    Event Type
    Type Description
    EventHandler<ArtemisMouseMoveEventArgs>

    MouseScroll

    Occurs whenever a the scroll wheel of a mouse is turned

    Declaration
    event EventHandler<ArtemisMouseScrollEventArgs> MouseScroll
    Event Type
    Type Description
    EventHandler<ArtemisMouseScrollEventArgs>
    Content is available under the PolyForm Noncommercial License, by Artemis RGB.