mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-22 11:30:30 +08:00
Add changelog for Leader Key refactor (#19953)
This commit is contained in:
parent
1d182995ed
commit
b865b9e170
|
@ -82,6 +82,31 @@ uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
For more details, please read the updated documentation section on [Quick Tap Term](tap_hold.md#quick-tap-term).
|
For more details, please read the updated documentation section on [Quick Tap Term](tap_hold.md#quick-tap-term).
|
||||||
|
|
||||||
|
### Leader Key Rework :id=leader-key-rework ([#19632](https://github.com/qmk/qmk_firmware/pull/19632))
|
||||||
|
|
||||||
|
The Leader Key feature API has been significantly improved, along with some bugfixes and added tests.
|
||||||
|
|
||||||
|
Instead of defining your leader sequences in `matrix_scan_user()`, they are now handled in the `leader_end_user()` callback, and the `LEADER_EXTERNS()`/`LEADER_DICTIONARY()` macros are no longer needed:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void leader_end_user(void) {
|
||||||
|
if (leader_sequence_one_key(KC_F)) {
|
||||||
|
// Leader, f => Types the below string
|
||||||
|
SEND_STRING("QMK is awesome.");
|
||||||
|
} else if (leader_sequence_two_keys(KC_D, KC_D)) {
|
||||||
|
// Leader, d, d => Ctrl+A, Ctrl+C
|
||||||
|
SEND_STRING(SS_LCTL("a") SS_LCTL("c"));
|
||||||
|
} else if (leader_sequence_three_keys(KC_D, KC_D, KC_S)) {
|
||||||
|
// Leader, d, d, s => Types the below string
|
||||||
|
SEND_STRING("https://start.duckduckgo.com\n");
|
||||||
|
} else if (leader_sequence_two_keys(KC_A, KC_S)) {
|
||||||
|
// Leader, a, s => GUI+S
|
||||||
|
tap_code16(LGUI(KC_S));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
For more information please see the [Leader Key documentation](feature_leader_key.md).
|
||||||
|
|
||||||
### Updated Keyboard Codebases :id=updated-keyboard-codebases
|
### Updated Keyboard Codebases :id=updated-keyboard-codebases
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue