keyboards/zofle/config/sofle.keymap
2024-06-26 10:33:54 -05:00

110 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/outputs.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/ext_power.h>
#define TAPPING_TERM 150
#define PERMISSIVE_HOLD
#define IGNORE_MOD_TAP_INTERRUPT
#define LOWER_LAYER_ID 2
#define RAISE_LAYER_ID (LOWER_LAYER_ID + 1)
#define COMBO_LAYER_ID (RAISE_LAYER_ID + 1)
#define L_L LOWER_LAYER_ID
#define L_R RAISE_LAYER_ID
#define L_C COMBO_LAYER_ID
&mt {
#retro-tap;
label = "Mod Tap";
#binding-cells = <2>;
tapping-term-ms = <200>;
flavor = "hold-preferred";
bindings = <&kp>, <&kp>;
};
/ {
behaviors {
ht: hold_tap {
compatible = "zmk,behavior-hold-tap";
label = "Hold Tap";
#binding-cells = <2>;
tapping-term-ms = <200>;
flavor = "balanced";
bindings = <&kp>, <&kp>;
};
};
keymap {
compatible = "zmk,keymap";
default_layer {
bindings = <
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
&mt LCTRL ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &ht RCTRL SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp C_MUTE &kp K_PP &kp N &kp M &kp COMMA &kp DOT &kp FSLH &ht RSHFT RET
&kp LALT &kp LGUI &kp SPACE &mo L_L &kp LSHFT &kp RET &mo L_R &kp SPACE &kp RALT &kp RSHFT
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_DN PG_UP >;
};
gamer_layer {
bindings = <
&kp ESC &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&kp TAB &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&kp LCTRL &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp RIGHT LEFT >;
};
lower_layer {
bindings = <
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12
&kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC
&trans &trans &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE
&trans &kp EQUAL &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &trans &trans &trans &trans &kp LT &kp GT &kp QMARK &trans
&trans &mo L_C &trans &trans &trans &trans &mo L_C &kp RET &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp RIGHT LEFT>;
};
raise_layer {
bindings = <
&kp ESC &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC
&kp GRAV &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DEL
&trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH
&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &kp INS &trans &trans &trans &trans
&trans &trans &kp LALT &mo L_C &trans &trans &trans &trans &mo L_C &trans
>;
sensor-bindings = <&inc_dec_kp UP DOWN &inc_dec_kp PG_UP PG_DN>;
};
combo_layer {
bindings = <
&bootloader &tog 1 &trans &ext_power EP_OFF &bt BT_CLR &out OUT_TOG &trans &trans &ext_power EP_OFF &trans &trans &bootloader
&sys_reset &trans &trans &trans &trans &out OUT_BLE &kp C_PREV &kp C_VOL_DN &kp K_PP &kp C_VOL_UP &kp C_NEXT &sys_reset
&ext_power EP_ON &ext_power EP_ON &trans &trans &trans &out OUT_USB &kp LEFT &kp DOWN &kp UP &kp RIGHT &ext_power EP_ON &ext_power EP_ON
&trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &kp HOME &kp PGDN &kp PGUP &kp END &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
};
};
};