summaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode/process_programmable_button.c
diff options
context:
space:
mode:
authorlokher <lokher@gmail.com>2022-12-06 17:04:10 +0800
committerlokher <lokher@gmail.com>2022-12-06 17:04:10 +0800
commit27fc28fd2ff52e079a5bc58d6aaea4c752420615 (patch)
tree7ac943fb1ba4f430a7220efd18f66f6a77205c30 /quantum/process_keycode/process_programmable_button.c
parente736133392fe6427cfb995da0787337189828272 (diff)
parent2709b6ed616f8012ff4cfd3ee69a822a8d188351 (diff)
Merge upstream master
Diffstat (limited to 'quantum/process_keycode/process_programmable_button.c')
-rw-r--r--quantum/process_keycode/process_programmable_button.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/quantum/process_keycode/process_programmable_button.c b/quantum/process_keycode/process_programmable_button.c
index c6e77faacc..03034edb61 100644
--- a/quantum/process_keycode/process_programmable_button.c
+++ b/quantum/process_keycode/process_programmable_button.c
@@ -19,12 +19,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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 (IS_QK_PROGRAMMABLE_BUTTON(keycode)) {
+ uint8_t button = keycode - QK_PROGRAMMABLE_BUTTON + 1;
if (record->event.pressed) {
- programmable_button_on(button);
+ programmable_button_register(button);
} else {
- programmable_button_off(button);
+ programmable_button_unregister(button);
}
}
return true;