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

Untrimmed key combination string silently causes issues #155

Open
SneakySensei opened this issue Apr 13, 2023 · 1 comment
Open

Untrimmed key combination string silently causes issues #155

SneakySensei opened this issue Apr 13, 2023 · 1 comment

Comments

@SneakySensei
Copy link

If you pass an untrimmed string to any of the combo registration functions, it splits that without trimming which results in an invalid key combination.

Eg:

listener.simple_combo(" r", function() {
    console.log("This function is never called");
});

This happens because the combo " r" gets split into ["", "r"] which is not a valid combo. The library should trim the combo before passing it to the split function.

@SneakySensei SneakySensei changed the title Untrimmed key combination string silently results in issues Untrimmed key combination string silently causes in issues Apr 13, 2023
@SneakySensei SneakySensei changed the title Untrimmed key combination string silently causes in issues Untrimmed key combination string silently causes issues Apr 13, 2023
@SneakySensei
Copy link
Author

I can take this up if this is a valid fix. @dmauro

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

1 participant