1
0
Fork 0

process_record implementation (non-breaking for process_action ATM)

This commit is contained in:
Jack Humbert 2016-05-28 15:22:30 -04:00
parent 38987d4c15
commit 17977a7e24
2 changed files with 16 additions and 0 deletions

View file

@ -12,6 +12,16 @@ bool process_action_kb(keyrecord_t *record) {
return true; 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)) __attribute__ ((weak))
void leader_start(void) {} 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); keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key);
#endif #endif
if (!process_record_kb(keycode, record))
return false;
// This is how you use actions here // This is how you use actions here
// if (keycode == KC_LEAD) { // if (keycode == KC_LEAD) {
// action_t action; // action_t action;

View file

@ -62,6 +62,9 @@ extern uint32_t default_layer_state;
void matrix_init_kb(void); void matrix_init_kb(void);
void matrix_scan_kb(void); void matrix_scan_kb(void);
bool process_action_kb(keyrecord_t *record); 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); bool is_music_on(void);
void music_toggle(void); void music_toggle(void);