UNPKG

react-hotkeys

Version:

A declarative library for handling hotkeys and focus within a React application

12 lines (10 loc) 402 B
import isNonPrintableKeyName from '../parsing-key-maps/isNonPrintableKeyName'; /** * Whether the specified key name is for a key that has a native keypress event * @param {NormalizedKeyName} keyName Name of the key * @returns {boolean} Whether the key has a native keypress event */ function hasKeyPressEvent(keyName) { return !isNonPrintableKeyName(keyName); } export default hasKeyPressEvent;