question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sequential key support

See original GitHub issue

I’ve been thinking about adding sequential key support to whenipress.

The idea is that instead of registering a keyboard combo, you register a set of key presses that must be pressed in order. The syntax would look something like this:

whenipress('a', 'b', 'c', 'd', 'e', 'f', 'g').sequentially().then(e => alert('You know the start of the alphabet!'));

My issue is I don’t know how widely used this would be, and I don’t want to bloat the package with unused features as I’d like it to remain as small as possible. I did think of releasing it as a plugin that works alongside whenipress. Any thoughts or ideas are appreciated.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
millettecommented, Jul 14, 2020

Another use-case for sequences is something like gmail and it’s support for “g i” meaning “Go to Inbox”. It supports other sequences, that’s just the first that comes to mind.

P.S.: I’m not insisting for the feature, just laying out a few usage examples.

1reaction
DionPotkampcommented, Apr 2, 2021

Sure! It’s acting weird if you don’t add the .once()'s. The first whenipress shouldn’t have the .once().

whenipress('a').then(e =>  
    whenipress('d').then(e =>  
        whenipress('m').then(e =>  
            whenipress('i').then(e =>  
                whenipress('n').then(e =>  
                    console.log("admin!")  
                ).once()  
            ).once()  
        ).once()  
    ).once()  
)  
Read more comments on GitHub >

github_iconTop Results From Across the Web

Sequential keys - AppSheet Help - Google Support
Is it possible to create sequential keys for each record? The brief answer is No. Some customers ask for the ability to create...
Read more >
Behind the Scenes on OPTIMIZE_FOR_SEQUENTIAL_KEY
In SQL Server 2019 CTP 3.1 a new index option was added called OPTIMIZE_FOR_SEQUENTIAL_KEY that is intended to address throughput issues ...
Read more >
Sequential
Support · Contact Support · Register Your Product · Artists · Dealers · ABOUT SEQUENTIAL · About · Contact Us · Careers ·...
Read more >
Support sequence key generation on SQL Server ... - GitHub
We could generate a sequence (as we do for HiLo generation) and then set the column default for the key column on every...
Read more >
DB2 10 - What's new - Relief for sequential key insert - IBM
This release of DB2® for z/OS® includes support for asymmetric splitting of index pages and increased index page sizes (larger than 4 KB)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found