1
0
Fork 0

Programmable Button API refactor and improve docs (#18641)

This commit is contained in:
Ryan 2022-10-15 14:33:24 +11:00 committed by GitHub
parent 19aed5e999
commit f0b2bfd5ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 220 additions and 86 deletions

View file

@ -22,9 +22,9 @@ 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);
programmable_button_register(button);
} else {
programmable_button_off(button);
programmable_button_unregister(button);
}
}
return true;