This repository has been archived on 2023-05-28. You can view files and clone it, but cannot push or open issues/pull-requests.
SkyHook-Unity/Runtime/Event.cs

29 lines
636 B
C#
Raw Normal View History

2022-11-03 21:18:05 +09:00
using System.Diagnostics.CodeAnalysis;
2022-11-03 20:55:22 +09:00
using System.Runtime.InteropServices;
namespace SkyHook
{
[StructLayout(LayoutKind.Sequential)]
2022-11-03 21:18:05 +09:00
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
2022-11-03 20:55:22 +09:00
public struct SkyHookEvent
{
2022-11-03 21:18:05 +09:00
/// <summary>
/// When the key was pressed
/// </summary>
public readonly ulong Time;
/// <summary>
/// The key is pressed or released
/// </summary>
public readonly EventType Type;
/// <summary>
/// The key number that was pressed or released
/// </summary>
public readonly uint Key;
2022-11-03 20:55:22 +09:00
}
public enum EventType
{
KeyPressed,
KeyReleased
}
}