using System.Diagnostics; using System.Drawing; using XFEExtension.NetCore.InputSimulator.Native; namespace XFEExtension.NetCore.InputSimulator; /// 独立的输入控制器,管理后端、按键生命周期和可取消的输入操作。 /// 拥有传入后端的所有权,Dispose 时释放本实例持有的按键并关闭后端。多个实例的按键状态相互独立。 public sealed class InputController : IDisposable { private readonly IInputBackend backend; private readonly object sync = new(); private readonly Dictionary held = []; private readonly List