{"library":"keyboard-key","type":"library","category":null,"description":"`keyboard-key` is a lightweight utility library designed to provide a consistent and reliable way to determine the `KeyboardEvent.key` property from keyboard events across different browsers, addressing inconsistencies in native browser implementations. Released as version 1.1.0, this package aims to normalize keyboard event key values, stepping in where `KeyboardEvent.key` lacked full cross-browser support or where older, deprecated properties like `keyCode` and `which` were still in use. It differentiates itself by attempting to infer key values, including interpreting shift key presses, which, while helpful for `en-US` layouts, introduces a locale-specific caveat. The library also offers `getCode()` for obtaining normalized `keyCode` values and provides constants for common key codes, promoting the use of modern `KeyboardEvent.key` semantics while providing a fallback.","language":"javascript","status":"active","version":"1.1.0","tags":["javascript","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install keyboard-key","imports":["import { getKey } from 'keyboard-key'","import { getCode } from 'keyboard-key'","import { Escape } from 'keyboard-key'"]},{"cmd":"yarn add keyboard-key","imports":[]},{"cmd":"pnpm add keyboard-key","imports":[]}],"homepage":null,"github":"https://github.com/levithomason/keyboard-key","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/keyboard-key","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/keyboard-key/compatibility"}}