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

The argument allow_blur_event is a confusing boolean trap #87

Open
mondeja opened this issue Mar 25, 2024 · 0 comments · May be fixed by #99
Open

The argument allow_blur_event is a confusing boolean trap #87

mondeja opened this issue Mar 25, 2024 · 0 comments · May be fixed by #99
Assignees
Milestone

Comments

@mondeja
Copy link
Collaborator

mondeja commented Mar 25, 2024

This is a common case of a boolean trap, a software antipattern. It could be defined as a boolean trap, but at least a positive name should be expected to take action. His name is now so much confusing.

Currently, defining allow_blur_event to false in the call to provide_hotkeys_context will create a blur event on the windows object. Means something like: "if not allow blur event then create a blur event to reset all the active scopes", that doesn't makes sense.

Their name should be somehing like reset_pressed_keys_on_blur and should accept a true value to enable it.

I think that this can be implemented along with #84 and postponed to v0.3.0.

@mondeja mondeja added this to the v0.3.0 milestone Mar 25, 2024
@friendlymatthew friendlymatthew self-assigned this May 1, 2024
@friendlymatthew friendlymatthew linked a pull request May 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants