react-hotkeys
Version:
A declarative library for handling hotkeys and focus within a React application
13 lines (11 loc) • 423 B
JavaScript
import NonPrintableKeysDictionary from '../../const/NonPrintableKeysDictionary';
/**
* Whether the specified key is a valid key name that is not a single character or
* symbol
* @param {ReactKeyName} keyName Name of the key
* @returns {boolean} Whether the key is a valid special key
*/
function isNonPrintableKeyName(keyName) {
return !!NonPrintableKeysDictionary[keyName];
}
export default isNonPrintableKeyName;