diff options
| author | Damien Pollet <damien.pollet@gmail.com> | 2016-03-27 17:58:26 +0200 |
|---|---|---|
| committer | Damien Pollet <damien.pollet@gmail.com> | 2016-03-28 16:30:00 +0200 |
| commit | ef21a855e6d60b78011ddb8940f58985b1c60acb (patch) | |
| tree | 8182e65f6b9b0f923608a9dc123fc66c02581531 /tmk_core/common/action.c | |
| parent | 80eefb09ac5de95a6977702b4014d4b4d79a5d7d (diff) | |
| download | qmk_firmware-ef21a855e6d60b78011ddb8940f58985b1c60acb.tar.gz qmk_firmware-ef21a855e6d60b78011ddb8940f58985b1c60acb.zip | |
Add per-event user hook function to QMK
Diffstat (limited to 'tmk_core/common/action.c')
| -rw-r--r-- | tmk_core/common/action.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 4197c53ed..c6595196f 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c | |||
| @@ -53,6 +53,9 @@ void action_exec(keyevent_t event) | |||
| 53 | #endif | 53 | #endif |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | __attribute__ ((weak)) | ||
| 57 | void process_action_user(keyrecord_t *record) {} | ||
| 58 | |||
| 56 | void process_action(keyrecord_t *record) | 59 | void process_action(keyrecord_t *record) |
| 57 | { | 60 | { |
| 58 | keyevent_t event = record->event; | 61 | keyevent_t event = record->event; |
| @@ -62,6 +65,8 @@ void process_action(keyrecord_t *record) | |||
| 62 | 65 | ||
| 63 | if (IS_NOEVENT(event)) { return; } | 66 | if (IS_NOEVENT(event)) { return; } |
| 64 | 67 | ||
| 68 | process_action_user(record); | ||
| 69 | |||
| 65 | action_t action = layer_switch_get_action(event.key); | 70 | action_t action = layer_switch_get_action(event.key); |
| 66 | dprint("ACTION: "); debug_action(action); | 71 | dprint("ACTION: "); debug_action(action); |
| 67 | #ifndef NO_ACTION_LAYER | 72 | #ifndef NO_ACTION_LAYER |
