-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat: Parameterised Mod Morph and Tap Dance #2724
base: main
Are you sure you want to change the base?
Conversation
5ba0a64
to
f595f4a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is pretty nice. A few things worth discussing:
- Forcing mod-morphs and tap-dances to always have two parameters prevents them from being used in hold-taps, or inside parametrized mod-morph/tap-dances. This is a big limitation, so it might be worth keeping around zero-param versions as the main variants.
- These are a bit inconsistent w.r.t. parametrized macros, they are more flexible so we can't easily unify them. One thing we can do is switch to
PLACEHOLDER
instead ofMACRO_PLACEHOLDER
in the macro docs.
|
||
The `binding-params` property determines how the parameters passed to the tap-dance behavior are passed on to the behaviors listed in `bindings`. | ||
It is an array of `BINDING_PARAM(arg1,arg2)` elements, one for each behavior in `bindings`. | ||
The Nth `BINDING_PARAM(arg1,arg2)` corresponds to the Nth behavior listed in `bindings`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is worded slightly differently compared to mod morph, it is probably worth keeping them same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The slightly different wording is due to one of them being of fixed length 2, while the other can vary. If this was extended to hold-tap and macros I'd use the mm wording for hold-tap and the td wording for macros.
You should be able to use them inside the others with appropriate 0s being passed in the right places. I'll add some more tests to be sure. EDIT: parameterised nesting works fine, hold-tap is an issue that needs to be discussed to find the right resolution.
I think that both hold-tap and parameterised macros could be adjusted to use a |
0b5f4d3
to
2825669
Compare
0b47879
to
ab2d1e4
Compare
General idea is to have a
binding-params
array property which maps parameters input to the behavior to the behaviors found in the bindings array. Bit flags and some macros to tidy it all up.Docs are included, I decided to substitute the references to the non-parameterised version with the parameterised one in the interest of "one way to do it". Current one was moved to a footnote.
In general I think the approach and user experience side of things is good. May add more tests. Unsure whether documentation needs further reworking or if the non-parameterised version should remain prominent.
PR check-list
TODO: