Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to delete listeners? #12

Closed
EugeneHerasymchuk opened this issue Dec 25, 2017 · 1 comment
Closed

How to delete listeners? #12

EugeneHerasymchuk opened this issue Dec 25, 2017 · 1 comment

Comments

@EugeneHerasymchuk
Copy link

Is it possible to add a hook to remove all listeners?
It's quite useful in event handler:

process.on('exit'....
@tomzx
Copy link
Owner

tomzx commented Dec 25, 2017

Please refer to EventEmitter2 documentation on how to remove listeners.

Something like gkm.events.removeAllListeners(eventName) should do the trick.

Note that gkm spawns a single listener process (for both keyboard and mouse) in Java (running gkm.jar) that will run until your program is terminated.

@tomzx tomzx closed this as completed Dec 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants