modern-hotkeys
Version:
<p align="center"> <img src="https://img.shields.io/npm/l/modern-hotkeys"> <img src="https://img.shields.io/npm/dt/modern-hotkeys"> <img src="https://img.shields.io/npm/v/modern-hotkeys"> <img src="https://img.shields.io/github/stars/pato12/modern-hotkeys
18 lines (17 loc) • 749 B
TypeScript
/**
* Split a string into an array of strings using a separator
*/
export declare function getKeys(key: string, separator?: string): string[];
/**
* Get a normalized key name from a key string (e.g. "shift+ctrl+alt+meta+a")
*/
export declare function normalizeKey(key: string, separator?: string): string;
/**
* Split a string by a separator, but append the separator to the end of the string if it ends with the separator
* E.g. "a+b+c+" will be split into ["a", "b", "c+"] instead of ["a", "b", "c"]
*/
export declare function safeSplit(value: string, separator: string): string[];
/**
* Check if the event should be ignored or not based on the target element
*/
export declare function defaultInputFilter(event: KeyboardEvent): boolean;