-
-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add onKey function for custom key commands for patterns #1235
Conversation
Nice! Looks illegal, but not too dangerous :) Could it support lowercase and short names for modifiers, e.g. I think it is worth exposing that Then maybe |
good ideas! updated. I added some common aliases and a link to the key name values in the docs, as well as broke out the function and renamed it |
Great thanks! Looking a bit closer I thought Relying on this magic though means that How about exporting this instead of
(the fmap is needed because register doesn't patternify the final parameter..) Then $: keyDown("Alt:j").pick([s("bd(5,8)"), s("cp(3,8)")]); |
works great! I update the pr |
$: s("bd(5,8)")
.onKey("Control:j", x => x.segment(16).color("red"))
.onKey("Control:i", x => x.fast(2).color("blue"))