-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
123 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
122 changes: 122 additions & 0 deletions
122
config/boards/shields/mlego_m66_rev4/mlego_m66_rev4_keymap.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>; | ||
}; | ||
|
||
}; | ||
}; |