Skip to content

Commit

Permalink
Add next tapping record user callback
Browse files Browse the repository at this point in the history
  • Loading branch information
filterpaper committed May 11, 2023
1 parent aec8825 commit 06cfb89
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
9 changes: 9 additions & 0 deletions quantum/action_tapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,4 +544,13 @@ static void debug_waiting_buffer(void) {
ac_dprintf("}\n");
}

/**
* @brief Get next tapping record from buffer
*
* @return keyrecord_t
*/
keyrecord_t get_next_tapping_record(void) {
return waiting_buffer[waiting_buffer_tail];
}

#endif
7 changes: 4 additions & 3 deletions quantum/action_tapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define WAITING_BUFFER_SIZE 8

#ifndef NO_ACTION_TAPPING
uint16_t get_record_keycode(keyrecord_t *record, bool update_layer_cache);
uint16_t get_event_keycode(keyevent_t event, bool update_layer_cache);
void action_tapping_process(keyrecord_t record);
uint16_t get_record_keycode(keyrecord_t *record, bool update_layer_cache);
uint16_t get_event_keycode(keyevent_t event, bool update_layer_cache);
void action_tapping_process(keyrecord_t record);
keyrecord_t get_next_tapping_record(void);
#endif

uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record);
Expand Down

0 comments on commit 06cfb89

Please sign in to comment.