Skip to content

latapals/sequence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Sequence

Sequence is a little library to help make handling keystroke sequences easier.

How to use Sequence

All you need to do to make a Sequence is to make a new Sequence with an array of keys (based on event.key), and a callback function.

Example

Here's a little example of G then I, which Linear uses to take you to your inbox:

new Sequence(["g", "i"], event => {
  // Code goes here
})

Killing a Sequence

You can easily kill a Sequence by calling it's kill() method.

Credits

This library was made by Aetinx for Latapals.