RayCraftDocs
v1.0.3 raycraft.dev
On this page

Hotkey

Free

Invisible component that runs a callback for a keyboard shortcut such as alt+k or mod+shift+l (mod is Ctrl on Windows and Cmd on macOS). Shortcuts are ignored while typing in a field unless AllowInInputs is set.

Example

Hotkey control

Parameters

ParameterTypeDescription
AllowInInputsboolAlso reacts while a text field has focus (default false).
KeysstringShortcut such as alt+k or mod+shift+l. mod is Ctrl or Cmd.
PreventDefaultboolStops the browser's own action for the shortcut (default true).

Events

EventTypeDescription
OnPressedEventCallbackRaised when the shortcut is pressed.

Package

Hotkey is part of RayCraft Free. Package: RayCraft.Blazor. It comes from nuget.org. See Getting started.