Key Code Constants

JSON →
library 3.1.0 ·javascript
verified May 27, 2026

keycode-js is a JavaScript package providing a comprehensive set of constants for keyboard events, specifically mapping to KeyboardEvent.keyCode, KeyboardEvent.code, and KeyboardEvent.key properties. The current stable version is 3.1.0. The package maintains a steady release cadence, incorporating new key event codes and values while addressing compatibility and consistency across browser environments. A key differentiator is its provision of constants for all three KeyboardEvent properties, allowing developers to choose the most appropriate and future-proof method for handling keyboard input. It also ships with TypeScript types, enhancing developer experience in TypeScript projects, and offers direct support for Deno environments.

total hits 11
actors 5 distinct systems
last hit 1d ago human
GPTBot
2
Script
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany · 🇮🇹 Italy