Skip to content

Commit

Permalink
share keymap
Browse files Browse the repository at this point in the history
  • Loading branch information
alinelena committed Oct 23, 2024
1 parent 8096428 commit 7a91020
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 116 deletions.
117 changes: 1 addition & 116 deletions config/boards/shields/mlego_m66_rev4/mlego_m66_rev4.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -3,120 +3,5 @@
*
* SPDX-License-Identifier: MIT
*/

#define HOST_OS 1
#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>
#include "zmk-helpers/helper.h"
#include "romanian.dtsi"
#include "my_keys.dtsi"

#define QW 0
#define LWR 2
#define RSE 1
#define ADJ 3

/ {

conditional_layers {
compatible = "zmk,conditional-layers";
tri_layer {
if-layers = <LWR RSE>;
then-layer = <ADJ>;
};
};

behaviors {
tlwr: tlwr {
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&mo LWR>, <&tog LWR>, <&trans>;
};

trse: trse {
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&mo RSE>, <&tog RSE>, <&trans>;
};
};

keymap {
compatible = "zmk,keymap";

/*
┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐
│ ⎋ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ ⌫ │ 🕨 │
├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┘
│ ↹ │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │
├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤
│ # │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │ ⏎ │
├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤
│ ⇧( │ \ │ z │ x │ c │ v │ b │ n │ m │ , │ . │ ↑ │ / │
├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤
│ ⎈ │  │ ⇓ │ ⎇ │ ⇑ │ │ │ │ ⎇ │ ⇧) │ ← │ ↓ │ → │
└────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┘
*/
qw_layer {
bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp BSPC &kp K_MUTE
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT
&kp NON_US_HASH &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp APOS &kp RET
&kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp UP &kp FSLH
&kp LCTRL &kp LGUI &tlwr &kp LALT &trse &kp SPACE &kp SPACE &kp SPACE &kp RALT &kp RSHFT &kp LEFT &kp DOWN &kp RIGHT
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
raise_layer {
bindings = <
&kp GRAVE &kp K_MUTE &kp K_VOL_UP &kp K_VOL_DN &kp K_PREV &kp K_PP &kp K_NEXT &kp LG(P) &kp K_SLEEP &kp K_COFFEE &kp PSCRN &kp DEL &kp EQUAL &trans
&trans &my_qQ &my_wW &my_eE &my_rR &my_tT &my_yY &my_uU &my_iI &my_oO &my_pP &my_bo &my_bc
&kp CAPS &my_aA &my_sS &my_dD &my_fF &my_gG &my_hH &my_jJ &my_kK &my_lL &my_lL1 &my_kK1 &trans
&trans &my_ss2 &my_zZ &my_xX &my_cC &my_vV &my_bB &my_nN &my_mM &my_cC1 &my_pP1 &trans &my_qQ1
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
lower_layer {
bindings = <
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans
&trans &ro_ai &kp F13 &kp F14 &kp F15 &ro_t &kp F16 &kp F17 &ro_i &kp F18 &kp F19 &kp F20 &kp F21
&trans &ro_a &ro_s &kp F22 &kp F23 &kp F24 &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &my_xXr &my_cCr &my_vVr &my_bBr &my_nNr &trans &trans &trans &trans &trans
&trans &studio_unlock &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};

/*
adj layer
* ┌───┬────┬───┬───┬───┬───┬────┬───┬───┬───┬───┬────┬────┐
* │TOG│bt0 │bt1│bt2│bt3│bt4│ │ │ │ │ │ SPI│ SPD│
* ├───┼────┼───┼───┼───┼───┼────┼───┼───┼───┼───┼────┼────┤
* │HUI│HUD │ │ │rst│ │ │ │ │ │ │ EFF│ EFR│
* ├───┼────┼───┼───┼───┼───┼────┼───┼───┼───┼───┼────┼────┤
* │SAI│SAD │ │ │ │ │ │ │ │ │ │ │ │
* ├───┼────┼───┼───┼───┼───┼────┼───┼───┼───┼───┼────┼────┤
* │BRI│BRD │ │ │ │ │boot│ │ │ │ │bt │ │
* ├───┼────┼───┼───┼───┼───┼────┼───┼───┼───┼───┼────┼────┤
* │ ON│OFF │ │ │ │ │ │ │ │USB│btN│btC │ btP│
* └───┴────┴───┴───┴───┴───┴────┴───┴───┴───┴───┴────┴────┘
*/

adjust_layer {
bindings = <
&trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &sys_reset &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 &bootloader &trans &trans &trans &out OUT_USB &out OUT_BLE &out OUT_TOG
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_NXT &bt BT_CLR &bt BT_PRV
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};

};
};
#include "mlego_m66_rev4_keymap.dtsi"
122 changes: 122 additions & 0 deletions config/boards/shields/mlego_m66_rev4/mlego_m66_rev4_keymap.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
/*
* Copyright (c) 2022-2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#define HOST_OS 1
#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>
#include "zmk-helpers/helper.h"
#include "romanian.dtsi"
#include "my_keys.dtsi"

#define QW 0
#define RSE 1
#define LWR 2
#define ADJ 3

/ {

conditional_layers {
compatible = "zmk,conditional-layers";
tri_layer {
if-layers = <LWR RSE>;
then-layer = <ADJ>;
};
};

behaviors {
tlwr: tlwr {
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&mo LWR>, <&tog LWR>, <&trans>;
};

trse: trse {
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&mo RSE>, <&tog RSE>, <&trans>;
};
};

keymap {
compatible = "zmk,keymap";

/*
┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐
│ ⎋ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ ⌫ │ 🕨 │
├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┘
│ ↹ │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │
├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤
│ # │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │ ⏎ │
├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤
│ ⇧( │ \ │ z │ x │ c │ v │ b │ n │ m │ , │ . │ ↑ │ / │
├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤
│ ⎈ │  │ ⇓ │ ⎇ │ ⇑ │ │ │ │ ⎇ │ ⇧) │ ← │ ↓ │ → │
└────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┘
*/
qw_layer {
bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp BSPC &kp K_MUTE
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT
&kp NON_US_HASH &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp APOS &kp RET
&kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp UP &kp FSLH
&kp LCTRL &kp LGUI &tlwr &kp LALT &trse &kp SPACE &kp SPACE &kp SPACE &kp RALT &kp RSHFT &kp LEFT &kp DOWN &kp RIGHT
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
raise_layer {
bindings = <
&kp GRAVE &kp K_MUTE &kp K_VOL_UP &kp K_VOL_DN &kp K_PREV &kp K_PP &kp K_NEXT &kp LG(P) &kp K_SLEEP &kp K_COFFEE &kp PSCRN &kp DEL &kp EQUAL &trans
&trans &my_qQ &my_wW &my_eE &my_rR &my_tT &my_yY &my_uU &my_iI &my_oO &my_pP &my_bo &my_bc
&kp CAPS &my_aA &my_sS &my_dD &my_fF &my_gG &my_hH &my_jJ &my_kK &my_lL &my_lL1 &my_kK1 &trans
&trans &my_ss2 &my_zZ &my_xX &my_cC &my_vV &my_bB &my_nN &my_mM &my_cC1 &my_pP1 &trans &my_qQ1
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
lower_layer {
bindings = <
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans
&trans &ro_ai &kp F13 &kp F14 &kp F15 &ro_t &kp F16 &kp F17 &ro_i &kp F18 &kp F19 &kp F20 &kp F21
&trans &ro_a &ro_s &kp F22 &kp F23 &kp F24 &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &my_xXr &my_cCr &my_vVr &my_bBr &my_nNr &trans &trans &trans &trans &trans
&trans &studio_unlock &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};

/*
adj layer
* ┌───┬────┬───┬───┬───┬───┬────┬───┬───┬───┬───┬────┬────┐
* │TOG│bt0 │bt1│bt2│bt3│bt4│ │ │ │ │ │ SPI│ SPD│
* ├───┼────┼───┼───┼───┼───┼────┼───┼───┼───┼───┼────┼────┤
* │HUI│HUD │ │ │rst│ │ │ │ │ │ │ EFF│ EFR│
* ├───┼────┼───┼───┼───┼───┼────┼───┼───┼───┼───┼────┼────┤
* │SAI│SAD │ │ │ │ │ │ │ │ │ │ │ │
* ├───┼────┼───┼───┼───┼───┼────┼───┼───┼───┼───┼────┼────┤
* │BRI│BRD │ │ │ │ │boot│ │ │ │ │bt │ │
* ├───┼────┼───┼───┼───┼───┼────┼───┼───┼───┼───┼────┼────┤
* │ ON│OFF │ │ │ │ │ │ │ │USB│btN│btC │ btP│
* └───┴────┴───┴───┴───┴───┴────┴───┴───┴───┴───┴────┴────┘
*/

adjust_layer {
bindings = <
&trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &sys_reset &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 &bootloader &trans &trans &trans &out OUT_USB &out OUT_BLE &out OUT_TOG
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_NXT &bt BT_CLR &bt BT_PRV
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};

};
};

0 comments on commit 7a91020

Please sign in to comment.