mirror of
https://github.com/Kabbone/zmk-config.git
synced 2025-01-06 09:14:24 +01:00
174 lines
5.4 KiB
Plaintext
174 lines
5.4 KiB
Plaintext
/*
|
|
* Copyright (c) 2020 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#include <behaviors.dtsi>
|
|
#include <dt-bindings/zmk/keys.h>
|
|
#include <dt-bindings/zmk/bt.h>
|
|
|
|
|
|
&mt {
|
|
flavor = "tap-preferred";
|
|
tapping_term_ms = <200>;
|
|
};
|
|
&sk {
|
|
quick-release;
|
|
release-after-ms = <2000>;
|
|
};
|
|
|
|
/* Layers */
|
|
#define ALPH 0
|
|
#define SYM 1
|
|
#define NUM 2
|
|
#define SYS 3
|
|
#define BT 4
|
|
#define GAME 5
|
|
/ {
|
|
|
|
combos {
|
|
compatible = "zmk,combos";
|
|
|
|
combo_game {
|
|
timeout-ms = <30>;
|
|
key-positions = <0 1 2 3>;
|
|
bindings = <&to GAME>;
|
|
};
|
|
|
|
combo_sys {
|
|
timeout-ms = <30>;
|
|
key-positions = <6 7 8>;
|
|
bindings = <&to SYS>;
|
|
};
|
|
|
|
combo_num {
|
|
timeout-ms = <10>;
|
|
key-positions = <15 16>;
|
|
bindings = <&to NUM>;
|
|
};
|
|
|
|
combo_bt {
|
|
timeout-ms = <10>;
|
|
key-positions = <13 14>;
|
|
bindings = <&to BT>;
|
|
layers = <SYS>;
|
|
};
|
|
|
|
combo_term {
|
|
timeout-ms = <50>;
|
|
key-positions = <30 33>;
|
|
bindings = <&kp LG(ENTER)>;
|
|
};
|
|
|
|
combo_lenter {
|
|
timeout-ms = <50>;
|
|
key-positions = <30 19>;
|
|
bindings = <&kp ENTER>;
|
|
};
|
|
|
|
combo_renter {
|
|
timeout-ms = <50>;
|
|
key-positions = <33 19>;
|
|
bindings = <&kp ENTER>;
|
|
};
|
|
|
|
combo_layer0 {
|
|
timeout-ms = <50>;
|
|
key-positions = <31 32>;
|
|
bindings = <&to 0>;
|
|
};
|
|
};
|
|
|
|
behaviors {
|
|
hm: homerow_mods {
|
|
compatible = "zmk,behavior-hold-tap";
|
|
label = "HOMEROW_MODS";
|
|
#binding-cells = <2>;
|
|
tapping-term-ms = <200>;
|
|
quick_tap_ms = <0>;
|
|
flavor = "tap-preferred";
|
|
bindings = <&kp>, <&kp>;
|
|
};
|
|
hl: homerow_layers {
|
|
compatible = "zmk,behavior-hold-tap";
|
|
label = "HOMEROW_LAYERS";
|
|
#binding-cells = <2>;
|
|
tapping-term-ms = <220>;
|
|
quick_tap_ms = <0>;
|
|
flavor = "tap-preferred";
|
|
bindings = <&sl>, <&kp>;
|
|
};
|
|
sr: shift_layer {
|
|
compatible = "zmk,behavior-hold-tap";
|
|
label = "SHIFT_LAYER";
|
|
#binding-cells = <2>;
|
|
tapping-term-ms = <300>;
|
|
quick_tap_ms = <0>;
|
|
flavor = "tap-preferred";
|
|
bindings = <&kp>, <&to>;
|
|
retro-tap;
|
|
};
|
|
|
|
};
|
|
|
|
keymap {
|
|
compatible = "zmk,keymap";
|
|
|
|
alpha1 {
|
|
bindings = <
|
|
&hm ESC Q &kp W &kp F &kp P &kp G &kp J &kp L &kp U &kp Y &kp BSPC
|
|
&hl NUM A &kp R &kp S &kp T &kp D &kp H &kp N &kp E &kp I &hm ENTER O
|
|
&hl SYS Z &hl SYM X &kp C &kp V &kp B &kp K &hm COLON M &hm MINUS COMMA &hm EXCL DOT &hm UNDER SLASH
|
|
&hm LCTRL SPACE &sk LSHIFT &to SYM &hl SYM SPACE
|
|
>;
|
|
};
|
|
|
|
sym1 {
|
|
bindings = <
|
|
&kp ESC &kp AT &kp HASH &kp DOLLAR &kp PERCENT &kp CARET &kp AMPS &kp STAR &hm COLON SEMI &trans
|
|
&kp TAB &hm PLUS EQUAL &kp QMARK &kp SLASH &kp SQT &hm HOME BSLH &kp LBRC &kp RBRC &hm END PIPE &kp ENTER
|
|
&hl SYS TILDE &kp LCTRL &kp LT &kp GT &kp DQT &kp LBKT &kp LPAR &kp RPAR &kp RBKT &to NUM
|
|
&kp LSHIFT &to ALPH &to SYS &kp RGUI
|
|
>;
|
|
};
|
|
|
|
num1 {
|
|
bindings = <
|
|
&kp ESC &kp C_PLAY_PAUSE &kp C_PREV &kp C_NEXT &kp UNDER &kp MINUS &kp NUM_7 &kp NUM_8 &kp NUM_9 &trans
|
|
&kp TAB &kp C_VOL_UP &kp C_VOL_DN &kp STAR &kp SLASH &kp PLUS &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp ENTER
|
|
&kp LCTRL &none &none &none &kp DOT &kp EQUAL &kp NUM_1 &kp NUM_2 &kp NUM_3 &to SYS
|
|
&trans &to ALPH &to SYM &kp NUM_0
|
|
>;
|
|
};
|
|
|
|
sys {
|
|
bindings = <
|
|
&kp ESC &kp LG(NUM_1) &kp LG(NUM_2) &kp LG(NUM_3) &kp LG(NUM_4) &kp LG(NUM_5) &hm LC(V) LC(C) &kp RC(TAB) &kp Q &hm DEL BSPC
|
|
&hm LGUI TAB &kp LG(Q) &hm LG(E) LG(W) &kp LG(F) &kp LGUI &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp ENTER
|
|
&kp LCTRL &hm HOME DEL &kp END &kp LG(D) &kp LG(ENTER) &kp DEL &kp PG_UP &kp PG_DN &none &to NUM
|
|
&trans &to ALPH &to SYM &kp RALT
|
|
>;
|
|
};
|
|
|
|
bluetooth {
|
|
bindings = <
|
|
&bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &none &none &none &none
|
|
&none &none &none &none &none &none &none &none &none &none
|
|
&bt BT_CLR &bt BT_NXT &bt BT_PRV &bt BT_SEL 0 &none &none &none &none &none &none
|
|
&none &to ALPH &to SYM &none
|
|
>;
|
|
};
|
|
|
|
gaming {
|
|
bindings = <
|
|
&kp Q &kp W &kp E &kp R &kp NUM_1 &none &none &none &none &none
|
|
&kp A &kp S &kp D &kp F &kp NUM_2 &none &none &none &none &none
|
|
&kp Z &kp X &kp C &kp V &kp NUM_3 &none &none &none &none &none
|
|
&none &to ALPH &to SYM &none
|
|
>;
|
|
};
|
|
|
|
};
|
|
};
|