Class HotkeyOptions
Builder accumulator passed to
AddBlazOrbitHotkeys(opts => opts.Register(...)). Captures app-wide hotkeys
declared at composition time so they fire as soon as BOBHotkeyHost renders.
public sealed class HotkeyOptions
- Inheritance
-
objectHotkeyOptions
Remarks
Handlers receive the request System.IServiceProvider so they can resolve scoped
dependencies (e.g. NavigationManager, IModalService) without capturing
state at registration time.
Constructors
HotkeyOptions()
public HotkeyOptions()
Methods
Register(string, string, Func<IServiceProvider, Task>, HotkeyScope, bool)
Registers a hotkey that fires globally across the app.
public HotkeyOptions Register(string combo, string description, Func<IServiceProvider, Task> handler, HotkeyScope scope = HotkeyScope.Global, bool preventDefault = true)
Parameters
combostringCanonical combo string (case-insensitive). E.g.
"ctrl+k","?".descriptionstringShort human-friendly label used by cheat-sheet UIs.
handlerFunc<IServiceProvider, Task>Async callback receiving the request System.IServiceProvider.
scopeHotkeyScopepreventDefaultboolWhen true (default), the JS bridge calls
event.preventDefault()after the handler matches.