Skip to content
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(behaviors): hold-tap hold while undecided #1811

Merged
merged 3 commits into from
Feb 20, 2024

Conversation

theol0403
Copy link
Contributor

@theol0403 theol0403 commented May 23, 2023

This PR builds on the changes from #1398 and attempts to implement @okke-formsma 's suggestions. Addresses #1393.

New Properties:

hold-while-undecided

If enabled, the hold behavior will immediately be held on hold-tap press, and will release before the tap behavior is sent.

hold-while-undecided-linger

If your tap behavior activates the same modifier as the hold behavior, and you want to avoid a double tap when transitioning from the hold to the tap, you can use hold-while-undecided-linger. When enabled, the hold behavior will continue to be held until after the tap behavior is released. For example, if the hold is &kp LGUI and the tap is &sk LGUI, then with hold-while-undecided-linger enabled, the host will see LGUI held down continuously until the sticky key is finished, instead of seeing a release and press when transitioning from hold to sticky key.

Discussion

I did my best to implement the suggestions in #1398 (comment). However, some of them seemed unnecessary, and my implementation ended up looking quite like @nickconway 's. There seemed to be no benefit to adding STATUS_UNDECIDED_INITIAL_HOLD, as it wasn't used in the logic to decide whether to hold, and it was just treated identically to STATUS_UNDECIDED.

I am not sure about the name of hold-while-undecided-linger, any suggestions? Maybe hold-while-undecided-release-deferred or hold-while-undecided-around-tap?

@Ciebiada
Copy link

Hi. What's the status on this? :)

@theol0403
Copy link
Contributor Author

If you're asking me, this PR is pending review and is ready for merge! I think the devs are just busy and havent gotten around to merging PRs yet.

Note to devs that my ability to make changes will drastically reduce come september (same goes for all my PRs), so review by then would be ideal.

@Sixzero
Copy link

Sixzero commented Sep 5, 2023

Guys, can we merge this? What is the status on this?

Copy link
Contributor

@caksoylar caksoylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs-wise it looks good, added a few suggestions to improve.

@sommerper
Copy link

sommerper commented Oct 5, 2023

Hey! What's the status on this? Can it be merged? I've been using this for a long time without problems now.

@akira-toriyama
Copy link

I am looking forward.

@Sixzero
Copy link

Sixzero commented Nov 1, 2023

I am also using it for pretty long time... maybe already a year? I guess now there are conflicts which must be resolved, but who has write access?

@theol0403
Copy link
Contributor Author

Conflicts are easy to fix. Just some documentation formatting.

@theol0403 theol0403 requested a review from a team as a code owner December 18, 2023 22:44
@theol0403
Copy link
Contributor Author

Bump - this is a well-requested feature!

@akira-toriyama
Copy link

👀

proBaller3000 added a commit to proBaller3000/zmk that referenced this pull request Jan 16, 2024
Copy link
Contributor

@petejohanson petejohanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your patience on this. Code looks good, tests to cover things, etc.

Please see my one style comment, and can you please rebase to fix the conflict file in the docs?

Thanks!

@theol0403 theol0403 force-pushed the hold-while-undecided branch from dfb928c to 2ef03e5 Compare February 3, 2024 22:21
@theol0403
Copy link
Contributor Author

Rebased and fixed!

@omichalek
Copy link

I am looking forward to this, it should make using the hold key (like ctrl) usable in combination with mouse clicks

Copy link
Contributor

@petejohanson petejohanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@petejohanson petejohanson merged commit c9c620d into zmkfirmware:main Feb 20, 2024
46 of 47 checks passed
@theol0403 theol0403 deleted the hold-while-undecided branch February 20, 2024 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behaviors enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants