TeXitoi / keyberon

A rust crate to create a pure rust keyboard firmware.
MIT License
1.08k stars 79 forks source link

Implement custom handling for HoldTap actions. #82

Closed Nashenas88 closed 2 years ago

Nashenas88 commented 2 years ago

Allows an API user to control the behavior of the HoldTap action however they prefer. This allows behaviors like preventing hold actions when rolling keys on the same side of a split keyboard.

Fixes #35

TeXitoi commented 2 years ago

Great! I'll try to do a deep review in the next days.

You can avoid the CustomHandler wrapper.

Also, you can use a fn(&Stack) -> Option<WaitingAction> instead of the dyn types you used. it would simplify the declaration.

I have to think about making the Stack type public: it clearly leak implementation details, but I don't have a better idea.

TeXitoi commented 2 years ago

Thanks for the great contribution!

Nashenas88 commented 2 years ago

I addressed all the comments so far. I'll be leaving for a 1 week vacation on Saturday, so I won't be able to respond to comments during that period. I will have time tomorrow evening to address any additional comments you might have.

Nashenas88 commented 2 years ago

Just wanted to follow up since it's been a bit. Is there anything else I needed to address?

TeXitoi commented 2 years ago

Sorry, i didn't had the time to review since last time

Nashenas88 commented 2 years ago

No worries! There's no rush on my side I was just checking to make sure I didn't misunderstand anything. Thanks for the review so far!

TeXitoi commented 2 years ago

Thanks, and sorry for the duration of the review

Nashenas88 commented 2 years ago

No worries! I only re-requested the review when I realized it might have been missing from a queue of yours. No rush intended, and thanks for the thorough review!