Skip to content
This repository was archived by the owner on Nov 8, 2017. It is now read-only.

Conversation

@nick-skriabin
Copy link

I've added support for "multiple combos" as alternative of many combox separated by slash.
You can now write

jwerty.is("cmd+[a,b,c]", event)
jwerty.is("cmd+shift+[a,b,c]", event)
jwerty.is("[ctrl, cmd]+a", event)

instead of

jwerty.is("cmd+a/cmd+b/cmd+c", event)
jwerty.is("cmd+shift+a/cmd+shift+b/cmd+shift+c", event)
jwerty.is("cmd+a/ctrl+a", event)

And next example demonstrates the power of new syntax.

Old style:

jwerty.is("backspace/backspace+ctrl/backspace+cmd/backspace+alt/delete/delete+ctrl/delete+cmd/delete+alt", event)

New style:

jwerty.is("backspace/backspace+[cmd,ctrl,alt]/delete/delete+[cmd,ctrl,alt]", event)

This syntax works like abbreviations and my code just expands it into full combo.
Everything from old syntax (such as [a-z] or [0-9]) works as usual.

@keithamus
Copy link
Owner

I absolutely love the idea. I can't help but feel the code could be improved though. I'm going to look at this in more detail a bit later on.

@nick-skriabin
Copy link
Author

Ok, thanks. I'm glad to see that you're interested in my idea. I'll wait for your comments.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants