Skip to content

Simultaneous execution of commands that share a shortcut key #200

@theAJFM

Description

@theAJFM

This is an issue that I discovered after upgrading from v0.1.0-beta.28 to v0.1.0-beta.33. I have the following commands that share the s shortcut key:

  [{
    id: 'stats',
    name: 'Go to stats page',
    shortcut: ['s'],
    keywords: 'stats',
    section: 'Settings',
    perform: () => {
      // Do some action here...
    },
  },
  {
    id: 'system',
    name: 'Use system theme',
    shortcut: ['t', 's'],
    keywords: 'system',
    section: 'Settings',
    perform: () => {
      // Do some other action here...
    },
  }]

In the previous kbar versions, these 2 commands could co-exist just fine. Pressing the t and s, in that order, didn't lead to the stats command being executed. But since I made the version upgrade, these two commands got executed simultaneously.

Here it is in action when I use the v0.1.0-beta.33. Just press t and s, and you can see the two alerts getting executed.

Here it is when I use the v0.1.0-beta.28. Using the same command, you can see that only the system alert gets executed there—which is what I expected and what I had before this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions