dmauro / Keypress

A keyboard input capturing utility in which any key can be a modifier key.
http://dmauro.github.io/Keypress/
Apache License 2.0
3.18k stars 313 forks source link

calling "register_combo" with Typescript needs to initialize all the parameters #138

Closed karim10 closed 6 years ago

karim10 commented 6 years ago

This is an enhancement. First of all I want to thank all the contributors for this wonderful API. listener.register_combo({ "keys" : null, "on_keydown" : null, "on_keyup" : null, "on_release" : null, "this" : undefined, "prevent_default" : false, "prevent_repeat" : false, "is_unordered" : false, "is_counting" : false, "is_exclusive" : false, "is_solitary" : false, "is_sequence" : false });

the doc says that we can call listener.register_combo() with any number of options, but this is not the case when using typescript with "keypress.js" type definitions (https://www.npmjs.com/package/@types/keypress.js). It would be great if we can call register_combo only with the wanted parameters. thanks.

karim10 commented 6 years ago

I've created a pull request for this purpose. It would be great if you can review it guys, thanks! https://github.com/DefinitelyTyped/DefinitelyTyped/pull/20993

karim10 commented 6 years ago

The PR was merged, thanks!