Table of Contents

Class HotkeyOptions

Namespace
BlazOrbit.Hotkeys
Assembly
BlazOrbit.Hotkeys.dll

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
object
HotkeyOptions

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

combo string

Canonical combo string (case-insensitive). E.g. "ctrl+k", "?".

description string

Short human-friendly label used by cheat-sheet UIs.

handler Func<IServiceProvider, Task>

Async callback receiving the request System.IServiceProvider.

scope HotkeyScope

Surfaced via Scope; defaults to Global.

preventDefault bool

When true (default), the JS bridge calls event.preventDefault() after the handler matches.

Returns

HotkeyOptions