diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2016-05-28 15:22:30 -0400 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2016-05-28 15:22:30 -0400 |
| commit | 17977a7e24ddab6ca101341b33c8fe7ad13e68f5 (patch) | |
| tree | 466cc235aecf9f737c13004f1a5c9a251954a6ed | |
| parent | 38987d4c1589d2d457459f42e179be24b712be30 (diff) | |
| download | qmk_firmware-17977a7e24ddab6ca101341b33c8fe7ad13e68f5.tar.gz qmk_firmware-17977a7e24ddab6ca101341b33c8fe7ad13e68f5.zip | |
process_record implementation (non-breaking for process_action ATM)
| -rw-r--r-- | quantum/quantum.c | 13 | ||||
| -rw-r--r-- | quantum/quantum.h | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index c53fb19b4..d9aaafd61 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -13,6 +13,16 @@ bool process_action_kb(keyrecord_t *record) { | |||
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | __attribute__ ((weak)) | 15 | __attribute__ ((weak)) |
| 16 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 17 | return process_record_user(keycode, record); | ||
| 18 | } | ||
| 19 | |||
| 20 | __attribute__ ((weak)) | ||
| 21 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 22 | return true; | ||
| 23 | } | ||
| 24 | |||
| 25 | __attribute__ ((weak)) | ||
| 16 | void leader_start(void) {} | 26 | void leader_start(void) {} |
| 17 | 27 | ||
| 18 | __attribute__ ((weak)) | 28 | __attribute__ ((weak)) |
| @@ -124,6 +134,9 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 124 | keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key); | 134 | keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key); |
| 125 | #endif | 135 | #endif |
| 126 | 136 | ||
| 137 | if (!process_record_kb(keycode, record)) | ||
| 138 | return false; | ||
| 139 | |||
| 127 | // This is how you use actions here | 140 | // This is how you use actions here |
| 128 | // if (keycode == KC_LEAD) { | 141 | // if (keycode == KC_LEAD) { |
| 129 | // action_t action; | 142 | // action_t action; |
diff --git a/quantum/quantum.h b/quantum/quantum.h index 71533f48b..3ce940895 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h | |||
| @@ -62,6 +62,9 @@ extern uint32_t default_layer_state; | |||
| 62 | void matrix_init_kb(void); | 62 | void matrix_init_kb(void); |
| 63 | void matrix_scan_kb(void); | 63 | void matrix_scan_kb(void); |
| 64 | bool process_action_kb(keyrecord_t *record); | 64 | bool process_action_kb(keyrecord_t *record); |
| 65 | bool process_record_kb(uint16_t keycode, keyrecord_t *record); | ||
| 66 | bool process_record_user(uint16_t keycode, keyrecord_t *record); | ||
| 67 | |||
| 65 | 68 | ||
| 66 | bool is_music_on(void); | 69 | bool is_music_on(void); |
| 67 | void music_toggle(void); | 70 | void music_toggle(void); |
