Skip to content

Instantly share code, notes, and snippets.

@71
Created April 2, 2023 22:20
Show Gist options
  • Save 71/a63ea89954530529d5f45c72bac99588 to your computer and use it in GitHub Desktop.
Save 71/a63ea89954530529d5f45c72bac99588 to your computer and use it in GitHub Desktop.
/*
* Copyright (c) 2020 The ZMK Contributors
* Copyright (c) 2022 Innaworks Development Limited, trading as MoErgo
*
* SPDX-License-Identifier: MIT
*/
/* THIS FILE WAS GENERATED BY GLOVE80 LAYOUT EDITOR
*
* This file was generated automatically. You may or may not want to
* edit it directly.
*/
#include <behaviors.dtsi>
/* Include all behaviour includes needed by system behaviors/macros */
#include <dt-bindings/zmk/outputs.h>
/* Include behaviour includes needed by key binds - automatically generated */
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/rgb.h>
#include <dt-bindings/zmk/outputs.h>
/ {
/* Glove80 system behavior & macros */
behaviors {
// For the "layer" key, it'd nice to be able to use it as either a shift or a toggle.
// Configure it as a tap dance, so the first tap (or hold) is a &mo and the second tap is a &to
lower: tap_dance_0 {
compatible = "zmk,behavior-tap-dance";
label = "LAYER_TAP_DANCE";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&mo 1>, <&to 1>;
};
};
macros {
rgb_ug_status_macro: rgb_ug_status_macro_0 {
label = "RGB_UG_STATUS";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
= <&rgb_ug RGB_STATUS>;
};
};
macros {
bt_0: bt_profile_macro_0 {
label = "BT_0";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
= <&out OUT_BLE>,
<&bt BT_SEL 0>;
};
};
macros {
bt_1: bt_profile_macro_1 {
label = "BT_1";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
= <&out OUT_BLE>,
<&bt BT_SEL 1>;
};
};
macros {
bt_2: bt_profile_macro_2 {
label = "BT_2";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
= <&out OUT_BLE>,
<&bt BT_SEL 2>;
};
};
macros {
bt_3: bt_profile_macro_3 {
label = "BT_3";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
= <&out OUT_BLE>,
<&bt BT_SEL 3>;
};
};
magic: magic_hold_tap {
compatible = "zmk,behavior-hold-tap";
label = "MAGIC_HOLD_TAP";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <200>;
bindings = <&mo>, <&rgb_ug_status_macro>;
};
/* Custom Defined Behaviors */
behaviors {
twominus: two_minus {
compatible = "zmk,behavior-mod-morph";
label = "TWO_MINUS";
#binding-cells = <0>;
bindings = <&kp N2>, <&kp MINUS>;
mods = <(MOD_LSFT|MOD_RSFT)>;
};
threeunder: three_underscore {
compatible = "zmk,behavior-mod-morph";
label = "THREE_UNDERSCORE";
#binding-cells = <0>;
bindings = <&kp N3>, <&kp UNDERSCORE>;
mods = <(MOD_LSFT|MOD_RSFT)>;
};
fourslash: four_slash {
compatible = "zmk,behavior-mod-morph";
label = "FOUR_SLASH";
#binding-cells = <0>;
bindings = <&kp N4>, <&kp FSLH>;
mods = <(MOD_LSFT|MOD_RSFT)>;
};
fivepipe: five_pipe {
compatible = "zmk,behavior-mod-morph";
label = "FIVE_PIPE";
#binding-cells = <0>;
bindings = <&kp N5>, <&kp PIPE>;
mods = <(MOD_LSFT|MOD_RSFT)>;
};
eighteq: eight_equal {
compatible = "zmk,behavior-mod-morph";
label = "EIGHT_EQUAL";
#binding-cells = <0>;
bindings = <&kp N8>, <&kp EQUAL>;
mods = <(MOD_LSFT|MOD_RSFT)>;
};
nineq: nine_question {
compatible = "zmk,behavior-mod-morph";
label = "NINE_QUESTION";
#binding-cells = <0>;
bindings = <&kp N9>, <&kp QUESTION>;
mods = <(MOD_LSFT|MOD_RSFT)>;
};
zerohash: zero_hash {
compatible = "zmk,behavior-mod-morph";
label = "ZERO_HASH";
#binding-cells = <0>;
bindings = <&kp N0>, <&kp HASH>;
mods = <(MOD_LSFT|MOD_RSFT)>;
};
tildepercent: tilde_percent {
compatible = "zmk,behavior-mod-morph";
label = "TILDE_PERCENT";
#binding-cells = <0>;
bindings = <&kp GRAVE>, <&kp PERCENT>;
mods = <(MOD_LSFT|MOD_RSFT)>;
keep-mods = <(MOD_LSFT|MOD_RSFT)>;
};
};
/* Automatically generated keymap */
keymap {
compatible = "zmk,keymap";
layer_Base {
bindings = <
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10
&kp ESC &kp N1 &twominus &threeunder &fourslash &fivepipe &kp N6 &kp N7 &eighteq &nineq &zerohash &kp F11
&kp TAB &kp X &kp Y &kp D &kp COMMA &kp DOT &kp Z &kp Q &kp M &kp L &kp U &kp F12
&tildepercent &kp A &kp T &kp H &kp E &kp B &kp F &kp S &kp N &kp O &kp I &none
&kp GRAVE &kp P &kp V &kp G &kp W &kp K &kp LCTRL &kp LALT &kp LCTRL &kp K_APP &kp DEL &kp RET &kp J &kp R &kp C &kp SEMI &kp SQT &none
&magic 2 0 &kp RALT &none &none &none &lower &kp LSHFT &kp LGUI &none &kp BSPC &kp SPACE &none &none &none &none &to 3
>;
};
layer_Lower {
bindings = <
&none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &kp LPAR &kp RPAR &kp DLLR &kp AT &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_NEXT &kp C_PP
&none &none &none &kp LBKT &kp RBKT &kp STAR &kp PLUS &kp LEFT &kp DOWN &kp UP &kp RIGHT &none
&none &kp PSCRN &none &kp LBRC &kp RBRC &none &trans &trans &none &trans &trans &trans &none &none &none &none &none &none
&magic 2 0 &none &none &none &none &trans &trans &trans &trans &kp DEL &kp RET &none &none &none &none &none
>;
};
layer_Magic {
bindings = <
&bt BT_CLR &none &none &none &none &none &none &none &none &bt BT_CLR_ALL
&none &none &none &none &none &none &none &none &none &none &none &none
&none &rgb_ug RGB_SPI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_BRI &rgb_ug RGB_TOG &none &none &none &none &none &none
&bootloader &rgb_ug RGB_SPD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_BRD &rgb_ug RGB_EFF &none &none &none &none &none &bootloader
&reset &none &none &none &none &none &bt_2 &bt_3 &none &none &none &none &none &none &none &none &none &reset
&none &none &none &none &none &bt_0 &bt_1 &out OUT_USB &none &none &none &none &none &none &none &none
>;
};
layer_Qwerty {
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS
&trans &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH
&trans &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&trans &kp Z &kp X &kp C &kp V &kp B &trans &trans &trans &trans &trans &trans &kp N &kp M &kp COMMA &kp DOT &kp FSLH &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &to 0
>;
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment