diff --git a/CelesteTAS-EverestInterop/Source/EverestInterop/Hotkeys.cs b/CelesteTAS-EverestInterop/Source/EverestInterop/Hotkeys.cs index 0e778834..b88dec55 100644 --- a/CelesteTAS-EverestInterop/Source/EverestInterop/Hotkeys.cs +++ b/CelesteTAS-EverestInterop/Source/EverestInterop/Hotkeys.cs @@ -87,16 +87,8 @@ private static bool CelesteNetChatting { internal static bool Initialized { get; private set; } = false; - [Load] - private static void Load() { - Everest.Events.Input.OnInitialize += InputInitialize; - } - [Unload] - private static void Unload() { - Everest.Events.Input.OnInitialize -= InputInitialize; - } - - private static void InputInitialize() { + [Initialize] + private static void Initialize() { AllHotkeys.Clear(); AllHotkeys[HotkeyID.Start] = StartStop = BindingToHotkey(TasSettings.KeyStart); AllHotkeys[HotkeyID.Restart] = Restart = BindingToHotkey(TasSettings.KeyRestart); @@ -252,7 +244,7 @@ public class Hotkey(List keys, List buttons, bool keyCo public bool DoublePressed { get; private set; } public bool Repeated { get; private set; } - private bool LastCheck { get; set; } + public bool LastCheck { get; set; } private const double DoublePressTimeoutMS = 200.0; private const double RepeatTimeoutMS = 500.0;