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

Can't exit without calling exit(0) after binding keyboard #8

Open
Mixolyde opened this issue Aug 2, 2015 · 3 comments
Open

Can't exit without calling exit(0) after binding keyboard #8

Mixolyde opened this issue Aug 2, 2015 · 3 comments

Comments

@Mixolyde
Copy link

Mixolyde commented Aug 2, 2015

I'd like to be able to close/end my application within unit tests without calling exit(0), because this exits from the unit test framework. But, if I don't call exit(0) the keyboard binding keeps the application alive forever. Ideally there would be a method to unbind all keys, and tell the Keyboard class to stop capturing input.
Thanks.

@azenla
Copy link

azenla commented Aug 2, 2015

Sure I can add this functionality in an hour or so :)

@Mixolyde
Copy link
Author

Mixolyde commented Aug 2, 2015

I tried to do this with my own version, but it turns out to be a little trickier than I thought, because StreamSubscription objects are lost when a client uses the bindKey().listen method. I think the Keyboard class needs to capture those subscriptions so it can cancel them.

@Mixolyde
Copy link
Author

Any update on this issue? I didn't see a fix in the latest update. Thanks.

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