Chord keybindings #4596
darrenburns
started this conversation in
Ideas
Replies: 1 comment
-
The tree-like syntax in your second example looks great! It also looks very easy to continue nesting. One thing to implement is a keypress to "back out" of the chord. Usually this is ESC. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd love to be able to create chorded keybindings. I think this would solve much of the namespacing issue we have with limited keybings available.
Maybe I could define a binding like this:
(That syntax probably isn't the best - but it hopefully gets the idea across)
This would mean if the user presses
ctrl+k
followed byu
, the action would fire.Alternatively:
In this example,
ctrl+k
followed bya
would trigger an action.ctrl+k
followed byb
would trigger another action.This would integrate into the footer, so after pressing
ctrl+k
, the footer would update to only showa
andb
.Sometimes these systems have things like timeouts e.g.
Chord("ctrl+k", timeout=5, bindings=[...])
would mean after pressingctrl+k
, the bindings inside the chord would be available for 5 seconds. Perhaps pressing escape could short circuit it and take you back to the parent bindings.Beta Was this translation helpful? Give feedback.
All reactions