diff options
author | Alexander Krikun <[email protected]> | 2024-10-07 03:59:11 +0400 |
---|---|---|
committer | Pete Johanson <[email protected]> | 2024-10-16 17:04:39 -0600 |
commit | 11537ebee6df3c07262ba4acd668df9becd1df2f (patch) | |
tree | 36da026d467913f9d5a2f0a2ce55aa323d5068f8 | |
parent | 218a2fff8dddd664ccb9288c176246f5c85d9969 (diff) | |
download | zmk-11537ebee6df3c07262ba4acd668df9becd1df2f.tar.gz zmk-11537ebee6df3c07262ba4acd668df9becd1df2f.zip |
feat(shields): add physical layouts and update keymap for Jiran
Add physical layouts and update the keymap for Ladniy's Jiran.
Layouts are added for all three possible transforms:
- Full (with additional pinky key and number row)
- Jian (with additional pinky key), re-uses Jian layout
- 6 column (Corne), re-uses Jian layout
Keymap update includes &studio_unlock.
-rw-r--r-- | app/boards/shields/jiran/jiran.dtsi | 18 | ||||
-rw-r--r-- | app/boards/shields/jiran/jiran.keymap | 4 | ||||
-rw-r--r-- | app/boards/shields/jiran/layouts/6column.dtsi | 20 | ||||
-rw-r--r-- | app/boards/shields/jiran/layouts/full.dtsi | 81 | ||||
-rw-r--r-- | app/boards/shields/jiran/layouts/jian.dtsi | 24 | ||||
-rw-r--r-- | app/boards/shields/jiran/layouts/position_map.dtsi | 7 |
6 files changed, 151 insertions, 3 deletions
diff --git a/app/boards/shields/jiran/jiran.dtsi b/app/boards/shields/jiran/jiran.dtsi index 517cbe5f7c..d760de17c7 100644 --- a/app/boards/shields/jiran/jiran.dtsi +++ b/app/boards/shields/jiran/jiran.dtsi @@ -6,10 +6,26 @@ #include <dt-bindings/zmk/matrix_transform.h> +#include "layouts/full.dtsi" +#include "layouts/jian.dtsi" +#include "layouts/6column.dtsi" + +&ladniy_jiran_full_layout { + transform = <&default_transform>; +}; + +&kgoh_jian_full_layout { + transform = <&jian_transform>; +}; + +&kgoh_jian_6col_layout { + transform = <&crkbd_transform>; +}; + / { chosen { zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &ladniy_jiran_full_layout; }; default_transform: keymap_transform_0 { diff --git a/app/boards/shields/jiran/jiran.keymap b/app/boards/shields/jiran/jiran.keymap index 6dcd733cdb..77b943b218 100644 --- a/app/boards/shields/jiran/jiran.keymap +++ b/app/boards/shields/jiran/jiran.keymap @@ -25,11 +25,11 @@ lower_layer { bindings = < &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp EQUAL - &kp F11 &kp TAB &bt BT_CLR &kp HOME &sys_reset &kp PG_UP &kp C_VOL_UP &kp C_VOL_UP &kp PG_UP &sys_reset &kp HOME &kp INS &kp DEL &kp F12 + &kp F11 &kp TAB &bt BT_CLR &kp HOME &sys_reset &kp PG_UP &kp C_VOL_UP &kp C_VOL_UP &kp PG_UP &studio_unlock &kp HOME &kp INS &kp DEL &kp F12 &kp LSHIFT &bt BT_NXT &kp LEFT &kp UP &kp RIGHT &kp C_MUTE &kp C_MUTE &kp LEFT &kp UP &kp RIGHT &kp PSCRN &mt RSHIFT SLCK &kp LCTRL &bt BT_PRV &kp END &kp DOWN &kp PG_DN &kp C_VOL_DN &kp C_VOL_DN &kp PG_DN &kp DOWN &kp END &kp PAUSE_BREAK &mt RCTRL KP_NUM &trans &kp SPACE &kp LALT &mt RALT RET &kp BSPC &trans >; }; }; -};
\ No newline at end of file +}; diff --git a/app/boards/shields/jiran/layouts/6column.dtsi b/app/boards/shields/jiran/layouts/6column.dtsi new file mode 100644 index 0000000000..56e5d32f4a --- /dev/null +++ b/app/boards/shields/jiran/layouts/6column.dtsi @@ -0,0 +1,20 @@ +#include <layouts/kgoh/jian/6column.dtsi> +#include <physical_layouts.dtsi> + +#include "position_map.dtsi" + +&layouts_kgoh_jian_position_map { + status = "disabled"; +}; + +&layouts_ladniy_jiran_position_map { + ladniy_jiran_6col_posmap: six { + physical-layout = <&kgoh_jian_6col_layout>; + positions + = < 42 43 44 45 46 47 48 49 50 51 52 53 > + , <54 0 1 2 3 4 5 6 7 8 9 10 11 55> + , < 12 13 14 15 16 17 18 19 20 21 22 23 > + , < 24 25 26 27 28 29 30 31 32 33 34 35 > + , < 36 37 38 39 40 41 >; + }; +}; diff --git a/app/boards/shields/jiran/layouts/full.dtsi b/app/boards/shields/jiran/layouts/full.dtsi new file mode 100644 index 0000000000..205c53fef5 --- /dev/null +++ b/app/boards/shields/jiran/layouts/full.dtsi @@ -0,0 +1,81 @@ +#include <physical_layouts.dtsi> + +#include "position_map.dtsi" + +/ { + ladniy_jiran_full_layout: ladniy_jiran_full_layout { + compatible = "zmk,physical-layout"; + display-name = "Full (with pinky/numbers)"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 100 75 0 0 0> + , <&key_physical_attrs 100 100 200 62 0 0 0> + , <&key_physical_attrs 100 100 300 25 0 0 0> + , <&key_physical_attrs 100 100 400 0 0 0 0> + , <&key_physical_attrs 100 100 500 25 0 0 0> + , <&key_physical_attrs 100 100 600 37 0 0 0> + , <&key_physical_attrs 100 100 1000 37 0 0 0> + , <&key_physical_attrs 100 100 1100 25 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 100 100 1300 25 0 0 0> + , <&key_physical_attrs 100 100 1400 62 0 0 0> + , <&key_physical_attrs 100 100 1500 75 0 0 0> + , <&key_physical_attrs 100 100 0 250 0 0 0> + , <&key_physical_attrs 100 100 100 175 0 0 0> + , <&key_physical_attrs 100 100 200 162 0 0 0> + , <&key_physical_attrs 100 100 300 125 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 500 125 0 0 0> + , <&key_physical_attrs 100 100 600 137 0 0 0> + , <&key_physical_attrs 100 100 1000 137 0 0 0> + , <&key_physical_attrs 100 100 1100 125 0 0 0> + , <&key_physical_attrs 100 100 1200 100 0 0 0> + , <&key_physical_attrs 100 100 1300 125 0 0 0> + , <&key_physical_attrs 100 100 1400 162 0 0 0> + , <&key_physical_attrs 100 100 1500 175 0 0 0> + , <&key_physical_attrs 100 100 1600 250 0 0 0> + , <&key_physical_attrs 100 100 100 275 0 0 0> + , <&key_physical_attrs 100 100 200 262 0 0 0> + , <&key_physical_attrs 100 100 300 225 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 500 225 0 0 0> + , <&key_physical_attrs 100 100 600 237 0 0 0> + , <&key_physical_attrs 100 100 1000 237 0 0 0> + , <&key_physical_attrs 100 100 1100 225 0 0 0> + , <&key_physical_attrs 100 100 1200 200 0 0 0> + , <&key_physical_attrs 100 100 1300 225 0 0 0> + , <&key_physical_attrs 100 100 1400 262 0 0 0> + , <&key_physical_attrs 100 100 1500 275 0 0 0> + , <&key_physical_attrs 100 100 100 375 0 0 0> + , <&key_physical_attrs 100 100 200 362 0 0 0> + , <&key_physical_attrs 100 100 300 325 0 0 0> + , <&key_physical_attrs 100 100 400 300 0 0 0> + , <&key_physical_attrs 100 100 500 325 0 0 0> + , <&key_physical_attrs 100 100 600 337 0 0 0> + , <&key_physical_attrs 100 100 1000 337 0 0 0> + , <&key_physical_attrs 100 100 1100 325 0 0 0> + , <&key_physical_attrs 100 100 1200 300 0 0 0> + , <&key_physical_attrs 100 100 1300 325 0 0 0> + , <&key_physical_attrs 100 100 1400 362 0 0 0> + , <&key_physical_attrs 100 100 1500 375 0 0 0> + , <&key_physical_attrs 100 100 500 425 0 0 0> + , <&key_physical_attrs 100 100 600 437 0 0 0> + , <&key_physical_attrs 100 100 700 450 0 0 0> + , <&key_physical_attrs 100 100 900 450 0 0 0> + , <&key_physical_attrs 100 100 1000 437 0 0 0> + , <&key_physical_attrs 100 100 1100 425 0 0 0> + ; + }; +}; + +&layouts_ladniy_jiran_position_map { + ladniy_jiran_full_posmap: full { + physical-layout = <&ladniy_jiran_full_layout>; + positions + = < 0 1 2 3 4 5 6 7 8 9 10 11 > + , <12 13 14 15 16 17 18 19 20 21 22 23 24 25> + , < 26 27 28 29 30 31 32 33 34 35 36 37 > + , < 38 39 40 41 42 43 44 45 46 47 48 49 > + , < 50 51 52 53 54 55 >; + }; +}; diff --git a/app/boards/shields/jiran/layouts/jian.dtsi b/app/boards/shields/jiran/layouts/jian.dtsi new file mode 100644 index 0000000000..0fefcfce27 --- /dev/null +++ b/app/boards/shields/jiran/layouts/jian.dtsi @@ -0,0 +1,24 @@ +#include <layouts/kgoh/jian/full.dtsi> +#include <physical_layouts.dtsi> + +#include "position_map.dtsi" + +&kgoh_jian_full_layout { + display-name = "Jian (with pinky)"; +}; + +&layouts_kgoh_jian_position_map { + status = "disabled"; +}; + +&layouts_ladniy_jiran_position_map { + ladniy_jiran_jian_posmap: jian { + physical-layout = <&kgoh_jian_full_layout>; + positions + = < 44 45 46 47 48 49 50 51 52 53 54 55 > + , < 0 1 2 3 4 5 6 7 8 9 10 11 12 13> + , < 14 15 16 17 18 19 20 21 22 23 24 25 > + , < 26 27 28 29 30 31 32 33 34 35 36 37 > + , < 38 39 40 41 42 43 >; + }; +}; diff --git a/app/boards/shields/jiran/layouts/position_map.dtsi b/app/boards/shields/jiran/layouts/position_map.dtsi new file mode 100644 index 0000000000..26f63d8e12 --- /dev/null +++ b/app/boards/shields/jiran/layouts/position_map.dtsi @@ -0,0 +1,7 @@ +/ { + layouts_ladniy_jiran_position_map: layouts_ladniy_jiran_position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + }; +}; |