@useloops/design-system
Version:
The official React based Loops design system
13 lines (11 loc) • 396 B
TypeScript
type ComboString = string;
type ComboObject = {
key: string;
altKey?: boolean;
ctrlKey?: boolean;
metaKey?: boolean;
shiftKey?: boolean;
};
type ComboDefinition = ComboString | ComboObject;
declare const useKeyCombo: (combo: ComboDefinition | ComboDefinition[], callback: (event: KeyboardEvent) => void, node?: HTMLElement | Document | null) => void;
export { useKeyCombo };