123 lines
5.7 KiB
Text
123 lines
5.7 KiB
Text
/*
|
|
* Copyright (c) 2020 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
/* THIS FILE WAS GENERATED!
|
|
*
|
|
* This file was generated automatically. You may or may not want to
|
|
* edit it directly
|
|
*/
|
|
|
|
#include <behaviors.dtsi>
|
|
#include <dt-bindings/zmk/keys.h>
|
|
#include <dt-bindings/zmk/bt.h>
|
|
#include <dt-bindings/zmk/rgb.h>
|
|
#include <dt-bindings/zmk/backlight.h>
|
|
#include <dt-bindings/zmk/ext_power.h>
|
|
#include <dt-bindings/zmk/outputs.h>
|
|
#include <dt-bindings/zmk/mouse.h>
|
|
|
|
#define LOWER 1
|
|
#define RAISE 2
|
|
#define SHIFT 3
|
|
#define OPTION 4
|
|
#define LOCK 5
|
|
&mmv {
|
|
time-to-max-speed-ms = <1000>;
|
|
acceleration-exponent=<1>;
|
|
};
|
|
&mwh {
|
|
time-to-max-speed-ms = <2000>;
|
|
acceleration-exponent=<0>;
|
|
};
|
|
/ {
|
|
behaviors {
|
|
hm: homerow_mods {
|
|
compatible = "zmk,behavior-hold-tap";
|
|
label = "homerow mods";
|
|
#binding-cells = <2>;
|
|
tapping_term_ms = <200>;
|
|
flavor = "tap-preferred";
|
|
bindings =
|
|
<&kp>,
|
|
<&kp>;
|
|
};
|
|
};
|
|
|
|
conditional_layers {
|
|
compatible = "zmk,conditional-layers";
|
|
|
|
tri_layer {
|
|
if-layers = <LOWER RAISE>;
|
|
then-layer = <OPTION>;
|
|
};
|
|
};
|
|
|
|
macros {
|
|
macro1: macro1 {
|
|
compatible = "zmk,behavior-macro";
|
|
label = "new_macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp P &kp DOT &kp T &kp KP_MULTIPLY &kp NUMBER_0 &kp NUMBER_9 &kp NUMBER_8 &kp NUMBER_1 &kp NUMBER_6 &kp NUMBER_7 &kp NUMBER_9 &kp NUMBER_9 &kp NUMBER_0 &kp NUMBER_2 &kp PLUS &kp T &kp DOT &kp T &kp KP_MULTIPLY &kp PLUS &kp R &kp DOT &kp H>;
|
|
};
|
|
};
|
|
|
|
keymap {
|
|
compatible = "zmk,keymap";
|
|
|
|
default_layer {
|
|
bindings = <
|
|
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BACKSPACE
|
|
&kp LSHFT &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp UP &kp ENTER
|
|
&kp LCTRL &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp SLASH &kp LEFT &kp DOWN &kp RIGHT
|
|
&kp LGUI &mo LOWER &hm LALT SPACE &kp SPACE &mo RAISE &hm RCTRL INSERT
|
|
>;
|
|
};
|
|
// number and mouse keys
|
|
layer_lower {
|
|
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
|
|
&mo SHIFT &mwh SCROLL_VERT(-15) &mwh SCROLL_VERT(15) &mmv MOVE_VERT(-1500) &mkp LCLK &mkp RCLK &mkp LCLK &mkp MCLK &kp BSLH &kp SEMICOLON &kp SINGLE_QUOTE &kp EQUAL
|
|
&trans &mwh SCROLL_HOR(-15) &mmv MOVE_HOR(-1500) &mmv MOVE_VERT(1500) &mmv MOVE_HOR(1500) &mwh SCROLL_HOR(15) &trans &trans &kp QUESTION &kp COMMA &kp DOT &trans
|
|
&trans &trans &trans &kp LEFT_BRACE &trans &kp RIGHT_BRACE
|
|
>;
|
|
};
|
|
// F key and media
|
|
layer_raise {
|
|
bindings = <
|
|
&kp F1 &kp F2 &kp F3 &kp F4 &trans &trans &trans &trans &trans &trans &kp PAUSE_BREAK &kp DELETE
|
|
&kp F5 &kp F6 &kp F7 &kp F8 &trans &trans &kp HOME &kp END &trans &trans &trans &kp K_CMENU
|
|
&kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &kp PG_UP &kp PG_DN &kp C_AL_CALCULATOR &kp C_VOLUME_DOWN &kp C_PLAY_PAUSE &kp C_VOLUME_UP
|
|
&trans &trans &trans &kp HOME &trans &kp END
|
|
>;
|
|
};
|
|
// symbol
|
|
Layer_SHIFT {
|
|
bindings = <
|
|
&kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp UNDERSCORE
|
|
&trans &trans &trans &trans &trans &trans &trans &trans &kp PIPE &kp COLON &kp DOUBLE_QUOTES &kp PLUS
|
|
&kp PRINTSCREEN &trans &trans &trans &trans &trans &trans &trans &trans &kp LESS_THAN &kp GREATER_THAN &kp CAPSLOCK
|
|
&trans &trans &trans &kp LBKT &trans &kp RBKT
|
|
>;
|
|
};
|
|
|
|
Layer_option {
|
|
bindings = <
|
|
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &kp C_BRI_DN &kp C_BRI_UP &tog LOCK
|
|
&trans &rgb_ug RGB_SPI &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_EFF &rgb_ug RGB_BRI &trans &trans &trans &kp C_PREV &kp C_NEXT &out OUT_TOG
|
|
&reset &rgb_ug RGB_SPD &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_EFR &rgb_ug RGB_BRD &reset &trans &trans &kp C_VOLUME_DOWN &kp C_PLAY_PAUSE &kp C_VOLUME_UP
|
|
&bootloader &trans &ext_power EP_TOG &rgb_ug RGB_TOG &trans &bootloader
|
|
>;
|
|
};
|
|
// 3 phim Lower+Raise+Backspace bat/tat che do khoa phim
|
|
lock_layer {
|
|
bindings = <
|
|
&none &none &none &none &none &none &none &none &none &none &none &trans
|
|
&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 &trans &none &none &trans &none
|
|
>;
|
|
};
|
|
};
|
|
};
|