-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
feat(behaviors): Hold-tap - Hold while undecided #1398
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
Conversation
Wow, we even can merge it soon? You guys are crazy fast! Loving it! |
I am trying to understand why the modkey getting stuck with this option, but I don't see a problem in your code. |
If someone would review the pull, I would suggest it to get merged. :) The solution seems to be working perfectly! Also any code that was added, only runs if this flavor is turned on, so it won't have effect on other things. |
Could someone review and approve this? Would be good if it is out in official! It has been working like a charm since the last update! The readme of zmk changed on master AFAIK, so maybe that will need a little evident correction. |
Could we get it reviewed. I have been using it since aug 1, and everything is working perfectly. |
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.
@okke-formsma Thoughts on this?
bool keyTap = | ||
!(hold_tap->status == STATUS_HOLD_TIMER || hold_tap->status == STATUS_HOLD_INTERRUPT); | ||
bool holdRelease = |
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.
Style issue... we use snake_case variable names.
(hold_tap->status == STATUS_HOLD_TIMER || hold_tap->status == STATUS_HOLD_INTERRUPT) && | ||
decision_moment == HT_KEY_UP; |
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.
(hold_tap->status == STATUS_HOLD_TIMER || hold_tap->status == STATUS_HOLD_INTERRUPT) && | |
decision_moment == HT_KEY_UP; | |
!key_tap && decision_moment == HT_KEY_UP; |
return ZMK_EV_EVENT_BUBBLE; | ||
} | ||
|
||
if (undecided_hold_tap->first_press && undecided_hold_tap->config->hold_while_undecided) { |
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 seems to be the only place where 'first_press' is used and I do not understand why it is needed at all. What does this code solve? Why should we not capture the events that would be captured on line 697?
I do not feel this MR is on the right track implementation-wise. It adds two new state variables ( I would suggest to implement this in the following way, more in line with the original implementation of hold-tap. It uses the existing status variable and existing machinery to centralise decisionmaking.
|
@okke-formsma your idea, of trying to solve the functionality without that 2 extra states, seems to be an important request. I also think the functionality should be more deeply integrated, while I think Nicon thought things would be more modular if he used these two states. I can't reach @nickconway on discord anymore, I have tried to do so in the last 3 weeks. I don't know what is happening to him, so probably the correction of the pull request is on us. |
Just want to add that this PR works perfectly for me. I am using this for shift, gui(Mac) and ctrl(Windows). Without this option, homerow mods aren't very usable with mouse clicks. |
I am using it also, and shift + mouseclicks are insanely good! Loving it so much! I hope some day we will merge it! |
95b8551
to
c3f74bb
Compare
Close this in favor of #1811 |
Addresses #1393