mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-01-20 01:22:59 +08:00
Add event to onKeyReleased per https://github.com/hodgef/react-simple-keyboard/issues/2231
This commit is contained in:
parent
89e985c866
commit
1147601610
@ -684,7 +684,7 @@ class SimpleKeyboard {
|
|||||||
* Calling onKeyReleased
|
* Calling onKeyReleased
|
||||||
*/
|
*/
|
||||||
if (button && typeof this.options.onKeyReleased === "function")
|
if (button && typeof this.options.onKeyReleased === "function")
|
||||||
this.options.onKeyReleased(button);
|
this.options.onKeyReleased(button, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -276,6 +276,16 @@ export interface KeyboardOptions {
|
|||||||
*/
|
*/
|
||||||
onChangeAll?: (inputObj: KeyboardInput, e?: MouseEvent) => any;
|
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
|
* Module options can have any format
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user