12345678910111213141516171819202122232425262728293031 |
- #include "process_programmable_button.h"
- #include "programmable_button.h"
- bool process_programmable_button(uint16_t keycode, keyrecord_t *record) {
- if (keycode >= PROGRAMMABLE_BUTTON_MIN && keycode <= PROGRAMMABLE_BUTTON_MAX) {
- uint8_t button = keycode - PROGRAMMABLE_BUTTON_MIN + 1;
- if (record->event.pressed) {
- programmable_button_on(button);
- } else {
- programmable_button_off(button);
- }
- }
- return true;
- }
|