qmk_firmware
qmk_firmware copied to clipboard
Allow hook to inspect leader key sequence as it grows, and provide example code to exit the leader mode early if a prefix is matched
Description
This is similar to other efforts to implement a compose key (e.g., https://github.com/qmk/qmk_firmware/pull/10063/files) but more modular, allowing for fewer code changes and more customizability for the user.
Aside from the features covered in the title, this also fixes a bug. See line 76 in process_leader.c
. When LEADER_NO_TIMEOUT
is defined and line prcoess_leader.c:55
is run, leading
will remain true
, breaking the leading mode until a reset occurs.
Types of Changes
- [ ] Core
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement/optimization
- [ ] Keyboard (addition or update)
- [ ] Keymap/layout/userspace (addition or update)
- [x] Documentation
Issues Fixed or Closed by This PR
-
LEADER_NO_TIMEOUT
could break the leader mode
Checklist
- [x] My code follows the code style of this project: C, Python
- [x] I have read the PR Checklist document and have made the appropriate changes.
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [x] I have read the CONTRIBUTING document.
- [ ] I have added tests to cover my changes.
- [x] I have tested the changes and verified that they work and don't break anything (as well as I can manage).
Thank you @zvecr for fixing the branch
Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with bug
, awaiting review
, breaking_change
, in progress
, or on hold
to prevent the issue from being re-flagged.
Thank you for your contribution! This pull request has been automatically closed because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. // [stale-action-closed]