Skip to content

Untrimmed key combination string silently causes issues #155

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.

Activity

  1. changed the title [-]Untrimmed key combination string silently results in issues[/-] [+]Untrimmed key combination string silently causes in issues[/+] on Apr 13, 2023
  2. changed the title [-]Untrimmed key combination string silently causes in issues[/-] [+]Untrimmed key combination string silently causes issues[/+] on Apr 13, 2023
  3. SneakySensei commented on Apr 13, 2023

    @SneakySensei
    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

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