Skip to content

Untrimmed key combination string silently causes issues #155

@SneakySensei

Description

@SneakySensei

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions