Per Key Leader Timing Option (#4026)

* leader changes to enable per key timing option

* Changes requested to docs for @drashna

* Changes requested by @drashna
This commit is contained in:
Alexander Kagno 2018-12-15 08:29:24 -07:00 committed by Drashna Jaelre
parent 72bd17f290
commit 3ec4a00bfc
3 changed files with 34 additions and 1 deletions

View file

@ -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;