Skip to content

Commit

Permalink
Move pre_process_record_kb() before process_combo() (qmk#20969)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigprof committed May 20, 2023
1 parent 6d90fa2 commit 21b660f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/understanding_qmk.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ The `process_record()` function itself is deceptively simple, but hidden within
* [`void action_exec(keyevent_t event)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/action.c#L78-L140)
* [`void pre_process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/quantum.c#L204)
* [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_combo.c#L521)
* [`bool pre_process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/27119fa77e8a1b95fff80718d3db4f3e32849298/quantum/quantum.c#L117)
* [`bool pre_process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/27119fa77e8a1b95fff80718d3db4f3e32849298/quantum/quantum.c#L121)
* [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_combo.c#L521)
* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/action.c#L254)
* [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/quantum.c#L224)
* [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/quantum.c#L225)
Expand Down
7 changes: 3 additions & 4 deletions quantum/quantum.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,11 @@ uint16_t get_event_keycode(keyevent_t event, bool update_layer_cache) {
/* Get keycode, and then process pre tapping functionality */
bool pre_process_record_quantum(keyrecord_t *record) {
uint16_t keycode = get_record_keycode(record, true);
return pre_process_record_kb(keycode, record) &&
#ifdef COMBO_ENABLE
if (!(process_combo(keycode, record))) {
return false;
}
process_combo(keycode, record) &&
#endif
return pre_process_record_kb(keycode, record);
true;
}

/* Get keycode, and then call keyboard function */
Expand Down

0 comments on commit 21b660f

Please sign in to comment.