@inkline/inkline
Version:
Inkline is the Vue.js UI/UX Library built for creating your next design system
13 lines • 344 B
JavaScript
import { keymap } from '../constants/index.mjs';
/**
* Verify if the given event is mapped to a specific key
*
* @param key
* @param e
* @returns {boolean}
*/
export const isKey = (key, e) => {
const keyCode = e.key || e.keyIdentifier || e.keyCode;
return keymap[key].indexOf(keyCode) !== -1;
};
//# sourceMappingURL=isKey.mjs.map