zmk-config/config/cradio.keymap
2023-11-18 10:32:54 +01:00

148 lines
5.1 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
#define ALPH2 6
/ {
combos {
compatible = "zmk,combos";
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;
};
//shk: shift_key {
// compatible = "zmk,behavior-mod-morph";
// label = "SHIFT_KEY";
// #binding-cells = <2>;
// bindings = <&kp>, <&kp>;
// mods = <(MOD_LSFT|MOD_RSFT)>;
//};
};
keymap {
compatible = "zmk,keymap";
alpha1 {
bindings = <
&hm ESC Q &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp Y &hm ESC SQT
&hm LCTRL A &hm LSHIFT R &hm LGUI S &hm LALT T &kp G &hm EQUAL M &hm RALT N &hm RGUI E &hm RSHIFT I &hm RCTRL O
&hl NUM Z &kp X &kp C &kp D &kp V &hm QMARK K &hm COLON H &kp COMMA &kp DOT &hm SLASH SEMI
&hl SYM TAB &hm LSHIFT ENTER &kp BSPC &hl SYS SPACE
>;
};
sym1 {
bindings = <
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
&kp DOLLAR &kp PLUS &kp LPAR &kp RPAR &kp AT &kp PIPE &kp MINUS &kp EQUAL &kp UNDER &kp STAR
&kp EXCL &kp HASH &kp LBRC &kp RBRC &kp GRAVE &kp AMPS &kp LBKT &kp RBKT &kp PERCENT &kp CARET
&trans &trans &kp DEL &trans
>;
};
num1 {
bindings = <
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10
&none &none &none &none &kp COMMA &none &kp C_PLAY_PAUSE &kp C_PREV &kp C_NEXT &kp F11
&none &none &to BT &to GAME &kp DOT &none &kp C_VOL_UP &kp C_VOL_DN &kp NUM_3 &kp F12
&trans &trans &trans &trans
>;
};
sys {
bindings = <
&kp LG(NUM_1) &kp LG(NUM_2) &kp LG(NUM_3) &kp LG(NUM_4) &kp LG(NUM_5) &kp PG_UP &kp LC(V) &kp LC(C) &kp LC(X) &kp DQT
&kp LG(LS(Q)) &kp LG(D) &hm LG(E) LG(W) &kp LG(F) &kp LGUI &kp LEFT &kp DOWN &kp UP &kp RIGHT &none
&kp LG(LS(MINUS)) &kp HOME &kp END &kp LG(MINUS) &kp LG(ENTER) &kp PG_DN &kp HOME &kp END &kp INS &trans
&trans &trans &trans &trans
>;
};
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_NXT &bt BT_PRV &bt BT_SEL 0 &none &none &bt BT_CLR &none &none &none &none
&none &to ALPH &none &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 ALPH2 &to ALPH &none
>;
};
/* alpha2 {
bindings = <
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
&hm LCTRL A &hm LGUI S &hm LALT D &kp F &kp G &hm EQUAL H &kp J &hm RALT K &hm RGUI L &hm RCTRL ESC
&hl NUM Z &kp X &kp C &kp V &kp B &hm QMARK N &hm COLON M &hm MINUS COMMA &hm EXCL DOT &hm UNDER SLASH
&hm LSHIFT ENTER &hm LCTRL TAB &hl SYS BSPC &hl SYM SPACE
>;
};
*/
};
};