mirror of
https://github.com/ClaytonWWilson/miryoku_zmk.git
synced 2025-12-13 17:58:47 +00:00
125 lines
3.0 KiB
Plaintext
125 lines
3.0 KiB
Plaintext
// Copyright 2021 Manna Harbour
|
|
// https://github.com/manna-harbour/miryoku
|
|
|
|
#include <behaviors.dtsi>
|
|
#include <dt-bindings/zmk/keys.h>
|
|
#include <dt-bindings/zmk/bt.h>
|
|
#include <dt-bindings/zmk/rgb.h>
|
|
#include <dt-bindings/zmk/outputs.h>
|
|
|
|
#include "miryoku.h"
|
|
|
|
/ {
|
|
behaviors {
|
|
hm: homerow_mods {
|
|
compatible = "zmk,behavior-hold-tap";
|
|
label = "HOMEROW_MODS";
|
|
#binding-cells = <2>;
|
|
tapping_term_ms = <200>;
|
|
flavor = "tap-preferred";
|
|
bindings = <&kp>, <&kp>;
|
|
};
|
|
};
|
|
};
|
|
|
|
/ {
|
|
keymap {
|
|
compatible = "zmk,keymap";
|
|
BASE_layer {
|
|
label = "Base";
|
|
bindings = < U_MACRO_VA_ARGS(MIRYOKU_MAPPING, MIRYOKU_LAYER_BASE) >;
|
|
};
|
|
BUTTON_layer {
|
|
label = "Button";
|
|
bindings = < U_MACRO_VA_ARGS(MIRYOKU_MAPPING, MIRYOKU_LAYER_BUTTON) >;
|
|
};
|
|
NAV_layer {
|
|
label = "Nav";
|
|
bindings = < U_MACRO_VA_ARGS(MIRYOKU_MAPPING, MIRYOKU_LAYER_NAV) >;
|
|
};
|
|
MOUSE_layer {
|
|
label = "Mouse";
|
|
bindings = < U_MACRO_VA_ARGS(MIRYOKU_MAPPING, MIRYOKU_LAYER_MOUSE) >;
|
|
};
|
|
MEDIA_layer {
|
|
label = "Media";
|
|
bindings = < U_MACRO_VA_ARGS(MIRYOKU_MAPPING, MIRYOKU_LAYER_MEDIA) >;
|
|
};
|
|
NUM_layer {
|
|
label = "Num";
|
|
bindings = < U_MACRO_VA_ARGS(MIRYOKU_MAPPING, MIRYOKU_LAYER_NUM) >;
|
|
};
|
|
SYM_layer {
|
|
label = "Sym";
|
|
bindings = < U_MACRO_VA_ARGS(MIRYOKU_MAPPING, MIRYOKU_LAYER_SYM) >;
|
|
};
|
|
FUN_layer {
|
|
label = "Fun";
|
|
bindings = < U_MACRO_VA_ARGS(MIRYOKU_MAPPING, MIRYOKU_LAYER_FUN) >;
|
|
};
|
|
};
|
|
};
|
|
|
|
#if defined (MIRYOKU_COMBO_TPS_ENABLE) && defined (MIRYOKU_COMBO_TPSL) && defined (MIRYOKU_COMBO_TPSR)
|
|
/ {
|
|
combos {
|
|
compatible = "zmk,combos";
|
|
combo_tpsl_BASE {
|
|
timeout-ms = <200>;
|
|
key-positions = <MIRYOKU_COMBO_TPSL>;
|
|
bindings = << MEDIA ESC>;
|
|
layers = <BASE>;
|
|
};
|
|
combo_tpsr_BASE {
|
|
timeout-ms = <200>;
|
|
key-positions = <MIRYOKU_COMBO_TPSR>;
|
|
bindings = << FUN DEL>;
|
|
layers = <BASE>;
|
|
};
|
|
combo_tpsr_BUTTON {
|
|
timeout-ms = <200>;
|
|
key-positions = <MIRYOKU_COMBO_TPSR>;
|
|
bindings = <U_NU>;
|
|
layers = <BUTTON>;
|
|
};
|
|
combo_tpsr_NAV {
|
|
timeout-ms = <200>;
|
|
key-positions = <MIRYOKU_COMBO_TPSR>;
|
|
bindings = <&kp DEL>;
|
|
layers = <NAV>;
|
|
};
|
|
combo_tpsr_MOUSE {
|
|
timeout-ms = <200>;
|
|
key-positions = <MIRYOKU_COMBO_TPSR>;
|
|
bindings = <U_NU>;
|
|
layers = <MOUSE>;
|
|
};
|
|
combo_tpsr_MEDIA {
|
|
timeout-ms = <200>;
|
|
key-positions = <MIRYOKU_COMBO_TPSR>;
|
|
bindings = <&kp K_MUTE>;
|
|
layers = <MEDIA>;
|
|
};
|
|
combo_tpsl_NUM {
|
|
timeout-ms = <200>;
|
|
key-positions = <MIRYOKU_COMBO_TPSL>;
|
|
bindings = <&kp DOT>;
|
|
layers = <NUM>;
|
|
};
|
|
combo_tpsl_SYM {
|
|
timeout-ms = <200>;
|
|
key-positions = <MIRYOKU_COMBO_TPSL>;
|
|
bindings = <&kp LPAR>;
|
|
layers = <SYM>;
|
|
};
|
|
combo_tpsl_FUN {
|
|
timeout-ms = <200>;
|
|
key-positions = <MIRYOKU_COMBO_TPSL>;
|
|
bindings = <&kp K_APP>;
|
|
layers = <FUN>;
|
|
};
|
|
};
|
|
};
|
|
#endif
|
|
|