2020-12-04 03:08:20 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020 The ZMK Contributors
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <behaviors.dtsi>
|
|
|
|
#include <dt-bindings/zmk/bt.h>
|
|
|
|
#include <dt-bindings/zmk/outputs.h>
|
|
|
|
#include <dt-bindings/zmk/rgb.h>
|
|
|
|
#include <dt-bindings/zmk/keys.h>
|
2020-12-04 22:43:05 +00:00
|
|
|
#include <dt-bindings/zmk/ext_power.h>
|
2021-07-17 00:28:26 +00:00
|
|
|
#include <dt-bindings/zmk/mouse.h>
|
2020-12-04 03:08:20 +00:00
|
|
|
|
2020-12-05 23:18:43 +00:00
|
|
|
&encoder_1_top_row {
|
|
|
|
status = "disabled";
|
|
|
|
};
|
|
|
|
|
2020-12-04 03:08:20 +00:00
|
|
|
&encoder_4 {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&pro_micro_i2c {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
/ {
|
|
|
|
sensors {
|
|
|
|
compatible = "zmk,keymap-sensors";
|
|
|
|
sensors = <&encoder_4>;
|
|
|
|
};
|
|
|
|
|
|
|
|
keymap {
|
|
|
|
compatible = "zmk,keymap";
|
2021-01-05 17:50:37 +00:00
|
|
|
navigation_layer {
|
2021-01-08 23:20:25 +00:00
|
|
|
// &rgb_ug RGB_COLOR_HSB(215, 100, 50)
|
2021-01-07 12:11:43 +00:00
|
|
|
label = "Nav";
|
2021-01-10 02:03:30 +00:00
|
|
|
// activate-behaviors = <
|
|
|
|
// &rgb_ug RGB_COLOR_HSB(215, 100, 50)
|
|
|
|
// >;
|
|
|
|
|
|
|
|
// deactivate-behaviors = <
|
|
|
|
// &rgb_ug RGB_COLOR_HSB(0, 100, 50)
|
|
|
|
// >;
|
|
|
|
|
2021-01-05 17:50:37 +00:00
|
|
|
bindings = <
|
2021-01-08 23:20:25 +00:00
|
|
|
&to 1 &to 2 &to 3
|
2021-02-28 01:46:40 +00:00
|
|
|
&kp PG_UP &kp UP &kp PG_DN &kp LG(E)
|
|
|
|
&kp LEFT &kp DOWN &kp RIGHT &kp SPACE
|
2021-01-10 02:03:30 +00:00
|
|
|
&kp HOME &kp BSPC &kp END &kp ENTER
|
2021-02-28 01:53:44 +00:00
|
|
|
&kp C_MUTE &kp ESC &none &kp LA(F4)
|
2021-01-05 17:50:37 +00:00
|
|
|
>;
|
|
|
|
|
|
|
|
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>;
|
|
|
|
};
|
2021-01-08 23:20:25 +00:00
|
|
|
mouse_layer {
|
|
|
|
// &rgb_ug RGB_COLOR_HSB(275, 100, 50)
|
|
|
|
label = "Mouse";
|
|
|
|
bindings = <
|
2021-07-17 00:28:26 +00:00
|
|
|
&to 0 &to 2 &to 3
|
|
|
|
&mkp MB1 &mmv MOVE_UP &mkp MB2 &mwh SCROLL_UP
|
|
|
|
&mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &mwh SCROLL_DOWN
|
|
|
|
&kp ESCAPE &kp LC(LA(TAB)) &kp LG(DOWN_ARROW) &none
|
|
|
|
&kp C_MUTE &kp C_VOLUME_DOWN &kp C_VOLUME_UP &none
|
2021-01-08 23:20:25 +00:00
|
|
|
>;
|
|
|
|
|
|
|
|
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>;
|
|
|
|
};
|
2020-12-04 22:43:05 +00:00
|
|
|
num_pad_layer {
|
2021-01-08 23:20:25 +00:00
|
|
|
// &rgb_ug RGB_COLOR_HSB(35, 100, 50)
|
2021-01-07 12:11:43 +00:00
|
|
|
label = "Num Pad";
|
2020-12-04 22:43:05 +00:00
|
|
|
bindings = <
|
2021-01-05 17:50:37 +00:00
|
|
|
&to 0 &kp KP_NUMLOCK &kp KP_SLASH
|
2020-12-04 03:08:20 +00:00
|
|
|
&kp KP_NUMBER_7 &kp KP_NUMBER_8 &kp KP_NUMBER_9 &kp KP_ASTERISK
|
|
|
|
&kp KP_NUMBER_4 &kp KP_NUMBER_5 &kp KP_NUMBER_6 &kp KP_MINUS
|
|
|
|
&kp KP_NUMBER_1 &kp KP_NUMBER_2 &kp KP_NUMBER_3 &kp KP_PLUS
|
|
|
|
&kp C_MUTE &kp KP_NUMBER_0 &kp KP_DOT &kp KP_ENTER
|
|
|
|
>;
|
|
|
|
|
|
|
|
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>;
|
|
|
|
};
|
|
|
|
|
2021-01-05 17:50:37 +00:00
|
|
|
zmk_layer {
|
2021-01-08 23:20:25 +00:00
|
|
|
// &rgb_ug RGB_COLOR_HSB(0, 100, 50)
|
2021-01-07 12:11:43 +00:00
|
|
|
label = "ZMK";
|
2020-12-04 03:08:20 +00:00
|
|
|
bindings = <
|
2021-01-05 17:50:37 +00:00
|
|
|
&to 0 &reset &bootloader
|
2021-01-23 18:56:10 +00:00
|
|
|
&rgb_ug RGB_HUD &rgb_ug RGB_HUI &rgb_ug RGB_BRD &rgb_ug RGB_BRI
|
|
|
|
&none &none &none &none
|
|
|
|
&ext_power EXT_POWER_TOGGLE_CMD &rgb_ug RGB_TOG &out OUT_TOG &none
|
|
|
|
&kp C_MUTE &bt BT_PRV &bt BT_NXT &bt BT_CLR
|
2020-12-04 03:08:20 +00:00
|
|
|
>;
|
|
|
|
|
|
|
|
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|