hotkeys-js is a tiny, framework-agnostic library for binding keyboard shortcuts in the browser, from simple key presses to complex combos and sequences. It provides a declarative API to register handlers like ctrl+k, shift+alt+p, or g g, and it normalizes key behavior across major browsers. The library includes scoping, so the same shortcut can trigger different actions depending on page context, and it offers filters to ignore inputs when the user is typing in form fields. You can enable or disable groups of shortcuts dynamically, making it well suited for SPAs and dashboard apps. Because it has no external dependencies and a small footprint, it drops easily into existing codebases. Its focus on developer ergonomics makes defining, managing, and cleaning up shortcuts straightforward.

Features

  • Bind single keys, modifiers, combos, and multi-key sequences
  • Cross-browser normalization with a small, dependency-free core
  • Scope-based handling so shortcuts vary by context or mode
  • Filters to ignore inputs and editable fields to prevent conflicts
  • Runtime enable, disable, and unbind APIs for dynamic UIs
  • Works seamlessly with vanilla JS or frameworks

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow Hotkeys JS

Hotkeys JS Web Site

Other Useful Business Software
$300 Free Credits for Your Google Cloud Projects Icon
$300 Free Credits for Your Google Cloud Projects

Start building on Google Cloud with $300 in free credits. No commitment, no credit card required until you're ready to scale.

Launch your next project with $300 in free Google Cloud credits—no strings attached. Test, build, and deploy without risk. Use your credits across the entire Google Cloud platform to find what works best for your needs. After your credits are used, continue with always-free tier services. Only pay when you're ready to scale. Sign up in minutes and start exploring.
Start Free Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Hotkeys JS!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Libraries

Registered

2025-10-17