zmk/config/urchin.keymap
Anish Lakhwara d80b12e3af try again??
2024-09-22 21:17:01 -07:00

121 lines
3.9 KiB
Plaintext

/*
* Copyright (c) 2020 duckyb
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/outputs.h>
// Layer definitions
#define BASE 0
#define SYM 1
#define NUM 2
#define NAV 3
#define SYM2 3
// -----------------
&sk {
// don't release mods on other mods presses
ignore-modifiers;
};
/ {
behaviors {
// Enables holding the first mod-tap key
// by performing a tap-release-hold sequence.
// To use it: "&qt KEYCODE1 KEYCODE2"
qt: quick_tap {
compatible = "zmk,behavior-hold-tap";
label = "QUICK_TAP";
#binding-cells = <2>;
flavor = "hold-preferred";
tapping-term-ms = <200>;
quick-tap-ms = <200>;
bindings = <&kp>, <&kp>;
};
};
macros {
// sometimes my device thinks a modifier is being held down
// pressing all modifiers fixes it.
unstick: unstick {
label = "ZM_unstick";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&kp LSHIFT &kp RSHIFT &kp LCTRL &kp RCTRL &kp LALT &kp RALT &kp LGUI &kp RGUI>;
};
};
combos {
compatible = "zmk,combos";
// both right thumb keys
combo_accent {
timeout-ms = <200>;
key-positions = <32 33>;
bindings = <&mo ACCENT>;
};
// internal-left & external-right thumb keys
combo_sym2 {
timeout-ms = <200>;
key-positions = <31 33>;
bindings = <&mo SYM2>;
};
// both left thumb keys
combo_settings {
timeout-ms = <200>;
key-positions = <30 31>;
bindings = <&mo SETTINGS>;
};
// left index & middle fingers (home-row)
// hold control & space for Adobe workflow
combo_ctrl_space {
timeout-ms = <200>;
key-positions = <12 13>;
bindings = <&kp LC(SPACE)>;
layers = <BASE>;
};
};
keymap {
compatible = "zmk,keymap";
default_layer {
bindings = <
&kp SQT &kp CMMA &kp DOT &kp P &kp Y &kp F &kp G &kp C &kp R &kp L &kp A &kp O &lt FUN E &lt NAV U &kp I &kp D &lt SYM H &lt NUM T &kp N &kp S
&kp SCLN &kp Q &kp J &kp K &kp X &kp B &kp M &kp W &kp V &kp Z &mt LALT TAB &mt LGUI SPC &mt LSHIFT RET &mt LCTRL BSPC
>;
};
nav_layer {
bindings = <
&bt BT_CLR &trans &trans &bootloader &sys_reset &trans &kp LBRC &kp RBRC &kp LPAR &kp RPAR
&bt BT_SEL 0 &trans &trans &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans
&bt BT_SEL 1 &trans &trans &trans &trans &trans &kp LBKT &kp RBKT &IT_LESS &IT_GREAT
&trans &trans &trans &kp BSPC
>;
};
num_layer {
bindings = <
&trans &kp F7 &kp F8 &kp F9 &trans &trans &trans &trans &trans &trans
&kp DQT &kp F4 &kp F5 &kp F6 &kp EQUAL &trans &trans &trans &trans &trans
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp BSLH &trans &trans &trans &trans &trans
&trans &trans &trans &trans
>;
};
sym_layer {
label = "Sym.";
bindings = <
&kp LS(Q) &kp LS(Z) &kp STAR &kp AMPS &trans &sys_reset &bootloader &trans &trans &trans
&kp DQT &kp CARET &kp PRCNT &kp DLLR &kp KP_PLUS &trans &trans &trans &trans &trans
&kp TILDE &kp HASH &kp AT &kp EXCL &kp PIPE &trans &trans &trans &trans &trans
&kp LPAR &kp RPAR &trans &trans
>;
};
};
};