updated pressKey & releaseKey

This commit is contained in:
Teoxoy 2019-01-09 02:11:13 +01:00 committed by GitHub
parent b3ff1c3986
commit bea7afecd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
// Type definitions for KeyboardJS v2.4.1
// Type definitions for KeyboardJS v2.4.2
// Project: https://github.com/RobertWHurst/KeyboardJS
// Definitions by: Vincent Bortone <https://github.com/vbortone>,
// David Asmuth <https://github.com/piranha771>,
@ -92,14 +92,16 @@ declare namespace keyboardjs {
/**
* Triggers a key press. Stays in pressed state until released.
* @param keyCombo String of keys to be pressed to execute 'pressed' callbacks.
* @param keyCombo String of keys or keyCode to be pressed to execute 'pressed' callbacks.
* @param event The KeyEvent, can be null.
*/
export function pressKey(keyCombo: string): void
export function pressKey(keyCombo: string | number, event?: KeyEvent): void;
/**
* Triggers a key release.
* @param keyCombo String of keys to be released to execute 'released' callbacks.
* @param keyCombo String of keys or keyCode to be released to execute 'released' callbacks.
* @param event The KeyEvent, can be null.
*/
export function releaseKey(keyCombo: string): void;
export function releaseKey(keyCombo: string | number, event?: KeyEvent): void;
/**
* Releases all keys.
*/