From 137af05b073ecae641714080fd239ffb2185058d Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 19 Apr 2024 02:18:51 +0100 Subject: [PATCH] Tidy use of raw hid within keyboards (#23557) --- keyboards/dp60/keymaps/via/keymap.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/keyboards/dp60/keymaps/via/keymap.c b/keyboards/dp60/keymaps/via/keymap.c index 538a2788..fab799e0 100644 --- a/keyboards/dp60/keymaps/via/keymap.c +++ b/keyboards/dp60/keymaps/via/keymap.c @@ -44,3 +44,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______, _______,_______,_______,_______) }; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + #ifdef RGBLIGHT_ENABLE + #ifdef RGB_MATRIX_ENABLE + case KC_F13: // toggle rgb matrix + rgb_matrix_toggle(); + return false; + case KC_F14: + rgb_matrix_step(); + return false; + #endif + #endif + default: + break; + } + } + return true; +}