diff options
Diffstat (limited to 'quantum/process_keycode/process_programmable_button.c')
-rw-r--r-- | quantum/process_keycode/process_programmable_button.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/quantum/process_keycode/process_programmable_button.c b/quantum/process_keycode/process_programmable_button.c index d6a14e120c..03034edb61 100644 --- a/quantum/process_keycode/process_programmable_button.c +++ b/quantum/process_keycode/process_programmable_button.c @@ -19,8 +19,8 @@ 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 >= QK_PROGRAMMABLE_BUTTON_MIN && keycode <= QK_PROGRAMMABLE_BUTTON_MAX) { - uint8_t button = keycode - QK_PROGRAMMABLE_BUTTON_MIN + 1; + if (IS_QK_PROGRAMMABLE_BUTTON(keycode)) { + uint8_t button = keycode - QK_PROGRAMMABLE_BUTTON + 1; if (record->event.pressed) { programmable_button_register(button); } else { |