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

use regexp or smart shortcuts to filter key event streams #8

Open
dey-dey opened this issue Dec 7, 2014 · 2 comments
Open

use regexp or smart shortcuts to filter key event streams #8

dey-dey opened this issue Dec 7, 2014 · 2 comments

Comments

@dey-dey
Copy link

dey-dey commented Dec 7, 2014

so something i was trying to do but didn't really get how was to filter events for alphanumeric keys. i can contribute to this, maybe there's a way to add custom filters easily to this plugin? lemme know!

@mightyiam
Copy link
Contributor

So, you want to add a binding that uses a regexp for the key, or a filter function?

@mightyiam
Copy link
Contributor

Something like

combokeys.bind(
    function (character, e) {
        if (
            // filter code
        ) {
            return true;
        },
        function () {
            // callback
        }
)

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