A configuration-centric class library for adding keyboard shortcuts to Blazor applications.
Blazor HotKeys2 is a class library for ASP.NET Core Blazor that allows developers to add configurable keyboard shortcuts to their web applications. It solves the problem of implementing complex keyboard navigation and shortcuts in Blazor apps by providing a simple, declarative API. The library handles key event management, focus-aware behavior, and dynamic hotkey updates, reducing boilerplate code.
Blazor developers building interactive web applications that require keyboard shortcuts for improved UX, such as admin dashboards, data-intensive tools, or productivity apps.
Developers choose Blazor HotKeys2 for its clean integration with Blazor's component lifecycle, focus-aware hotkey management, and support for both physical and logical key mappings, which simplifies handling international keyboard layouts.
This is a class library that provides configuration-centric keyboard shortcuts for your Blazor apps.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers a fluent API with .Add() methods for easy hotkey binding, reducing boilerplate code, as shown in the clean registration examples in the README.
Allows precise control over hotkey activation using Exclude flags and CSS selectors, enabling/disabling shortcuts in form fields to improve user experience.
Hotkeys can be enabled, disabled, or removed at runtime via properties like Disabled and PreventDefault, providing flexibility for changing app states.
Supports both Code (physical key locations) and Key (input characters) to handle international keyboard layouts, addressing layout-independent shortcuts.
Lacks a built-in help system for displaying shortcuts, requiring developers to manually implement UI using HotKeyEntries, unlike libraries like angular-hotkeys.
Relies on a JavaScript file for event handling, with complex cache busting requirements that need environment variable or MSBuild property adjustments, especially in .NET 10+ WebAssembly apps.
Requires implementing IAsyncDisposable and managing HotKeysContext lifecycle in components, adding boilerplate code for registration and cleanup in OnAfterRender and DisposeAsync.