Add action-preprocessing hook to keyboard template

example_keyboards
Damien Pollet 9 years ago
parent acd64aa841
commit 2181be029e

@ -10,6 +10,11 @@ void matrix_scan_user(void) {
// leave this function blank - it can be defined in a keymap file // leave this function blank - it can be defined in a keymap file
} }
__attribute__ ((weak))
void process_action_user(keyrecord_t *record) {
// leave this function blank - it can be defined in a keymap file
}
__attribute__ ((weak)) __attribute__ ((weak))
void led_set_user(uint8_t usb_led) { void led_set_user(uint8_t usb_led) {
// leave this function blank - it can be defined in a keymap file // leave this function blank - it can be defined in a keymap file
@ -29,6 +34,13 @@ void matrix_scan_kb(void) {
matrix_scan_user(); matrix_scan_user();
} }
void process_action_kb(keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
process_action_user(record);
}
void led_set_kb(uint8_t usb_led) { void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here

@ -21,6 +21,7 @@
void matrix_init_user(void); void matrix_init_user(void);
void matrix_scan_user(void); void matrix_scan_user(void);
void process_action_user(keyrecord_t *record);
void led_set_user(uint8_t usb_led); void led_set_user(uint8_t usb_led);
#endif #endif
Loading…
Cancel
Save