namespace CursorLang.Core.Services; /// /// Intercepts Caps Lock at the system level and splits the presses into short and /// long ones. What to do with them is up to the subscribers. /// public interface ICapsLockHotkeyService { /// A short press: the key was released before the hold threshold. event EventHandler? Tapped; /// The hold threshold has passed, the key is still held. event EventHandler? HoldStarted; /// The hold is over: the key was released. event EventHandler? HoldEnded; /// Whether the hook is installed right now. bool IsRunning { get; } /// /// Starts intercepting. Must be called from the user interface thread: /// a system keyboard hook works only on a thread with a message loop. /// void Start(); /// Removes the hook, giving the key its usual behaviour back. void Stop(); }