summaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode
diff options
context:
space:
mode:
authorAlexander Kagno <cwre@protonmail.com>2018-12-15 16:29:24 +0100
committerDrashna Jaelre <drashna@live.com>2018-12-15 16:29:24 +0100
commit3ec4a00bfc090fc440480336e3273b459074aa18 (patch)
tree95cd72fb059d961a3868a9dcf67f2fb1fb6ba7e2 /quantum/process_keycode
parent72bd17f2902c82ef84b9134433facb21ad696fbb (diff)
downloadqmk_firmware-3ec4a00bfc090fc440480336e3273b459074aa18.tar.gz
qmk_firmware-3ec4a00bfc090fc440480336e3273b459074aa18.tar.xz
Per Key Leader Timing Option (#4026)
* leader changes to enable per key timing option * Changes requested to docs for @drashna * Changes requested by @drashna
Diffstat (limited to 'quantum/process_keycode')
-rw-r--r--quantum/process_keycode/process_leader.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_leader.c b/quantum/process_keycode/process_leader.c
index eddbf71f7..b32fc1db6 100644
--- a/quantum/process_keycode/process_leader.c
+++ b/quantum/process_keycode/process_leader.c
@@ -38,9 +38,15 @@ uint8_t leader_sequence_size = 0;
bool process_leader(uint16_t keycode, keyrecord_t *record) {
// Leader key set-up
if (record->event.pressed) {
+#ifdef LEADER_PER_KEY_TIMING
+ leader_time = timer_read();
+#endif
if (!leading && keycode == KC_LEAD) {
leader_start();
leading = true;
+#ifndef LEADER_PER_KEY_TIMING
+ leader_time = timer_read();
+#endif
leader_time = timer_read();
leader_sequence_size = 0;
leader_sequence[0] = 0;