This commit is contained in:
Francisco Hodge 2023-01-31 17:02:14 -05:00
parent 89e985c866
commit 1147601610
2 changed files with 11 additions and 1 deletions

View File

@ -684,7 +684,7 @@ class SimpleKeyboard {
* Calling onKeyReleased
*/
if (button && typeof this.options.onKeyReleased === "function")
this.options.onKeyReleased(button);
this.options.onKeyReleased(button, e);
}
/**

View File

@ -276,6 +276,16 @@ export interface KeyboardOptions {
*/
onChangeAll?: (inputObj: KeyboardInput, e?: MouseEvent) => any;
/**
* Retrieves the pressed key
*/
onKeyPress?: (button: string, e?: MouseEvent) => any;
/**
* Retrieves the released key
*/
onKeyReleased?: (button: string, e?: MouseEvent) => any;
/**
* Module options can have any format
*/