feat(shield): Add underglow for reviung5 (#2191)

This commit is contained in:
FearlessSpiff
2025-05-05 20:46:21 +02:00
committed by GitHub
parent f1b944b1ef
commit ad6a181d7e
4 changed files with 87 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 The ZMK Contributors
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
@@ -8,20 +8,31 @@
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/outputs.h>
#include <dt-bindings/zmk/rgb.h>
#define BASE 0
#define BLE 1
#define RGB 2
/ {
behaviors {
rgb_encoder: rgb_encoder {
compatible = "zmk,behavior-sensor-rotate";
#sensor-binding-cells = <0>;
bindings = <&rgb_ug RGB_BRI>, <&rgb_ug RGB_BRD>;
};
};
keymap {
compatible = "zmk,keymap";
base_layer {
display-name = "BASE";
bindings = <
// ╭───────────────────────────┬──────────────────┬────────────┬─────────────╮
&mo BLE &kp C_PREVIOUS &kp C_PLAY_PAUSE &kp C_NEXT &kp C_MUTE
// ╰───────────────────────────┴──────────────────┴────────────┴─────────────╯
// ╭─────────────────────────┬──────────────────┬────────────┬────────────────╮
&mo BLE &kp C_PREVIOUS &kp C_PLAY_PAUSE &kp C_NEXT &lt RGB C_MUTE
// ╰─────────────────────────┴──────────────────┴────────────┴────────────────╯
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
@@ -29,10 +40,20 @@
ble_layer {
display-name = "BLE";
bindings = <
// ╭─────────────┬─────────────┬─────────────┬────────────┬─────────────╮
&trans &out OUT_TOG &bt BT_PRV &bt BT_NXT &bt BT_CLR
// ╰─────────────┴─────────────┴─────────────┴────────────┴─────────────╯
// ╭────────┬─────────────┬────────────┬────────────┬────────────╮
&trans &out OUT_TOG &bt BT_PRV &bt BT_NXT &bt BT_CLR
// ╰────────┴─────────────┴────────────┴────────────┴────────────╯
>;
};
rgb_layer {
display-name = "RGB";
bindings = <
// ╭──────────────────┬─────────────────┬─────────────────┬──────────────────────────────────┬────────╮
&rgb_ug RGB_TOG &rgb_ug RGB_EFR &rgb_ug RGB_EFF &rgb_ug RGB_COLOR_HSB(307,89,98) &trans
// ╰──────────────────┴─────────────────┴─────────────────┴──────────────────────────────────┴────────╯
>;
sensor-bindings = <&rgb_encoder>;
};
};
};
};