Skip to content

Cancel sequence hotkey when interrupted by other characters? #57

@sa-0001

Description

@sa-0001

The following sequence works as expected:

combokeys.bind('q n', function(){ ... })'

However if I bind a combination as well as the sequence:

combokeys.bind(['q+n', 'q n'], function(){ ... })'

or bind the sequence first and then the combination:

combokeys.bind('q+n', function(){ ... })'
combokeys.bind('q n', function(){ ... })'

then both the combination and sequence correctly call the handler, but pressing a key inbetween the q and n, also causes the handler to be called.

q+n -> handler called
q n -> handler called
q f n -> handler also called

Is this a limitation of the library, or is there a way to disallow extraneous keys inbetween sequence keys?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions