nope/resources/ui/layout/interfaces/IHotkeyAction.ts
2020-10-29 19:20:42 +01:00

20 lines
500 B
TypeScript

import { ICallback } from "./ICallback";
export interface IHotKeyAction<T> {
/**
* The Pressed Key. Please use a valid "KeyCode".
*
* @type {string}
*/
key: string,
/**
* The corresponding Callback, which will handle the
* Action if a Hotkey Press has been detected.
*/
onPress: ICallback<T>
/**
* The corresponding Callback, which will handle the
* Action if a Hotkey Press has been detected.
*/
onRelease?: ICallback<T>
}