using System;
namespace Artemis.Core.Services;
///
/// Contains data for keyboard input events
///
public class ArtemisKeyboardKeyEventArgs : EventArgs
{
internal ArtemisKeyboardKeyEventArgs(ArtemisDevice? device, ArtemisLed? led, KeyboardKey key, KeyboardModifierKey modifiers)
{
Device = device;
Led = led;
Key = key;
Modifiers = modifiers;
}
///
/// Gets the device that triggered the event
///
public ArtemisDevice? Device { get; }
///
/// Gets the LED that corresponds to the pressed key
///
public ArtemisLed? Led { get; }
///
/// Gets the key that triggered the event
///
public KeyboardKey Key { get; }
///
/// Gets the modifiers that are pressed
///
public KeyboardModifierKey Modifiers { get; }
///
/// Creates a hotkey matching the event.
///
/// The resulting hotkey.
public Hotkey ToHotkey()
{
return new Hotkey {Key = Key, Modifiers = Modifiers};
}
}