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 can "forceConsider" be set to true? #70

Open
valp124 opened this issue Sep 22, 2017 · 5 comments
Open

How can "forceConsider" be set to true? #70

valp124 opened this issue Sep 22, 2017 · 5 comments

Comments

@valp124
Copy link

valp124 commented Sep 22, 2017

I need to set forceConsider argument to _onKeyDown function in event_handler.js to true. How can this be done?

The reason I need that is that I need to be able to cancel an action with an escape key, regardless of where the target is. In my case, the target sometimes falls into the black list of _shouldConsider function, and then my code doesn't work.

Thanks a lot.

@glortho
Copy link
Owner

glortho commented Sep 23, 2017

@valp124 Are you wanting key bindings to work while a form element is focused?

@valp124
Copy link
Author

valp124 commented Sep 25, 2017

@glortho Not a form element per se -- because there is no form -- but in practice is happens to be textarea in this case.

I work in a complex single page app environment (https://www.os-js.org/) and don't always control what is in focus, the "os" is managing virtual windows, desktop icons, etc. The upshot of all this is: I want to be able to force the escape key action regardless of what appears to be the target.

@glortho
Copy link
Owner

glortho commented Sep 26, 2017

Okay @valp124 do you think a global keybinding along these lines would help? #69

@valp124
Copy link
Author

valp124 commented Sep 27, 2017

If I understand #69 correctly, it should. I suppose that's the effect I would achieve if I could set forceConsider to true.

@glortho
Copy link
Owner

glortho commented Sep 28, 2017

Ok @valp124 stay tuned for that. I'm hoping to work with @sheldonrong to get that merged next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants