20 lines
500 B
TypeScript
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>
|
|
} |