From 64351812232f6d78a5031d3dd725b01f6fac1e0b Mon Sep 17 00:00:00 2001 From: Xmj <146149506+Deer-Xmj@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:43:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=A0=E5=B0=84,=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E6=8C=89=E9=94=AE=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Xmj <146149506+Deer-Xmj@users.noreply.github.com> --- config/rolio.keymap | 423 ++++++-------------------------------------- 1 file changed, 52 insertions(+), 371 deletions(-) diff --git a/config/rolio.keymap b/config/rolio.keymap index 27879f8..cdd2ca0 100644 --- a/config/rolio.keymap +++ b/config/rolio.keymap @@ -6,430 +6,111 @@ #include //电池管理 #include -#define MACOS 0 -#define FKEYS 1 -#define NUMBERS 2 -#define WINDOWS 3 -#define W_FKEYS 4 -#define W_NUMBERS 5 -#define MATHS 6 -#define KB_CONFIG 7 - - +#define L0 0 +#define L1 1 +#define L2 2 +#define L3 3 / { - // conditional_layers { - // compatible = "zmk,conditional-layers"; - // win_fkeys { - // if-layers = ; - // then-layer = ; - // }; - // win_numbers { - // if-layers = ; - // then-layer = ; - // }; - // }; - behaviors { - // Toggle F-Keys Layer - td0: tap_dance_0 { - compatible = "zmk,behavior-tap-dance"; - label = "TAP_DANCE_0"; - #binding-cells = <0>; - tapping-term-ms = <300>; - bindings = <&mo FKEYS>, <&tog FKEYS>, <&tog KB_CONFIG>; - }; - // Toggle Numbers layer - td1: tap_dance_1 { - compatible = "zmk,behavior-tap-dance"; - label = "TAP_DANCE_1"; - #binding-cells = <0>; - tapping-term-ms = <300>; - bindings = <&mo NUMBERS>, <&tog MATHS>, <&tog NUMBERS>; - }; - // Toggle capsword left - td2: tap_dance_2 { - compatible = "zmk,behavior-tap-dance"; - label = "TAP_DANCE_2"; - #binding-cells = <0>; - tapping-term-ms = <200>; - bindings = <&kp LSHFT>, <&caps_word>; - }; - // Toggle capsword right - td3: tap_dance_3 { - compatible = "zmk,behavior-tap-dance"; - label = "TAP_DANCE_3"; - #binding-cells = <0>; - tapping-term-ms = <200>; - bindings = <&kp RSHFT>, <&caps_word>; - }; - // Toggle Windows layer - td4: tap_dance_4 { - compatible = "zmk,behavior-tap-dance"; - label = "TAP_DANCE_4"; - #binding-cells = <0>; - tapping-term-ms = <200>; - bindings = <&kp LGUI>, <&tog WINDOWS>; - }; - // Toggle Windows layer - td5: tap_dance_5 { - compatible = "zmk,behavior-tap-dance"; - label = "TAP_DANCE_5"; - #binding-cells = <0>; - tapping-term-ms = <200>; - bindings = <&kp RGUI>, <&tog WINDOWS>; - }; - // Backspace a whole word when holding backspace - backspace_word: backspace_word { - compatible = "zmk,behavior-hold-tap"; - label = "BACKSPACE_WORD"; - #binding-cells = <2>; - tapping_term_ms = <135>; - quick_tap_ms = <0>; - flavor = "tap-preferred"; - bindings = <&bsp_word>, <&kp>; - }; - w_backspace_word: w_backspace_word { - compatible = "zmk,behavior-hold-tap"; - label = "WINDOWS_BACKSPACE_WORD"; - #binding-cells = <2>; - tapping_term_ms = <135>; - quick_tap_ms = <0>; - flavor = "tap-preferred"; - bindings = <&w_bsp_word>, <&kp>; - }; - //Mac OS Zoom - mac_zoom: mac_zoom { - compatible = "zmk,behavior-sensor-rotate"; - label = "MAC_ZOOM"; - #sensor-binding-cells = <0>; - bindings = <&zoom_in>, <&zoom_out>; - }; - //Windows OS Zoom - win_zoom: win_zoom { - compatible = "zmk,behavior-sensor-rotate"; - label = "WINDOWS_ZOOM"; - #sensor-binding-cells = <0>; - bindings = <&w_zoom_in>, <&w_zoom_out>; - }; - }; - + behaviors { + } macros { - unindent: unindent { - label = "UNINDENT"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LSHIFT> - , <¯o_tap &kp TAB> - , <¯o_release &kp LSHIFT> - ; - }; - lstart: lstart { - label = "Line_Start"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LGUI> - , <¯o_tap &kp LEFT> - , <¯o_release &kp LGUI> - ; - }; - lend: lend { - label = "Line_End"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LGUI> - , <¯o_tap &kp RIGHT> - , <¯o_release &kp LGUI> - ; - }; - scrsh: scrsh { - label = "Screenshot"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LGUI> - , <¯o_press &kp LSHIFT> - , <¯o_tap &kp N3> - , <¯o_release &kp LSHFT> - , <¯o_release &kp LGUI> - ; - }; - scrcr: scrcr { - label = "Screen_Crop"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LGUI> - , <¯o_press &kp LSHIFT> - , <¯o_tap &kp N4> - , <¯o_release &kp LSHFT> - , <¯o_release &kp LGUI> - ; - }; - wscrcr: wscrcr { - label = "Windows_Screen_Crop"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LGUI> - , <¯o_press &kp LSHIFT> - , <¯o_tap &kp S> - , <¯o_release &kp LSHFT> - , <¯o_release &kp LGUI> - ; - }; - pal: pal { - label = "Pallette"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LGUI> - , <¯o_press &kp LCTRL> - , <¯o_tap &kp SPACE> - , <¯o_release &kp LCTRL> - , <¯o_release &kp LGUI> - ; - }; - wpal: wpal { - label = "W_Pallette"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LGUI> - , <¯o_tap &kp DOT> - , <¯o_release &kp LGUI> - ; - }; - // Word backspace macros - bsp_word: bsp_word { - label = "BSP_WORD"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LALT> - , <¯o_tap &kp BSPC> - , <¯o_release &kp LALT> - ; - }; - w_bsp_word: w_bsp_word { - label = "W_BSP_WORD"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LCTRL> - , <¯o_tap &kp BSPC> - , <¯o_release &kp LCTRL> - ; - }; - // Zoom macros - zoom_in: zoom_in { - label = "ZOOM_IN"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LGUI> - , <¯o_tap &kp EQUAL> - , <¯o_release &kp LGUI> - ; - }; - zoom_out: zoom_out { - label = "ZOOM_OUT"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LGUI> - , <¯o_tap &kp MINUS> - , <¯o_release &kp LGUI> - ; - }; - reset_zoom: reset_zoom { - label = "RESET_ZOOM"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LGUI> - , <¯o_tap &kp N0> - , <¯o_release &kp LGUI> - ; - }; - w_zoom_in: w_zoom_in { - label = "WINDOWS_ZOOM_IN"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LCTRL> - , <¯o_tap &kp EQUAL> - , <¯o_release &kp LCTRL> - ; - }; - w_zoom_out: w_zoom_out { - label = "WINDOWS_ZOOM_OUT"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LCTRL> - , <¯o_tap &kp MINUS> - , <¯o_release &kp LCTRL> - ; - }; - w_reset_zoom: w_reset_zoom { - label = "WINDOWS_RESET_ZOOM"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <¯o_press &kp LCTRL> - , <¯o_tap &kp N0> - , <¯o_release &kp LCTRL> - ; - }; - - }; - + td0:td0{ + label = "qiehuan_MACOS"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <¯o_tap &tog MACOS> + , <¯o_tap &tog FKEYS> + ; + }; + // td1:td1{ + // label = "qiehuan_FKEYS"; + // compatible = "zmk,behavior-macro"; + // #binding-cells = <0>; + // bindings + // = <¯o_tap &tog FKEYS> + // , <¯o_tap &tog MACOS> + // ; + // }; + } keymap { compatible = "zmk,keymap"; - default_layer {//0 - label = "Mac OS"; - sensor-bindings = <&inc_dec_kp UP DOWN &inc_dec_kp LEFT RIGHT>; + L0 {//0 + display-name = "Layer0"; + bindings = < //---------------------------------------------------------------+ +---------------------------------------------------------------// // | | | | | | | | | | | | // - &kp GRAVE &kp Q &bt BT_CLR &kp E &bt BT_CLR_ALL &bt BT_NXT &bt BT_CLR_ALL &kp A &kp S &kp D &kp P &backspace_word 0 BSPC + &kp GRAVE &kp Q &bt BT_CLR &kp E &bt BT_CLR_ALL &bt BT_NXT &bt BT_CLR_ALL &kp A &kp S &kp D &kp P &trans // | | | | | | | | | | | | // - &kp A &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT + &kp A &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT // | | | | | +-----------+ +-----------| | | | | | // &kp A &kp Z &kp X &kp C &kp V &kp B &kp F16 &kp F17 &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp G //--------------------| | | | | | | | | | |--------------------------------// - &kp LALT &kp LCTRL &kp A &tog KB_CONFIG &tog FKEYS &kp SPACE &kp G &kp G &kp RCTRL &kp DEL + &kp LALT &kp LCTRL &kp A &kp A &kp A &kp SPACE &kp G &kp G &kp RCTRL &kp DEL // +----------|-----------|----------|--------------------+ +-----------|-----------|--------|-----------|---------+ // >; }; - f_keys_layer {//1 - label = "F Keys"; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &mac_zoom>; - bindings = < -//-------------------------------------------------------------------------------+ +-------------------------------------------------------------------// -// | | | | | | | | | | | | // - &kp ESCAPE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 -// | | | | | | | | | | | | // - &unindent &bt BT_PRV &bt BT_NXT &kp C_PREV &kp C_PP &kp C_NEXT &lstart &kp UP &lend &scrsh &kp PG_UP &kp F12 -// | | | | | +-------------+ +--------+ | | | | | // - &trans &bl BL_TOG &bl BL_SET 2 &kp C_VOL_DN &kp C_MUTE &kp C_VOL_UP &kp C_MUTE &reset_zoom &kp LEFT &kp DOWN &kp RIGHT &scrcr &kp PG_DN &kp F13 -//-----------------------| | | | | | | | | | | |-----------------------// - &trans &trans &trans &tog MACOS &tog NUMBERS &trans &trans &trans &trans &trans -// +------------|--------------|------------|--------------|-------------+ +--------|----------|----------|-----------|---------+ // - >; - - }; + L1 {//1 + display-name = "Layer1"; - numbers_layer {//2 - label = "Numbers"; - sensor-bindings = <&inc_dec_kp UP DOWN &inc_dec_kp LEFT RIGHT>; - bindings = < -//-------------------------------------------------------------------------------+ +----------------------------------------------------------------------------// -// | | | | | | | | | | | | // - &kp UNDER &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans -// | | | | | | | | | | | | // - &trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPERSAND &kp STAR &kp LPAR &kp RPAR &kp FSLH -// | | | | | +--------+ +-------| | | | | // - &trans &pal &kp LEFT_BRACE &kp RIGHT_BRACE &kp PIPE &kp EQUAL &trans &trans &kp MINUS &kp PLUS &kp LBKT &kp RBKT &kp BACKSLASH &kp DOT -//---------------------| | | | | | | | | | |--------------------------// - &trans &trans &trans &tog FKEYS &tog WINDOWS &trans &trans &trans &trans &trans -// +----------------|-----------------|----------|-----------|--------+ +--------|----------|----------------|----------|----------+ // - >; - }; - windows_default_layer {//3 - label = "Windows"; - sensor-bindings = <&inc_dec_kp UP DOWN &inc_dec_kp LEFT RIGHT>; bindings = < //-----------------------------------------------------------------+ +------------------------------------------------------------------// // | | | | | | | | | | | | // - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &w_backspace_word 0 BSPC + &kp F1 &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 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans //---------------------| | | | | | | | | | | |----------------------// - &trans &trans &trans &tog NUMBERS &tog W_FKEYS &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans // +----------|----------|----------|----------|--------+ +----------|---------|----------|----------|----------+ // >; + }; - windows_fkeys_layer {//4 - label = "F Keys"; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &win_zoom>; + L2 {//2 + display-name = "Layer2"; + + bindings = < //-----------------------------------------------------------------+ +------------------------------------------------------------------// // | | | | | | | | | | | | // - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &kp F2 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans // | | | | | | | | | | | | // - &trans &trans &trans &trans &trans &trans &kp HOME &trans &kp END &kp PSCRN &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans // | | | | | +--------+ +---------| | | | | | // - &trans &trans &trans &trans &trans &trans &trans &w_reset_zoom &trans &trans &trans &wscrcr &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans //---------------------| | | | | | | | | | | |----------------------// - &trans &trans &trans &tog WINDOWS &tog W_NUMBERS &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans // +----------|----------|----------|----------|--------+ +----------|---------|----------|----------|----------+ // >; }; - windows_numbers_layer {//5 - label = "Numbers"; - sensor-bindings = <&inc_dec_kp UP DOWN &inc_dec_kp LEFT RIGHT>; + L3 {//3 + display-name = "Layer3"; + + bindings = < //-----------------------------------------------------------------+ +------------------------------------------------------------------// // | | | | | | | | | | | | // - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &kp F3 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans // | | | | | | | | | | | | // &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans // | | | | | +--------+ +---------| | | | | | // - &trans &wpal &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 &trans &trans &tog W_FKEYS &tog MATHS &trans &trans &trans &trans &trans -// +----------|----------|----------|----------|--------+ +---------|----------|----------|----------|----------+ // - >; - }; - - maths_layer {//6 - label = "Maths"; - sensor-bindings = <&inc_dec_kp UP DOWN &inc_dec_kp LEFT RIGHT>; - bindings = < -//-----------------------------------------------------------------+ +----------------------------------------------------------------------------// -// | | | | | | | | | | | | // - &kp UNDER &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans -// | | | | | | | | | | | | // - &trans &kp EXCL &trans &trans &trans &kp PRCNT &kp CARET &kp AMPERSAND &kp STAR &kp LPAR &kp RPAR &kp FSLH -// | | | | | +--------+ +---------| | | | | | // - &trans &wpal &trans &trans &trans &kp EQUAL &trans &trans &kp MINUS &kp PLUS &trans &trans &trans &kp DOT -//---------------------| | | | | | | | | | | |--------------------------// - &trans &trans &trans &tog W_NUMBERS &tog KB_CONFIG &trans &tog MATHS &trans &trans &trans -// +----------|----------|----------|----------|--------+ +---------|-----------|---------------|----------|----------+ // - >; - }; - - settings_layer {//7 - label = "Settings"; - sensor-bindings = <&inc_dec_kp UP DOWN &inc_dec_kp LEFT RIGHT>; - bindings = < -//---------------------------------------------------------------------------------------+ +------------------------------------------------------------------// -// | | | | | | | | | | | | // - &out OUT_TOG &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_CLR &trans &trans &trans &trans &trans &trans -// | | | | | | | | | | | | // - &trans &bt BT_PRV &bt BT_NXT &kp T &kp T &kp T &trans &trans &trans &trans &trans &trans -// | | | | | +--------+ +---------| | | | | | // - &trans &trans &bt BT_CLR &bl BL_DEC &bl BL_TOG &bl BL_INC &trans &trans &trans &trans &trans &trans &trans &trans -//-------------------------| | | | | | | | | | | |----------------------// - &trans &trans &trans &tog MATHS &tog MACOS &trans &trans &trans &trans &trans -// +--------------|--------------|--------------|----------------|--------+ +----------|---------|----------|----------|----------+ // + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +// +----------|----------|----------|----------|--------+ +----------|---------|----------|----------|----------+ // >; }; - }; };