aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core
diff options
context:
space:
mode:
authorGravatar Erez Zukerman <bulk@ezuk.org>2016-05-15 00:27:32 -0400
committerGravatar Jack Humbert <jack.humb@gmail.com>2016-05-15 00:27:32 -0400
commit1a8c0dd22d6a2255511d0db6a456315541b5815b (patch)
tree6c7d5e9dc66f9ce864cfe87a72dfb47e6f06d3a7 /tmk_core
parent79d26f331a275c99f76a30d34752fbd65bb3f335 (diff)
downloadqmk_firmware-1a8c0dd22d6a2255511d0db6a456315541b5815b.tar.gz
Leader key implementation (#326)
* implements leader key for planck experimental * allows override of leader timeout * adds ability to use the leader key in seq * fixes leader keycode * adds chording prototype * fixes keycode detection * moves music mode to quantum.c * disables chording by default * updates process_action functions to return bool
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/action.c7
-rw-r--r--tmk_core/common/action.h2
-rw-r--r--tmk_core/common/matrix.h4
3 files changed, 8 insertions, 5 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index 081e90b2d..c026b96d9 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -70,7 +70,9 @@ void process_action_nocache(keyrecord_t *record)
#endif
__attribute__ ((weak))
-void process_action_kb(keyrecord_t *record) {}
+bool process_action_quantum(keyrecord_t *record) {
+ return true;
+}
void process_action(keyrecord_t *record)
{
@@ -89,7 +91,8 @@ void process_action(keyrecord_t *record)
}
#endif
- process_action_kb(record);
+ if (!process_action_quantum(record))
+ return;
action_t action = store_or_get_action(event.pressed, event.key);
dprint("ACTION: "); debug_action(action);
diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h
index 44ec3047b..7d1cbafe9 100644
--- a/tmk_core/common/action.h
+++ b/tmk_core/common/action.h
@@ -59,7 +59,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt);
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt);
/* keyboard-specific key event (pre)processing */
-void process_action_kb(keyrecord_t *record);
+bool process_action_quantum(keyrecord_t *record);
/* Utilities for actions. */
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h
index 0b013fc98..ad0871bfb 100644
--- a/tmk_core/common/matrix.h
+++ b/tmk_core/common/matrix.h
@@ -64,8 +64,8 @@ void matrix_power_up(void);
void matrix_power_down(void);
/* keyboard-specific setup/loop functionality */
-void matrix_init_kb(void);
-void matrix_scan_kb(void);
+void matrix_init_quantum(void);
+void matrix_scan_quantum(void);
#ifdef __cplusplus
}