]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
process_record implementation (non-breaking for process_action ATM)
authorJack Humbert <jack.humb@gmail.com>
Sat, 28 May 2016 19:22:30 +0000 (15:22 -0400)
committerJack Humbert <jack.humb@gmail.com>
Sat, 28 May 2016 19:22:30 +0000 (15:22 -0400)
quantum/quantum.c
quantum/quantum.h

index c53fb19b4b4124c8a14c199dca4637792c239856..d9aaafd616ef386abd0e69be35a620fa4263ac43 100644 (file)
@@ -12,6 +12,16 @@ bool process_action_kb(keyrecord_t *record) {
   return true;
 }
 
+__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) {}
 
@@ -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;
index 71533f48b913f578c9a3f57b2e20c624daa026b3..3ce940895d348a93a87556def4c21f31b989e379 100644 (file)
@@ -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);