60 lines
No EOL
2.9 KiB
Text
60 lines
No EOL
2.9 KiB
Text
/*
|
|
* Copyright (c) 2024 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#include <behaviors.dtsi>
|
|
#include <dt-bindings/zmk/keys.h>
|
|
#include <dt-bindings/zmk/bt.h>
|
|
#include <dt-bindings/zmk/outputs.h>
|
|
#include <dt-bindings/zmk/rgb.h>
|
|
#include <dt-bindings/zmk/ext_power.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_BRD>, <&rgb_ug RGB_BRI>;
|
|
};
|
|
};
|
|
|
|
keymap {
|
|
compatible = "zmk,keymap";
|
|
|
|
base_layer {
|
|
display-name = "BASE";
|
|
bindings = <
|
|
// ╭─────────┬────────────────┬──────────────────┬────────────┬────────────────╮
|
|
&mo BLE &kp C_PREVIOUS &kp C_PLAY_PAUSE &kp C_NEXT < RGB C_MUTE
|
|
// ╰─────────┴────────────────┴──────────────────┴────────────┴────────────────╯
|
|
>;
|
|
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP>;
|
|
};
|
|
|
|
ble_layer {
|
|
display-name = "BLE";
|
|
bindings = <
|
|
// ╭────────┬──────────────┬────────────┬────────────┬────────────╮
|
|
&trans &out OUT_TOG &bt BT_PRV &bt BT_NXT &bt BT_CLR
|
|
// ╰────────┴──────────────┴────────────┴────────────┴────────────╯
|
|
>;
|
|
};
|
|
|
|
rgb_layer {
|
|
display-name = "RGB";
|
|
bindings = <
|
|
// ╭───────────────────┬─────────────────┬─────────────────┬──────────────────────────────────┬────────╮
|
|
&ext_power EP_TOG &rgb_ug RGB_EFR &rgb_ug RGB_EFF &rgb_ug RGB_COLOR_HSB(307,89,98) &trans
|
|
// ╰───────────────────┴─────────────────┴─────────────────┴──────────────────────────────────┴────────╯
|
|
>;
|
|
sensor-bindings = <&rgb_encoder>;
|
|
};
|
|
};
|
|
}; |