summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--quantum/quantum.c13
-rw-r--r--quantum/quantum.h3
2 files changed, 16 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index c53fb19b4b..d9aaafd616 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -13,6 +13,16 @@ bool process_action_kb(keyrecord_t *record) {
}
__attribute__ ((weak))
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ return process_record_user(keycode, record);
+}
+
+__attribute__ ((weak))
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+__attribute__ ((weak))
void leader_start(void) {}
__attribute__ ((weak))
@@ -124,6 +134,9 @@ bool process_record_quantum(keyrecord_t *record) {
keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key);
#endif
+ if (!process_record_kb(keycode, record))
+ return false;
+
// This is how you use actions here
// if (keycode == KC_LEAD) {
// action_t action;
diff --git a/quantum/quantum.h b/quantum/quantum.h
index 71533f48b9..3ce940895d 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -62,6 +62,9 @@ extern uint32_t default_layer_state;
void matrix_init_kb(void);
void matrix_scan_kb(void);
bool process_action_kb(keyrecord_t *record);
+bool process_record_kb(uint16_t keycode, keyrecord_t *record);
+bool process_record_user(uint16_t keycode, keyrecord_t *record);
+
bool is_music_on(void);
void music_toggle(void);