Interface IInputService
A service that allows you to interact with keyboard and mice input events
public interface IInputService : IDisposable
- Inherited Members
Properties
KeyboardToggleStatus
Gets the current keyboard toggle status
KeyboardToggleStatus KeyboardToggleStatus { get; }
Property Value
Methods
AddInputProvider(InputProvider)
Adds an input provided
void AddInputProvider(InputProvider inputProvider)
Parameters
inputProvider
InputProviderThe input provider the add
BustIdentifierCache()
Clears the identifier cache
void BustIdentifierCache()
GetDeviceByIdentifier(InputProvider, object, InputDeviceType)
Attempts to identify the device using the provided identifier
ArtemisDevice? GetDeviceByIdentifier(InputProvider provider, object identifier, InputDeviceType type)
Parameters
provider
InputProviderThe input provider to identify the device for
identifier
objectThe value to use to identify the device
type
InputDeviceTypeA device type to fall back to if no match is found
Returns
- 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
void IdentifyDevice(ArtemisDevice device)
Parameters
device
ArtemisDeviceThe device to identify - Must be a keyboard or mouse
IsButtonDown(MouseButton)
Determines whether the button key is pressed by any device
bool IsButtonDown(MouseButton button)
Parameters
button
MouseButtonThe button to check
Returns
IsKeyDown(KeyboardKey)
Determines whether the provided key is pressed by any device
bool IsKeyDown(KeyboardKey key)
Parameters
key
KeyboardKeyThe key to check
Returns
ReleaseAll()
Flush all currently pressed buttons/keys
void ReleaseAll()
RemoveInputProvider(InputProvider)
Removes an input provided
void RemoveInputProvider(InputProvider inputProvider)
Parameters
inputProvider
InputProviderThe input provider the remove
StopIdentify()
Cancels identifying the device last passed to IdentifyDevice(ArtemisDevice)
void StopIdentify()
Events
DeviceIdentified
Occurs when a device has been identified after calling IdentifyDevice(ArtemisDevice)
event EventHandler DeviceIdentified
Event Type
KeyboardKeyDown
Occurs whenever a key on a keyboard was pressed
event EventHandler<ArtemisKeyboardKeyEventArgs> KeyboardKeyDown
Event Type
KeyboardKeyUp
Occurs whenever a key on a keyboard was released
event EventHandler<ArtemisKeyboardKeyEventArgs> KeyboardKeyUp
Event Type
KeyboardKeyUpDown
Occurs whenever a key on a keyboard was pressed or released
event EventHandler<ArtemisKeyboardKeyUpDownEventArgs> KeyboardKeyUpDown
Event Type
KeyboardToggleStatusChanged
Occurs whenever a one or more of the keyboard toggle statuses changed
event EventHandler<ArtemisKeyboardToggleStatusArgs> KeyboardToggleStatusChanged
Event Type
MouseButtonDown
Occurs whenever a button on a mouse was pressed
event EventHandler<ArtemisMouseButtonEventArgs> MouseButtonDown
Event Type
MouseButtonUp
Occurs whenever a button on a mouse was released
event EventHandler<ArtemisMouseButtonEventArgs> MouseButtonUp
Event Type
MouseButtonUpDown
Occurs whenever a button on a mouse was pressed or released
event EventHandler<ArtemisMouseButtonUpDownEventArgs> MouseButtonUpDown
Event Type
MouseMove
Occurs whenever a a mouse is moved
event EventHandler<ArtemisMouseMoveEventArgs> MouseMove
Event Type
MouseScroll
Occurs whenever a the scroll wheel of a mouse is turned
event EventHandler<ArtemisMouseScrollEventArgs> MouseScroll