UNPKG

@equinor/eds-utils

Version:

Utility functions and hooks for the Equinor Design System

11 lines (10 loc) 289 B
declare enum KEY { Escape = "Escape", Enter = "Enter", Tab = "Tab", ArrowDown = "ArrowDown", ArrowUp = "ArrowUp" } type KEYTYPES = keyof typeof KEY; export declare const useGlobalKeyPress: (targetKey: KEYTYPES, callback: (e: KeyboardEvent) => void) => void; export {};