using Newtonsoft.Json.Converters;
using System.Collections.Generic;
using ElectronNET.API.Converter;
using Newtonsoft.Json;
namespace ElectronNET.API.Entities
{
///
///
///
public class InputEvent
{
///
/// Equivalent to KeyboardEvent.key.
///
public string Key { get; set; } = "";
///
/// Equivalent to KeyboardEvent.code.
///
public string Code { get; set; } = "";
///
/// Equivalent to KeyboardEvent.repeat.
///
public bool IsAutoRepeat { get; set; } = false;
///
/// Equivalent to KeyboardEvent.isComposing.
///
public bool IsComposing { get; set; } = false;
///
/// Equivalent to KeyboardEvent.shiftKey.
///
public bool Shift { get; set; } = false;
///
/// Equivalent to KeyboardEvent.controlKey.
///
public bool Control { get; set; } = false;
///
/// Equivalent to KeyboardEvent.altKey.
///
public bool Alt { get; set; } = false;
///
/// Equivalent to KeyboardEvent.metaKey.
///
public bool Meta { get; set; } = false;
///
/// Equivalent to KeyboardEvent.location.
///
public int Location { get; set; } = 0;
///
/// An array of modifiers of the event, can be `shift`, `control`, `ctrl`, `alt`,
/// `meta`, `command`, `cmd`, `isKeypad`, `isAutoRepeat`, `leftButtonDown`,
/// `middleButtonDown`, `rightButtonDown`, `capsLock`, `numLock`, `left`, `right`
///
[JsonConverter(typeof(ModifierTypeListConverter))]
public List Modifiers { get; set; }
///
/// Can be `undefined`, `mouseDown`, `mouseUp`, `mouseMove`, `mouseEnter`,
/// `mouseLeave`, `contextMenu`, `mouseWheel`, `rawKeyDown`, `keyDown`, `keyUp`,
/// `gestureScrollBegin`, `gestureScrollEnd`, `gestureScrollUpdate`,
/// `gestureFlingStart`, `gestureFlingCancel`, `gesturePinchBegin`,
/// `gesturePinchEnd`, `gesturePinchUpdate`, `gestureTapDown`, `gestureShowPress`,
/// `gestureTap`, `gestureTapCancel`, `gestureShortPress`, `gestureLongPress`,
/// `gestureLongTap`, `gestureTwoFingerTap`, `gestureTapUnconfirmed`,
/// `gestureDoubleTap`, `touchStart`, `touchMove`, `touchEnd`, `touchCancel`,
/// `touchScrollStarted`, `pointerDown`, `pointerUp`, `pointerMove`,
/// `pointerRawUpdate`, `pointerCancel` or `pointerCausedUaAction`.
///
[JsonConverter(typeof(StringEnumConverter))]
public InputEventType Type { get; set; }
}
}