krikun98
4 years ago
committed by
innovaker
13 changed files with 234 additions and 5 deletions
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
|
||||
if SHIELD_JIAN_LEFT |
||||
|
||||
config ZMK_KEYBOARD_NAME |
||||
default "Jian Left" |
||||
|
||||
endif |
||||
|
||||
|
||||
if SHIELD_JIAN_RIGHT |
||||
|
||||
config ZMK_KEYBOARD_NAME |
||||
default "Jian Right" |
||||
|
||||
endif |
||||
|
||||
if SHIELD_JIAN_LEFT || SHIELD_JIAN_RIGHT |
||||
|
||||
config ZMK_SPLIT |
||||
default y |
||||
|
||||
|
||||
endif |
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
# Copyright (c) 2020 The ZMK Contributors |
||||
# SPDX-License-Identifier: MIT |
||||
|
||||
config SHIELD_JIAN_LEFT |
||||
def_bool $(shields_list_contains,jian_left) |
||||
|
||||
config SHIELD_JIAN_RIGHT |
||||
def_bool $(shields_list_contains,jian_right) |
@ -0,0 +1,76 @@
@@ -0,0 +1,76 @@
|
||||
/* |
||||
* Copyright (c) 2020 The ZMK Contributors |
||||
* |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#include <dt-bindings/zmk/matrix-transform.h> |
||||
|
||||
/ { |
||||
chosen { |
||||
zmk,kscan = &kscan0; |
||||
zmk,matrix_transform = &default_transform; |
||||
}; |
||||
|
||||
default_transform: keymap_transform_0 { |
||||
compatible = "zmk,matrix-transform"; |
||||
columns = <12>; |
||||
rows = <4>; |
||||
// | SW0 | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | SW0 | |
||||
// | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | |
||||
// | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | |
||||
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | |
||||
map = < |
||||
RC(2,0) RC(0,0) RC(0,1) RC(1,2) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(1,9) RC(0,10) RC(0,11) RC(2,11) |
||||
RC(1,0) RC(1,1) RC(2,2) RC(1,3) RC(1,4) RC(0,5) RC(0,6) RC(1,7) RC(1,8) RC(2,9) RC(1,10) RC(1,11) |
||||
RC(2,1) RC(3,2) RC(3,3) RC(2,3) RC(2,4) RC(1,5) RC(1,6) RC(2,7) RC(2,8) RC(3,8) RC(3,9) RC(2,10) |
||||
RC(3,4) RC(2,5) RC(3,5) RC(3,6) RC(2,6) RC(3,7) |
||||
>; |
||||
}; |
||||
|
||||
crkbd_transform: keymap_transform_1 { |
||||
compatible = "zmk,matrix-transform"; |
||||
columns = <12>; |
||||
rows = <4>; |
||||
// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | |
||||
// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | |
||||
// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | |
||||
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | |
||||
map = < |
||||
RC(0,0) RC(0,1) RC(1,2) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(1,9) RC(0,10) RC(0,11) |
||||
RC(1,0) RC(1,1) RC(2,2) RC(1,3) RC(1,4) RC(0,5) RC(0,6) RC(1,7) RC(1,8) RC(2,9) RC(1,10) RC(1,11) |
||||
RC(2,1) RC(3,2) RC(3,3) RC(2,3) RC(2,4) RC(1,5) RC(1,6) RC(2,7) RC(2,8) RC(3,8) RC(3,9) RC(2,10) |
||||
RC(3,4) RC(2,5) RC(3,5) RC(3,6) RC(2,6) RC(3,7) |
||||
>; |
||||
}; |
||||
|
||||
five_column_transform: keymap_transform_2 { |
||||
compatible = "zmk,matrix-transform"; |
||||
columns = <10>; |
||||
rows = <4>; |
||||
// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | |
||||
// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | |
||||
// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | |
||||
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | |
||||
map = < |
||||
RC(0,1) RC(1,2) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(1,9) RC(0,10) |
||||
RC(1,1) RC(2,2) RC(1,3) RC(1,4) RC(0,5) RC(0,6) RC(1,7) RC(1,8) RC(2,9) RC(1,10) |
||||
RC(3,2) RC(3,3) RC(2,3) RC(2,4) RC(1,5) RC(1,6) RC(2,7) RC(2,8) RC(3,8) RC(3,9) |
||||
RC(3,4) RC(2,5) RC(3,5) RC(3,6) RC(2,6) RC(3,7) |
||||
>; |
||||
}; |
||||
|
||||
kscan0: kscan { |
||||
compatible = "zmk,kscan-gpio-matrix"; |
||||
label = "KSCAN"; |
||||
|
||||
diode-direction = "col2row"; |
||||
row-gpios |
||||
= <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> |
||||
, <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> |
||||
, <&pro_micro_d 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> |
||||
, <&pro_micro_d 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> |
||||
; |
||||
|
||||
}; |
||||
}; |
@ -0,0 +1,74 @@
@@ -0,0 +1,74 @@
|
||||
/* |
||||
* Copyright (c) 2020 The ZMK Contributors |
||||
* |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#include <behaviors.dtsi> |
||||
#include <dt-bindings/zmk/keys.h> |
||||
#include <dt-bindings/zmk/bt.h> |
||||
|
||||
#define DEF 0 |
||||
#define LWR 1 |
||||
#define RSE 2 |
||||
#define ADJ 3 |
||||
|
||||
/ { |
||||
keymap { |
||||
compatible = "zmk,keymap"; |
||||
|
||||
default_layer { |
||||
// ----------------------------------------------------------------------------------------- |
||||
// | GUI | ~ | Q | W | E | R | T | | Y | U | I | O | P | [ | GUI/] | |
||||
// | CTRL | A | S | D | F | G | | H | J | K | L | ; |CTRL/'| |
||||
// | LALT | Z | X | C | V | B | | N | M | , | . | / | RALT | |
||||
// | RSE | SPC | LWR | | LWR | BKSP | RSE | |
||||
bindings = < |
||||
&kp LWIN &kp GRAVE &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &mt RWIN RBKT |
||||
&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &mt RCTRL QUOT |
||||
&kp LALT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp BSLH |
||||
< RSE TAB &mt LSHFT SPC < LWR RET < LWR ESC &mt RSHFT BSPC < RSE DEL |
||||
>; |
||||
}; |
||||
lower_layer { |
||||
// ----------------------------------------------------------------------------------------- |
||||
// | | _ | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | |
||||
// | + | ! | @ | # | $ | % | | ^ | & | * | ( | ) | - | |
||||
// | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | |
||||
// | GUI | | SPC | | ENT | | ALT | |
||||
bindings = < |
||||
&trans &kp UNDER &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &mt RGUI F12 |
||||
&mt LCTRL PLUS &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CRRT &kp AMPS &kp STAR &kp LPAR &kp RPAR &mt RCTRL MINUS |
||||
&mt LALT EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans |
||||
< ADJ TAB &trans &trans &trans &trans < ADJ DEL |
||||
>; |
||||
}; |
||||
|
||||
raise_layer { |
||||
// ----------------------------------------------------------------------------------------- |
||||
// | | NMLK | / | 7 | 8 | 9 | - | | VOLU| HOME| PRSC| PGUP| SCLK| CLCK| | |
||||
// | CTRL | * | 4 | 5 | 6 | + | | MUT | LEFT| UP | RGHT| INS | APP | |
||||
// | | 0 | 1 | 2 | 3 | . | | VOLD| END | DOWN| PGDN| PAUS| | |
||||
// | | | ADJ | | ADJ | | | |
||||
bindings = < |
||||
&trans &kp KP_NUM &kp KP_SLASH &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp C_VOL_UP &kp HOME &kp PSCRN &kp PG_UP &kp SLCK &kp CAPS &trans |
||||
&mt LCTRL EQL &kp KP_MULTIPLY &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp C_MUTE &kp LEFT &kp UP &kp RIGHT &kp INS &mt RCTRL K_APP |
||||
&trans &kp KP_N0 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_DOT &kp C_VOL_DN &kp END &kp DOWN &kp PG_DN &kp PAUS &trans |
||||
&trans &trans < ADJ RET < ADJ ESC &trans &trans |
||||
>; |
||||
}; |
||||
adjust_layer { |
||||
// ----------------------------------------------------------------------------------------- |
||||
// | RST | BLDR | | | | | | | | | | | | BLDR | RST | |
||||
// | BTCLR| BT0 | BT1 | BT2 | BT3 | BT4 | | BT4 | BT3 | BT2 | BT1 | BT0 | BTCLR| |
||||
// | | | | | | | | | | | | | | |
||||
// | | | | | | | | |
||||
bindings = < |
||||
&reset &bootloader &none &none &none &none &none &none &none &none &none &none &bootloader &reset |
||||
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR |
||||
&none &none &none &none &none &none &none &none &none &none &none &none |
||||
&trans &none &trans &trans &none &trans |
||||
>; |
||||
}; |
||||
}; |
||||
}; |
@ -0,0 +1,2 @@
@@ -0,0 +1,2 @@
|
||||
CONFIG_ZMK_SPLIT=y |
||||
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y |
@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
|
||||
/* |
||||
* Copyright (c) 2020 The ZMK Contributors |
||||
* |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#include "jian.dtsi" |
||||
|
||||
&kscan0 { |
||||
col-gpios |
||||
= <&pro_micro_d 1 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_d 0 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_d 8 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_d 16 GPIO_ACTIVE_HIGH> |
||||
; |
||||
}; |
@ -0,0 +1,2 @@
@@ -0,0 +1,2 @@
|
||||
CONFIG_ZMK_SPLIT=y |
||||
CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y |
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
/* |
||||
* Copyright (c) 2020 The ZMK Contributors |
||||
* |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#include "jian.dtsi" |
||||
|
||||
&default_transform { |
||||
col-offset = <6>; |
||||
}; |
||||
|
||||
&kscan0 { |
||||
col-gpios |
||||
= <&pro_micro_d 16 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_d 8 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_d 0 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_d 1 GPIO_ACTIVE_HIGH> |
||||
; |
||||
}; |
Loading…
Reference in new issue