Interface IHotkeyRegistry
- Namespace
- AcDream.Plugin.Abstractions
- Assembly
- AcDream.Plugin.Abstractions.dll
Binds plugin-owned keyboard shortcuts. A host with no keyboard hands out the inert registry, where a registration is accepted but never fires.
public interface IHotkeyRegistry
Methods
Register(string, string, PluginKeyChord, Action)
Registers a plugin-owned hotkey. id identifies the
binding for persistence (scoped by plugin, so two plugins may each
use the same id); displayName is shown in the
rebind UI. A stored user override for this id replaces
defaultChord when present. The handler does not
fire while the chat bar has keyboard focus unless the chord includes
Ctrl or Alt. Disposing the result revokes the binding; the host also
revokes every hotkey a plugin registered when that plugin unloads.
IPluginHotkeyRegistration Register(string id, string displayName, PluginKeyChord defaultChord, Action handler)
Parameters
idstringdisplayNamestringdefaultChordPluginKeyChordhandlerAction